Файл: selemege.tk/guest/index.php
Строк: 60
<?
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($user) && isset($_GET['v']))
{
if ($_GET['v'] == 0)
mysql_query("UPDATE `user` SET `v_guest` = '0' WHERE `id` = '$user[id]'");
if ($_GET['v'] == 1)
mysql_query("UPDATE `user` SET `v_guest` = '1' WHERE `id` = '$user[id]'");
header("Location: ?");
}
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';
if (isset($user) && $user['v_guest'] == 0)
include 'inc/2.php';
else
include 'inc/1.php';
if ($k_page>1)str('index.php?',$k_page,$page); // Вывод страниц
if (isset($user))
{
echo '<div class="foot">';
if ($user['v_guest'] == 1)
echo '<center> <a href="index.php?v=0">Легкая версия</a> | <b>Полная версия</b></center>';
else
echo '<center><b>Легкая версия</b> | <a href="index.php?v=1">Полная версия</a></center>';
echo '</div>';
}
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';
?>