resultats.php
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 8k
Category:

WEB Mail

Development Platform:

PHP

  1. //script resultat
  2. <?
  3. include "configuration.php";
  4. include "page_haut.inc";
  5. require ("xml_domit_parser.php");
  6. require ("xml_domit_utilities.php");
  7. require ("xml_domit_nodemaps.php");
  8. echo"<br><br>";
  9. if (!empty($word)) {
  10. if($choix=="nom"){
  11. $prd=& new DOMIT_Document();
  12.               $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
  13.               
  14.              $comp = count($prd->documentElement->childNodes);
  15.           
  16.        for($i=0;$i<$comp;$i++){
  17.             $currentprd =& $prd->documentElement->childNodes[$i];
  18.     $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  19.             $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  20. if($prdnom!="$word")
  21.                    {
  22. $num=0;
  23. echo "<table border="0">";
  24. echo "<tr>";
  25. echo "<td><b>R閟ultats de la recherche avec <font color="navy">$word</font>. Il y a <b>$num</b> r閟ultats: </b></td>";
  26. echo "</tr><tr>";
  27. echo "<td>&nbsp;</td>";
  28. echo "</tr><tr>";
  29. echo "<td class="moyen">Pas de r閟ultats!</td>";
  30. echo "</td>";
  31. echo "</tr>";
  32. echo "</table>";
  33. include "page_bas.inc";
  34. } else {
  35. echo "<table border="0" width=90%>";
  36. echo "<tr bgcolor=#21529C>";
  37. 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>";
  38. echo "</tr><tr></table>";
  39. }
  40. }
  41. $prd=& new DOMIT_Document();
  42.               $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
  43.  $comp = count($prd->documentElement->childNodes);
  44. for($i=0;$i<$comp;$i++){
  45.                        $currentprd =& $prd->documentElement->childNodes[$i];
  46.                $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  47.                        $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  48. if($prdnom=="$word")
  49.                    {
  50.    $currentprd=& $prd->documentElement->childNodes[$i];
  51.                    $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  52.            $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  53.    $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
  54.                    $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
  55.                    $prdan=$currentprd->childNodes[5]->firstChild->nodeValue;
  56.                    $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
  57.                    $prdpromo=$currentprd->childNodes[4]->firstChild->nodeValue;
  58. echo "<table border=0 width=90%>
  59. <tr><td width='50%'>
  60. <a href="detail.php?id= $prdid" alt='Afficher le produit'><center><font class=grand><b>$prdnom</b></font></a></center></td>";
  61. if ($prdphoto != "nul") {
  62. $split = explode("../", $prdphoto);
  63. $prdphoto = $split[1];
  64. $img = "<img src="$prdphoto" hight='72'width='60' border=0 alt='Afficher le produit'>";
  65. } else {
  66. $img = "<img src="$images/na.jpg" width=100 border=0>";
  67. }
  68. $prixunitaire = $prdprix;
  69. $prixunitaire = sprintf("%0.2f", $prixunitaire);
  70. echo "<td width='50%' align=left><a href="?m=client&a=detail&id=$prdid">$img</a></td></tr>";
  71. $descriptif = $prddesc;
  72. $descriptif = str_replace("[retour]","<br>",$descriptif);
  73. $descriptif = str_replace("[gras]","<b>",$descriptif);
  74. $descriptif = str_replace("[/gras]","</b>",$descriptif);
  75. echo "<tr><td width='50%' align=left>$descriptif</td><td width='50%' align=left><font class=grand><center><b>$prixunitaire $devises</b>";
  76. if ($prdpromo == "oui") {
  77. $ancienprix = $prdan;
  78.                   $ancienprix = sprintf("%0.2f", $ancienprix);
  79. echo "<br>Ancien prix = <font class="promo">$ancienprix</font><font color=red> $devises";
  80. echo "<br><a href="?m=client&a=detail&id=$prdid"><img src="$images/visu.gif" border="0" alt="Visualiser l'article"></a></font></td>";
  81.                         
  82. echo "</tr>";
  83. echo "</table><hr size='2' width='90%' color='#21529C'>";
  84. }
  85. }
  86. }
  87. else{}
  88. }
  89. else{
  90. if($choix=="spec"){
  91. $prd=& new DOMIT_Document();
  92.               $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
  93.               
  94.              $comp = count($prd->documentElement->childNodes);
  95.           
  96.        for($i=0;$i<$comp;$i++){
  97.             $currentprd =& $prd->documentElement->childNodes[$i];
  98.     $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  99.             $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
  100.             $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  101. if($prddesc!=$word)
  102. {
  103. $num=0;
  104. echo "<table border="0">";
  105. echo "<tr>";
  106. echo "<td><b>R閟ultats de la recherche avec <font color="navy">$word</font>. Il y a <b>$num</b> r閟ultats: </b></td>";
  107. echo "</tr><tr>";
  108. echo "<td>&nbsp;</td>";
  109. echo "</tr><tr>";
  110. echo "<td class="moyen">Pas de r閟ultats!</td>";
  111. echo "</td>";
  112. echo "</tr>";
  113. echo "</table>";
  114. include "page_bas.inc";
  115. }
  116. else
  117. {
  118. if($prddesc==$word){
  119.                   $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  120.            $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  121.    $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
  122.                    $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
  123.                    $prdan=$currentprd->childNodes[5]->firstChild->nodeValue;
  124.                    $prddesc=$currentprd->childNodes[7]->firstChild->nodeValue;
  125.                    $prdpromo=$currentprd->childNodes[4]->firstChild->nodeValue;
  126. echo "<table border="0" width=90%>";
  127. echo "<tr bgcolor=#21529C>";
  128. 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>";
  129. echo "</tr><tr></table>";
  130. echo "<table border=0 width=90%>
  131. <tr><td width='50%'>
  132. <a href="?m=client&a=detail&id= $prdid" alt='Afficher le produit'><center><font class=grand><b>$prdnom</b></font></a></center></td>";
  133. if ($prdphoto != "nul") {
  134. $split = explode("../", $prdphoto);
  135. $prdphoto = $split[1];
  136. $img = "<img src="$prdphoto" hight='72'width='60' border=0 alt='Afficher le produit'>";
  137. } else {
  138. $img = "<img src="$images/na.jpg" width=100 border=0>";
  139. }
  140. $prixunitaire = $prdprix;
  141. $prixunitaire = sprintf("%0.2f", $prixunitaire);
  142. echo "<td width='50%' align=left><a href="?m=client&a=detail&id=$prdid">$img</a></td></tr>";
  143. $descriptif = $prddesc;
  144. $descriptif = str_replace("[retour]","<br>",$descriptif);
  145. $descriptif = str_replace("[gras]","<b>",$descriptif);
  146. $descriptif = str_replace("[/gras]","</b>",$descriptif);
  147. echo "<tr><td width='50%' align=left>$descriptif</td><td width='50%' align=left><font class=grand><center><b>$prixunitaire $devises</b>";
  148. if ($prdpromo == "oui") {
  149. $ancienprix = $prdan;
  150.                   $ancienprix = sprintf("%0.2f", $ancienprix);
  151. echo "<br>Ancien prix = <font class="promo">$ancienprix</font><font color=red> $devises";
  152. echo "<br><a href="?m=client&a=detail&id=$prdid"><img src="$images/visu.gif" border="0" alt="Visualiser l'article"></a></font></td>";
  153.                         
  154. echo "</tr>";
  155. echo "</table><hr size='2' width='90%' color='#21529C'>";
  156. }
  157. }
  158. }
  159. } else {
  160.             echo "<HTML><HEAD><TITLE>R閟ultats de la recherche</TITLE></HEAD>
  161. <link rel='stylesheet' href='style.css'>
  162. <BODY TEXT='#000000' BGCOLOR='#FFFFFF' LINK='#000000' VLINK='#000000' ALINK='#F70404'>";
  163. echo "<font color=red><b>Vous devez mettre des mots-cl閟 pour votre recherche.</b></font>";
  164. include "page_bas.inc";
  165. }
  166. }
  167. ?>