Файл: ban_page.php
Строк: 67
<?php
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';
only_reg();
if(isset($_GET['id']))$ank=intval($_GET['id']);
else $user['id']=intval($_GET['id']);
if(mysql_result(mysql_query("SELECT COUNT(`id`)FROM `user` WHERE `id`='".intval($_GET['id'])."' LIMIT 1"),0)==0){
header("Location: /index.php");
exit;
}else{
$ank=get_user(intval($_GET['id']));
$set['title']='Баны '.$ank['nick'].'';
include_once 'sys/inc/thead.php';
title();
err();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(`id`)FROM `ban` WHERE `id_user`='".$ank['id']."'"),0);
if($k_post==0){
echo "<div class='nav1'>";
echo "У пользователя ".$ank['nick']." нет нарушений.";
echo "</div>";
}else{
$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 id,razdel,time FROM `ban` WHERE `id_user`='".$ank['id']."' LIMIT ".$start.",".$set['p_str']."");
while($ban=mysql_fetch_assoc($q)){
echo "<div class='nav2'>";
echo "<a href='/ban_id.php?id=".$ban['id']."'>".$rBan[$ban['razdel']]."</a> <span style='color:darkred;'>(до ".vremja($ban['time']).")</span>";
echo "</div>";
}
if ($k_page > 1)
str("/ban_page.php?id=".intval($_GET['id'])."&", $k_page, $page);
}
}
include_once 'sys/inc/tfoot.php';
?>