Файл: plugins/notes/notelist.php
Строк: 60
<div style="padding: 6px 10px;" class="bg5 top_corners">
<a class="blocK_item stnd_padd overfl_hid" href="/plugins/notes/">
<span class="t-link_item_hover left"> <b>Дневники</b> </span></a></div><?
$q=$pdo->prepare("SELECT * FROM `notes` order by `count` desc limit 5");
$q->execute();
while($post=$q->fetch()){
$ris=$pdo->query("SELECT `name` FROM `notes_dir` WHERE `id`='".$post['id_dir']."' LIMIT 1")->fetch();
$kol_post=$pdo->query("SELECT COUNT(`id`)FROM `notes_komm` WHERE `id_notes`='".$post['id']."'")->fetch();
$note_name = "<a href='/plugins/notes/list.php?id=$post[id]'><span style='color:#06f'>".text($post['name'])."</span></a>";
$note_text=text($post['msg']);
$arr_note_text = explode(" ", $note_text);
$arrnt = array_slice($arr_note_text, 0, 6); # считаем по пробелам
$note_text = implode(" ", $arrnt);
$note_text .= '...';
echo "<div style='border-bottom:1px #d5dde5 solid;' class='nav2'>n";
echo group($post['id_user'])." ";
echo user::nick($post['id_user'],1,1,1)." : ".$note_name."</br>
".$note_text."<br/>n";
echo " ".($post['share']==1 ? "<img height='16' src='/style/icons/repostik.png'> <i>Репостнутая запись</i><br/>" : null)."n";
echo " <img src='/style/icons/comm_num_gray.png'>".$kol_post[0]."n";
echo "<span style='float:right;color:#666;'><small>n";
echo "".($ris['name']!=null ? "<a href='/plugins/notes/dir.php?id=".$post['id_dir']."'>".text($ris['name'])."</a> /" : null )." ".vremja($post['time'])."</small></div></div>n";
}
?><div class='nav2'><span style="float:right;"><a class="t-block_item stnd_padd overfl_hid" href="/plugins/notes/">
Все записи →</a></span><br/>
</div><?