Файл: vsime.com/bans/inc/act_info.php
Строк: 87
<?
$ban=mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `users_ban` WHERE `id` = '".intval($_GET['id'])."' AND `id_comm` = '0'".($count_arr_bans < 1?" AND `show` = '1'":NULL).""));
if ($ban == NULL)
{
$title .= ' - Ошибка!';
ex_head();
$error[] = 'Нарушение не найдено.';
show_errors();
ex_foot();
}
$title .= ' - Информация';
ex_head();
$ban_user=profile($ban['id_user']);
$ban_user_give=profile($ban['id_ank']);
$time_ban = ($ban['time_ban']-$ban['time'])/3600;
if ($ban['forever'] == 1)$time_text = 'Навсегда';
else $time_text = "$time_ban ч.";
if ($ban['time_ban'] > $time)$image = "comm_closed.png"; else $image = "comm_open.png";
if ($ban['reason']==2)$reason_name = 'Нецензурная лексика';
elseif ($ban['reason']==3)$reason_name = 'Реклама';
elseif ($ban['reason']==4)$reason_name = 'Пропаганда ненависти';
elseif ($ban['reason']==5)$reason_name = 'Флуд';
elseif ($ban['reason']==6)$reason_name = 'Иное';
elseif ($ban['reason']==7)$reason_name = 'СПАМ, реклама';
elseif ($ban['reason']==8)$reason_name = 'Системное нарушение';
else $reason_name = 'Грубость и оскорбления';
if ($ban['time_ban'] > $time)$ban_status = '<span class="spared">Бан активен</span>'; else $ban_status = '<span class="spagr">Бан неактивен</span>';
?>
<div class="list"><? echo "<img src='/i/site/$image' /> ".$ban_status;?></div>
<div class="list">Обитатель: <?php echo profile_icon($ban_user['id']).profile_nick($ban_user['id'], 1).profile_medal($ban_user['id']);?></div>
<div class="list">Дата:</b> <?php echo vremja($ban['time']);?></div>
<div class="list">Модератор: <?php echo profile_icon($ban_user_give['id']).profile_nick($ban_user_give['id'], 1).profile_medal($ban_user_give['id']);?></div>
<div class="list">Время: <?php echo $time_text;?></div>
<div class="list">Причина: <?php echo $reason_name;?></div>
<div class="list">Комментарий: <?php echo output_text($ban['msg'], $ban_user_give['id']);?></div>
<? if (isset($moderate_ban["$ban[type]"]) && isset($user) && ($user['id'] == $ban_user_give['id'] || $user['level'] > $ban_user_give['level']))
{
?><div class="list"><? echo $config['code_delete'];?> <a href='?act=delete&id=<?php echo $ban['id'];?>'>Удалить нарушение</a></div>
<?
}
?>
<?
echo "<div class='foot'>n";
echo image_back()." <a href='?id=$ban_user[id]'>Назад</a>n";
echo "</div>n";
ex_foot();
?>