<?
/**
* & Author :: Igor Slepko
* & Contacts :: http://gix.su/user/Tw1nGo
**/
include_once '../../sys/inc/home.php';
include_once H.'sys/inc/start.php';
include_once H.'sys/inc/compress.php';
include_once H.'sys/inc/sess.php';
include_once H.'sys/inc/settings.php';
include_once H.'sys/inc/db_connect.php';
include_once H.'sys/inc/ipua.php';
include_once H.'sys/inc/fnc.php';
include_once H.'sys/inc/user.php';
// Определяем uID юзера
if (isset($user))$ank['id'] = $user['id'];
if (isset($_GET['uid']))$ank['id'] = intval($_GET['uid']);
$ank = get_user($ank['id']);
if (!isset($_GET['uid']) || !$ank || $ank['id'] == 0 || $user['id'] != $ank['id'] && $user['level'] <= 3){
$_SESSION['err'] = 'Ошибка.';
header("Location: /".SID);
exit;
}
$set['title']= 'Нарушения : ' . $ank['nick'];
include_once H.'sys/inc/thead.php';
title();
?>
<div class="lc_br wbg font0 relative oh" id="header_path"> <a href="/" style="font-size:0;"> <img src="/style/i/lb/home.png" alt=""> </a> <span class="lc_brw"> <img src="/style/i/lb/sep.png" alt="" class="lc_br_sep"> <a href="/user/?id=<?= $ank['id']?>" class=""><?= $ank['nick']?></a> </span> <span class="lc_brw"> <img src="/style/i/lb/sep.png" alt="" class="lc_br_sep"> <span class="lc_br_text">Нарушения</span> </span> </div>
<?
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_post == 0) {
?>
<div class="wrapper block"> Нет нарушений </div>
<?
}
else{
?>
<div class="wrapper bb0">
<?
$q = mysql_query("SELECT * FROM `ban` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$ank2 = get_user($post['id_user']);
$user_ban = get_user($post['id_ban']);
?>
<div class="js-row block bord-botm oh relative">
<div class="left font0">
<a href="/user/?id=<?= $ank2['id']?>" class="tdn">
<span class="pr"> <div class="inl_bl relative"> <?= ava40($ank2['id'])?> </div> </span>
</a>
</div>
<div class="pre_content_wrap break-word">
<?= group($ank2['id'])?>
<a href="/user/?id=<?= $ank2['id']?>" class="black full_link"> <b><?= $ank2['nick']?></b> </a> <?= medal($ank2['id'])?>
<div class="grey">
<div class="break-word">
<?
if ($post['navsegda'] == 1){
echo "Время бана: <font color=red><b>навсегда</b></font><br />";
} else {
echo "Время бана до: <b>" . vremja($post['time']) . "</b><br />";
}
?>
Причина: <?= $pBan[$post['pochemu']]?><br />
Раздел: <?= $rBan[$post['razdel']]?><br />
Коммент: <?= output_text($post['prich'])?><br />
</div>
</div>
</div> </div>
<?
}
?>
</div>
<?
}
if ($k_page > 1)str('?uid='.$ank['id'].'&',$k_page,$page);
?>
<a href="/user/anketa/?id=<?= $ank['id']?>" class="link darkblue return full_link"> <span class="ico ico_arrow-back"></span> Назад </a>
<?
include_once H.'sys/inc/tfoot.php';
?>