Guest User

admin.php

a guest
Aug 10th, 2013
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.01 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ERROR | E_WARNING | E_PARSE);
  3. session_start();
  4. include '../config.php';
  5. ?>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Language" content="bg">
  10. <title>Меню Поздрави</title>
  11. <meta http-equiv="Refresh" content="7200" />
  12. <meta name="robots" content="INDEX, FOLLOW"/>
  13. <meta name="revisit-after" content="365 Days"/>
  14. <meta http-equiv="imagetoolbar" content="no"/>
  15. <meta name="generator" content="Тошко Танчев Skype:toshko_7771"/>
  16. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  17. <link href="css/ban.css" rel="stylesheet" type="text/css" />
  18. <link href="css/style.css" rel="stylesheet" type="text/css" />
  19. <link href="css/page.css" rel="stylesheet" type="text/css" />
  20. <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
  21. <script type="text/javascript">
  22. $(document).ready(function()
  23. {
  24.    $("#NavigationBar1 .navbar a").hover(function()
  25.    {
  26.       $("img", this).stop().animate({left:"-98px"},{queue:false,duration:500});
  27.    }, function()
  28.    {
  29.       $("img", this).stop().animate({left:"0px"},{queue:false,duration:500});
  30.    })
  31. });
  32. </script>
  33. </head>
  34. <body>
  35. <div id="wb_Image1" style="position:absolute; left:0px; top:0px; width:300px; height:150px; z-index:3;">
  36. <img src="images/radio_alex.jpg" id="Image1" alt="" style="width:300px; height:150px;"></div>
  37. <div id="NavigationBar1" style="position:absolute; left:420px; top:23px; width:400px; height:25px; z-index:4;">
  38. <ul class="navbar">
  39. <li><a href="../index.php" target="_blank"><img alt="" src="images/img0009.png"></a></li>
  40. <li><a href="admin.php"><img alt="" src="images/img0010.png"></a></li>
  41. <li><a href="addban.php"><img alt="" src="images/img0011.png"></a></li>
  42. <li><a href="logout.php"><img alt="" src="images/img0012.png"></a></li>
  43. </ul>
  44. </div>
  45. <br /><br /><br /><br />
  46. <center><h2>П О З Д Р А В И&nbsp;&nbsp; М Е Н Ю</h2></center>
  47. <center>
  48. <table align="center" width="150" border="1px">
  49.     <form action="emptytable.php" method="post">
  50. <input name="temptable" type="hidden" value="pozdravi" />
  51. <font color="#990033">Изтриване на поздрави:&nbsp;</font><input name="Submit" type="submit" value="Изтрий" />
  52. </form>
  53. </table>
  54. </center>
  55. <div class="div" style="text-align: center; margin-top:-50px; ">
  56. <table class="center" align="center" color="#fff" border="1" cellpadding="1" cellspacing="1" style="width:100%">
  57. <tbody>
  58. <tr bgcolor=”#009900”>
  59. <td style="width:60px"><b>ID</b></td>
  60. <td style="width:125px"><b>От кого</b></td>
  61. <td style="width:125px"><b>За кого</b></td>
  62. <td style="align:center"><b>Поздрав</b></td>
  63. <td style="width:125px"><b>IP Адрес</b></td>
  64. <td style="width:150px"><b>Дата на изпращане</b></td>
  65. </tr>
  66. <?php
  67. $page=(int)$_GET['page'];
  68. if ($page == 0 || $page == NULL || $page < 0)
  69. {
  70.     $page = 1;
  71. }
  72. $pp=10;//Брой поздрави
  73. $start = ($page*$pp) - $pp;
  74. $pq = mysql_query("SELECT * FROM pozdravi") or die(mysql_error());
  75. $broip = mysql_num_rows($pq);
  76. $total = ceil($broip/$pp);
  77. //Край странициране
  78. $row = mysql_query("SELECT * FROM pozdravi ORDER BY pz_date DESC LIMIT $start,$pp");
  79. while ($r = mysql_fetch_assoc($row)) {
  80.     $id=$r['id'];
  81.     $from=$r['from'];
  82.     $send=$r['send'];
  83.     $greeting=$r['greeting'];
  84.     $ip=$r['ip_client'];
  85.     $date=$r['pz_date'];
  86. echo "<tr><td>$id</td><td>$from</td><td>$send</td><td>$greeting</td><td>$ip</td><td>$date</td></tr>";
  87. }
  88. ?>
  89. </tbody>
  90. </table>
  91. </div>
  92. <center>
  93. <div class="pagination">
  94.     <?php
  95. $prev = $page - 1;
  96. $next = $page + 1;
  97. if($page >= $total)
  98. {
  99.     print "<a href=''>Предишна</a>";
  100. }
  101.  else {
  102.     print "<a href='?page=$next'>Предишна</a>";
  103. }
  104. if ($prev == 0)
  105. {
  106.     print "<a href=''>Следваща</a>";  
  107. }
  108.  else {
  109.     print "<a href='?page=$prev'>Следваща</a>";    
  110. }
  111. print"<br /><p>Страница $page от $total</p>";
  112. ?>
  113. </div>
  114. </center>
  115. </body>
  116. </html>
Advertisement
Add Comment
Please, Sign In to add comment