<?php
echo '<div class="blue">';
echo '<div class="phdr"><center><b>Новые</b></center></div>';
$kmess = '5';
$page = $page >= ceil($total / $kmess) ?
ceil($total / $kmess) : $page; $start = $page == 1 ? 0 : ($page - 1) * $kmess;
$sql = mysql_query("SELECT `id`, `name`, `time`, `uploader`, `uploader_id`, `count_views`, `comments`, `count_comments`, `cat_id`, `announce` FROM `library_texts` WHERE `cat_id`=1 ORDER BY `time` DESC LIMIT " . $start . "," . $kmess); $nav = ($total > $kmess) ? '<div class="menu"><center>' . functions::display_pagination('?act=new&', $start, $total, $kmess) . '</center></div>' : '';
if ($total) {
$i = 0;
$comm = mysql_result( mysql_query("select count(*) from `cms_library_comments` where `refid` = '".$lib['id']."'"),0);
echo '<div class="menu"><a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</a></b><br>';
$post1 = functions::checkout($lib['announce'], 1, 1);
$post = functions::smileys($post1, 1);
echo $post;
echo '<br/>';
echo '['. functions::display_date($lib['time']) . ']';
echo '[<a href="/library/index.php?act=comments&id=' . $lib['id'] . '">Обсуждения (' . $lib['count_comments'] . ')</a>]';
echo '<span style="float:right;"><b>[' . $lib['count_views'] . ']</b></span></div>';
}
}
echo '<div class="menu"><a href="' . $set['homeurl'] . '/library/index.php?do=dir&id=1"><b>Показать все >></a></b></div></div>';
?>
bu kod librarydagi maqolalarni faqat bitta cat bo'yicha chiqaryapti. Huddi shu kodni tahrirlab beringlar, librarydagi umumiy yangi maqolalar chiqadigan qilib.