Modif liste quand on appel avec un fournèid, la solution n'est pas

très belle mais cette liste sera prochainement déplacée
This commit is contained in:
Rodolphe Quiedeville 2005-04-08 15:42:14 +00:00
parent 02a4e03162
commit f849b95c95

View File

@ -101,10 +101,13 @@ else
$sql .= " AND p.envente = ".$_GET["envente"]; $sql .= " AND p.envente = ".$_GET["envente"];
} }
else else
{
if ($fourn_id == 0)
{ {
$sql .= " AND p.envente = 1"; $sql .= " AND p.envente = 1";
} }
} }
}
if ($fourn_id > 0) if ($fourn_id > 0)
{ {
@ -113,24 +116,26 @@ if ($fourn_id > 0)
$sql .= " ORDER BY $sortfield $sortorder "; $sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit($limit + 1 ,$offset); $sql .= $db->plimit($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;
if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref)) if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref))
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($resql);
Header("Location: fiche.php?id=$objp->rowid"); Header("Location: fiche.php?id=$objp->rowid");
} }
if (isset($_GET["envente"]) || isset($_POST["envente"])) { if (isset($_GET["envente"]) || isset($_POST["envente"]))
{
$envente = (isset($_GET["envente"])?$_GET["envente"]:$_POST["envente"]); $envente = (isset($_GET["envente"])?$_GET["envente"]:$_POST["envente"]);
} }
else { else
{
$envente=1; $envente=1;
} }