From 871d46355b44eda64ac410e80ddb2b0001a180ce Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 28 Jun 2003 19:49:28 +0000 Subject: [PATCH] modifs mineures --- htdocs/fichinter/index.php3 | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/htdocs/fichinter/index.php3 b/htdocs/fichinter/index.php3 index 2450f814d65..35c6479f725 100644 --- a/htdocs/fichinter/index.php3 +++ b/htdocs/fichinter/index.php3 @@ -33,35 +33,43 @@ $db = new Db(); if ($sortorder == "") { - $sortorder="ASC"; + $sortorder="DESC"; } if ($sortfield == "") { $sortfield="f.datei"; } +if ($page == -1) { $page = 0 ; } -print_titre("Liste des fiches d'intervention"); +$limit = $conf->liste_limit; +$offset = $limit * $page ; +$pageprev = $page - 1; +$pagenext = $page + 1; + + +print_barre_liste("Liste des fiches d'intervention", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder); $sql = "SELECT s.nom,s.idp, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.duree"; $sql .= " FROM llx_societe as s, llx_fichinter as f "; $sql .= " WHERE f.fk_soc = s.idp "; -if ($user->societe_id > 0) { +if ($user->societe_id > 0) +{ $sql .= " AND s.idp = " . $user->societe_id; } -$sql .= " ORDER BY $sortfield DESC ;"; +$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit ,$offset); if ( $db->query($sql) ) { $num = $db->num_rows(); $i = 0; - print "

"; + print '
'; print ""; - print ""; - print ""; - print ""; + print_liste_field_titre_new ("Num",$PHP_SELF,"f.ref","","&socidp=$socidp",'width="15%"',$sortfield); + print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socidp=$socidp",'',$sortfield); + print_liste_field_titre_new ("Date",$PHP_SELF,"f.datei","","&socidp=$socidp",'',$sortfield); print ''; print ''; print "\n";
NumSocieteDateDuréeStatut