Exemplo n.º 1
0
             $img->codepage = JIEQI_SYSTEM_CHARSET;
             $img->wm_image_pos = $jieqiConfigs['article']['attachwater'];
             $img->wm_image_name = $water_image_file;
             $img->wm_image_transition = $jieqiConfigs['article']['attachwtrans'];
             $img->jpeg_quality = $jieqiConfigs['article']['attachwquality'];
             $img->create($tmp_attachfile);
             unset($img);
         }
         jieqi_copyfile($tmp_attachfile, $attach_save_path, 0777, true);
     }
 }
 //保存文章内容和生成html
 include_once $GLOBALS['jieqiModules']['article']['path'] . '/class/package.php';
 $package = new JieqiPackage($article->getVar('articleid', 'n'));
 if ($_POST['chaptertype'] == 2) {
     $package->addChapter($newChapter->getVar('chapterid'), $_POST['chaptername'], $_POST['chaptercontent'], 1, $volumeid);
 } else {
     $package->addChapter($newChapter->getVar('chapterid'), $_POST['chaptername'], $_POST['chaptercontent'], 0, $volumeid);
 }
 if ($from_draft) {
     $draft_handler->delete($_REQUEST['draftid']);
 }
 //增加章节积分
 jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
 $article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $GLOBALS['jieqiModules']['article']['url'] : $jieqiConfigs['article']['staticurl'];
 $article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $GLOBALS['jieqiModules']['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
 if (!empty($jieqiConfigs['article']['scorechapter'])) {
     include_once JIEQI_ROOT_PATH . '/class/users.php';
     $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
     $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['scorechapter'], true);
     if ($_REQUEST['userchappid'] > 0 && !empty($jieqiConfigs['article']['scoreauthuserchap'])) {