2005-02-12 09:50:13 +00:00
|
|
|
<?php
|
2006-06-16 23:53:56 +00:00
|
|
|
/**
|
|
|
|
* Where the moderator decides what action to take on a thread. Sends
|
|
|
|
* its data to forum_moderate_thread_action.php for the actual action to
|
|
|
|
* take place.
|
|
|
|
**/
|
2005-02-12 09:50:13 +00:00
|
|
|
|
|
|
|
require_once('../inc/forum.inc');
|
2006-06-16 23:53:56 +00:00
|
|
|
require_once('../inc/forum_std.inc');
|
2005-02-12 09:50:13 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2006-06-16 23:53:56 +00:00
|
|
|
$logged_in_user = re_get_logged_in_user();
|
2005-02-12 09:50:13 +00:00
|
|
|
|
2005-02-17 11:43:49 +00:00
|
|
|
if (!get_str('action')) {
|
2006-06-16 23:53:56 +00:00
|
|
|
error_page("You must specify an action...");
|
2005-02-17 11:43:49 +00:00
|
|
|
}
|
2006-06-16 23:53:56 +00:00
|
|
|
$thread = new Thread(get_int('thread'));
|
2005-02-12 09:50:13 +00:00
|
|
|
|
2006-06-16 23:53:56 +00:00
|
|
|
if (!$logged_in_user->isSpecialUser(S_MODERATOR)) {
|
2005-02-17 11:43:49 +00:00
|
|
|
// Can't moderate without being moderator
|
2006-06-16 23:53:56 +00:00
|
|
|
error("You are not authorized to moderate this post.");
|
2005-02-12 09:50:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
page_head('Forum');
|
|
|
|
|
|
|
|
//start form
|
2006-06-16 23:53:56 +00:00
|
|
|
echo "<form action=forum_moderate_thread_action.php?thread=".$thread->getID()." method=POST>\n";
|
2005-02-12 09:50:13 +00:00
|
|
|
start_table();
|
|
|
|
row1("Moderate thread");
|
|
|
|
|
2005-02-17 11:43:49 +00:00
|
|
|
if (get_str('action')=="hide") {
|
2005-02-12 09:50:13 +00:00
|
|
|
//display input that selects reason
|
|
|
|
echo "<input type=hidden name=action value=hide>";
|
|
|
|
row2("",
|
|
|
|
"Select the reason category, optionally write a longer describtion of why you delete the thread and then press ok to delete it.");
|
|
|
|
row2("Category",
|
|
|
|
"<select name=\"category\">
|
2005-02-13 21:33:02 +00:00
|
|
|
<option value=\"1\">Obscene</option>
|
|
|
|
<option value=\"2\">Flame/Hate mail</option>
|
|
|
|
<option value=\"3\">Commercial spam</option>
|
2006-10-09 18:53:54 +00:00
|
|
|
<option value=\"4\">Other</option>
|
2005-02-12 09:50:13 +00:00
|
|
|
</select>");
|
2006-06-16 23:53:56 +00:00
|
|
|
} elseif (get_str('action')=="move") {
|
2005-02-12 09:50:13 +00:00
|
|
|
|
|
|
|
echo "<input type=hidden name=action value=move>";
|
2006-06-16 23:53:56 +00:00
|
|
|
row2("Destination forum ID:", "<input name=\"forumid\">");
|
|
|
|
//todo display where to move the thread as a dropdown instead of having to get ID
|
|
|
|
} elseif (get_str('action')=="title") {
|
|
|
|
|
|
|
|
echo "<input type=hidden name=action value=title>";
|
2006-12-23 14:59:47 +00:00
|
|
|
row2("New title:", "<input name=\"newtitle\" value=\"".stripslashes(htmlspecialchars($thread->getTitle()))."\">");
|
2005-02-12 09:50:13 +00:00
|
|
|
} else {
|
2006-06-16 23:53:56 +00:00
|
|
|
error_page("Unknown action");
|
2005-02-12 09:50:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
row2("Reason<br>Mailed if nonempty",
|
|
|
|
"<textarea name=\"reason\"></textarea>");
|
|
|
|
|
|
|
|
row2(
|
|
|
|
"",
|
|
|
|
"<input type=\"submit\" name=\"submit\" value=\"OK\">"
|
|
|
|
);
|
|
|
|
|
|
|
|
end_table();
|
|
|
|
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|