Nettoyage du code
This commit is contained in:
parent
3b6b574b9e
commit
dec2704ec7
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -22,16 +22,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/fourn/index.php
|
\file htdocs/fourn/index.php
|
||||||
\ingroup fournisseur
|
\ingroup fournisseur
|
||||||
\brief Page accueil de la zone fournisseurs
|
\brief Page accueil de la zone fournisseurs
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("../contact.class.php");
|
|
||||||
|
|
||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
$sortorder = $_GET["sortorder"];
|
$sortorder = $_GET["sortorder"];
|
||||||
@ -55,8 +52,6 @@ if ($user->societe_id > 0)
|
|||||||
if ($page == -1) { $page = 0 ; }
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
|
||||||
$offset = $conf->liste_limit * $page ;
|
$offset = $conf->liste_limit * $page ;
|
||||||
$pageprev = $page - 1;
|
|
||||||
$pagenext = $page + 1;
|
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="nom";
|
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);
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($result)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfSuppliers"), $page, "index.php", "", $sortfield, $sortorder, '', $num);
|
print_barre_liste($langs->trans("ListOfSuppliers"), $page, "index.php", "", $sortfield, $sortorder, '', $num);
|
||||||
@ -101,7 +96,6 @@ if ($result)
|
|||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="index.php" method="GET">';
|
print '<form action="index.php" method="GET">';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
||||||
@ -114,7 +108,7 @@ if ($result)
|
|||||||
|
|
||||||
while ($i < min($num,$conf->liste_limit))
|
while ($i < min($num,$conf->liste_limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
@ -127,7 +121,7 @@ if ($result)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free();
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user