Файл: vsime.com/awards/inc/act_index.php
Строк: 63
<?
if (isset($_GET['id']))
{
$ank = profile(intval($_GET['id']));
if ($ank['id'] == 0)
{
$title .= ' - Ошибка!';
ex_head();
$error[] = 'Пользователь не найден.';
show_errors();
ex_foot();
}
} else {
if_user('is_reg');
$ank = $user;
}
$links_hist['name'] = "$ank[nick] / Награды";
$title .= ' '.$ank['nick'];
ex_head();
$count_results = mysqli_result("SELECT COUNT(*) FROM `awards_user` WHERE `id_user` = '$ank[id]'");
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
if (!$count_results)
{
echo "<div class='list_empty'>n";
echo "У $ank[nick] нет наградn";
echo "</div>n";
}
$query = mysqli_query($dbi, "SELECT * FROM `awards_user` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query))
{
$award = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `awards_list` WHERE `id` = '$post[id_award]'"));
$ank2 = profile($post['id_ank']);
echo "<div class='list'>n";
echo "<div class='left'>n";
echo "<img src='/i/awards/award_$award[id].png' />n";
echo "</div>n";
echo "<div class='overfl_hid'>n";
if (isset($moderate_awards))echo "<span class='right'><a href='?act=delete&id=$post[id]'>$config[code_delete]</a></span>n";
echo hsc($award['name'])."<br />n";
echo "<img src='/i/site/time.png' /> ".vremja($post['time'])."<br />n";
echo profile_icon($ank2['id']).profile_nick($ank2['id'], 1).profile_medal($ank2['id']);
if ($post['msg'])echo ": ".output_text($post['msg'], $ank2['id'])."<br />n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?id=$ank[id]&");
if (isset($moderate_awards) && $ank['id']!=$user['id'])
{
echo "<div class='mod_grad'>n";
echo "<img src='/i/site/awards.png' /> <a href='?act=send&id=$ank[id]'>Наградить</a>n";
echo "</div>n";
}
echo "<div class='foot'>n";
echo image_back()." <a href='?act=index&id=$ank[id]'>Назaд</a>n";
echo "</div>n";
ex_foot();
?>