. */ /** * @brief postindexing document list * @file * @author Yves Christian KPAKPO * @date $date$ * @version $Revision$ * @ingroup postindexing */ require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_request.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("apps".DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_extended_list_show.php"); //require_once("apps".DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR.'class_contacts.php'); include_once('apps'.DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR.'definition_mail_categories.php'); $core_tools = new core_tools(); $core_tools->load_lang(); $func = new functions(); $postindexing = new postindexing(); $status_obj = new manage_status(); $db = new dbquery(); $list = new extended_list_show(); $request = new request; //$contact = new contacts(); $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 postindexing session values $postindexing->reinit_postindexing_session(); //Reload the indexation window if already reserved if ($postindexing->already_reserved($table)) { ?> '".$_SESSION['user']['UserId']."' and video_time < ".$timestamp.") ) )"; $where_tab[] = stripslashes($_SESSION['current_basket']['clause']); $where = implode(' and ', $where_tab); //Clause order by $order = ''; if(isset($_REQUEST['order']) && !empty($_REQUEST['order'])) { $order = trim($_REQUEST['order']); } $field = ''; if(isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) { $field = trim($_REQUEST['order_field']); } else { $field = 'creation_date'; } $orderstr = $list->extended_define_order($order, $field); //Les champs a recuperer array_push($select[$table],"res_id", "status", "category_id","category_id as category_img", "priority", "admission_date", "subject", "process_limit_date", "destination", "dest_user", "type_label"); $tab=$request->select($select,$where,$orderstr,$_SESSION['config']['databasetype'], $_SESSION['config']['databasesearchlimit'], false, '', '', '', false); //$request->show(); for ($i=0;$iformat_date_db($tab[$i][$j]["value"], false); $tab[$i][$j]["label"]=_ADMISSION_DATE; $tab[$i][$j]["size"]="10"; $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"]='admission_date'; } if($tab[$i][$j][$value]=="process_limit_date") { $tab[$i][$j]["value"]=$core_tools->format_date_db($tab[$i][$j]["value"], false); $compareDate = ""; if($tab[$i][$j]["value"] <> "" && ($statusCmp == "NEW" || $statusCmp == "COU" || $statusCmp == "VAL" || $statusCmp == "RET")) { $compareDate = $core_tools->compare_date($tab[$i][$j]["value"], date("d-m-Y")); if($compareDate == "date2") { $tab[$i][$j]["value"] = "".$tab[$i][$j]["value"]."
(".$core_tools->nbDaysBetween2Dates($tab[$i][$j]["value"], date("d-m-Y"))." "._DAYS.")
"; } elseif($compareDate == "date1") { $tab[$i][$j]["value"] = $tab[$i][$j]["value"]."
(".$core_tools->nbDaysBetween2Dates(date("d-m-Y"), $tab[$i][$j]["value"])." "._DAYS.")"; } elseif($compareDate == "equal") { $tab[$i][$j]["value"] = "".$tab[$i][$j]["value"]."
("._LAST_DAY.")
"; } } $tab[$i][$j]["label"]=_PROCESS_LIMIT_DATE; $tab[$i][$j]["size"]="10"; $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"]='process_limit_date'; } if($tab[$i][$j][$value]=="category_id") { $_SESSION['mlb_search_current_category_id'] = $tab[$i][$j]["value"]; $tab[$i][$j]["value"] = $_SESSION['mail_categories'][$tab[$i][$j]["value"]]; $tab[$i][$j]["label"]=_CATEGORY; $tab[$i][$j]["size"]="10"; $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"]='category_id'; } if($tab[$i][$j][$value]=="priority") { $tab[$i][$j]["value"] = $_SESSION['mail_priorities'][$tab[$i][$j]["value"]]; $tab[$i][$j]["label"]=_PRIORITY; $tab[$i][$j]["size"]="10"; $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"]='priority'; } if($tab[$i][$j][$value]=="subject") { $tab[$i][$j]["value"] = $request->cut_string($request->show_string($tab[$i][$j]["value"]), 250); $tab[$i][$j]["label"]=_SUBJECT; $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"]='subject'; } if($tab[$i][$j][$value]=="type_label") { $tab[$i][$j]["value"] = $request->show_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'; } if($tab[$i][$j][$value]=="category_img") { $tab[$i][$j]["label"]=_CATEGORY; $tab[$i][$j]["size"]="10"; $tab[$i][$j]["label_align"]="left"; $tab[$i][$j]["align"]="left"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=false; $tab[$i][$j]["value_export"] = $tab[$i][$j]['value']; $my_imgcat = get_img_cat($tab[$i][$j]['value'],$extension_icon); $tab[$i][$j]['value'] = ""; $tab[$i][$j]["value"] = $tab[$i][$j]['value']; $tab[$i][$j]["order"]="category_id"; } } } } if (count($tab) >0 ) { //Clé de la liste $list_key = 'res_id'; //Initialiser le tableau de paramètres $paramsTab = array(); //Keep the number of available doc to postindex $_SESSION['postindexing']['nb_docs'] = count($tab); //Aspect de la liste $paramsTab['page_title'] = count($tab).' '._FOUND_DOC; $paramsTab['bool_big_page_title'] = false; $paramsTab['bool_sort'] = true; //Affichage des icones par défaut $paramsTab['bool_view_document'] = true; $paramsTab['bool_view_document_popup'] = true; $paramsTab['bool_details'] = true; //Creation des liens $paramsTab['page_name'] = 'view_baskets'; $paramsTab['page_parameters'] = 'module=basket&baskets='.$_SESSION['current_basket']['id']; //Creation des liens $paramsTab['page_name'] = 'view_baskets'; $paramsTab['page_parameters'] = 'module=basket&baskets='.$_SESSION['current_basket']['id']; //Formulaire sans bouton radio ni checkbox $paramsTab['bool_standalone_form'] = true; //Liste des actions via une fonction magique!!!!! $paramsTab = $list->extended_basket_to_actions_list($_SESSION['current_basket'], $paramsTab); //Champ hidden, utilisé pour la gestion des actions $paramsTab['hidden_fields_form'] = array(); array_push($paramsTab['hidden_fields_form'], array( "id"=>"coll_id", "name"=>"coll_id", "value"=> $_SESSION['current_basket']['coll_id'])); array_push($paramsTab['hidden_fields_form'], array( "id"=>"module", "name"=>"module", "value"=>"postindexing")); array_push($paramsTab['hidden_fields_form'], array( "id"=>"table", "name"=>"table", "value"=>$_SESSION['current_basket']['table'])); //$func->show_array($_SESSION['current_basket']); //Afficher la liste $params = $list->extended_list($tab, $list_key, $paramsTab); //$func->show_array($params); } else { ?>