jieqi_getconfigs(JIEQI_MODULE_NAME, 'right'); $maxmessage = $jieqiConfigs['system']['messagelimit']; $honorid = jieqi_gethonorid($_SESSION['jieqiUserScore'], $jieqiHonors); if ($honorid && isset($jieqiRight['system']['maxmessages']['honors'][$honorid]) && is_numeric($jieqiRight['system']['maxmessages']['honors'][$honorid])) { $maxmessage = intval($jieqiRight['system']['maxmessages']['honors'][$honorid]); } //根据头衔设置的消息数 include_once JIEQI_ROOT_PATH . '/class/message.php'; $message_handler = JieqiMessageHandler::getInstance('JieqiMessageHandler'); $sql = "SELECT COUNT(*) AS msgnum FROM " . jieqi_dbprefix('system_message') . " WHERE (fromid=" . $_SESSION['jieqiUserId'] . " AND fromdel=0) OR (toid=" . $_SESSION['jieqiUserId'] . " AND todel=0)"; $res = $message_handler->db->query($sql); $row = $message_handler->getRow($res); $nowmessage = (int) $row['msgnum']; if ($nowmessage >= $maxmessage) { $jieqiTpl->setCaching(0); $jieqiTpl->assign('jieqi_contents', jieqi_msgbox($jieqiLang['system']['message_is_full'], $jieqiLang['system']['message_box_full'])); } else { $jieqiTpl->assign('maxdaymsg', $maxdaymsg); $jieqiTpl->assign('nowmessage', $nowmessage); $jieqiTpl->assign('maxmessage', $maxmessage); $jieqiTpl->assign('url_newmessage', JIEQI_URL . '/newmessage.php?do=submit'); $message = false; if (!empty($_REQUEST['reid']) || !empty($_REQUEST['fwid'])) { include_once JIEQI_ROOT_PATH . '/class/message.php'; $message_handler = JieqiMessageHandler::getInstance('JieqiMessageHandler'); if (!empty($_REQUEST['reid'])) { $message = $message_handler->get($_REQUEST['reid']); } elseif (!empty($_REQUEST['fwid'])) { $message = $message_handler->get($_REQUEST['fwid']); } }
$newReport->setVar('reportname', $_SESSION['jieqiUserName']); $newReport->setVar('authtime', 0); $newReport->setVar('authuid', 0); $newReport->setVar('authname', ''); $newReport->setVar('reporttitle', $_POST['reporttitle']); $newReport->setVar('reporttext', $_POST['reporttext']); $newReport->setVar('reportsize', strlen($_POST['reporttext'])); if (!isset($_POST['reportfield'])) { $_POST['reportfield'] = ''; } $newReport->setVar('reportfield', strval($_POST['reportfield'])); $newReport->setVar('authnote', ''); $newReport->setVar('reportsort', intval($_POST['reportsort'])); $newReport->setVar('reporttype', intval($_POST['reporttype'])); $newReport->setVar('authflag', 0); $report_handler->insert($newReport); include_once JIEQI_ROOT_PATH . '/header.php'; $jieqiTpl->setCaching(0); $jieqiTpl->assign('jieqi_contents', jieqi_msgbox(LANG_DO_SUCCESS, $jieqiLang['system']['report_submit_success'])); include_once JIEQI_ROOT_PATH . '/footer.php'; } else { jieqi_printfail($errtext); } } else { //显示申请条例 include_once JIEQI_ROOT_PATH . '/header.php'; $jieqiTpl->assign_by_ref('rsortrows', $jieqiRsort); $jieqiTpl->setCaching(0); $jieqiTpl->assign('jieqi_contents', $jieqiTpl->fetch(JIEQI_ROOT_PATH . '/templates/report.html')); include_once JIEQI_ROOT_PATH . '/footer.php'; }
$newApply->setVar('applyname', $_SESSION['jieqiUserName']); $newApply->setVar('authtime', 0); $newApply->setVar('authuid', 0); $newApply->setVar('authname', ''); $newApply->setVar('applytitle', ''); $newApply->setVar('applytext', $_POST['applytext']); $newApply->setVar('applysize', strlen($_POST['applytext'])); $newApply->setVar('authnote', ''); if ($jieqiConfigs['article']['checkappwriter'] == 1) { //需要审核 $newApply->setVar('applyflag', 0); $apply_handler->insert($newApply); //jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['apply_submit_success']); include_once JIEQI_ROOT_PATH . '/header.php'; $jieqiTpl->setCaching(0); $jieqiTpl->assign('jieqi_contents', jieqi_msgbox(LANG_DO_SUCCESS, $jieqiLang['article']['apply_submit_success'])); include_once JIEQI_ROOT_PATH . '/footer.php'; } else { //不需要审核 include_once JIEQI_ROOT_PATH . '/class/groups.php'; jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs'); $key = array_search($jieqiConfigs['article']['writergroup'], $jieqiGroups); if ($key == false) { jieqi_printfail($jieqiLang['article']['no_writer_group']); } elseif ($key == JIEQI_GROUP_ADMIN) { jieqi_printfail($jieqiLang['article']['no_writer_admin']); } else { include_once JIEQI_ROOT_PATH . '/class/users.php'; $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler'); $jieqiUsers = $users_handler->get($_SESSION['jieqiUserId']); $jieqiUsers->setVar('groupid', $key);
if (empty($_REQUEST['siteid']) || empty($_REQUEST['fromid']) || empty($_REQUEST['toid'])) { jieqi_printfail(LANG_ERROR_PARAMETER); } jieqi_loadlang('collect', JIEQI_MODULE_NAME); jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs'); $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']; include_once $jieqiModules['article']['path'] . '/include/collectarticle.php'; //0 初始状态 1 采集完成 2 不需要采集 3 采集失败 4 需要采集但是对应不上 if ($retflag == 1) { jieqi_getcachevars('article', 'articleuplog'); if (!is_array($jieqiArticleuplog)) { $jieqiArticleuplog = array('articleuptime' => 0, 'chapteruptime' => 0); } $jieqiArticleuplog['articleuptime'] = JIEQI_NOW_TIME; $jieqiArticleuplog['chapteruptime'] = JIEQI_NOW_TIME; jieqi_setcachevars('articleuplog', 'jieqiArticleuplog', $jieqiArticleuplog, 'article'); jieqi_jumppage($article_static_url . '/articlemanage.php?id=' . $_REQUEST['toid'], LANG_DO_SUCCESS, $jieqiLang['article']['update_collect_success']); } elseif ($retflag == 2) { include_once JIEQI_ROOT_PATH . '/admin/header.php'; $jieqiTpl->assign('jieqi_contents', '<br />' . jieqi_msgbox(LANG_DO_SUCCESS, sprintf($jieqiLang['article']['collect_no_update'], jieqi_geturl('article', 'article', $_REQUEST['toid'], 'info'), $article_static_url . '/articleclean.php?id=' . $_REQUEST['toid'] . '&collecturl=' . urlencode($article_static_url . '/admin/updatecollect.php?siteid=' . $_REQUEST['siteid'] . '&fromid=' . $_REQUEST['fromid'] . '&toid=' . $_REQUEST['toid']), $article_static_url . '/admin/collect.php')) . '<br />'); include_once JIEQI_ROOT_PATH . '/admin/footer.php'; } elseif ($retflag == 4) { include_once JIEQI_ROOT_PATH . '/admin/header.php'; $errchapter = ''; foreach ($retchapinfo as $v) { $errchapter .= $v['fchapter'] . ' => ' . $v['tchapter'] . '<br />'; } $jieqiTpl->assign('jieqi_contents', '<br />' . jieqi_msgbox(LANG_DO_SUCCESS, sprintf($jieqiLang['article']['collect_cant_update'], $errchapter, $article_static_url . '/articlemanage.php?id=' . $_REQUEST['toid'], $article_static_url . '/articleclean.php?id=' . $_REQUEST['toid'] . '&collecturl=' . urlencode($article_static_url . '/admin/updatecollect.php?siteid=' . $_REQUEST['siteid'] . '&fromid=' . $_REQUEST['fromid'] . '&toid=' . $_REQUEST['toid']), $article_static_url . '/admin/collect.php')) . '<br />'); include_once JIEQI_ROOT_PATH . '/admin/footer.php'; }