$catlistbit='';if(!empty($cat_cache)){foreach ($cat_cache[0] AS $parentcatrow){ $parentid = $parentcatrow["articles_categoryid"]; $catname = $parentcatrow["categoryname"]; $parentcat = $parentcatrow["parentcategory"];
$catlistbit='';if(!empty($cat_cache)){foreach ($cat_cache[0] AS $parentcatrow){ $parentid = $parentcatrow["articles_categoryid"]; $catname = $parentcatrow["categoryname"]; $parentcat = $parentcatrow["parentcategory"]; $cattotal = 0;$catcount = $DB_site->query("SELECT *FROM " . TABLE_PREFIX . "articles_articleWHERE categoryid =$parentid AND usersubmitted=0And draft = 0");$cattotal = $DB_site->num_rows($catcount);
if(!empty($cat_cache[$parentid])){ foreach ($cat_cache[$parentid] AS $subcatrow) { $subcatid=$subcatrow["articles_categoryid"]; $subcatname=$subcatrow["categoryname"];
if(!empty($cat_cache[$parentid])){ foreach ($cat_cache[$parentid] AS $subcatrow) { $subcatid=$subcatrow["articles_categoryid"]; $subcatname=$subcatrow["categoryname"];$cattotal = 0;$catcount = $DB_site->query("SELECT *FROM " . TABLE_PREFIX . "articles_articleWHERE categoryid =$subcatidAND usersubmitted=0And draft = 0");$cattotal = $DB_site->num_rows($catcount);
<if condition="$parentcat==0"><br><a href="articles.php?action=viewcat&catid=$parentid"><span class="smallfont"><b>$catname</b></a> ($cattotal)</span></if>
<li><span class="smallfont"><a href="articles.php?action=viewcat&catid=$subcatid">$subcatname</a> ($cattotal)</span></li>
Show Your Support