1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| function listEntity($restrict,$startRow){
global $g_num_rows,$g_numOptionsByList,$session_restrict;
$db = new DB;
$db->Debug =false;
//echo "sql restrict : $restrict<br>";
//echo "sql session_restrict : $session_restrict<br>";
$query="select count(*) from VEHICULES $restrict";
$db->query($query);
$db->next_record();
$g_num_rows= $db->f("COUNT(*)");
//echo "num_rows : ".$g_num_rows;
//echo $restrict;
if ($g_num_rows < $startRow + 500){
$borneSup=$g_num_rows;
} else {
$borneSup=$startRow + 500;
}
//$query="select IDNV, CDNVMQ, LDNVMQ, CDNVMD, LDNVMD, CDNVCR, LDNVCR, CDNVEN, LDNVEN, QVNVPA, DDNVCO, CDNVGR, LDNVGR from VEHICULES $restrict order by 1 desc";
$query="select IDNV, CDNVMQ, CDNVMD, rpad(LDNVVE,35,'_') as LDNVVE from VEHICULES ";
$query.="$restrict order by IDNV asc";
$db->query($query);
for ($i = 0; $i <= $borneSup-1; $i++) {
$db->next_record();
if ($i > $startRow-1)
$code=aHref($code,$db->f("IDNV")." - ".$db->f("CDNVMQ")." - ".$db->f("CDNVMD")." - ".$db->f("LDNVVE")."<input type='checkbox' name='choix[]' value ='true' ","",$db->f("IDNV"));
}
return $code;
} |