<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';


/* Бан пользователя */ 
if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `razdel` = 'guest' AND `id_user` = '$user[id]' AND (`time` > '$time' OR `view` = '0')"), 0)!=0)
{
header('Location: /ban.php?'.SID);exit;
}



if (isset($_GET['cit']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `guest` WHERE `id` = '".intval($_GET['cit'])."'"), 0) == 1)
{
	$cit = mysql_fetch_assoc(mysql_query("SELECT * FROM `guest` WHERE `id` = '".intval($_GET['cit'])."' limit 1"));
	$c_ank = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $cit[id_user] LIMIT 1"));
}



$set['title']='Гостевая книга'; // заголовок страницы

include_once '../sys/inc/thead.php';


include 'inc/2.php';




if ($k_page>1)str('index.php?',$k_page,$page); // Вывод страниц



echo '<div class="foot">';
echo '<img src="/style/icons/str.gif" alt="*"> <a href="who.php">Кто здесь?</a><br />';
echo '</div>';
include 'inc/admin_form.php';
include_once '../sys/inc/tfoot.php';
?>
