. require_once('../inc/util.inc'); require_once('../inc/forum_db.inc'); require_once('../inc/forum_banishment_vote.inc'); if (DISABLE_FORUMS) error_page("Forums are disabled"); check_get_args(array("action", "userid")); $config = get_config(); $logged_in_user = get_logged_in_user(); BoincForumPrefs::lookup($logged_in_user); if (!get_str('action')) { error_page("You must specify an action..."); } if (!$logged_in_user->prefs->privilege(S_MODERATOR)) { // Can't moderate without being moderator error_page(tra("You are not authorized to banish users.")); } $userid = get_int('userid'); $user = BoincUser::lookup_id($userid); page_head(tra("Banishment Vote")); echo "
\n"; echo form_tokens($logged_in_user->authenticator); start_table(); row1(tra("Banishment Vote")); if (get_str('action')=="start") { if (!$user) { error_page(tra("No user with this ID found.")); } BoincForumPrefs::lookup($user); $x = $user->prefs->banished_until; if ($x>time()) { error_page(tra("User is already banished")); } //display input that selects reason echo ""; echo "\n"; row1(tra("Are you sure you want to banish %1?
This will prevent %1 from posting for chosen time period.
It should be done only if %1 has consistently exhibited trollish behavior.", $user->name)); row2("", tra("Select the reason category, optionally write a longer description of why the user should be banished.")); row2(tra("Category"), ""); row2(tra("Reason")."
".tra("Mailed if nonempty"), ""); row2( "", "" ); } elseif (get_str('action')=="yes") { vote_yes($config,$logged_in_user,$user); } elseif (get_str('action')=="no") { vote_no($config,$logged_in_user,$user); } else { error_page("Unknown action"); } end_table(); echo "
"; page_tail(); ?>