2005-02-12 09:50:13 +00:00
|
|
|
<?php
|
2007-11-12 20:57:15 +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');
|
|
|
|
|
2007-11-12 20:57:15 +00:00
|
|
|
$logged_in_user = get_logged_in_user();
|
|
|
|
BoincForumPrefs::lookup($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
|
|
|
}
|
2007-11-12 20:57:15 +00:00
|
|
|
$thread = BoincThread::lookup_id(get_int('thread'));
|
2005-02-12 09:50:13 +00:00
|
|
|
|
2007-11-12 20:57:15 +00:00
|
|
|
if (!$logged_in_user->prefs->privilege(S_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');
|
|
|
|
|
2007-11-12 20:57:15 +00:00
|
|
|
echo "<form action=forum_moderate_thread_action.php?thread=$thread->id method=POST>\n";
|
|
|
|
echo form_tokens($logged_in_user->authenticator);
|
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("",
|
2007-02-08 19:54:05 +00:00
|
|
|
"Select the reason category, optionally write a longer description of why you delete the thread and then press ok to delete it.");
|
2005-02-12 09:50:13 +00:00
|
|
|
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>";
|
2007-05-18 14:49:10 +00:00
|
|
|
|
|
|
|
$selectbox = '<select name="forumid">';
|
2007-11-12 20:57:15 +00:00
|
|
|
$categories = BoincCategory::enum();
|
|
|
|
foreach ($categories as $category) {
|
|
|
|
$forums = BoincForum::enum("category=$category->id");
|
|
|
|
foreach ($forums as $forum) {
|
|
|
|
$selectbox .= '<option value="'.$forum->id.'">'.$forum->title.'</option>';
|
2007-05-18 14:49:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$selectbox .= '</option>';
|
|
|
|
|
|
|
|
row2("Destination forum:", $selectbox);
|
2006-06-16 23:53:56 +00:00
|
|
|
} elseif (get_str('action')=="title") {
|
|
|
|
|
|
|
|
echo "<input type=hidden name=action value=title>";
|
2007-11-12 20:57:15 +00:00
|
|
|
row2("New title:", "<input name=\"newtitle\" value=\"".stripslashes(htmlspecialchars($thread->title))."\">");
|
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();
|
|
|
|
|
|
|
|
?>
|