예제 #1
0
파일: pm.php 프로젝트: CalvinZhu/boinc
function do_delete_selected($logged_in_user)
{
    check_tokens($logged_in_user->authenticator);
    $msgs = BoincPrivateMessage::enum("userid={$logged_in_user->id}");
    foreach ($msgs as $msg) {
        $x = "pm_select_{$msg->id}";
        if (post_str($x, true)) {
            $msg = BoincPrivateMessage::lookup_id($msg->id);
            $msg->delete();
        }
    }
    Header("Location: pm.php?action=inbox&deleted=1");
}
예제 #2
0
// 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/>.
include_once "../inc/util.inc";
include_once "../inc/prefs.inc";
include_once "../inc/prefs_project.inc";
check_get_args(array("subset", "venue", "confirmed", "cols", "tnow", "ttok"));
$user = get_logged_in_user();
check_tokens($user->authenticator);
$subset = get_str("subset");
$venue = get_str("venue");
$confirmed = get_str("confirmed", true);
$columns = get_int("cols", true);
$c = $columns ? "&cols={$columns}" : "";
if ($confirmed) {
    if ($subset == "global") {
        $main_prefs = prefs_parse_global($user->global_prefs);
        $main_prefs->{$venue} = null;
        global_prefs_update($user, $main_prefs);
    } else {
        $main_prefs = prefs_parse_project($user->project_prefs);
        $main_prefs->{$venue} = null;
        project_prefs_update($user, $main_prefs);
    }
예제 #3
0
    $filter = false;
}
check_reply_access($logged_in_user, $forum, $thread);
if (!$sort_style) {
    $sort_style = $logged_in_user->prefs->thread_sorting;
} else {
    $logged_in_user->prefs->update("thread_sorting={$sort_style}");
}
$warning = null;
if ($content && !$preview) {
    if (post_str('add_signature', true) == "add_it") {
        $add_signature = true;
    } else {
        $add_signature = false;
    }
    check_tokens($logged_in_user->authenticator);
    if (!akismet_check($logged_in_user, $content)) {
        $warning = "Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again.";
        $preview = tra("Preview");
    } else {
        create_post($content, $parent_post_id, $logged_in_user, $forum, $thread, $add_signature);
        header('Location: forum_thread.php?id=' . $thread->id);
    }
}
page_head(tra("Post to thread"));
show_forum_header($logged_in_user);
switch ($forum->parent_type) {
    case 0:
        $category = BoincCategory::lookup_id($forum->category);
        show_forum_title($category, $forum, $thread);
        break;