Файл: vsime.com/bans/inc/act_index.php
Строк: 73
<?
if (isset($_GET['id']))
{
$ank = profile(intval($_GET['id']));
if ($ank['id'] == 0)
{
$title .= ' - Ошибка!';
ex_head();
show_errors('Пользователь не найден.');
ex_foot();
}
} else {
if_user('is_reg');
$ank = $user;
}
$title .= ' '.$ank['nick']; // тип заголовок
ex_head();
$count_results = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `users_ban` WHERE `id_comm` = '0' AND `id_user` = '$ank[id]'".($count_arr_bans < 1?" AND `show` = '1'":NULL).""));
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
if (!$count_results) {
echo "<div class='list'>n";
echo "Нет нарушенийn";
echo "</div>n";
}
$query=mysqli_query($dbi, "SELECT * FROM `users_ban` WHERE `id_comm` = '0' AND `id_user` = '$ank[id]'".($count_arr_bans < 1?" AND `show` = '1'":NULL)." ORDER BY `time` DESC LIMIT $start, $config[rop]");
while($post=mysqli_fetch_array($query)) {
$ank2 = profile($post['id_ank']);
$time_ban = ($post['time_ban']-$post['time'])/3600;
if ($post['time_ban'] > $time){$title_link_text = 'Бан активен'; $image = "comm_closed.png";} else {$image = "comm_open.png"; $title_link_text = 'Бан неактивен';}
if ($post['forever'] == 1)$time_text = 'навсегда';
elseif ($time_ban <= 0)$time_text = 'предупреждение';
else $time_text = "на $time_ban ч.";
echo "<div class='list'>n";
echo "<div class='left'>n";
show_avatar($ank2['id'], 'small');
echo "</div>n";
echo "<div class='overfl_hid'>n";
echo profile_icon($ank2['id']).profile_nick($ank2['id'], 1).profile_medal($ank2['id'])."n";
echo " ".array_search($post['type'], $config['array_type_bans'])." ($time_text)".(isset($moderate_site) && $post['akt_rating'] > 0?" <span class='spared'>(-$post[akt_rating])</span>":NULL)." <span class='right'><img src='/i/site/$image' ".title_link($title_link_text)."/></span>n";
echo "<br />n";
echo "<a href='?act=info&id=$post[id]'>Подробнее »</a>";
echo "<span class='right'>".vremja($post['time'])."</span>n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?id=$ank[id]&"); // Вывод страниц
echo "<div class='foot'>n";
echo image_back()." <a href='/anketa/?id=$ank[id]'>В анкету</a>n";
echo "</div>n";
ex_foot();
?>