<?php echo'<div class="phdr"><b>So`nggi yangiliklar</b></div>'; if ($total) { $nechta = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `mod` = '1' AND `bolim`= '".$row['id']."';"), 0); $new = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `mod` = '1' AND `bolim` = '".$row['id']."' AND `time` > '".(time() - (86400))."';"), 0); echo '<a href="'.$home.'/news.php?act=boliminfo&id='.$row['id'].'"> <div class="menu"> <img src="'.$home.'/images/green.png" style="margin-bottom: -3px;" width="10"> <span style="font-size: x-small; color: #555; float: right;" class="soni"> '.$nechta . ($new > 0 ? '/<font color="red">+'.$new.'</font>' : '').' </span> '.$row['nomi'].' </div> </a>'; } if ($total > $kmess) { echo '<div class="menu"> <center> <span class="gray"> ...::: </span> '.functions::display_pagination('news.php?', $start, $total, $kmess).' <span class="gray"> :::... </span> </center> </div>'; } } else { echo '<div class="menu"> <p> <center> Hozirda bironta ham yangilik yo\'q! </center> </p> </div>'; } if ($rights > 8) { echo '<div class="menu"> <p> <a href="'.$home.'/news.php?act=bolim" class="qopqora"> Bo\'lim ochish </a> </p> </div>'; } echo '</div>'; } ?>
<?php echo'<div class="phdr"><b>So`nggi yangiliklar</b></div>'; if ($total) { $nechta = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `mod` = '1' AND `bolim`= '".$row['id']."';"), 0); $new = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `mod` = '1' AND `bolim` = '".$row['id']."' AND `time` > '".(time() - (86400))."';"), 0); echo '<a href="'.$home.'/news.php?act=boliminfo&id='.$row['id'].'"> <div class="menu"> <img src="'.$home.'/images/green.png" style="margin-bottom: -3px;" width="10"> <span style="font-size: x-small; color: #555; float: right;" class="soni"> '.$nechta . ($new > 0 ? '/<font color="red">+'.$new.'</font>' : '').' </span> '.$row['nomi'].' </div> </a>'; } if ($total > $kmess) { echo '<div class="menu"> <center> <span class="gray"> ...::: </span> '.functions::display_pagination('news.php?', $start, $total, $kmess).' <span class="gray"> :::... </span> </center> </div>';
<?php echo '<div class="phdr"><b>tezkor xabarlar</b></div>'; $kmess = '7'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `library_texts` WHERE `time` AND `premod`=1"), 0); $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 `premod`=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'] . '</b></a> ['. functions::display_date($lib['time']) . ']<br>'.mb_substr($lib['announce'],0,100).'...<br>'; $catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1")); echo '[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']'; echo '<span style="float:right;"><b>[' . $lib['count_views'] . ']</b></span></div>'; ++$i; } } echo $nav; ?>
<?php echo '<div class="phdr"><b>tezkor xabarlar</b></div>'; $kmess = '7'; $cat_id = 1; //bu yerga kategorya idsini yozasiz $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `library_texts` WHERE `time` AND `premod`=1 AND `cat_id` = '".$cat_id."'"), 0); $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 `premod`=1 AND `cat_id` = '".$cat_id."' 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'] . '</b></a> ['. functions::display_date($lib['time']) . ']<br>'.mb_substr($lib['announce'],0,100).'...<br>'; $catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1")); echo '[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']'; echo '<span style="float:right;"><b>[' . $lib['count_views'] . ']</b></span></div>'; ++$i; } } echo $nav; ?>