Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=81255
Postga havola
sobirjonovv [1587] [off]
Bu yerda 4 ta news chiqadigan qilishim kerak. Qayeridan limitni belgilayman?
// news echo '<div class="header"><b>So\'ngi xabarlar</b></div>'; 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); $_SESSION['cms_news'] = $id; } $komm = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_comments` WHERE `refid`='{$res['id']}'"), 0); 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>'; }