Файл: inc/user/bans.php
Строк: 62
<?
$title='Список нарушений';
include_once '../system/config.php';
?>
<div class="title"><a href='/user/<? echo $ank['id'];?>'><? echo $au['nick'];?></a> / Список нарушений
</div>
<div class="content">
<div class="div">
<ul>
<?
if(isset($_GET['delete']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ban` WHERE `id` = '".intval($_GET['delete'])."' AND `id_user` = '$ank[id]'"),0)!=0 && $ku['status']==3)
{
mysql_query("UPDATE `kolhoz_ban` SET `izg` = '0', `time` = '0', `mod` = '$ku[id]' WHERE `id` = '".intval($_GET['delete'])."'");
}
$num=0;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ban` WHERE `id_user` = '".($ank['id'])."'"),0);
if ($k_post==0)
{
echo "Нет инфо";
}
$user['set'] = 5;
$k_page=k_page($k_post,$user['set']);
$page=page($k_page);
$start=$user['set']*$page-$user['set'];
$q=mysql_query("SELECT * FROM `kolhoz_ban` WHERE `id_user` = '$ank[id]' ORDER BY id DESC LIMIT $start, $user[set]");
while($post=mysql_fetch_array($q))
{
$num++;
$us_ban=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$post[id_who]'"));
if($post['mod']<1)echo "<li><span class='minor'><span>$num</span>.</span><span> <span>".($post['izg']==1?'Изгнание':"Обет Молчания</span>")."</span>";
if($post['mod']>0)echo "<li><span class='minor'><span>$num</span>.</span><span> <span>".($post['izg']==1?'Изгнание':"Обет Молчания</span>")." (снято)</span>";
echo", выдал".($us_ban['pol']==0?'a':null)." <span>";
echo on_k($us_ban['id']);
echo "<a href='/user/$us_ban[id]'>".nc($us_ban['id'])."</a></span><span>, (".output_text($post['msg']).")</span>";
echo "<li>Нарушение: ".($post['reason'])."<span><br>";
echo"".($ku['status']>0?" <a href='/user/$ank[id]/bans/delete/$post[id]'>[снять бан]</a>":null)."<br>".($post['mod']>0?"Снял бан: ".nc($post['mod'])."":null)."</li>";
}
if ($k_page>1)str("/user/$ank[id]/bans/",$k_page,$page); // Вывод страниц
echo '</ul></div>';
include_once '../system/foot.php';
?>