Guest User

obusu

a guest
Mar 1st, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.34 KB | None | 0 0
  1. <?php
  2. include("ayarlar.php");
  3. session_start();
  4.  
  5. if(!isset($_SESSION["giris"]))
  6. {
  7.  
  8. echo "Bu sayfayı görüntüleme yetkiniz yoktur.<br>";
  9. echo "<a href=index.php>Giriş sayfası</a>";
  10.  
  11. }
  12. else
  13.  
  14. {
  15.  
  16. include("../baglan.php");
  17.  
  18. $gosterim=6;
  19. $sayfa=@$_GET['sayfa'];  
  20. if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}
  21.  
  22.  
  23. $k_sayisi=mysql_num_rows(mysql_query("Select id From ziyaretcidefteri"));
  24.  
  25. $s_sayisi=ceil($k_sayisi/$gosterim);
  26.  
  27. $ilk_kayit=($sayfa*$gosterim)-$gosterim;
  28.  
  29. $al=mysql_query("Select id, mesaj, nick, email, onay From ziyaretcidefteri Order By id Desc Limit
  30.  
  31. $ilk_kayit,$gosterim");
  32. while($yazdir=mysql_fetch_array($al)){
  33.  
  34.     extract($yazdir);
  35.     echo "<br /><strong>Yazan:</strong> ".$nick."";
  36.     echo "<br /><strong>E-Mail:</strong> ".$email."";
  37.     echo "<br /><strong>Mesaj:</strong> ".$mesaj."</br></br>";
  38.     echo "<font face='Tahoma' size='3'><p><b><font face='Tahoma'><a href='onayla.php?id=$id' style='text-decoration: none'>
  39. <font color='#FF0000'>Onayla</font></a></font></b></br></br>";
  40. }
  41. echo '</br><hr>';
  42. if($sayfa!=1){
  43.     echo "";
  44.     echo " ";
  45. }
  46. for($i=1;$i<=$s_sayisi;$i++){
  47.     echo "<span style='padding:3px; font-size:19px; margin-right:5px;'><a
  48.  
  49. href='yonetim.php?sayfa={$i}'>$i</a></span>";
  50.     echo "";
  51. }
  52. if($sayfa!=$s_sayisi){
  53.     echo "";
  54.     echo " ";
  55. }
  56.  
  57. }
  58.  
  59. ?>
Advertisement
Add Comment
Please, Sign In to add comment