Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> kosz
integer000
post
Post #1





Grupa: Zarejestrowani
Postów: 129
Pomógł: 0
Dołączył: 24.09.2005

Ostrzeżenie: (30%)
XX---


kosz

Ten post edytował integer000 25.05.2006, 18:33:36
Go to the top of the page
+Quote Post
tiraeth
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 789
Pomógł: 41
Dołączył: 30.10.2003
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


  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. ?>
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 13:06