diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 20000c3b4ec..d2ebcb95ba6 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -22,16 +22,13 @@ */ /** - \file htdocs/fourn/index.php - \ingroup fournisseur - \brief Page accueil de la zone fournisseurs - \version $Revision$ + \file htdocs/fourn/index.php + \ingroup fournisseur + \brief Page accueil de la zone fournisseurs + \version $Revision$ */ - require("./pre.inc.php"); -require("../contact.class.php"); - $page = $_GET["page"]; $sortorder = $_GET["sortorder"]; @@ -55,8 +52,6 @@ if ($user->societe_id > 0) if ($page == -1) { $page = 0 ; } $offset = $conf->liste_limit * $page ; -$pageprev = $page - 1; -$pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="nom"; @@ -85,10 +80,10 @@ if (strlen($_GET["search_ville"])) } $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($langs->trans("ListOfSuppliers"), $page, "index.php", "", $sortfield, $sortorder, '', $num); @@ -101,7 +96,6 @@ if ($result) print ' '; print "\n"; - print ''; print '
'; print ''; @@ -114,7 +108,7 @@ if ($result) while ($i < min($num,$conf->liste_limit)) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($resql); $var=!$var; print ""; @@ -127,7 +121,7 @@ if ($result) $i++; } print ""; - $db->free(); + $db->free($resql); } else {