Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][HTML] stronicowanie, źle się wyświetla, poziomo, pionowo
Goldi
post
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 12.01.2009

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


Witam,
Jak mam zrobić żeby stronicowanie się wyświetlało poziomo, a nie pionowo?

Kod php
  1. <?php
  2. echo'<center><table><tr><td>';
  3. if($_GET['page']>=2){echo'<a href="szukaj,'.($_GET['page']-1).','.$_GET['max'].','.plustxt($_GET['q']).',html"><<</a>';}else{echo'<<';}echo'&nbsp;</td><td>';
  4. for($i=1;$i<=$_GET['max'];$i++)
  5. {
  6. if($_GET['page']!=$i){echo'<a href="szukaj,'.$i.','.$_GET['max'].','.plustxt($_GET['q']).'.html">'.$i.'</a>';}else{echo'<b>'.$i.'</b>';}echo' - ';
  7. }
  8. echo'</td><td>&nbsp;';if($_GET['page']<=($_GET['max']-1)){echo'<a href="szukaj,'.($_GET['page']+1).','.$_GET['max'].','.plustxt($_GET['q']).'.html">>></a>';}else{echo'>>';}echo'</td></tr></table></center>';
  9. }
  10. ?>


A tak to wygląda
(IMG:http://fototube.pl/pictures/pyt2.jpg)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
artur_dziocha
post
Post #2





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


linki obejmij w style
<ul><li>
Go to the top of the page
+Quote Post
Goldi
post
Post #3





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 12.01.2009

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


Przepraszam ale pomyliłem kod (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

oto kod:

  1. <?
  2.  
  3.  
  4. if($strona>1)
  5.  
  6. echo "<a href=$link".($strona-1).".html><img src=\"images/left.gif\" border=\"0\" ></a>"; else echo "<img src=\"images/left.gif\" border=\"0\" >";
  7.  
  8.  
  9.               echo '</td><td>';
  10.  
  11.               if($podstron<=10)
  12.                 {
  13.                 for ($s=1; $s<=$podstron; $s++){
  14.                 if ($s==$strona) echo "$s";
  15.                 else echo "<a href=".$link."".$s.".html> $s </a>";}
  16.                 }  
  17.                //jeżeli podstron więcej niż 10
  18.              elseif($podstron>10)
  19.                 {
  20.                 if($strona>=6 && $strona<=$podstron-5){
  21.                 $wr=$strona-4;
  22.                 $wz=$strona+5;
  23.                 for ($s=$wr; $s<=$wz; $s++){
  24.                   if ($s==$strona) echo "$s";
  25.                   else echo "<a href=".$link."".$s.".html> $s </a>";
  26.                   }
  27.                   }
  28.                  else if($strona>=$podstron-5){
  29.                  for ($s=$podstron-9; $s<=$podstron; $s++){
  30.                   if ($s==$strona) echo "$s";
  31.                   else echo "<a href=".$link."".$s.".html> $s </a>";
  32.                   }              
  33.                   }
  34.                 else{
  35.                 for ($s=1; $s<=10; $s++){
  36.                 if ($s==$strona) echo "$s";
  37.                 else echo "<a href=".$link."".$s.".html> $s </a>";}
  38.                 }
  39.                 }              echo '</td><td width="" align="center">';  
  40.  
  41. if($strona<$podstron) echo"<a href=$link".($strona+1).".html><img src=\"images/right.gif\" border=\"0\" ></a>"; else echo"<img src=\"images/right.gif\" border=\"0\" >";
  42.  
  43.  
  44.  
  45.  
  46. ?>


a wczytuje to do index.php

  1. <?
  2. include("podzial.php");
  3. ?>
Go to the top of the page
+Quote Post

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.08.2025 - 06:55