0) { ?> 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(); $db2 = new dbquery(); $db2->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, destination, TYPE_ID, status, date(creation_date) as date, dest_user from ".$table." where ".$_SESSION['current_basket']['clause'].' '.$orderby." limit ".$start.",".$_SESSION['config']['nblinetoshow']); $_SESSION['print_list']['current_request'] = "select res_id, destination, TYPE_ID, status, creation_date 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 == null) { $user = ''; $reserved = 'N'; } else { $user = ''; $reserved = 'Y'; $db2->query("select FIRSTNAME, LASTNAME from ".$_SESSION['tablename']['users']." where user_id = '".$isreserved."'"); if( $db2->nb_result() > 0 ) { $res2 = $db2->fetch_object(); $user = $res2->FIRSTNAME." ".$res2->LASTNAME; } } $this_line = array( "DESTINATION" => $line->destination, "ID" => $line->res_id, "TYPE" => $line->TYPE_ID, "CREATION_DATE" => $db->inverse_date($line->date), "STATUS" => $line->status , "USER" => $user, "RESERVED" => $reserved, "BY_USER_ID" => $isreserved); $this_line["TYPE"] = $func->show($this_line["TYPE"],12); $this_line["SERVICE"] = $func->show($this_line["SERVICE"],15); $this_line["USER"] = $func->show($this_line["USER"],12); $tab[] = $this_line; } if($total == 1) { $title = $_SESSION['current_basket']['label']." (".$total." document)"; } else { $title = $_SESSION['current_basket']['label']." (".$total." "._DOCUMENTS.")"; } $courr->qualif_list($tab, $total, $title, $_SESSION['current_basket']['page']); ?>