Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z wyświetlaniem galerii fotek.
karolski
post
Post #1





Grupa: Zarejestrowani
Postów: 199
Pomógł: 0
Dołączył: 12.02.2004
Skąd: Czymiasto

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


Witam,

Mam problem z wyswietlaniem miniaturek fotek tzn napisalem skrypt wyswiwtlajacy ale porcjowanie zaczerpnolem z innego skryptu i nei wiem dlaczego to nei dziala u mnie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) chodzi mi o to ze aj k pobieram fotki to wyswitlam je max 31 na stronce i na dole liczyc ile ma byc tych stronek ale jak przechodze dalej to wyswietla sie to samo co na pierwszej stronce zmienna zapytanei przekazuje poprzez POST, zobaczcie sami:

  1. <?
  2.  
  3. polacz ();
  4.  
  5. $sql = &#092;"select * from fotki where keywords like '%$zapytanie%' order by id DESC\";
  6.  
  7. $wynik = mysql_query($sql);
  8.  
  9. $ile_znalezionych = mysql_numrows($wynik);
  10. print &#092;"Znaleziono rekordów: $ile_znalezionych<br><br>\";
  11.  
  12. $gal_cols = '3';
  13. $gal_limit = '21';
  14.  
  15. $aaa = 0;
  16. $cols = 0;
  17.  
  18. echo '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">
  19. <tr>';
  20.  
  21. while($rekord = mysql_fetch_array($wynik)) {
  22.  
  23.  
  24.  
  25. if($cols==$gal_cols) {
  26. $cols = 0;
  27. echo '<tr><td><br></td></tr></tr>
  28. <tr>';
  29. }
  30.  
  31. $fotka = $rekord[1];
  32. $img= explode(&#092;".\", \"$fotka\");
  33. $thumb=$img[0].'m.'.$img[1];
  34. $imgg = @getimagesize($imgfinalink);
  35. $imgbig = @getimagesize($rekord[1]);
  36.  
  37.  
  38. print &#092;"<td width=\"20\">&nbsp;</td>\";
  39. print &#092;"<td><img src=\"layout/thumb_left.gif\" width=\"10\" height=\"145\" border=\"0\"></td>\";
  40. print &#092;"<td width=\"124\" height=\"145\" align=\"center\" bgcolor=\"#26506C\">\";
  41. print &#092;"<img src=\"layout/transparent.gif\" width=\"1\" border=\"0\"><br>\";
  42. print &#092;"<a href=\"javascript:nowe('$rekord[1]', '$imgbig[1]', '$imgbig[0]')\"><img src=\"$thumb\" alt=\"Powiększ zdjęcie\" hspace=\"0\" vspace=\"0\" align=\"top\" class=\"mini\"></a><br>\";
  43. print &#092;"<span class=\"rok_i_nr1\">rok :</span> <span class=\"rok_i_nr2\">$rekord[9]</span><br>\";
  44. print &#092;"<img src=\"layout/transparent.gif\" width=\"1\" border=\"0\">\";
  45. print &#092;"<span class=\"rok_i_nr1\">nr :</span> <span class=\"rok_i_nr2\">$rekord[0]</span> </td>\";
  46. print &#092;"<td><img src=\"layout/thumb_right.gif\" width=\"10\" height=\"145\" border=\"0\"></td>\";
  47.  
  48.  
  49. $aaa = $aaa+1;
  50. $cols = $cols+1;
  51. if($aaa==$gal_limit) break;
  52. }
  53.  
  54. echo '</tr>
  55. </table>';
  56.  
  57. echo '<br><center>';
  58. $ile = mysql_num_rows($wynik);
  59. if($ile<>0) {
  60. $arts= $ile;
  61. $ile = $ile / $gal_limit;
  62. $ile = ceil($ile);
  63.  
  64. $bbb = 0;
  65. while($bbb<>$ile) {
  66.  
  67. $ccc = $bbb + 1;
  68. if($page==$bbb) {
  69. echo '<b>'.$ccc.'</b> ';
  70. } else {
  71. echo '<a href=\"index.php?strona=szukaj&page='.$bbb.'\">'.$ccc.'</a> ';
  72. }
  73.  
  74. $bbb++;
  75. }
  76. } else {
  77. echo '<b>1</b> ';
  78. }
  79.  
  80.  
  81. ?>


Ten post edytował karolski 13.03.2005, 14:04:06
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 23.12.2025 - 19:55