Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ERROR | E_WARNING | E_PARSE);
- session_start();
- include '../config.php';
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Language" content="bg">
- <title>Меню Поздрави</title>
- <meta http-equiv="Refresh" content="7200" />
- <meta name="robots" content="INDEX, FOLLOW"/>
- <meta name="revisit-after" content="365 Days"/>
- <meta http-equiv="imagetoolbar" content="no"/>
- <meta name="generator" content="Тошко Танчев Skype:toshko_7771"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <link href="css/ban.css" rel="stylesheet" type="text/css" />
- <link href="css/style.css" rel="stylesheet" type="text/css" />
- <link href="css/page.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function()
- {
- $("#NavigationBar1 .navbar a").hover(function()
- {
- $("img", this).stop().animate({left:"-98px"},{queue:false,duration:500});
- }, function()
- {
- $("img", this).stop().animate({left:"0px"},{queue:false,duration:500});
- })
- });
- </script>
- </head>
- <body>
- <div id="wb_Image1" style="position:absolute; left:0px; top:0px; width:300px; height:150px; z-index:3;">
- <img src="images/radio_alex.jpg" id="Image1" alt="" style="width:300px; height:150px;"></div>
- <div id="NavigationBar1" style="position:absolute; left:420px; top:23px; width:400px; height:25px; z-index:4;">
- <ul class="navbar">
- <li><a href="../index.php" target="_blank"><img alt="" src="images/img0009.png"></a></li>
- <li><a href="admin.php"><img alt="" src="images/img0010.png"></a></li>
- <li><a href="addban.php"><img alt="" src="images/img0011.png"></a></li>
- <li><a href="logout.php"><img alt="" src="images/img0012.png"></a></li>
- </ul>
- </div>
- <br /><br /><br /><br />
- <center><h2>П О З Д Р А В И М Е Н Ю</h2></center>
- <center>
- <table align="center" width="150" border="1px">
- <form action="emptytable.php" method="post">
- <input name="temptable" type="hidden" value="pozdravi" />
- <font color="#990033">Изтриване на поздрави: </font><input name="Submit" type="submit" value="Изтрий" />
- </form>
- </table>
- </center>
- <div class="div" style="text-align: center; margin-top:-50px; ">
- <table class="center" align="center" color="#fff" border="1" cellpadding="1" cellspacing="1" style="width:100%">
- <tbody>
- <tr bgcolor=”#009900”>
- <td style="width:60px"><b>ID</b></td>
- <td style="width:125px"><b>От кого</b></td>
- <td style="width:125px"><b>За кого</b></td>
- <td style="align:center"><b>Поздрав</b></td>
- <td style="width:125px"><b>IP Адрес</b></td>
- <td style="width:150px"><b>Дата на изпращане</b></td>
- </tr>
- <?php
- $page=(int)$_GET['page'];
- if ($page == 0 || $page == NULL || $page < 0)
- {
- $page = 1;
- }
- $pp=10;//Брой поздрави
- $start = ($page*$pp) - $pp;
- $pq = mysql_query("SELECT * FROM pozdravi") or die(mysql_error());
- $broip = mysql_num_rows($pq);
- $total = ceil($broip/$pp);
- //Край странициране
- $row = mysql_query("SELECT * FROM pozdravi ORDER BY pz_date DESC LIMIT $start,$pp");
- while ($r = mysql_fetch_assoc($row)) {
- $id=$r['id'];
- $from=$r['from'];
- $send=$r['send'];
- $greeting=$r['greeting'];
- $ip=$r['ip_client'];
- $date=$r['pz_date'];
- echo "<tr><td>$id</td><td>$from</td><td>$send</td><td>$greeting</td><td>$ip</td><td>$date</td></tr>";
- }
- ?>
- </tbody>
- </table>
- </div>
- <center>
- <div class="pagination">
- <?php
- $prev = $page - 1;
- $next = $page + 1;
- if($page >= $total)
- {
- print "<a href=''>Предишна</a>";
- }
- else {
- print "<a href='?page=$next'>Предишна</a>";
- }
- if ($prev == 0)
- {
- print "<a href=''>Следваща</a>";
- }
- else {
- print "<a href='?page=$prev'>Следваща</a>";
- }
- print"<br /><p>Страница $page от $total</p>";
- ?>
- </div>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment