isSpecialUser(S_MODERATOR)) { // Can't moderate without being moderator error_page("You are not authorized to moderate this post."); } $postid = get_int('id'); $post = new Post($postid); $thread = $post->getThread(); page_head('Forum'); //start form echo "
getID()." method=POST>\n"; start_table(); row1("Moderate post"); if (get_str('action')=="hide") { //display input that selects reason echo ""; row2("", "Select the reason category, optionally write a longer describtion of why you delete the post and then press ok to hide it."); row2("Category", ""); } elseif (get_str('action')=="move") { 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 = newUser($userid); if (!$user) { error_page("no user"); } $x = $user->getBanishedUntil(); if ($x>time()) { echo "User is already banished"; exit(); } echo "Are you sure you want to banish $user->name? This will prevent $user->name from posting for 2 weeks. It should be done only if $user->name has consistently exhibited trollish behavior.

Yes, banish $user->name "; page_tail(); exit(); } else { error_page( "Unknown action"); } row2("Reason
Mailed if nonempty", ""); row2( "", "" ); end_table(); echo "

"; page_tail(); ?>