From 203b3f11ade323c6b96515fef86d298a978d09bd Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 3 Sep 2003 13:50:00 +0000 Subject: [PATCH] Ajout formulaire de recherche --- htdocs/comm/index.php | 62 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index cba867bfb74..90d65caa24f 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -72,25 +72,65 @@ print ''; print ''; print ""; -print ""; -print "\n"; +print ""; +print ''; +print "'; +print "
Propositions commerciales
Recherche
"; +print 'Réf. :

"; -$sql = "SELECT count(*) FROM llx_propal WHERE fk_statut = 0"; -if (valeur($sql)) + + +$sql = "SELECT p.rowid, p.ref"; +$sql .= " FROM llx_propal as p"; +$sql .= " WHERE p.fk_statut = 0"; + +if ( $db->query($sql) ) { - $var=!$var; - print "Brouillons".valeur($sql).""; + $num = $db->num_rows(); + $i = 0; + if ($num > 0 ) + { + print ''; + print ""; + print ""; + + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print ""; + $i++; + } + print "
Propositions commerciales brouillons
rowid."\">".$obj->ref."

"; + } } -$sql = "SELECT count(*) FROM llx_propal WHERE fk_statut = 1"; -if (valeur($sql)) +$sql = "SELECT p.rowid, p.ref"; +$sql .= " FROM llx_propal as p"; +$sql .= " WHERE p.fk_statut = 1"; + +if ( $db->query($sql) ) { - $var=!$var; - print "Ouvertes".valeur($sql).""; + $num = $db->num_rows(); + $i = 0; + if ($num > 0 ) + { + print ''; + print ""; + print ""; + + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print ""; + $i++; + } + print "
Propositions commerciales ouvertes
rowid."\">".$obj->ref."

"; + } } -print "
"; /* * *