From a674c1442d0ccf1c1349170e90ab50fbeef2e16e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 26 Nov 2003 16:04:22 +0000 Subject: [PATCH] Modif affichage --- htdocs/expedition/liste.php | 105 ++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 60 deletions(-) diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 2387834615a..681c9ff1ed9 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -40,36 +40,25 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } - - -llxHeader(); - /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ -/**************************************************************************** - * * - * * - * * - * * - ****************************************************************************/ +llxHeader(); -if ($sortfield == "") +if ($_GET["sortfield"] == "") { $sortfield="e.rowid"; } -if ($sortorder == "") +if ($_GET["sortorder"] == "") { $sortorder="DESC"; } -if ($page == -1) { $page = 0 ; } - $limit = $conf->liste_limit; -$offset = $limit * $page ; -$pageprev = $page - 1; -$pagenext = $page + 1; +$offset = $limit * $_GET["page"] ; +$pageprev = $_GET["page"] - 1; +$pagenext = $_GET["page"] + 1; $sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition" ; $sql .= " FROM llx_expedition as e "; @@ -91,18 +80,15 @@ $sql .= $db->plimit($limit + 1,$offset); if ( $db->query($sql) ) { $num = $db->num_rows(); - print_barre_liste("Expeditions", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num); - + print_barre_liste("Expeditions", $_GET["page"], $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; - print ''; + print '
'; print ''; print_liste_field_titre_new ("Réf",$PHP_SELF,"p.ref","","&socidp=$socidp",'width="15%"',$sortfield); - print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socidp=$socidp",'width="30%"',$sortfield); - print_liste_field_titre_new ("Date",$PHP_SELF,"c.date_expedition","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield); print_liste_field_titre_new ("Statut",$PHP_SELF,"p.fk_statut","","&socidp=$socidp",'width="10%" align="center"',$sortfield); @@ -113,46 +99,45 @@ if ( $db->query($sql) ) { $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - print "\n"; - - $now = time(); - $lim = 3600 * 24 * 15 ; - - if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 ) - { - print ""; - } - else - { - print ""; - } - - print "\n"; - - print "\n"; - print "\n"; - - $i++; + $var=!$var; + print ""; + print "\n"; + + $now = time(); + $lim = 3600 * 24 * 15 ; + + if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 ) + { + print ""; } - - print "
rowid\">$objp->refidp\">$objp->nom > 15 jours "; - $y = strftime("%Y",$objp->date_expedition); - $m = strftime("%m",$objp->date_expedition); - - print strftime("%d",$objp->date_expedition)."\n"; - print " "; - print strftime("%B",$objp->date_expedition)."\n"; - print " "; - print strftime("%Y",$objp->date_expedition)."$objp->statut
rowid\">$objp->ref > 15 jours
"; - $db->free(); - } - else - { - print $db->error(); + else + { + print " "; + } + + print ""; + $y = strftime("%Y",$objp->date_expedition); + $m = strftime("%m",$objp->date_expedition); + + print strftime("%d",$objp->date_expedition)."\n"; + print " "; + print strftime("%B",$objp->date_expedition)."\n"; + print " "; + print strftime("%Y",$objp->date_expedition)."\n"; + + print ''.$objp->statut.''; + print "\n"; + + $i++; } + + print ""; + $db->free(); +} +else +{ + print $db->error(); +} $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$");