. */ /** * @brief Displays the folders list in the following baskets * * @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"); $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; $core_tools->load_lang(); //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(); //$func->show_array($_SESSION['postindexing']); //Reload the indexation window if folder already selected if (isset($_SESSION['postindexing']['folder_system_id']) && !empty($_SESSION['postindexing']['folder_system_id'])) { ?> unlock_user_folder(); //Build the query $select[$table]= array(); //Toutes les "Where Clause" dans un tableau $where_tab = array(); $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); array_push($select[$table],"folders_system_id", "foldertype_label", "folder_id", "folder_name", "creation_date", "count_document", "status", "video_status"); $tab=$request->select($select,$where,$orderstr,$_SESSION['config']['databasetype'], $_SESSION['config']['databasesearchlimit'], false, '', '', '', false); //$request->show(); for ($i=0;$iformat_date($tab[$i][$j]["value"]); $tab[$i][$j]["size"]="15"; $tab[$i][$j]["label_align"]="right"; $tab[$i][$j]["align"]="right"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=true; $tab[$i][$j]["value_export"] = $tab[$i][$j]['value']; $tab[$i][$j]["order"]="creation_date"; } if($tab[$i][$j][$value]=="count_document") { $tab[$i][$j]["label"]=_ARCHIVED_DOC; $tab[$i][$j]["size"]="15"; $tab[$i][$j]["label_align"]="right"; $tab[$i][$j]["align"]="right"; $tab[$i][$j]["valign"]="bottom"; $tab[$i][$j]["show"]=true; $tab[$i][$j]["value_export"] = $tab[$i][$j]['value']; $tab[$i][$j]["order"]="count_document"; } } } } if (count($tab) >0 ) { //Clé de la liste $list_key = 'folders_system_id'; //Initialiser le tableau de paramètres $paramsTab = array(); //Aspect de la liste $paramsTab['page_title'] = _RESULTS." : ".count($tab).' '._FOUND_FOLDER; $paramsTab['bool_big_page_title'] = false; $paramsTab['bool_sort'] = true; //Ajout du bouton radio $paramsTab['bool_radio_form'] = true; //Creation des liens $paramsTab['page_name'] = 'view_baskets'; $paramsTab['page_parameters'] = 'module=basket&baskets='.$_SESSION['current_basket']['id']; //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"=>"basket")); array_push($paramsTab['hidden_fields_form'], array( "id"=>"table", "name"=>"table", "value"=>$_SESSION['current_basket']['table'])); //Actions array $actions = array(); $action_icon = array( "href"=>$_SESSION['config']['businessappurl']."index.php?page=show_folder&module=folder", "icon"=>'info-circle', "tooltip"=>_DETAILS ); array_push($actions, $action_icon); //Formulaire $paramsTab['name_form'] = 'list_folders_form'; $paramsTab['method_form'] = 'post'; $paramsTab['disabled_form_rule'] = '@@video_status@@ == \'LCK\''; $paramsTab['bool_buttons_form'] = true; //A true pour afficher les boutons $paramsTab['buttons_form']= array(); array_push($paramsTab['buttons_form'], array( "type"=>"button", "id"=>"cancel", "name"=>"cancel", "label"=> _CANCEL, "action"=>'window.top.location.href=\''.$_SESSION['config']['businessappurl'].'index.php?reinit=true\';')); //Afficher la liste $list->extended_list($tab, $list_key, $paramsTab, $actions); } else { ?>