0) { if ($sortby) $result = db_select("SELECT * FROM $config[utable] ORDER BY $sortby ASC"); else $result = db_select("SELECT * FROM $config[utable] ORDER BY username ASC"); print "
"; print ""; $i = 0; while($row = db_getarray($result)) { $i = $i + 1; if ($i % 2) $bgcolor = $config['color_b']; else $bgcolor = $config['color_a']; if ($row[username] == $forumsess[$realm][username]) { $promotetext = ""; $demotetext = ""; } else { $promotetext = "   Promote"; $demotetext = "   Demote"; } if ($row[disabled]) $disabletext = "Enable"; else $disabletext = "Disable"; if ($row[level] == 10) { $level = "Administrator $demotetext"; $actions = ""; } else { $level = "Member $promotetext"; $actions = "$disabletext"; } print ""; } print "
Username Level Msgs Actions
".$row[username]." $level ".usermessagecount($row[username])." $actions
"; } else { print "No users available
"; } } else { print "You do not have sufficient access to manage users.
"; } } function manageforums() { global $forumsess,$config,$realm; if (admincheck($forumsess[$realm][username])) { print "Add Forum

"; if (db_numrows_all('forums')>0) { print "
"; $result = db_select("SELECT cat FROM $config[ftable] GROUP BY cat"); while($cat = db_getarray($result)) { $result2 = db_select("SELECT * FROM $config[ftable] WHERE cat='$cat[cat]' ORDER BY ftitle ASC"); if (!$cat[cat]) $cat[cat] = $lang[gf]; print ""; print ""; $i = 0; while($row = db_getarray($result2)){ $i = $i + 1; $options = $row[options]; if (!$options & 1) $closed = TRUE; else $closed = FALSE; if ($options & 2) $private = TRUE; else $private = FALSE; if ($i % 2) $bgcolor = $config['color_b']; else $bgcolor = $config['color_a']; /* if ($row[icon]) $icon = ""; else $icon = ""; */ $status = NULL; if ($closed) $status = "Closed
"; else $status = "Open
"; if ($private) $status .= "Private"; print ""; } } print "
$cat[cat]
Status Forum Topics Messages Actions
$status ".$row[ftitle]." ".topiccount($row[fname])." ".messagecount($row[fname])." Edit Delete Delete Clean
"; } else { print "No forums available
"; } } else { print "You do not have sufficient access to manage forums.
"; } } function catlist() { global $config; $result = db_select("SELECT cat FROM $config[ftable] GROUP BY cat"); while($cat = db_getarray($result)) { $c[] = $cat[cat]; } return $c; } function addforum() { global $forumsess,$config,$realm; if (admincheck($forumsess[$realm][username])) { ?>