From a2399301444889350aefa442adf44f63be977dbc Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 4 Apr 2005 10:59:05 +0000 Subject: [PATCH] Mise aux normes --- htdocs/compta/param/comptes/liste.php | 30 ++++++++------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/htdocs/compta/param/comptes/liste.php b/htdocs/compta/param/comptes/liste.php index a2b3842c767..1a0d5ae83ac 100644 --- a/htdocs/compta/param/comptes/liste.php +++ b/htdocs/compta/param/comptes/liste.php @@ -21,27 +21,15 @@ */ require("./pre.inc.php"); +llxHeader('','Compta - Liste des comptes'); + $page = $_GET["page"]; $sortorder = $_GET["sortorder"]; $sortfield = $_GET["sortfield"]; - -llxHeader(); - -/* - * Sécurité accés client - */ -if ($user->societe_id > 0) -{ - $action = ''; - $socidp = $user->societe_id; -} - if ($sortorder == "") $sortorder="ASC"; if ($sortfield == "") $sortfield="cg.numero"; $offset = $conf->liste_limit * $page ; -$pageprev = $page - 1; -$pagenext = $page + 1; /* * Mode Liste @@ -76,18 +64,18 @@ else $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); -$result = $db->query($sql); -if ($result) +$resql = $db->query($sql); +if ($resql) { - $num = $db->num_rows($result); + $num = $db->num_rows($resql); $i = 0; print_barre_liste("Comptes généraux", $page, "liste.php", "", $sortfield, $sortorder, '', $num); print ''; print ''; - print_liste_field_titre("N° compte","liste.php","s.nom"); - print_liste_field_titre("Intitulé compte","liste.php","s.nom"); + print_liste_field_titre("N° compte","liste.php","cg.numero"); + print_liste_field_titre("Intitulé compte","liste.php","cg.intitule"); print ''; print "\n"; @@ -103,7 +91,7 @@ if ($result) while ($i < min($num,$conf->liste_limit)) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($resql); $var=!$var; print ""; @@ -118,7 +106,7 @@ if ($result) $i++; } print "
Date création
"; - $db->free($result); + $db->free($resql); } else {