Файл: ban.php
Строк: 64
<?
include_once 'sys/includes/start.php';
include_once 'sys/includes/compress.php';
include_once 'sys/includes/sess.php';
include_once 'sys/includes/home.php';
include_once 'sys/includes/settings.php';
include_once 'sys/includes/db_connect.php';
include_once 'sys/includes/ipua.php';
include_once 'sys/includes/fnc.php';
$banpage=true;
include_once 'sys/includes/user.php';
only_reg();
$set['title']='БАН';
include_once 'sys/includes/header.php';
title();
auter();
if (!isset($user))
{
header("Location: /index.php?".SID);
exit;
}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '".$user['id']."' AND (`time` > '".$time."' OR `view` = '0')"), 0)==0)
{
header('Location: /index.php?'.SID);
exit;
}
mysql_query("UPDATE `ban` SET `view` = '1' WHERE `id_user` = '".$user['id']."'");
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '".$user['id']."'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=mysql_query("SELECT * FROM `ban` WHERE `id_user` = '$user[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
$ank=get_user($post['id_ban']);
echo "<td class='icon12'>";
avatar_mini($ank['id']);
echo "</td>";
echo "<td class='p_t'>";
echo GradientText("$ank[nick]", "$ank[ncolor]", "$ank[ncolor2]");
echo ": до ".vremja($post['time'])."";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='p_m' colspan='2'>";
echo esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($post['prich']))))))))."<br />";
echo "</td>";
echo "</tr></table>";
}
if ($k_page>1)
{
str('?',$k_page,$page);
}
echo "<div class='forum_tema'>";
echo "<b>Чтобы больше не возникало подобных ситуаций, рекомендуем Вам изучить <a href="/rules.php">правила</a> нашего сайта</b><br />";
echo "</div>";
include_once 'sys/includes/footer.php';
?>