Файл: plugins/notes/notelist.php
Строк: 51
<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=mysql_query("SELECT * FROM `notes` ORDER BY `count` DESC LIMIT 5");
if (mysql_num_rows($q)==0)
{
echo "<div class='mess'>n";
echo "Никто не создавал дневникn";
echo "</div>n";
}
while ($post = mysql_fetch_assoc($q))
{
$result = mysql_query("SELECT * FROM `notes_dir` WHERE `id` = $post[id_dir] LIMIT 1");
$ris = mysql_fetch_array($result);
$kol_post = mysql_query("SELECT COUNT(`id`) FROM `notes_komm` WHERE `id_notes` = '$post[id]'");
$kommN=mysql_result($kol_post, 0);
$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'>";
echo group($post['id_user'])." ";
echo user::nick($post['id_user'],1,1,1)." : ".$note_name."</br>
".$note_text."<br/><img src='/style/icons/comm_num_gray.png'>".$kommN."<span style='float:right;color:#666;'><small>
<a href='/plugins/notes/dir.php?id=".$post['id_dir']."'>".($ris['name'])."</a>/ ".vremja($post['time'])."</small></div></div>";
}?><div class='nav2'><span style="float:right;"><a class="t-block_item stnd_padd overfl_hid" href="/plugins/notes/">
Все записи →</a></span><br/>
</div><?