. require_once("../inc/boinc_db.inc"); require_once("../inc/util.inc"); require_once("../inc/team.inc"); if (DISABLE_TEAMS) error_page("Teams are disabled"); check_get_args(array("teamid", "action", "tnow", "ttok")); function show_admin_page($user, $team) { page_head(tra("Team administration for %1", $team->name)); echo " "; page_tail(); } $user = get_logged_in_user(true); $teamid = get_int('teamid'); $team = BoincTeam::lookup_id($teamid); if (!$team) error_page(tra("No such team")); $action = get_str('action', true); if ($action == 'delete') { require_founder_login($user, $team); if (team_count_members($team->id) > 0) { error_page(tra("Can't delete non-empty team")); } check_tokens($user->authenticator); $team->delete(); page_head(tra("Team %1 deleted", $team->name)); page_tail(); } else { require_admin($user, $team); show_admin_page($user, $team); } ?>