Accueil
Résultats de la recherche
- N° de client
- Nom
- Prénom
- E-mail
-
escape_string(trim($motcle));
$search="and nom like \"%$motcle%\" or prenom like \"%$motcle%\" or ville like \"%$motcle%\" or email like \"%$motcle%\"";
$query = "select * from $client->table where 1 $search";
$cliresul = mysql_query($query, $client->link);
$clilist="";
while($row = mysql_fetch_object($cliresul)){
$clilist .= "'$row->id', ";
if(!($i%2)) $fond="ligne_claire_rub";
else $fond="ligne_fonce_rub";
$i++;
?>
- N° de commande
- Date
- Nom
- Montant
- Statut
- Suppr.
table $search";
$resul = mysql_query($query, $commande->link);
$venteprod = new Venteprod();
while($row = mysql_fetch_object($resul)){
$client = new Client();
$client->charger_id($row->client);
$statutdesc = new Statutdesc();
$statutdesc->charger($row->statut);
$query2 = "SELECT sum(prixu*quantite) as total FROM $venteprod->table where commande='$row->id'";
$resul2 = mysql_query($query2, $venteprod->link);
$total = round(mysql_result($resul2, 0, "total"), 2);
$port = $row->port;
$total -= $row->remise;
$total += $port;
if($total<0) $total = 0;
$jour = substr($row->date, 8, 2);
$mois = substr($row->date, 5, 2);
$annee = substr($row->date, 0, 4);
$heure = substr($row->date, 11, 2);
$minute = substr($row->date, 14, 2);
$seconde = substr($row->date, 17, 2);
if(!($i%2)) $fond="ligne_claire_rub";
else $fond="ligne_fonce_rub";
$i++;
?>
- Référence
- Titre
- Prix
- Suppr.
table where 1 $search";
$resul = mysql_query($query, $produit->link);
$produitdesc = new Produitdesc();
$prodlist="";
while($row = mysql_fetch_object($resul)){
$prodlist .= "'$row->id', ";
}
$prodlist = substr($prodlist, 0, strlen($prodlist)-2);
$search="";
$search .= "and titre like '%$motcle%' or description like '%$motcle%'";
$produit = new Produit();
$query = "select * from $produitdesc->table where 1 $search";
$resul = mysql_query($query, $produitdesc->link);
if(mysql_num_rows($resul) && $prodlist!="") $prodlist .= ",";
$produitdesc = new Produitdesc();
$num = 0;
while($row = mysql_fetch_object($resul)){
$num++;
$prodlist .= "'$row->produit', ";
}
if( substr($prodlist, strlen($prodlist)-2, 1) == ",")
$prodlist = substr($prodlist, 0, strlen($prodlist)-2);
if($num == 1) $prodlist .= "'";
if($prodlist == "") $search = "where 0";
else $search = " where id in ($prodlist)";
$query = "select * from $produit->table $search";
$query = str_replace("'')", "')", $query);
$resul = mysql_query($query, $produitdesc->link);
while($row = mysql_fetch_object($resul)){
$produitdesc->charger($row->id);
if(!($i%2)) $fond="ligne_claire_rub";
else $fond="ligne_fonce_rub";
$i++;
?>
inclure_module_admin("recherche");
?>