2007-10-19 20:01:36 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2007-10-19 20:01:36 +00:00
|
|
|
|
|
|
|
|
2011-02-09 22:11:34 +00:00
|
|
|
require_once("../inc/util.inc");
|
2007-11-12 20:57:15 +00:00
|
|
|
require_once("../inc/forum_db.inc");
|
2007-11-19 05:14:37 +00:00
|
|
|
require_once("../inc/forum_banishment_vote.inc");
|
2007-10-19 20:01:36 +00:00
|
|
|
|
2011-02-14 00:06:40 +00:00
|
|
|
check_get_args(array("action", "userid", "tnow", "ttok"));
|
2011-02-09 22:11:34 +00:00
|
|
|
|
2007-10-19 20:01:36 +00:00
|
|
|
$config = get_config();
|
|
|
|
|
2007-11-12 20:57:15 +00:00
|
|
|
$logged_in_user = get_logged_in_user();
|
|
|
|
BoincForumPrefs::lookup($logged_in_user);
|
|
|
|
check_tokens($logged_in_user->authenticator);
|
2007-10-19 20:01:36 +00:00
|
|
|
|
2007-11-12 20:57:15 +00:00
|
|
|
if (!$logged_in_user->prefs->privilege(S_MODERATOR)) {
|
2007-10-19 20:01:36 +00:00
|
|
|
error_page("You are not authorized to banish users.");
|
|
|
|
}
|
|
|
|
|
|
|
|
// See if "action" is provided - either through post or get
|
|
|
|
if (!post_str('action', true)) {
|
|
|
|
if (!get_str('action', true)){
|
|
|
|
error_page("You must specify an action...");
|
|
|
|
} else {
|
2010-11-04 18:20:57 +00:00
|
|
|
$action = get_str('action');
|
2007-10-19 20:01:36 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$action = post_str('action');
|
|
|
|
}
|
|
|
|
|
|
|
|
$userid = post_int('userid');
|
2007-11-12 20:57:15 +00:00
|
|
|
$user=BoincUser::lookup_id($userid);
|
2007-10-19 20:01:36 +00:00
|
|
|
|
|
|
|
if ($action!="start"){
|
|
|
|
error_page("Unknown action ");
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (post_int("category", true)) {
|
|
|
|
case 1:
|
|
|
|
$mod_category = "Obscene";
|
|
|
|
case 2:
|
|
|
|
$mod_category = "Flame/Hate mail";
|
|
|
|
case 3:
|
|
|
|
$mod_category = "User Request";
|
|
|
|
default:
|
|
|
|
$mod_category = "Other";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (post_str('reason', true)){
|
2007-11-12 20:57:15 +00:00
|
|
|
start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason"));
|
2010-11-04 18:20:57 +00:00
|
|
|
} else {
|
2007-11-12 20:57:15 +00:00
|
|
|
start_vote($config,$logged_in_user,$user, $mod_category,"None given");
|
2007-10-19 20:01:36 +00:00
|
|
|
}
|
|
|
|
|
2008-08-05 22:43:14 +00:00
|
|
|
$cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit
|
2007-10-19 20:01:36 +00:00
|
|
|
?>
|