Пример #1
0
}
//主题处理相关函数
include_once JIEQI_ROOT_PATH . '/include/funpost.php';
//发表书评
$addnewreply = 0;
if (!empty($_POST['pcontent']) && $enablepost) {
    //校验错误信息数组
    $check_errors = array();
    //检查和过滤提交变量
    $post_set = array('module' => JIEQI_MODULE_NAME, 'ownerid' => intval($ownerid), 'topicid' => intval($_REQUEST['rid']), 'postid' => 0, 'posttime' => JIEQI_NOW_TIME, 'topictitle' => &$_POST['ptitle'], 'posttext' => &$_POST['pcontent'], 'attachment' => '', 'isnew' => true, 'istopic' => 0, 'istop' => 0, 'sname' => 'jieqiArticleReviewTime', 'attachfile' => '', 'oldattach' => '', 'checkcode' => $_POST['checkcode']);
    jieqi_post_checkvar($post_set, $jieqiConfigs['article'], $check_errors);
    if (empty($check_errors)) {
        include_once $jieqiModules['article']['path'] . '/class/replies.php';
        $replies_handler =& JieqiRepliesHandler::getInstance('JieqiRepliesHandler');
        $newReply = $replies_handler->create();
        jieqi_post_newset($post_set, $newReply);
        $replies_handler->insert($newReply);
        $addnewreply = 1;
        $_REQUEST['page'] = 'last';
        //增加书评积分
        if (!empty($jieqiConfigs['article']['scorereview'])) {
            include_once JIEQI_ROOT_PATH . '/class/users.php';
            $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
            $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['scorereview'], true);
        }
    } else {
        jieqi_printfail(implode('<br />', $check_errors));
    }
}
//检查是否有管理书评权力
$canedit = jieqi_checkpower($jieqiPower['article']['manageallreview'], $jieqiUsersStatus, $jieqiUsersGroup, true);
Пример #2
0
}
//主题处理相关函数
include_once JIEQI_ROOT_PATH . '/include/funpost.php';
//发表帖子
$addnewreply = 0;
if (!empty($_POST['pcontent']) && $enablepost) {
    //校验错误信息数组
    $check_errors = array();
    //检查和过滤提交变量
    $post_set = array('module' => JIEQI_MODULE_NAME, 'ownerid' => intval($ownerid), 'topicid' => intval($_REQUEST['tid']), 'postid' => 0, 'posttime' => JIEQI_NOW_TIME, 'topictitle' => &$_POST['ptitle'], 'posttext' => &$_POST['pcontent'], 'attachment' => '', 'isnew' => true, 'istopic' => 0, 'istop' => 0, 'sname' => 'jieqiSystemParlorTime', 'attachfile' => '', 'oldattach' => '', 'checkcode' => $_POST['checkcode']);
    jieqi_post_checkvar($post_set, $jieqiConfigs['system'], $check_errors);
    if (empty($check_errors)) {
        include_once JIEQI_ROOT_PATH . '/class/pposts.php';
        $pposts_handler =& JieqiPpostsHandler::getInstance('JieqiPpostsHandler');
        $newPost = $pposts_handler->create();
        jieqi_post_newset($post_set, $newPost);
        $pposts_handler->insert($newPost);
        $addnewreply = 1;
        $_REQUEST['page'] = 'last';
        //增加回复积分
        if (!empty($jieqiConfigs['system']['scoreptopic'])) {
            include_once JIEQI_ROOT_PATH . '/class/users.php';
            $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
            $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['system']['scoreptopic'], true);
        }
    } else {
        jieqi_printfail(implode('<br />', $check_errors));
    }
}
//检查是否有管理帖子权力
$canedit = jieqi_checkpower($jieqiPower['system']['manageallparlor'], $jieqiUsersStatus, $jieqiUsersGroup, true);