私信发送成功
Watch Star Fork

aming / ebookappPHP

基于bootstrap的php小说采集系统 http://getlove.xyz
克隆/下载
一键复制 编辑 原始数据 按行查看 历史
chapter_ctx.php 1.25 KB aming 提交于 2014-08-05 12:02 . 增加了最近阅读功能
<?php
include_once "init.php";
include_once WEB_ROOT."util/mysql_class.php";
include_once WEB_ROOT."smarty_inc.php";
include_once WEB_ROOT."admin/funcs/make_article_func.php";
include_once WEB_ROOT."admin/funcs/app_util_func.php";
include_once WEB_ROOT."admin/funcs/make_single_chapter_func.php";
include_once WEB_ROOT."util/util.php";
include_once WEB_ROOT."util/Model_class.php";
include_once WEB_ROOT.'admin/Parser_class.php';
include_once 'third_part/simple_html_dom.php';
include_once 'util/mobile_redirect.php';
if(@$_GET["id"]){
$chapter_id = str_check($_GET["id"]);
try{
navToChapter($chapter_id);
}catch (Exception $e){
echo $e->getMessage(), '<br/>';
echo '<pre>', $e->getTraceAsString(), '</pre>';
}
}else{
echo "artileid missing";
}
function navToChapter($chapter_id){
$local_url="/data/chapters/".$chapter_id.".htm";
setcookie('history',$local_url,time()+3600*24*7,"/");
$act_file = WEB_ROOT.$local_url;
if(!file_exists($act_file)){
try{
make_chapter_func($chapter_id,false);
}catch(Exception $e){
echo $e->getMessage(), '<br/>';
echo '<pre>', $e->getTraceAsString(), '</pre>';
}
}
if(file_exists($act_file)){
echo read_file_content($act_file);
}else{
showErrorPage($chapter_id);
}
}
?>

评论 (0)

你可以在登录后,对此项目发表评论

3_float_left_people 3_float_left_close