diff --git a/htdocs/product/index.php b/htdocs/product/index.php index eed5418df37..10f260db9b0 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -22,10 +22,10 @@ */ /** - \file htdocs/product/index.php - \ingroup product - \brief Page accueil des produits et services - \version $Revision$ + \file htdocs/product/index.php + \ingroup product + \brief Page accueil des produits et services + \version $Revision$ */ require("./pre.inc.php"); @@ -33,6 +33,7 @@ require("./pre.inc.php"); if (!$user->rights->produit->lire) accessforbidden(); + /* * Affichage page accueil * @@ -106,9 +107,11 @@ print ''; /* * Derniers produits/services en vente */ -$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type FROM ".MAIN_DB_PREFIX."product as p WHERE envente=1"; -$sql .= " ORDER BY p.datec DESC "; -$sql .= $db->plimit(15 ,0); +$max=15; +$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.envente"; +$sql.= " FROM ".MAIN_DB_PREFIX."product as p"; +$sql.= " ORDER BY p.datec DESC "; +$sql.= $db->plimit($max,0); $result = $db->query($sql) ; if ($result) @@ -124,7 +127,7 @@ if ($result) { print ''; - print ''; + print ''; $var=True; while ($i < $num) @@ -138,6 +141,7 @@ if ($result) print "rowid\">$objp->ref\n"; print ""; print ""; + print '"; print "\n"; $i++; }
'.$langs->trans("LastRecorded").'
'.$langs->trans("LastRecordedProducts",$max).'
$objp->label".$typeprodser[$objp->fk_product_type]."'.($objp->envente?$langs->trans("OnSell"):$langs->trans("NotOnSell"))."