From 9acd63c0ee774f9416ef5bcdf3e646d3d333dc41 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Jul 2004 18:24:32 +0000 Subject: [PATCH] Fix: register_globals=off --- htdocs/contrat/index.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 467787b4e83..70ddf419106 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -24,9 +24,13 @@ require("./pre.inc.php"); llxHeader(); -if ($page == -1) { - $page = 0 ; -} +$sortorder=$_GET["sortorder"]; +$sortfield=$_GET["sortfield"]; +$page=$_GET["page"]; +$statut=isset($_GET["statut"])?$_GET["statut"]:1; +$socid=$_GET["socid"]; + + /* * Sécurité accés client */ @@ -36,6 +40,9 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } + +if ($page == -1) { $page = 0 ; } + $limit = $conf->liste_limit; $offset = $limit * $page ; @@ -49,6 +56,7 @@ if ($sortorder == "") $sortorder="DESC"; } + $sql = "SELECT c.rowid as cid, c.enservice, ".$db->pdate("c.fin_validite")." as fin_validite, c.fin_validite-sysdate() as delairestant, p.label, p.rowid as pid, s.nom, s.idp as sidp"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE c.fk_soc = s.idp AND c.fk_product = p.rowid";