<?php



echo '<div class="phdr"><b>Yangi maqolalar</b></div>';

$total = mysql_result(mysql_query('SELECT COUNT(*) FROM `library_texts` WHERE `premod`=1'), 0);

if ($total > $kmess) {

echo '<div class="topmenu">' . functions::display_pagination('index.php?', $start, $total, $kmess) . '</div>';

}

$req_lib = mysql_query("SELECT * FROM `library_texts` WHERE `premod`='1' ORDER BY `time` DESC LIMIT 10");

$i=0;

while($lib=mysql_fetch_assoc($req_lib)) { 

echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; 

echo '<img src="/img/yozish.png" width="16" height="16" alt="icon"/>' .

'<a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</b></a><br/>' .

'<div class="newsdate">' . functions::display_date($lib['time']) . '</div>' .
'<div class="newsviews"><img src="http://ajoyib.ru/img/views.png" alt="" class="icon"/>' . $lib['count_views'] . '</div>'

. '<div class="newscomm"><img src="http://ajoyib.ru/img/comm.png" alt="" class="icon"/> <a href="' . $set['homeurl'] . '/library/index.php?act=comments&id=' . $lib['id'] . '">' . $lib['count_comments'] . '</a></div><br/>
';


echo '<div class="sub">Qo`shdi: <a href="'.$home.'/users/profile.php?user=' . $lib['uploader_id'] . '">' . $lib['uploader'] . '</a></div>' . $lng['section'] . ': ' . '<a href="/library/?do=dir&amp;id=' . $lib['cat_id'] . '"> ' . functions::checkout(mysql_result(mysql_query("SELECT `name` FROM `library_cats` WHERE `id`=" . $lib['cat_id']), 0)) . '</a></div>';

++$i;

}

echo '<div class="menu">- <a href="library/index.php">Hammasini ko\'rish</a></div>';

if ($total > $kmess) { 

echo '<div class="topmenu">' . functions::display_pagination('index.php?act=questions&',$start, $total, $kmess) . '</div>';


}


?>



