Размер файла: 2.64Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
function myErrorHandler ($errno, $errstr, $errfile, $errline) {}
set_error_handler("myErrorHandler");
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
include "inc/conf_db.php";
include"inc/conf.php";
include"inc/head.php";
//////////////////
session_name("ID");
session_start();
/////////////////
$login=$_SESSION['login'];
$password=$_SESSION['password'];
//////////////////
$q = mysql_query("select * from `user` where login='$login';");
$data = mysql_fetch_array($q);
if(($_SESSION['login'])==$moder OR ($_SESSION['login'])==$moder2 OR ($_SESSION['login'])==$moder3 OR ($_SESSION['login'])==$moder4 && !$_SESSION['login']=="" && !($_SESSION['password'])=="" && ($_SESSION['password'])==$data['pass']){
//////////////////
$max_mess=10;
$u = mysql_query("select * from `guestbook` ");
$counter = MYSQL_NUMROWS($u);
if (empty($page)) $page = 0;
if ($page < 0) $page = 0;
echo"<a href=\"/click/guest/add.php\">Добавить сообщение</a>";
$m = mysql_query("select * from `guestbook` ORDER BY `id` DESC LIMIT ".$page." ,".$max_mess."");
$count = MYSQL_NUMROWS($m);
if($counter==0){
echo"<br/><br/>Сообщений нет!<br/><br/>";}
if($counter>0){
while($mess = mysql_fetch_array($m)){
echo"<p align=\"left\">";
echo"»<font color=\"blue\">$mess[author]</font>
<small><font color=\"#004080\">[$mess[date]]</font><a href=\"moder_book_del.php?mess=".$mess['id']."\"> [DEL]</a></small><br/>
<b><font color=\"#346969\">$mess[mess]</font></b><br/><small>
<font color=\"red\">[$mess[usagent]]</font></small>";
echo"</p>";
}}
if ($page > 0) echo '<a href="'.$PHP_SELF.'?page='.($page - $max_mess).'">ҫназад</a> ';
if ($counter > $page + $max_mess) echo ' <a href="'.$PHP_SELF.'?page='.($page + $max_mess).'">далее»</a>';
echo"<br/>[<a href=\"moder_totalclean.php?".SID."\"><font color=\"red\">ТОТАЛЬНАЯ ЧИСТКА</font></a>]<br/>";
/////////////////
echo "<tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit;
}else{
echo"<b>ИДИ НА ХУЙ!</b><br/><a href=\"panel.php\">В панель</a><br/>
<tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit;}
?>