Файл: vsime.com/gifts/inc/act_gift.php
Строк: 46
<?
@$gift = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `gifts` WHERE `id` = '".intval($_GET['id'])."'"));
if (!$gift) {
$title .= ' - Ошибка!';
ex_head();
show_errors('Подарок не найден.');
ex_foot();
}
$giftt = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `gift` WHERE `id` = '$gift[id_gift]'"));
$ank = profile($gift['id_user']);
$ank2 = profile($gift['id_kont']);
$title .= " - Информация о подарке";
ex_head();
if ($gift['type']==2)$type='Личный';
elseif ($gift['type']==3)$type='Анонимный';
else $type='Публичный';
echo "<div class='list'>n";
echo "<img src='/i/gifts/$giftt[image]'/>n";
echo "</div>n";
echo "<div class='list'>n";
echo "Подарил: n";
echo ($gift['type']==1 || $gift['type']==2 && (isset($user) && $ank['id']==$user['id'] || isset($user) && $user['id']==$ank2['id'] || isset($moderate_gifts)) || $gift['type']==3 && (isset($user) && $user['id']==$ank2['id'] || isset($moderate_gifts))?profile_icon($ank2['id']).profile_nick($ank2['id'], 1).profile_medal($ank2['id']):'Неизвестный')."n";
echo "<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "Дата: ".vremja($gift['time'])."<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "Тип подарка: $type<br />";
echo "</div>n";
if ($gift['type']==1 || $gift['type']==2 && (isset($user) && $ank['id']==$user['id'] || isset($user) && $user['id']==$ank2['id'] || isset($moderate_gifts)) || $gift['type']==3 && (isset($user) && $ank2['id']==$user['id'] || isset($moderate_gifts)))
{
if ($gift['msg']!=NULL)
{
echo "<div class='list'>n";
echo "Сообщение: ".output_text($gift['msg'], $ank2['id'])."<br/>n";
echo "</div>n";
}
}
if ($ank['id'] == $user['id'] || isset($moderate_gifts) && $user['level'] > $ank['level'])
{
echo "<div class='list'>n";
if ($ank['id'] == $user['id'] && ($gift['type']==1 || $gift['type']==2))
{
echo "<img src='/i/site/gift.png'/> <a href='?act=send&id=$ank2[id]&do'>Ответить</a><br />";
}
echo "$config[code_delete] <a href='?act=delete&id=$gift[id]'>Удалить подарок</a><br />n";
echo "</div>n";
}
echo "<div class='foot'>n";
echo image_back()." <a href='?id=$ank[id]'>Назад</a>n";
echo "</div>";
ex_foot();
?>