Fix: register_globals=off

This commit is contained in:
Laurent Destailleur 2004-07-25 18:24:32 +00:00
parent 8d32da6b03
commit 9acd63c0ee

View File

@ -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";