Example #1
0
*/
if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$tagid = empty($_GET['tagid']) ? 0 : intval($_GET['tagid']);
if (submitcheck('opsubmit')) {
    if ($_POST['optype'] == 'delete') {
        include_once S_ROOT . './source/function_delete.php';
        if (!empty($_POST['ids']) && deletethreads($tagid, $_POST['ids'])) {
            cpmessage('do_success', $_POST['mpurl']);
        } else {
            cpmessage('choose_to_delete_the_topic', $_POST['mpurl']);
        }
    } elseif ($_POST['optype'] == 'digest') {
        include_once S_ROOT . './source/function_op.php';
        if (!empty($_POST['ids']) && digestthreads($tagid, $_POST['ids'], $_POST['digestv'])) {
            cpmessage('do_success', $_POST['mpurl']);
        } else {
            cpmessage('choosing_to_operate_the_topic', $_POST['mpurl']);
        }
    } elseif ($_POST['optype'] == 'top') {
        include_once S_ROOT . './source/function_op.php';
        if (!empty($_POST['ids']) && topthreads($tagid, $_POST['ids'], $_POST['topv'])) {
            cpmessage('do_success', $_POST['mpurl']);
        } else {
            cpmessage('choosing_to_operate_the_topic', $_POST['mpurl']);
        }
    } else {
        cpmessage('choice_batch_action');
    }
}
Example #2
0
            showmessage('no_privilege');
        }
    }
} elseif ($_GET['op'] == 'reply') {
    if ($eventid) {
        if ($userevent['status'] < 2) {
            showmessage('event_only_allows_member_thread');
        }
    }
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('post') . " WHERE pid='{$pid}'");
    if (!($post = $_SGLOBAL['db']->fetch_array($query))) {
        showmessage('posting_does_not_exist');
    }
} elseif ($_GET['op'] == 'digest') {
    include_once S_ROOT . './source/function_op.php';
    digestthreads($tagid, array($tid), isset($_GET['cancel']) ? 0 : 1);
    showmessage('do_success');
} elseif ($_GET['op'] == 'top') {
    include_once S_ROOT . './source/function_op.php';
    topthreads($tagid, array($tid), isset($_GET['cancel']) ? 0 : 1);
    showmessage('do_success');
} elseif ($_GET['op'] == 'edithot') {
    //权限
    if (!checkperm('managethread')) {
        showmessage('no_privilege');
    }
    $tid = intval($_GET['tid']);
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('thread') . " WHERE tid='{$tid}'");
    if (!($thread = $_SGLOBAL['db']->fetch_array($query))) {
        showmessage('no_privilege');
    }