*/ include("session.php"); require_once('class_functions.php'); require_once("class_db.php"); require_once("class_letterbox.php"); require_once("class_folders.php"); $func = new functions(); $folders = new folders(); $db = new dbquery(); $conn = new dbquery(); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } //A partir de la page de details if(isset($_GET['id']) && !empty($_GET['id']) ) { $_SESSION['chosen_doc'] = array(); $_SESSION['chosen_doc'][] = $_GET['id']; } //Récupération de l'identifiant du plan de classement if(isset($_GET['fileplan_id'])) { $fileplanId = addslashes($func->wash($_GET['fileplan_id'], "no", _FILEPLAN)); } else { $fileplanId = ""; } //Récupération de l'identifiant du classeur if(!isset($_REQUEST['folder_id']) || empty($_REQUEST['folder_id'])) { $folderId = ""; $action_link = "folders_put.php"; } else { $folderId = addslashes($func->wash($_REQUEST['folder_id'], "no", _THE_FOLDER)); if($folderId == -1) { $_SESSION['error'] = _CANT_CLASSIFIED_ON_ROOT; } $action_link = "folders_put.php?folder_id=".$folderId; } //ANNULER if(isset($_REQUEST['cancel'])) { // if ($_SESSION['origin'] == "details") // { // $link = "index.php?page=details&id=".$_SESSION['chosen_doc'][0]; // } // elseif($_SESSION['origin'] == "basket") // { // $link = "index.php?page=".$_SESSION['current_basket']['page']; // } $_SESSION['chosen_doc'] = array(); ?> "del") || (!empty($_REQUEST['folder_id']) && $_GET['action']=="del" && isset($_REQUEST['submit']))) { for ($i=0; $iputFolder($_REQUEST['folder_id'], $_SESSION['chosen_doc'][$i]); } /* if (!isset($_SESSION['error']) || empty($_SESSION['error'])) { $_SESSION['info'] = _MAIL_CLASSIFIED; if ($_SESSION['origin'] == "details") { $link = "index.php?page=details&id=".$_SESSION['chosen_doc'][0]; } elseif($_SESSION['origin'] == "basket") { $link = "index.php?page=".$_SESSION['current_basket']['page']; } //$_SESSION['chosen_doc'] = array(); ?> <?php echo _PUT_FOLDER; ?>
connect(); $db->query("SELECT * FROM ".$_SESSION['tablename']['folderscope']." fds, ".$_SESSION['tablename']['folders']." fol, ".$_SESSION['tablename']['fileplans']." fil WHERE fds.folder_id = fol.folder_id" ." AND fil.fileplan_id = fol.fileplan_id" ." AND fol.shared_folder = 'Y'" ." AND fds.write_right = 'Y'" ." AND ((scope = 'user' AND value = '".$_SESSION['user']['UserId']."')" ." OR (scope = 'all')" ." OR (scope = 'entity' AND value in (".$value."))" ." OR (scope = 'entities' AND value in (".$value.")))" ." OR (fil.fileplan_owner = '".$_SESSION['user']['UserId']."'" ." AND fil.shared_fileplan = 'N')" ." GROUP BY fol.folder_id, fileplan_description" ." ORDER BY fol.parent_id"); $myFileplans = array(); while($line = $db->fetch_object()) { $myFileplans[$line->FILEPLAN_ID] = $line->FILEPLAN_DESCRIPTION; if($line->SHARED_FILEPLAN == "N") { $fileplanId_perso = $line->FILEPLAN_ID; } } if(!empty($fileplanId)) { $conn->query("select FILEPLAN_ID, FILEPLAN_DESCRIPTION from ".$_SESSION['tablename']['fileplans']." where FILEPLAN_ID = ".$fileplanId." and FILEPLAN_OWNER = '".$_SESSION['user']['UserId']."' AND SHARED_FILEPLAN= 'N'"); if($conn->nb_result() != 0) { $idframe = "perso"; } else { $idframe = ""; } } echo _FILEPLANS; ?> : 
drawRoot($fileplanId, $folderId, "folders_put.php?fileplan_id=".$fileplanId."&", $idframe); $folders->buildTreeView($_GET['action'], $fileplanId, $idframe, "folders_put.php?fileplan_id=".$fileplanId, $folderId, $_GET['do'], $folder_parents); ?>
<?php echo _PUT_FOLDER; ?>
connect(); $db->query("SELECT * FROM ".$_SESSION['tablename']['folderscope']." fds, ".$_SESSION['tablename']['folders']." fol, ".$_SESSION['tablename']['fileplans']." fil WHERE fds.folder_id = fol.folder_id" ." AND fil.fileplan_id = fol.fileplan_id" ." AND fol.shared_folder = 'Y'" ." AND fds.write_right = 'Y'" ." AND ((scope = 'user' AND value = '".$_SESSION['user']['UserId']."')" ." OR (scope = 'all')" ." OR (scope = 'entity' AND value in (".$value."))" ." OR (scope = 'entities' AND value in (".$value.")))" ." OR (fil.fileplan_owner = '".$_SESSION['user']['UserId']."'" ." AND fil.shared_fileplan = 'N')" ." GROUP BY fol.folder_id, fileplan_description" ." ORDER BY fol.parent_id"); $myFileplans = array(); while($line = $db->fetch_object()) { $myFileplans[$line->FILEPLAN_ID] = $line->FILEPLAN_DESCRIPTION; if($line->SHARED_FILEPLAN == "N") { $fileplanId_perso = $line->FILEPLAN_ID; } } $conn->connect(); if(!empty($fileplanId)) { $conn->query("select FILEPLAN_ID, FILEPLAN_DESCRIPTION from ".$_SESSION['tablename']['fileplans']." where FILEPLAN_ID = ".$fileplanId." and FILEPLAN_OWNER = '".$_SESSION['user']['UserId']."' AND SHARED_FILEPLAN= 'N'"); while($line = $conn->fetch_object()) { $_SESSION['info'] = ""; } if($conn->nb_result() != 0) { $idframe = "perso"; } else { $idframe = ""; } } echo _FILEPLANS; ?> : 
fileplanOwner($fileplanId, $_SESSION['user']['UserId']) !== false) //{ $conn->connect(); if(!empty($fileplanId)) { $conn->query("select FILEPLAN_ID, FILEPLAN_DESCRIPTION from ".$_SESSION['tablename']['fileplans']." where FILEPLAN_ID = ".$fileplanId." and FILEPLAN_OWNER = '".$_SESSION['user']['UserId']."' AND SHARED_FILEPLAN= 'N'"); $_SESSION['info'] = ""; if($conn->nb_result() != 0) { $idframe = "perso"; } else { $idframe = ""; } } ?>
".$_SESSION['info'].""; } */ $folders->drawRoot($fileplanId, $folderId, "folders_put.php?fileplan_id=".$fileplanId."&", $idframe); $folders->buildTreeView($_GET['action'], $fileplanId, $idframe, "folders_put.php?fileplan_id=".$fileplanId, $folderId, $_GET['do'], $folder_parents); ?>
-1 ) { $courr = new LetterBox(); // configure the sql argument order by $orderby = $courr->define_order(); if(empty($orderby)) { $orderby = " ORDER BY priority "; } if(isset($_GET['start'])) { $start = $_GET['start']; } else { $start = 0; } $link = "folders_put.php?fileplan_id=".$fileplanId."&action=".$_GET['action']."&folder_id=".$_REQUEST['folder_id']; //$link = "view_folders.php?id=".$fileplanId."&action=".$_GET['action']."&folder_id=".$folderId; $db->connect(); $fields .= " r.SOCIETE, r.DESCRIPTION, r.RES_ID, r.TYPE_ID, r.IDENTIFIER, date(r.CUSTOM_D1) as DATE1, r.AUTHOR, r.CUSTOM_T4, date(r.CUSTOM_D2) as DATE2, r.CUSTOM_T3, r.DEST_USER, r.DESTINATION, r.STATUS, r.PRIORITY, date(r.CREATION_DATE) as DATE2, r.IS_INGOING"; $table = "res_x"; $join = "inner join ".$_SESSION['tablename']['folderres']." f on r.RES_ID = f.RES_ID "; $where_clause = "f.FOLDER_ID = '".$folderId."'"; $db->query("select r.RES_ID from ".$table." r ".$join." inner join ".$_SESSION['tablename']['doctypes']." t on r.TYPE_ID = t.TYPE_ID where ".$where_clause); $nb_total = $db->nb_result(); $db->query("select ".$fields." from ".$table." r ".$join." inner join ".$_SESSION['tablename']['doctypes']." t on r.TYPE_ID = t.TYPE_ID where ".$where_clause.' '.$orderby." limit ".$start.",".$_SESSION['config']['nblinetoshow']); //$db->show(); if($db->nb_result() > 0) { $listarr = array(); $db2 = new dbquery(); $db2->connect(); while($line = $db->fetch_object()) { $db2->query("select SERVICE from ".$_SESSION['tablename']['services']." where ID = '".$line->DESTINATION."'"); $res = $db2->fetch_object(); $service = stripslashes($res->SERVICE); $db2->query("select LASTNAME, FIRSTNAME from ".$_SESSION['tablename']['users']." where USER_ID = '".$line->DEST_USER."'"); $res = $db2->fetch_object(); $dest = stripslashes($res->FIRSTNAME.' '.$res->LASTNAME); array_push($listarr, array( "SOCIETE" => stripslashes($line->SOCIETE), "OBJET" => stripslashes($line->DESCRIPTION), "ID" => $line->RES_ID, "TYPE" => $line->TYPE_ID, "IDENTIFIER" => $line->IDENTIFIER, "PRIORITY" => $line->PRIORITY, "ARRIVEE" => $db->inverse_date($line->DATE1), "STATUS" => $line->STATUS, "SERVICE_ID" => $line->DESTINATION, "SERVICE" => $service, "DEST" => $dest, "CIV" => $line->CUSTOM_T3, "NOM" => stripslashes($line->AUTHOR), "PRENOM" => stripslashes($line->CUSTOM_T4), "LIMITE" => $db->inverse_date($line->DATE2), "CREATION_DATE" => $line->DATE2, "IS_INGOING" => $line->IS_INGOING ) ); } } //$listarr, $nb_total, $title,$name $page_list1 = ""; $page_list2 = ""; if(isset($_REQUEST['order'])) { $order = strip_tags($_REQUEST['order']); } else { $order = 0; } // define the defaults values $nb_show = $_SESSION['config']['nblinetoshow']; $nb_pages = ceil($nb_total/$nb_show); // if they are more 1 page we do pagination with 2 forms if($nb_pages > 1) { $next_start = 0; /*$page_list1 = '

'; */ $page_list1 = "

"; $lastpage = 0; for($i = 0;$i <> $nb_pages; $i++) { $page_name = $i + 1; $the_line = $i + 1; if($start == $next_start) { $page_list1 .= ""; $page_list2 .= ""; } else { $page_list1 .= ""; $page_list2 .= ""; } $next_start = $next_start + $nb_show; $lastpage = $next_start; } $lastpage = $lastpage - $nb_show; $previous = ""; $next = ""; if($start > 0) { $start_prev = $start - $nb_show; $previous = ""._PREVIOUS.""; //$previous = "< "._PREVIOUS." "; } if($start <> $lastpage) { $start_next = $start + $nb_show; $next = ""._NEXT.""; //$next = " "._NEXT." >"; } $page_list1 = $page_list1."".$previous." ".$next."

"; $page_list2 = $page_list2."".$previous." ".$next."

"; } ?>


<?php echo _DESC_SORT; ?><?php echo _ASC_SORT; ?> 0) { echo ''; } ?> > 0) { echo ''; } echo "


<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>


<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>
<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>

<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>


<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>


<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>



<?php echo _DESC_SORT; ?> <?php echo _ASC_SORT; ?>
   
<?php echo _TO_PROCESS;?> <?php echo _IN_PROGRESS;?> <?php echo _CLOSED;?> <?php echo _ONGOING;?> <?php echo _WAITINGDOC_PROCESS_IN_PROGRESS;?> dateformat($listarr[$theline]['CREATION_DATE']); } else { if("0000-00-00" == $listarr[$theline]['ARRIVEE'] || "00-00-0000" == $listarr[$theline]['ARRIVEE']) { echo $func->dateformat($listarr[$theline]['CREATION_DATE']); } else { echo $func->dateformat($listarr[$theline]['ARRIVEE']); } } ?> show($listarr[$theline]['ID']); ?> show($listarr[$theline]['NOM']); ?> show($listarr[$theline]['OBJET']); ?> show($listarr[$theline]['DEST']); ?> ?'));"><?php echo _OUTPUT_FOLDER;?>
"; // } ?>