*/ include("session.php"); require_once('class_functions.php'); require_once("class_db.php"); require_once("class_letterbox.php"); require_once("class_folders.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } $func = new functions(); $folders = new folders(); $db = new dbquery(); //The Fileplan if(isset($_REQUEST['id']) && !empty($_REQUEST['id'])) { $fileplanId = addslashes($func->wash($_GET['id'], "no", _FILEPLAN)); } else { $fileplanId = ""; } //The frame if(isset($_REQUEST['idframe']) && !empty($_REQUEST['idframe'])) { $frame = addslashes($func->wash($_REQUEST['idframe'], "no", _FILEPLAN)); } else { $frame= ""; } //The Action if(isset($_GET['action']) && !empty($_GET['action'])) { $action = addslashes($func->wash($_GET['action'], "no", _FILEPLAN)); } else { $action = ""; } //The folder if(isset($_REQUEST['folder_id']) ) { $folderId = addslashes($func->wash($_REQUEST['folder_id'], "no", _THE_FOLDER)); } else { $folderId = ""; } if($fileplanId==""){ exit; } ?> <?php echo $_SESSION['config']['applicationname']; ?> fileplanOwner($fileplanId, $_SESSION['user']['UserId']) !== false) {*/ ?>
drawRoot($fileplanId, $folderId, "view_folders.php?id=".$fileplanId."&", $_REQUEST['idframe']); $folders->buildTreeView($_GET['action'], $fileplanId, $_REQUEST['idframe'], "view_folders.php?id=".$fileplanId, $folderId, $_GET['do'], $folder_parents); ?>
define_order(); if(empty($orderby)) { $orderby = " ORDER BY priority "; } if(isset($_GET['start'])) { $start = $_GET['start']; } else { $start = 0; } $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 ) ); } } if ($folderId !=-1 || isset($_GET['start'])) { ?> 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."

"; } ?>
0) { echo ''; } $color = 'class="col"'; for($theline = 0; $theline < count($listarr) ; $theline++) { // background color if($color == 'class="col"') { $color = ""; } else { $color = 'class="col"'; } ?> > 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 _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 _DETAILS; ?> ?'));"><?php echo _OUTPUT_FOLDER;?> ?'));"><?php echo _OUTPUT_FOLDER;?>
"; echo "
"; ?>