. // top-level management page; // shows links to the various functions available to the user. // If the only option is managing a particular app, // redirect to that page require_once("../inc/submit_db.inc"); require_once("../inc/util.inc"); $user = get_logged_in_user(); $bus = BoincUserSubmit::lookup_userid($user->id); if (!$bus) die("no access"); if ($bus->manage_all) { page_head("Management functions"); echo " Project-wide management "; $apps = BoincApp::enum(null); echo "

Application-specific management:

\n"; page_tail(); exit; } $apps = BoincUserSubmit::enum("user_id=$user->id and manage<>1"); switch (count($apps)) { case 0: error_page("Nothing to manage"); case 1: $app = $apps[0]; Header("Location: manage_app.php?app_id=$app->id"); exit; default: page_head("Management functions"); foreach ($apps as $app) { echo "

id>Manage $app->name "; } page_tail(); } ?>