<?
if ($data['count_gifts'] > 0) {
echo"
<div class='app-container'>
<div class='app-user--sections' id='ufriends'>
<div class='app-user--sections--name'>
<a href='/gifts?id={$data['id']}' title='Подарки'>".language::text('gifts', $language,'profile')."
<span class='app-sections--counter'>".$data['count_gifts']."</span>
</a>
</div>
<div class='app-user--sections--main'>";
if ($data['count_gifts'] > 0)
{
$query_gifts = DB :: $pdo -> query("SELECT * FROM `user_gifts` WHERE `id_ank` = '".$data['id']."' ORDER BY `id` DESC LIMIT 8");
while($r_gifts = $query_gifts -> fetch())
{
echo"<div class='app-user--sections--item'>
<div class='app-user--sections--avatar'>
<img class='app--sections--photo' src='http://files.vineti.ru/gifts/{$r_gifts['id_gift']}.jpg' width='64px' height='64px'>
</div>
</div>";
}
}
echo"</div> </div></div>";
}