Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Nie pokazuje linku do 3 strony!
wozniak
post 23.02.2005, 17:49:01
Post #1





Grupa: Zarejestrowani
Postów: 278
Pomógł: 0
Dołączył: 21.11.2003

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


Witam, mam skrypt ktory dzieli dane z mysqla na strony automatycznie. Dzieli wszystko dobrze ,ale pokazuje 1 i 2 strone a link do 3 gdzies gnie
http://www.db-tuning.info/modules.php?name...l_Tuning&page=3
kod:
  1. <?php
  2. $perPage = 8;
  3.  
  4. $sql1 = 'SELECT COUNT(id) as ilosc FROM virtual_tuning';
  5. $result1 = $db->sql_query($sql1);
  6. $row = mysql_fetch_array($result1);
  7. $ilosc = $row['ilosc'];
  8. $strona = ($_GET['strona'] ? $_GET['strona'] : 1); 
  9. $strona--;
  10.  
  11. $from = $strona*$perPage;
  12.  print(&#092;"<center>\");
  13. $pytanie = $db->sql_query(&#092;"SELECT * FROM virtual_tuning LIMIT $from,$perPage \"); 
  14. while ($rekord = mysql_fetch_array($pytanie))  
  15. {
  16. $id = $rekord['id'];  
  17. $foto1 = $rekord['foto1'];
  18. $foto2 = $rekord['foto2'];
  19. $foto3 = $rekord['foto3'];
  20. $foto4 = $rekord['foto4'];
  21. $dodal = $rekord['dodal'];
  22. $wykonal = $rekord['wykonal'];
  23. $opis = $rekord['opis'];
  24. $data = $rekord['data'];
  25. $godz = $rekord['godz'];
  26. $czas = $rekord['czas'];
  27. $samochod = $rekord['samochod'];  
  28. if($wykonal=='StreetDemon'){
  29. $wykonal0='<a href=modules.php?name=Forums&file=profile&mode=viewprofile&u=7>StreetDemon</a>';
  30. }
  31. if($dodal=='Wozniak'){
  32. $dodal0='<a href=modules.php?name=Forums&file=profile&mode=viewprofile&u=3>Wozniak</a>';
  33. }
  34. if($dodal=='StreetDemon'){
  35. $dodal0='<a href=modules.php?name=Forums&file=profile&mode=viewprofile&u=7>StreetDemon</a>';
  36. }
  37.  $tmpl_file = &#092;"modules/Virtual_Tuning/ladowanie/wyswietlanie.php\";
  38. $thefile = implode(&#092;"\", file($tmpl_file));
  39. $thefile = addslashes($thefile);
  40. $thefile = &#092;"$r_file=\"\".$thefile.\"\";\";
  41. eval($thefile);
  42. print $r_file;
  43. }  
  44. for($i=1;$i<($ilosc/$perPage);$i++){
  45. echo('<a href=\"modules.php?name=Virtual_Tuning&strona=' . $i . '\">. ' . $i . ' .</a> ' );
  46.  
  47. }
  48.  
  49.  print(&#092;"</center>\");
  50. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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 Wersja Lo-Fi Aktualny czas: 24.07.2025 - 18:32