Файл: sys/inc/main_notes.php
Строк: 30
<?
$q=mysql_query("SELECT * FROM `notes` ORDER BY `time` DESC LIMIT 2");
if(mysql_num_rows($q)==0){
?><div class="nav2" style="color:#666;">Записей нет</div><?php
}else{
while($post=mysql_fetch_assoc($q)){
$note_name = '<a href="/plugins/notes/list.php?id='.$post['id'].'"><span style="color:#475679">'.text($post['name']).'</span></a>';
$note_text =$post['msg'];
$count_comm =mysql_result(mysql_query("SELECT COUNT(`id`) FROM `notes_komm` WHERE `id_notes`='".$post['id']."'"),0);
?>
<table style="border-bottom:none;" class="mess"><td style="vertical-align: top;" width="3%">
<?=avatar($post['id_user']);?>
</td><td>
<?=group($post['id_user']);?>
<?=user::nick($post['id_user'],1,1,1);?> : <?=$note_name;?>
<br/>
<?=rez_text($note_text,80);?><br/>
</td></table>
<div class="mess">
<span style="font-size: 12px; color: #67676e;"><i class="far fa-comment-alt"></i> <?=$count_comm;?></span>
<span style="float:right;font-size: 12px; color: #67676e;">
<i class="far fa-clock"></i> <?=vremja($post['time']);?></span>
</div>
<?
}
}