\n";
if($total_subcategories > 6) {
for($i=0; $i<$total_subcategories/2; $i++) {
unset($cat_subtotal);
if ($core['CategoryTotals']['value'] >= 1) {
unset($cat_subtotal);
$result = $MySQLConnection->DB_Query("SELECT `sitecount` FROM `Category` WHERE `topic` = '" . addslashes($cat_subcategories[$cat_subcategorykeys[$i]]) . "'");
if ($row = $MySQLConnection->DB_FetchArray($result)) {
if ($row["sitecount"] > 0) {
$cat_subtotal = number_format($row["sitecount"]);
$cat_subtotal = str_replace ("[count]", $cat_subtotal, $MainCount);
}
}
}
if (strstr($cat_subcategorykeys[$i], '@')) {
$CatIndLink = "" . str_replace('@', '', $cat_subcategorykeys[$i]) . "@ " . $cat_subtotal . "";
}
else {
$CatIndLink = "" . $cat_subcategorykeys[$i] . " " . $cat_subtotal . "";
}
$CatTmp = $CatLinks;
$CatTmp = str_replace("[category_name]", $CatIndLink, $CatTmp);
$CatSet .= $CatTmp;
}
$CatSet2 = $CatSet;
$cat_subcats .= $CatSet2 . " | \n";
unset ($CatSet);
for($i=($total_subcategories/2); $i<$total_subcategories; $i++) {
unset($cat_subtotal);
if ($core['CategoryTotals']['value'] >= 1) {
$result = $MySQLConnection->DB_Query("SELECT `sitecount` FROM `Category` WHERE `topic` = '" . addslashes($cat_subcategories[$cat_subcategorykeys[$i]]) . "'");
if ($row = $MySQLConnection->DB_FetchArray($result)) {
if ($row["sitecount"] > 0) {
$cat_subtotal = number_format($row["sitecount"]);
$cat_subtotal = str_replace ("[count]", $cat_subtotal, $MainCount);
}
}
}
if (strstr($cat_subcategorykeys[$i], '@')) {
$CatIndLink = "" . str_replace('@', '', $cat_subcategorykeys[$i]) . "@ " . $cat_subtotal . "";
}
else {
$CatIndLink = "" . $cat_subcategorykeys[$i] . " " . $cat_subtotal . "";
}
$CatTmp = $CatLinks;
$CatTmp = str_replace("[category_name]", $CatIndLink, $CatTmp);
$CatSet .= $CatTmp;
}
$CatSet2 = $CatSet;
$cat_subcats .= $CatSet2;
unset ($CatSet);
}
else {
for($i=0; $i<$total_subcategories; $i++) {
unset($cat_subtotal);
if ($core['CategoryTotals']['value'] >= 1) {
$result = $MySQLConnection->DB_Query("SELECT `sitecount` FROM `Category` WHERE `topic` = '" . addslashes($cat_subcategories[$cat_subcategorykeys[$i]]) . "'");
if ($row = $MySQLConnection->DB_FetchArray($result)) {
if ($row["sitecount"] > 0) {
$cat_subtotal = number_format($row["sitecount"]);
$cat_subtotal = str_replace ("[count]", $cat_subtotal, $MainCount);
}
}
}
if (strstr($cat_subcategorykeys[$i], '@')) {
$CatIndLink = "" . str_replace('@', '', $cat_subcategorykeys[$i]) . "@ " . $cat_subtotal . "";
}
else {
$CatIndLink = "" . $cat_subcategorykeys[$i] . " " . $cat_subtotal . "";
}
$CatTmp = $CatLinks;
$CatTmp = str_replace("[category_name]", $CatIndLink, $CatTmp);
$CatSet .= $CatTmp;
}
$CatSet2 = $CatSet;
$cat_subcats .= $CatSet2;
unset ($CatSet);
}
$cat_subcats .= " |