//主题处理相关函数 include_once JIEQI_ROOT_PATH . '/include/funpost.php'; switch ($_REQUEST['action']) { case 'update': //校验错误信息数组 $check_errors = array(); //检查和过滤提交变量 $post_set = array('module' => JIEQI_MODULE_NAME, 'ownerid' => intval($ppost->getVar('ownerid')), 'topicid' => intval($ppost->getVar('topicid')), 'postid' => intval($ppost->getVar('postid')), 'posttime' => intval($ppost->getVar('posttime', 'n')), 'topictitle' => &$_POST['ptitle'], 'posttext' => &$_POST['pcontent'], 'attachment' => '', 'emptytitle' => true, 'isnew' => false, 'istopic' => intval($ppost->getVar('istopic')), 'istop' => 0, 'sname' => 'jieqiSystemParlorTime', 'attachfile' => '', 'oldattach' => '', 'checkcode' => $_POST['checkcode']); jieqi_post_checkvar($post_set, $jieqiConfigs['system'], $check_errors); if (empty($check_errors)) { $oldtitle = $ppost->getVar('subject', 'n'); //更新帖子表 jieqi_post_upedit($post_set, jieqi_dbprefix('system_pposts')); //如果是主题则更新主题表 if ($ppost->getVar('istopic') == 1 && $post_set['topictitle'] != $oldtitle) { jieqi_topic_upedit($post_set, jieqi_dbprefix('system_ptopics')); } jieqi_jumppage(JIEQI_URL . '/ptopicshow.php?tid=' . $ppost->getVar('topicid'), LANG_DO_SUCCESS, $jieqiLang['system']['ppost_edit_success']); } else { jieqi_printfail(implode('<br />', $check_errors)); } break; case 'edit': default: include_once JIEQI_ROOT_PATH . '/header.php'; $jieqiTpl->assign('subject', $ppost->getVar('subject')); $jieqiTpl->assign('topicid', $ppost->getVar('topicid')); $jieqiTpl->assign('postid', $ppost->getVar('postid')); $jieqiTpl->assign('url_ppostedit', 'ppostedit.php?do=submit'); $jieqiTpl->assign('ptitle', $ppost->getVar('subject', 'e')); $jieqiTpl->assign('pcontent', $ppost->getVar('posttext', 'e'));
//主题处理相关函数 include_once JIEQI_ROOT_PATH . '/include/funpost.php'; switch ($_REQUEST['action']) { case 'update': //校验错误信息数组 $check_errors = array(); //检查和过滤提交变量 $post_set = array('module' => JIEQI_MODULE_NAME, 'ownerid' => intval($reply->getVar('ownerid')), 'topicid' => intval($reply->getVar('topicid')), 'postid' => intval($reply->getVar('postid')), 'posttime' => intval($reply->getVar('posttime', 'n')), 'topictitle' => &$_POST['ptitle'], 'posttext' => &$_POST['pcontent'], 'attachment' => '', 'emptytitle' => true, 'isnew' => false, 'istopic' => intval($reply->getVar('istopic')), 'istop' => 0, 'sname' => 'jieqiArticleReviewTime', 'attachfile' => '', 'oldattach' => '', 'checkcode' => $_POST['checkcode']); jieqi_post_checkvar($post_set, $jieqiConfigs['article'], $check_errors); if (empty($check_errors)) { $oldtitle = $reply->getVar('subject', 'n'); //更新帖子表 jieqi_post_upedit($post_set, jieqi_dbprefix('article_replies')); //如果是主题则更新主题表 if ($reply->getVar('istopic') == 1 && $post_set['topictitle'] != $oldtitle) { jieqi_topic_upedit($post_set, jieqi_dbprefix('article_reviews')); } jieqi_jumppage($jieqiModules['article']['url'] . '/reviewshow.php?rid=' . $reply->getVar('topicid', 'n'), LANG_DO_SUCCESS, $jieqiLang['article']['review_edit_success']); } else { jieqi_printfail(implode('<br />', $check_errors)); } break; case 'edit': default: //显示页面 include_once JIEQI_ROOT_PATH . '/header.php'; $article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl']; $article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl']; $jieqiTpl->assign('article_static_url', $article_static_url); $jieqiTpl->assign('article_dynamic_url', $article_dynamic_url); $jieqiTpl->assign('postid', $reply->getVar('postid'));