Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: kosz
Forum PHP.pl > Forum > PHP
integer000
kosz
tiraeth
  1. <?php
  2. $newsdata="kw.dat";
  3. $table=file($newsdata);
  4. $total=count($table);
  5. $maxstron=ceil($total/10);
  6.  
  7. $ak = 0;
  8.  
  9. if(!isset($_GET['id'])) $_GET['id']=1;
  10.  
  11. $do=$_GET['id']*10; 
  12. $od=$do-10;
  13.  
  14. if ($do>$total) $do=$total;
  15.  
  16. for ($i=$od; $i<$do; $i++)
  17. { 
  18. $data=explode("*|*", $table[$i]);
  19. if ($data[4] == "Kwiaty")
  20. {
  21. echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\" width=\"500px\">
  22. <tr>
  23. <td colspan=\"2\"
  24. <b>$data[0]</b>
  25. </td>
  26. </tr>
  27. <tr>
  28. <td rowspan=\"2\" width=\"210px\" height=\"170px\"><A TARGET=\"_blank\" HREF=\"../product/$data[3]\" onclick=\"return wyswietl('../product/$data[3]')\">
  29. <IMG SRC=\"../product/$data[3]\" BORDER=\"0\" width=\"210px\" height=\"170px\">
  30. </A></td> 
  31. <td width=\"290px\" height=\"140px\">$data[1]</td>
  32. </tr>
  33. <tr>
  34. <td colspan=\"2\" width=\"290px\" height=\"30px\">$data[2] zł</td>
  35. </tr>
  36. </table><br> ";
  37. $ak++;
  38. }
  39. }
  40.  
  41. for($i=1;$i<=$maxstron;$i++) echo "<a href=\"kwiaty.php?id=$i\">$i</a> | ";
  42. ?>
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.