*/ include("session.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } require_once("class_functions.php"); require_once("class_db.php"); require_once("class_letterbox.php"); //$_SESSION['origin'] = $_SESSION['current_basket']['page']; $courrier = new LetterBox(); $orderby = $courrier->define_order(); if(isset($_GET['start'])) { $start = $_GET['start']; } else { $start = 0; } if(isset($_GET['action']) && !empty($_GET['action']) ) { if($_GET['action'] == "RED" && count($_SESSION['chosen_doc']) > 0) { ?> 0) { ?> date(CUSTOM_D2) and STATUS <> 'END' ) "; } } $table = $_SESSION['current_basket']['table']; $db = new dbquery(); $db->connect(); $db->query("select count(*) as TOTAL from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$where.$orderby); //$db->show(); $line = $db->fetch_object(); $total = $line->TOTAL; $db->query("select SOCIETE, DESTINATION, DEST_USER, DESCRIPTION, RES_ID, TYPE_ID, IDENTIFIER, date(CREATION_DATE) as DATE1, AUTHOR, CUSTOM_T4, date(CUSTOM_D2) as DATE2, CUSTOM_T3, STATUS, PRIORITY from ".$table." where ".$_SESSION['current_basket']['clause']." ".$where.$orderby." limit ".$start.",".$_SESSION['config']['nblinetoshow']); if ($_SESSION['config']['corporate'] == "true") { $_SESSION['print_list']['current_request'] = " select RES_ID, PRIORITY, AUTHOR, SOCIETE, DEST_USER, date(CUSTOM_D2) as DATE2 from ".$table." where ".$_SESSION['current_basket']['clause']." ".$where.$orderby; } else { $_SESSION['print_list']['current_request'] = " select RES_ID, PRIORITY, AUTHOR, DESCRIPTION, DEST_USER, date(CUSTOM_D2) as DATE2 from ".$table." where ".$_SESSION['current_basket']['clause']." ".$where.$orderby; } $tab = array(); while($line = $db->fetch_object()) { array_push($tab, array( "OBJET" => $line->DESCRIPTION, "SOCIETE" => $line->SOCIETE, "ID" => $line->RES_ID, "TYPE" => $line->TYPE_ID, "IDENTIFIER" => $line->IDENTIFIER, "ARRIVEE" => $db->inverse_date($line->DATE1), "CIV" => $line->CUSTOM_T3, "NOM" => $line->AUTHOR, "PRENOM" => $line->CUSTOM_T4, "LIMITE" => $db->inverse_date($line->DATE2), "SERVICE" => $line->DESTINATION, "DEST" => $line->DEST_USER, "STATUS" => $line->STATUS, "PRIORITY" => $line->PRIORITY)); } $label = $_SESSION['tmpbasket']['service']; for($i=0; $i < count($_SESSION['user']['services']); $i++) { if($_SESSION['user']['services'][$i]['ID'] == $_SESSION['tmpbasket']['service']) { $label = str_replace('\\', '',$_SESSION['user']['services'][$i]['LABEL']); } } $title = $label." (".$total." "._DOCUMENTS.")"; $courrier->dep_mail_list($tab, $total, $title, $service, $status); ?>