sql_query($sql)) { return 'ERROR'; } else { $row = $db->sql_fetchrow($result); if($mode == 'newestuser') { return($row); } else { return($row['total']); } } } function make_jumpbox($db) { $sql = 'SELECT cat_id, cat_title FROM '.CATEGORIES_TABLE.' ORDER BY cat_order'; $boxstring = ''; if($result = $db->sql_query($sql)) { if($total_cats = $db->sql_numrows($result)) { $cat_rows = $db->sql_fetchrowset($result); for($x = 0; $x < $total_cats; $x++) { $boxstring .= "\n"; $boxstring .= "\n"; $boxstring .= "\n"; $f_sql = "SELECT forum_name, forum_id FROM ".FORUMS_TABLE." WHERE cat_id = ". $cat_rows[$x]["cat_id"] . " ORDER BY forum_id"; if($f_result = $db->sql_query($f_sql)) { if($total_forums = $db->sql_numrows($f_result)) { $f_rows = $db->sql_fetchrowset($f_result); for($y = 0; $y < $total_forums; $y++) { $name = stripslashes($f_rows[$y]["forum_name"]); $boxstring .= "\n"; } } } else { $boxstring .= "\n"; } } } else { $boxstring .= "\n"; } } else { $boxstring .= "\n"; } return($boxstring); } ?>