. */ /** * @brief Frame to manage phone numbers * @file * @author Yves Christian KPAKPO * @date $date$ * @version $Revision$ * @ingroup indexing_searching */ require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_request.php"); require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_security.php"); require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_manage_status.php"); require_once("modules".DIRECTORY_SEPARATOR."postindexing".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_modules_tools.php"); require_once("modules".DIRECTORY_SEPARATOR."postindexing".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_extended_list_show.php"); $core_tools = new core_tools(); $core_tools->load_lang(); $security = new security(); $func = new functions(); $postindexing = new postindexing(); $status_obj = new manage_status(); $db = new dbquery(); $core_tools->load_lang(); $core_tools->load_html(); $core_tools->load_header(); //Get the table if(!empty($_SESSION['current_basket']['view'])) { $table = $_SESSION['current_basket']['view']; } else { $table = $_SESSION['current_basket']['table']; } //Clear pointer unset($_SESSION['postindexing']['resid_pointeur']); //Release expired document $postindexing->release_expired_docs($_SESSION['current_basket']['table']); $select[$table]= array(); $timestamp = time(); $where = " ( (video_batch is null) or (video_batch is not null and video_user = '".$_SESSION['user']['UserId']."') or ( (video_batch is not null and video_user <> '".$_SESSION['user']['UserId']."' and video_time < ".$timestamp.") ) ) and ".$_SESSION['current_basket']['clause']; array_push($select[$table], "res_id", "status", "type_label" ); $indexes = $postindexing->get_postindexing_indexes('minimal'); for($i=0; $iselect($select,$where,$orderstr,$_SESSION['config']['databasetype'], $_SESSION['config']['databasesearchlimit'], false); //$request->show(); //build the tab with right forma for list_doc function if (count($tab) > 0) { $indexes = $postindexing->get_postindexing_indexes(); //$db->show_array($indexes); for ($i=0;$ishow_string($tab[$i][$j]["value"]); $tab[$i][$j]["label"]=_TYPE; $tab[$i][$j]["size"]="12"; $tab[$i][$j]["label_align"]="right"; $tab[$i][$j]["align"]="left"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=true; $tab[$i][$j]["order"]='type_label'; } if($tab[$i][$j][$value]=="status") { $res_status = $status_obj->get_status_data($tab[$i][$j]['value'],$extension_icon); $statusCmp = $tab[$i][$j]['value']; $tab[$i][$j]['value'] = "".$res_status["; $tab[$i][$j]["label"]=_STATUS; $tab[$i][$j]["size"]="4"; $tab[$i][$j]["label_align"]="left"; $tab[$i][$j]["align"]="left"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=true; $tab[$i][$j]["order"]='status'; } foreach(array_keys($indexes) as $key) { if(preg_match('/^custom_/', $indexes[$key]['column'])) // In the view all custom from res table begin with doc_ { $field = 'doc_'.$indexes[$key]['column']; } else { $field = $indexes[$key]['column']; } // if($tab[$i][$j][$value]== $field) { $tab[$i][$j]["value"] = $request->show_string($tab[$i][$j]["value"]); $tab[$i][$j]["label"]= $indexes[$key]['label']; $tab[$i][$j]["size"]="12"; $tab[$i][$j]["label_align"]="right"; $tab[$i][$j]["align"]="left"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=true; $tab[$i][$j]["order"]=$field; break; } } } } } //Keep the number of available doc to postindex $_SESSION['postindexing']['nb_docs'] = count($tab); //Parameters array $parameters = array(); $parameters['page_name'] = "postindexing_documents_list"; $parameters['module'] = "postindexing"; $parameters['table_css'] = 'listing'; $parameters['nb_total'] = $i; $parameters['bool_view_document'] = true; $parameters['bool_sort'] = true; $parameters['name_form'] = "list_doc_form"; $parameters['action_form'] = $_SESSION['config']['businessappurl']."index.php?display=true&module=postindexing&page=reserve_docs"; $parameters['method_form'] = "POST"; $parameters['bool_button_form'] = true; $parameters['buttons_form'] = array(); $submit_button = array('type'=>'submit', 'name'=>'submit','label'=>_RESERVE_PACKAGE); $cancel_button = array('type'=>'button', 'name'=>'cancem','label'=>_CANCEL, 'action'=>'window.top.location.href=\''.$_SESSION['config']['businessappurl'].'index.php?reinit=true\';'); array_push($parameters['buttons_form'], $submit_button); array_push($parameters['buttons_form'], $cancel_button); $new_list = new extended_list_show(); echo ""._PROCESS_LIST." : ".count($tab)." "._FOUND_DOCS."
"; $new_list->extended_list($tab, 'res_id', $parameters); } else { ?>