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 '
| rowid\">$objp->ref | \n"; - print "idp\">$objp->nom | \n"; - - $now = time(); - $lim = 3600 * 24 * 15 ; - - if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 ) - { - print "> 15 jours | "; - } - 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 | \n"; - print "
| rowid\">$objp->ref | \n"; + + $now = time(); + $lim = 3600 * 24 * 15 ; + + if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 ) + { + print "> 15 jours | "; } - - print "