From d7f8f2d79e7352cd8c8afa257f848fb0ae0a8d48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Apr 2005 22:14:34 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Traductions=20oubli=E9s=20sur=20la=20pa?= =?UTF-8?q?ge=20des=20commandes.=20Look:=20Picto=20incorrects=20sur=20page?= =?UTF-8?q?=20des=20commandes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/index.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index f88e1c56e3d..76882371b55 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -154,31 +154,33 @@ if ( $db->query($sql) ) /* * Commandes à traiter */ -$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s"; -$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut > 2 "; -if ($socidp) +$max=5; + +$sql = "SELECT c.rowid, c.ref, s.nom, s.idp"; +$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s"; +$sql.= " WHERE c.fk_soc = s.idp AND c.fk_statut > 2"; +if ($socidp) $sql .= " AND c.fk_soc = $socidp"; +$sql.= " ORDER BY c.rowid DESC"; +$sql.= $db->plimit($max, 0); + +$resql=$db->query($sql); +if ($resql) { - $sql .= " AND c.fk_soc = $socidp"; -} -$sql .= " ORDER BY c.rowid DESC"; -$sql .= $db->plimit(5, 0); -if ( $db->query($sql) ) -{ - $num = $db->num_rows(); + $num = $db->num_rows($resql); if ($num) { $i = 0; print ''; print ''; - print ''; + print ''; $var = True; while ($i < $num) { $var=!$var; - $obj = $db->fetch_object(); - print ""; - print ''; + $obj = $db->fetch_object($resql); + print "'; + print ''; $i++; } print "
5 dernières commandes
'.$langs->trans("LastOrders",$max).'
rowid\">".img_file()." "; - print "rowid\">$obj->ref'.$obj->nom.'
rowid\">".img_object($langs->trans("ShowOrders"),"order").' '; + print $obj->ref.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'

"; @@ -192,5 +194,6 @@ print ''; $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); + ?>