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

WEB Mail

Development Platform:

PHP

  1. //script promos
  2. <html>
  3. <head>
  4. <link rel='stylesheet' href='style.css'>
  5. </head>
  6. <?php
  7. include ("configuration.php");
  8. include("page_haut.inc");
  9. require ("xml_domit_parser.php");
  10. require ("xml_domit_utilities.php");
  11. require ("xml_domit_nodemaps.php");
  12. echo"<br><br>";
  13. ?>
  14. <table  border="0"  bordercolorlight="black" width="90%" cellspacing="1">
  15. <tr><td><img src="./images/promos.png"></td></tr>
  16. <tr><td>&nbsp;</td></tr>
  17. </table>
  18. <p><b> Les meilleures promos</font> </b></p>
  19. <table  border="1" bordercolordark="white" bordercolorlight="black" width="90%" cellspacing="1">
  20. <tr class=entete>
  21. <td align=center>Articles</td>
  22. <td align=center>Photo</td>
  23. <td align=center>Ancien Prix</td>
  24. <td align=center>Nouveau Prix</td>
  25. <td align=center>Visualiser</td>
  26. </tr>
  27.         <?
  28. $prd=& new DOMIT_Document();
  29.               $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
  30.               
  31.              $comp = count($prd->documentElement->childNodes);
  32.          for($i=0;$i<$comp;$i++){
  33.             $currentprd =& $prd->documentElement->childNodes[$i];
  34.     $promo=$currentprd->childNodes[4]->firstChild->nodeValue;
  35. if($promo==oui){
  36.            $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
  37.             $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
  38.             $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
  39.             $prdancienprix=$currentprd->childNodes[5]->firstChild->nodeValue;
  40.             $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
  41.                         $split = explode("../", $prdphoto);
  42. $prdphoto = $split[1];
  43. $img = "<img src="./modules/client/$prdphoto" border="0" width='50'>";
  44. $ancienprix = $prdancienprix;
  45. $ancienprix = sprintf("%0.2f", $ancienprix);
  46. $nouveauprix = $prdprix;
  47. $nouveauprix = sprintf("%0.2f", $nouveauprix);
  48. echo "<tr><td align='center'><b > $prdnom </b></td>";
  49. echo "<td> $img </td><td><b><center><font class='promo2'>$ancienprix </b></font></td><td><center><font class=grand><b><a href="?m=client&a=detail&id=$prdid" target="_self">$nouveauprix</b></a></font></td><td><a href="?m=client&a=detail&id=$prdid" target="_self"><center><img src= "./images/visu.gif" border="0" alt="Visualiser l'article"></a></td></tr>";
  50. }
  51. }
  52. ?>
  53. </table>
  54. <table width=95%>
  55. <tr><td>&nbsp;</td></tr>
  56. <tr><td>&nbsp;</td></tr>
  57. <tr><td>&nbsp;</td></tr>
  58. <tr><td> <hr></td></tr>
  59. <tr><td align=center><font size="-2" face="Verdana, Arial, Helvetica, sans-serif">&copy; Copyright WebGenerator.com. Tous 
  60.         droits r&eacute;serv&eacute;s</FONT></td></tr>
  61. </table>
  62. <?
  63. include("page_bas.inc");
  64. ?>