Exemplo n.º 1
0
             if ($_REQUEST['chaptertype'] == 0) {
                 $article->setVar('size', $article->getVar('size') + $chaptersize - $beforesize);
                 if ($chapter->getVar('chapterid') == $article->getVar('lastchapterid')) {
                     $article->setVar('lastchapter', $_POST['chaptername']);
                 }
             } else {
                 if ($chapter->getVar('chapterid') == $article->getVar('lastvolumeid')) {
                     $article->setVar('lastvolume', $_POST['chaptername']);
                 }
             }
             $article_handler->insert($article);
             @clearstatcache();
             //清除文件状态缓存,免得附件删除后还认为存在
             include_once $jieqiModules['article']['path'] . '/class/package.php';
             $package = new JieqiPackage($article->getVar('articleid'));
             $package->editChapter($_POST['chaptername'], $_POST['chaptercontent'], $_REQUEST['chaptertype'], $chapter->getVar('chapterorder'), $chapter->getVar('chapterid'));
             jieqi_jumppage($article_static_url . '/articlemanage.php?id=' . $article->getVar('articleid'), LANG_DO_SUCCESS, $jieqiLang['article']['chapter_edit_success']);
         }
     } else {
         jieqi_printfail($errtext);
     }
     break;
 case 'edit':
 default:
     //包含区块参数(定制区块)
     jieqi_getconfigs('article', 'authorblocks', 'jieqiBlocks');
     include_once JIEQI_ROOT_PATH . '/header.php';
     include_once JIEQI_ROOT_PATH . '/lib/html/formloader.php';
     $jieqiTpl->assign('article_static_url', $article_static_url);
     $jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
     $jieqiTpl->assign('url_chapteredit', $article_static_url . '/chapteredit.php?do=submit');