%include:header%>
if (!$curcat)
$curcat = 1335;
$sqlquery = "SELECT cat_id, cat_name, cat_sub, cat_links FROM inl_cats where cat_sub = 1335 order by cat_name asc limit 0,50";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
$i = 0;
if ($number < 2) {
return false;
}
else { ?>
while ($number > $i) {
$cat_id = mysql_result($result,$i,"cat_id");
$cat_name = mysql_result($result,$i,"cat_name");
$cat_sub = mysql_result($result,$i,"cat_sub");
$cat_links = mysql_result($result,$i,"cat_links");
$f_cat_links = number_format($cat_links);
echo "| $cat_name | ";
if ($curcat == $cat_id){
$bsqlquery = "SELECT cat_id, cat_name, cat_sub, cat_links FROM inl_cats where cat_sub = $curcat order by cat_name asc limit 0,50";
$bresult = mysql_query($bsqlquery);
$bnumber = mysql_numrows($bresult);
$b = 0;
if ($bnumber < 2) {
return false;
} else {
while ($bnumber > $b) {
$bcat_id = mysql_result($bresult,$b,"cat_id");
$bcat_name = mysql_result($bresult,$b,"cat_name");
$bcat_sub = mysql_result($bresult,$b,"cat_sub");
$bcat_links = mysql_result($bresult,$b,"cat_links");
$bf_cat_links = number_format($bcat_links);
echo "| + $bcat_name | ";
$b++;
}
}
}
$i++;
}
?>
} ?>
<%include:footer%> |