<?php
if ($data['count_friends'] > 0) {
echo"<div class='app-container'>
<div class='app-user--sections' id='ufriends'>
<div class='app-user--sections--name'>
<a href='/friends?id={$data['id']}' title='Друзья'>".language::text('friend', $language,'profile')."
<span class='app-sections--counter'>{$data['count_friends']}</span>
</a>
</div>
<div class='app-user--sections--main'>";
$Friends = DB :: $pdo -> query("SELECT * FROM `friends` WHERE `id_user` = '".$id."' ORDER BY `id` DESC LIMIT 8");
$i = 0;
while($r = $Friends -> fetch()) {
++$i;
$da = profile :: getUser($r['id_friend']);
echo"<div class='app-user--sections--item'>
<a href='".profile :: getLink($da)."'>
<div class='post-l app-user--sections--avatar emotion-show ' data-emotions='".system::textOut($da['emotions'])."'>
".profile :: userAvatar($da, 0)."
</div>
<div class='app-user--sections--username'>
".profile :: getName($da, true)."
</div>
</a>
</div>";
}
echo"</div></div>
<a class='app-user--sections--show' href='#show-all'>
Показать всех друзей
</a>
</div>";
}