Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: naujienu kategorijos

Parašė MAnjack· 2008 Lie. 21 18:07:15
#2

openside("Skyriai");
 
$result = dbquery("SELECT * FROM ".$db_prefix."news_cats ORDER BY news_cat_name");
 
while ($data = dbarray($result)) {
 
$rows = dbcount("(news_id)", "news", "news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
 
echo "<a href='".BASEDIR."news_cats.php?cat_id=".$data['news_cat_id']."' class='side'>".$data['news_cat_name']."[$rows]</a><br />";
}
closeside();