Parašė bad_user· 2008 Bir. 8 15:06:48
#9
Prašau:
openside("name");
$result = dbquery("SELECT * FROM ".$db_prefix."news LEFT JOIN ".$db_prefix."news_cats ON news_cat_id = news_cat WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 0,7");
while ($data = dbarray($result)) {
$title = $data['news_subject'];
$cat = $data['news_cat_name'];
$sh_title = $title;
$n_id = $data['news_id'];
$v_id = $data['news_reads'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=$n_id");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %B %d", $date);
$name = $data['news_cat'];
echo "<img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."news.php?readmore=$n_id'><span class='small'><b>$sh_title</b> $cat [$comments_n]</span></a>
<span class='side'></span><br><br>";
}
closeside();