Bu yerda 4 ta news chiqadigan qilishim kerak. Qayeridan limitni belgilayman?
// news
echo '<div class="header"><b>So\'ngi xabarlar</b></div>';
$count= mysql_query("select count(*) from `cms_news` where `time`<='". time()."'"); if($total>0)
$trans_req= mysql_query("select * from `cms_news` where `time`<='". time()."' order by `time` desc limit $start, $kmess;");
$comm= mysql_result( mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$trans_res['id']."'"),0); if (!isset($_SESSION['cms_news']) || isset($_SESSION['cms_news'])&&$_SESSION['cms_news'] != $id) { $_SESSION['cms_news'] = $id;
$newscount = intval($ncount['count']) 1; mysql_query("UPDATE `cms_news` SET `count` ='$newscount'WHERE `id` ='$id'"); }
echo '<div class="yangilik">'; echo '<span class="newsTime time bottom">' . date('H:i', $trans_res['time'] (core
::$system_set['timeshift'] core
::$user_set['timeshift']) * 3600) . '</span> – <a href="/news/index.php?act=view&id='.$trans_res['id'].'"> '. htmlentities($trans_res['name'],ENT_QUOTES,'UTF-8').'</a> <img style="vertical-align: middle ! important;" src="/images/blue_comment.png" /> ' . $comm . '</div>'; $i;
}
if($total>$kmess){
echo'<div class="yangilik" align="center"><p>'. functions::display_pagination('index.php?id='.$id.'&',$start,$total,$kmess).'</p></div>'; }