From 822b421f9280c1fac67b70ebe783e59cfcd39e14 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 19 Nov 2003 15:11:40 +0000 Subject: [PATCH] Modif gestion des variables dans l'url --- htdocs/commande/liste.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index c0e07cbb44b..85bd5f9f726 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -46,12 +46,10 @@ if ($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 s.nom, s.idp, c.rowid, c.ref, c.total_ht,".$db->pdate("c.date_commande")." as date_commande, c.fk_statut" ; $sql .= " FROM llx_societe as s, llx_commande as c WHERE c.fk_soc = s.idp"; @@ -81,7 +79,7 @@ $sql .= $db->plimit($limit + 1,$offset); if ( $db->query($sql) ) { $num = $db->num_rows(); - print_barre_liste("Commandes", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num); + print_barre_liste("Commandes", $_GET["page"], $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; print '';