thread); $forum = BoincForum::lookup_id($thread->forum); if (!get_str('action')) { error_page("No action specified"); } if (!is_moderator($logged_in_user, $forum)) { error_page("You are not authorized to moderate this post."); } page_head('Moderate post'); echo "
id."\" method=\"POST\">\n"; echo form_tokens($logged_in_user->authenticator); start_table(); if (get_str('action')=="hide") { //display input that selects reason echo ""; row1("Hide post"); row2("Reason", ""); } elseif (get_str('action')=="move") { row1("Move post"); echo ""; row2("Destination thread ID:", ""); //todo display where to move the post as a dropdown instead of having to get ID } elseif (get_str('action')=="banish_user") { $userid = get_int('userid'); $user = BoincUser::lookup_id($userid); BoincForumPrefs::lookup($user); if (!$user) { error_page("no user"); } $x = $user->prefs->banished_until; if ($x>time()) { error_page("User is already banished"); } row1("Banish user"); row1("Are you sure you want to banish ".$user->name."? This will prevent ".$user->name." from posting for chosen time period.
It should be done only if ".$user->name." has consistently exhibited trollish behavior."); row2("Ban duration", ""); echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { error_page( "Unknown action"); } row2("Optional explanation
This is included in email to user", ""); row2( "", "" ); end_table(); echo "
"; page_tail(); ?>