resultats.php
上传用户:feiyaoda
上传日期:2016-11-21
资源大小:9556k
文件大小:8k
- //script resultat
- <?
- include "configuration.php";
- include "page_haut.inc";
- require ("xml_domit_parser.php");
- require ("xml_domit_utilities.php");
- require ("xml_domit_nodemaps.php");
- echo"<br><br>";
- if (!empty($word)) {
- if($choix=="nom"){
- $prd=& new DOMIT_Document();
- $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
-
- $comp = count($prd->documentElement->childNodes);
-
- for($i=0;$i<$comp;$i++){
- $currentprd =& $prd->documentElement->childNodes[$i];
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- if($prdnom!="$word")
- {
- $num=0;
- echo "<table border="0">";
- echo "<tr>";
- echo "<td><b>R閟ultats de la recherche avec <font color="navy">$word</font>. Il y a <b>$num</b> r閟ultats: </b></td>";
- echo "</tr><tr>";
- echo "<td> </td>";
- echo "</tr><tr>";
- echo "<td class="moyen">Pas de r閟ultats!</td>";
- echo "</td>";
- echo "</tr>";
- echo "</table>";
-
- include "page_bas.inc";
- } else {
- echo "<table border="0" width=90%>";
- echo "<tr bgcolor=#21529C>";
- echo "<td><font color=white><b>R閟ultats de la recherche avec</font> <font color="yellow"><b>$word</b></font>. <font color=white>Il y a <b>$num</b> r閟ultats</font> </b></td>";
- echo "</tr><tr></table>";
- }
- }
- $prd=& new DOMIT_Document();
- $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
- $comp = count($prd->documentElement->childNodes);
- for($i=0;$i<$comp;$i++){
- $currentprd =& $prd->documentElement->childNodes[$i];
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- if($prdnom=="$word")
- {
- $currentprd=& $prd->documentElement->childNodes[$i];
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
- $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
- $prdan=$currentprd->childNodes[5]->firstChild->nodeValue;
- $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
- $prdpromo=$currentprd->childNodes[4]->firstChild->nodeValue;
- echo "<table border=0 width=90%>
- <tr><td width='50%'>
- <a href="detail.php?id= $prdid" alt='Afficher le produit'><center><font class=grand><b>$prdnom</b></font></a></center></td>";
- if ($prdphoto != "nul") {
- $split = explode("../", $prdphoto);
- $prdphoto = $split[1];
- $img = "<img src="$prdphoto" hight='72'width='60' border=0 alt='Afficher le produit'>";
- } else {
- $img = "<img src="$images/na.jpg" width=100 border=0>";
- }
-
- $prixunitaire = $prdprix;
- $prixunitaire = sprintf("%0.2f", $prixunitaire);
- echo "<td width='50%' align=left><a href="?m=client&a=detail&id=$prdid">$img</a></td></tr>";
- $descriptif = $prddesc;
- $descriptif = str_replace("[retour]","<br>",$descriptif);
- $descriptif = str_replace("[gras]","<b>",$descriptif);
- $descriptif = str_replace("[/gras]","</b>",$descriptif);
- echo "<tr><td width='50%' align=left>$descriptif</td><td width='50%' align=left><font class=grand><center><b>$prixunitaire $devises</b>";
- if ($prdpromo == "oui") {
- $ancienprix = $prdan;
- $ancienprix = sprintf("%0.2f", $ancienprix);
- echo "<br>Ancien prix = <font class="promo">$ancienprix</font><font color=red> $devises";
- }
- echo "<br><a href="?m=client&a=detail&id=$prdid"><img src="$images/visu.gif" border="0" alt="Visualiser l'article"></a></font></td>";
-
- echo "</tr>";
- echo "</table><hr size='2' width='90%' color='#21529C'>";
- }
- }
- }
- else{}
- }
- else{
- if($choix=="spec"){
- $prd=& new DOMIT_Document();
- $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
-
- $comp = count($prd->documentElement->childNodes);
-
- for($i=0;$i<$comp;$i++){
- $currentprd =& $prd->documentElement->childNodes[$i];
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- if($prddesc!=$word)
- {
- $num=0;
- echo "<table border="0">";
- echo "<tr>";
- echo "<td><b>R閟ultats de la recherche avec <font color="navy">$word</font>. Il y a <b>$num</b> r閟ultats: </b></td>";
- echo "</tr><tr>";
- echo "<td> </td>";
- echo "</tr><tr>";
- echo "<td class="moyen">Pas de r閟ultats!</td>";
- echo "</td>";
- echo "</tr>";
- echo "</table>";
- include "page_bas.inc";
- }
- else
- {
- if($prddesc==$word){
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
- $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
- $prdan=$currentprd->childNodes[5]->firstChild->nodeValue;
- $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
- $prdpromo=$currentprd->childNodes[4]->firstChild->nodeValue;
- echo "<table border="0" width=90%>";
- echo "<tr bgcolor=#21529C>";
- echo "<td><font color=white><b>R閟ultats de la recherche avec</font> <font color="yellow"><b>$word</b></font>. <font color=white>Il y a <b>$num</b> r閟ultats</font> </b></td>";
- echo "</tr><tr></table>";
- echo "<table border=0 width=90%>
- <tr><td width='50%'>
- <a href="?m=client&a=detail&id= $prdid" alt='Afficher le produit'><center><font class=grand><b>$prdnom</b></font></a></center></td>";
- if ($prdphoto != "nul") {
- $split = explode("../", $prdphoto);
- $prdphoto = $split[1];
- $img = "<img src="$prdphoto" hight='72'width='60' border=0 alt='Afficher le produit'>";
- } else {
- $img = "<img src="$images/na.jpg" width=100 border=0>";
- }
-
- $prixunitaire = $prdprix;
- $prixunitaire = sprintf("%0.2f", $prixunitaire);
- echo "<td width='50%' align=left><a href="?m=client&a=detail&id=$prdid">$img</a></td></tr>";
- $descriptif = $prddesc;
- $descriptif = str_replace("[retour]","<br>",$descriptif);
- $descriptif = str_replace("[gras]","<b>",$descriptif);
- $descriptif = str_replace("[/gras]","</b>",$descriptif);
- echo "<tr><td width='50%' align=left>$descriptif</td><td width='50%' align=left><font class=grand><center><b>$prixunitaire $devises</b>";
- if ($prdpromo == "oui") {
- $ancienprix = $prdan;
- $ancienprix = sprintf("%0.2f", $ancienprix);
- echo "<br>Ancien prix = <font class="promo">$ancienprix</font><font color=red> $devises";
- }
- echo "<br><a href="?m=client&a=detail&id=$prdid"><img src="$images/visu.gif" border="0" alt="Visualiser l'article"></a></font></td>";
-
- echo "</tr>";
- echo "</table><hr size='2' width='90%' color='#21529C'>";
- }
- }
- }
- } else {
- echo "<HTML><HEAD><TITLE>R閟ultats de la recherche</TITLE></HEAD>
- <link rel='stylesheet' href='style.css'>
- <BODY TEXT='#000000' BGCOLOR='#FFFFFF' LINK='#000000' VLINK='#000000' ALINK='#F70404'>";
- echo "<font color=red><b>Vous devez mettre des mots-cl閟 pour votre recherche.</b></font>";
- include "page_bas.inc";
- }
- }
- ?>