*/ include("session.php"); require_once("class_db.php"); require_once("class_letterbox.php"); 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) { ?> define_order(); if(empty($orderby)) { $orderby = " ORDER BY priority "; } $table = $_SESSION['current_basket']['table']; //$user = $_SESSION['user']['UserId']; $db = new dbquery(); $db->connect(); $db->query("select count(*) as TOTAL from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$orderby); $line = $db->fetch_object(); $total = $line->TOTAL; $db->query("select RES_ID, TYPE_ID, CREATION_DATE, TITLE, DESCRIPTION, AUTHOR, RELATION, CUSTOM_T1, CUSTOM_T2, CUSTOM_T3, CUSTOM_T4, CUSTOM_T5, STATUS from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$orderby." limit ".$start.",".$_SESSION['config']['nblinetoshow']); /* if ($_SESSION['config']['corporate'] == "true") { $_SESSION['print_list']['current_request'] = "select RES_ID, AUTHOR, SOCIETE, date(CUSTOM_D1) as DATE1,date(CUSTOM_D2) as DATE2 , PRIORITY, STATUS from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$orderby; } else { $_SESSION['print_list']['current_request'] = "select RES_ID, PRIORITY, date(CUSTOM_D1) as DATE1, DESCRIPTION, AUTHOR , date(CUSTOM_D2) as DATE2, STATUS from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$orderby; } */ $tab = array(); $isreserved == false; while($line = $db->fetch_object()) { /*$isreserved = $courr->test_reserved_time($line->RES_ID, $table); if($isreserved === false) { $user = ''; } else { $user = $line->DEST_USER; }*/ array_push($tab, array( "ID" => $line->RES_ID, "TYPE" => $line->TYPE_ID, "CREATION_DATE" => $db->inverse_date($line->CREATION_DATE), "OBJET" => stripslashes($line->DESCRIPTION), "EMETTEUR" => stripslashes($line->AUTHOR), "STATUS"=> $line->STATUS, "TO" => stripslashes($line->CUSTOM_T1), "CC" => stripslashes($line->CUSTOM_T2), "CCI" => stripslashes($line->CUSTOM_T3), ) ); } if($total == 1){ $title = $_SESSION['current_basket']['label']." (".$total." "._MAIL.")"; } else{ $title = $_SESSION['current_basket']['label']." (".$total." "._MAIL."s)"; } $courr->list_mail_send($tab, $total, $title, $_SESSION['current_basket']['page']); ?>