<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title><?php include \Kuxin\View::parseTpl($tkd['title']);?></title>
    <meta name="keywords" content="<?php include \Kuxin\View::parseTpl($tkd['keywords']);?>">
    <meta name="description" content="<?php include \Kuxin\View::parseTpl($tkd['description']);?>">
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/css/global.css"/>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/css/style.css"/>
    <script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/js/jquery-3.3.1.js"></script>
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
    <meta name="author" content="www.ptcms.com">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width" />
    <meta name="applicable-device" content="pc">
    <meta http-equiv="mobile-agent" content="format=html5; url=<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "mobileurl");?><?php echo $_SERVER['REQUEST_URI'];?>">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta http-equiv="Cache-Control" content="no-transform" />
    <link rel="canonical" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo $_SERVER['REQUEST_URI'];?>" />
    <?php if((\Kuxin\Helper\Arr::getValue($_kxcms_config, "ampurl"))):?><link rel="amphtml" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "ampurl");?><?php echo $_SERVER['REQUEST_URI'];?>"><?php endif;?>
    <?php if((\Kuxin\Helper\Arr::getValue($_kxcms_config, "mipurl"))):?><link rel="miphtml" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "mipurl");?><?php echo $_SERVER['REQUEST_URI'];?>"><?php endif;?>
    <meta property="og:type" content="novel"/>
    <meta property="og:title" content="<?php echo $novel['name'];?>"/>
    <meta property="og:description" content="<?php echo showIntroLine($novel['intro']);?>"/>
    <meta property="og:image" content="<?php echo $novel['cover'];?>"/>
    <meta property="og:novel:category" content="<?php echo $category['name'];?>"/>
    <meta property="og:novel:author" content="<?php echo $author['name'];?>"/>
    <meta property="og:novel:book_name" content="<?php echo $novel['name'];?>"/>
    <meta property="og:novel:read_url" content="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>"/>
    <meta property="og:url" content="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>"/>
    <meta property="og:novel:author_link" content="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo \Kuxin\Helper\Url::build("author.space.index",['authorid'=>$author['id'],'pinyin'=>$author['pinyin'],'name'=>$author['name']],"");?>"/>
    <meta property="og:novel:status" content="<?php if($novel['is_over']):?>完结<?php else:?>连载中<?php endif;?>"/>
    <meta property="og:novel:update_time" content="<?php echo \Kuxin\View::date($last['time'],'Y-m-d H:i:s');?>"/>
    <meta property="og:novel:latest_chapter_name" content="<?php echo $last['name'];?>"/>
    <meta property="og:novel:latest_chapter_url" content="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>$last['id']],"");?>"/>
</head>
<body>
<!-- 导航栏 -->
<div class="pt-top-nav">
    <ul class="content">
        <li class="fl">
            欢迎访问<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>小说网
        </li>
        <li class="fr m">
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/shortcut_icon.png" class="pt-shortcut-icon">
            <span class="cursor color4 lh100" onclick="toDesktop('<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>','<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>')">桌面快捷</span>
        </li>
        <li class="fr mr20">
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star_icon.png" class="pt-index-icon">
            <span class="cursor color4 lh100" onclick="addFavorite(document.title,window.location);">加入收藏</span>
        </li>
        <li class="fr mr20">
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/index_icon.png" class="pt-index-icon">
            <span class="cursor color4 lh100" onclick="setHome(this);">设为首页</span>
        </li>
    </ul>
</div>
<div class="w100 pt-head-bg">
    <div class="pt-head">
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/static/image/logo.png" class="pt-logo" title="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>">
        <div class="pt-search-box">
            <form action="<?php echo \Kuxin\Helper\Url::build("novel.search.result",[],"");?>">
                <div class="pt-serachbg">
                    <input type="text" name="searchkey" placeholder="请输入您要搜索的书名" class="pt-serarch-input" value="<?php echo $_GET['searchkey'];?>">
                </div>
                <button type="submit" class="pt-search-btn">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/search.png" class="pt-search-icon">
                </button>
            </form>
        </div>
        <ul class="inline-block size14 color4 fr pt-head-list">
            <li>
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/person_icon.png" class="pt-person-icon">
                <?php if(($islogin)):?>
                <span class="color2 lh100">
                    <a href="<?php echo \Kuxin\Helper\Url::build("user.index.index",[],"");?>" class="color2"><?php echo $userinfo['nickname']?:$userinfo['name'];?></a>
                    <span>|</span>
                    <a href="<?php echo \Kuxin\Helper\Url::build("user.pay.recharge",[],"");?>" class="color2">充值</a>
                </span>
                <?php else:?>
                <span class="color2 lh100"><a title="登录" href="<?php echo \Kuxin\Helper\Url::build("user.auth.login",[],"");?>" class="color2">登录</a> | <a title="注册" href="<?php echo \Kuxin\Helper\Url::build("user.auth.register",[],"");?>" class="color2">注册</a></span>
                <?php endif;?>
            </li>
            <li>
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/book_icon.png" class="pt-book-icon">
                <a rel="nofollow" href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>" class="color4 lh100">我的书架</a>
            </li>
            <li class="inline-block">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/history_icon.png" class="pt-history-icon">
                <a rel="nofollow" href="<?php echo \Kuxin\Helper\Url::build("user.history.index",[],"");?>" class="color4 lh100">阅读历史</a>
            </li>
        </ul>
    </div>
</div>

<!-- 导航栏 -->
<div class="pt-navbg">
    <div class="pt-nav">
        <a title="首页" href="<?php echo \Kuxin\Helper\Url::build("index.index",[],"");?>"<?php if($pagesign=='index'):?> class="pt-active"<?php endif;?>>首页</a>
        <a title="排行" href="<?php echo \Kuxin\Helper\Url::build("novel.rank.index",[],"");?>"<?php if($pagesign=='rank'):?> class="pt-active"<?php endif;?>>排行</a>
        <a title="分类" href="<?php echo \Kuxin\Helper\Url::build("novel.category.index",[],"");?>"<?php if($pagesign=='category'):?> class="pt-active"<?php endif;?>>分类</a>
        <a title="完本" href="<?php echo \Kuxin\Helper\Url::build("novel.over.index",[],"");?>"<?php if($pagesign=='over'):?> class="pt-active"<?php endif;?>>完本</a>
        <a title="书单" href="<?php echo \Kuxin\Helper\Url::build("booklist.booklist.index",[],"");?>"<?php if($pagesign=='booklist'):?> class="pt-active"<?php endif;?>>书单</a>
        <a title="专题" href="<?php echo \Kuxin\Helper\Url::build("special.index",[],"");?>"<?php if($pagesign=='special'):?> class="pt-active"<?php endif;?>>专题</a>
        <a title="用户中心" href="<?php echo \Kuxin\Helper\Url::build("user.index.index",[],"");?>" class="fr<?php if($pagesign=='user'):?>  pt-active<?php endif;?>">用户中心</a>
        <a title="原创专区" href="<?php echo \Kuxin\Helper\Url::build("author.author.index",[],"");?>" class="fr" target="_blank">原创专区</a>
    </div>
</div>
<!-- 内容 -->
<div class="pt-content">
    <!-- 面包屑 -->
    <div class="pt-crumb">
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/crumb_icon.png" class="pt-crumb-icon">
        <span class="color5">
            <a title="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></a> >
            <a title="<?php echo $category['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$category['id'],'key'=>$category['key']],"");?>" class="color5"><?php echo $category['name'];?></a> >
            <a title="<?php echo $novel['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="color5"><?php echo $novel['name'];?></a>
        </span>
    </div>
    <!-- 书籍详情 -->
    <div class="pt-bookdetail">
        <a title="<?php echo $novel['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>"><img src="<?php echo $novel['cover'];?>" class="fl pt-bookdetail-img" title="<?php echo $novel['name'];?>" alt="<?php echo $novel['name'];?>"></a>
        <div class="fl pt-bookdetail-info">
            <div style="line-height: 40px;">
                <h1 class="size24  mr20 novelname"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="color2 bold" title="<?php echo $novel['name'];?>"><?php echo $novel['name'];?></a></h1>
                <span class="mr30">作者：<a title="<?php echo $author['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("author.space.index",['authorid'=>$author['id'],'pinyin'=>$author['pinyin'],'name'=>$author['name']],"");?>"><span class="color5"><?php echo $author['name'];?></span></a></span>
                <span class="">类别：<a title="<?php echo $category['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$category['id'],'key'=>$category['key']],"");?>" class="color5"><span class="color5"><?php echo $category['name'];?></span></a></span>
                <span class="fr color7">综合评分 <span class="size26 color2 num-avg-star" data-star-score="<?php echo $data['star_score'];?>" data-star-num="<?php echo $data['star_num'];?>"><?php echo $data['star'];?></span></span>
            </div>
            <div style="max-height: 72px;overflow: hidden;position:relative" class="tags">
                <div>
                    <?php if(is_array($tag)): foreach($tag as $key =>$loop):?>
                    <a title="<?php echo $loop['name'];?>" class="pt-bookdetail-label mt10"><?php echo $loop['name'];?></a>
                    <?php endforeach; endif;?>
                </div>
            </div>
            <div class="compulsory-row-three pt-bookdetail-intro">
                <?php echo showIntro($novel['intro']);?>
            </div>
            <div>
                <?php if($last['id']):?>
                <a title="<?php echo $last['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>$last['id']],"");?>"><span class="color2 mr20"><?php echo $last['name'];?></span></a>
                <?php else:?>
                <span class="color2 mr20"><?php echo $last['name'];?></span>
                <?php endif;?>
                <span class="size12 color0"><?php echo \Kuxin\View::date($last['time'],"Y-m-d H:i:s");?></span>
            </div>
            <div class="pt-bookdetail-btn">
                <?php if($last['id']):?>
                <a href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>1],"");?>" class="pt-bookdetail-select">立即阅读</a>
                <?php else:?>
                <a href="javascript:void(0);" class="">立即阅读</a>
                <?php endif;?>
                <div class="inline-block">
                    <a href="javascript:void(0);" id="btn-mark">
                        <?php echo \Kuxin\View::default($ismark,'加入收藏','取消收藏');?>
                    </a>
                    <a href="javascript:void(0);" id="btn-add-booklist" title="加入书单" style="margin-left: -5px;">&nbsp;</a>
                    <div class="box-booklist" tabindex="0">
                        <div class="angle"></div>
                        <ul>
                            <li>天崩地裂单</li>
                            <li>我爱的小清新</li>
                            <li>奇门异术</li>
                            <li title="奇门异术随便翻翻看">奇门异术随便翻翻看</li>
                        </ul>
                    </div>
                </div>
                <a href="javascript:void(0);" id="btn-vote">我要推荐</a>
                <a class="fr" style="border: none;margin-right: 0;padding-right: 0" title="<?php echo $novel['name'];?>TXT下载" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.down",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>">
                    <img style="vertical-align: middle" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/book.png" alt="TXT下载">
                    <span>TXT下载</span>
                </a>
            </div>
        </div>
    </div>
    <!-- 右侧次数 -->
    <div class="pt-bookdetail-num">
        <div class="mb20 lh100">
            <span class="color5 mr10">点击:</span>
            <span class="color7"><?php echo $data['allvisit'];?> 次</span>
        </div>
        <div class="mb20 lh100">
            <span class="color5 mr10">收藏:</span>
            <span class="color7"><span class="num-mark"><?php echo $data['mark'];?></span> 人</span>
        </div>
        <div class="mb20 lh100">
            <span class="color5 mr10">推荐:</span>
            <span class="color7"><span class="num-vote"><?php echo $data['vote'];?></span> 人</span>
        </div>
        <div class="mb20 lh100">
            <span class="color5 mr10">字数:</span>
            <span class="color7"><?php echo $data['words'];?>万</span>
        </div>
        <div class="mb20 lh100">
            <span class="color5 mr10">我要评分:</span>
            <span class="pt-photo">
                <span title="不知所云">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="随便看看">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="值得一读">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="不容错过">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="经典必读">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
            </span>
        </div>
        <div class="mb20 lh100">
            <span class="color5 mr10">参评人数:</span>
            <span class="color7"><span class="num-star-people"><?php echo $data['star_num'];?></span> 人</span>
        </div>
    </div>
    <!-- 章节 -->
    <div class="clearfix" style="width:100%">
        <div class="fl" style="width:950px">
            <?php $novelstat=\Kuxin\Block::show('novel.stat', ['novelid'=>$novel['id'],'num'=>7]);?>
            <div class="bg-white mt10 pt-interactive">
                <p class="pl20 pt20">
                    <img style="vertical-align: middle;margin-top: -6px;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/interactive1.png" alt="书迷互动">
                </p>
                <div>
                    <div style="width: 265px;border-right: 1px solid #E5E5E5;">
                        <div class="color2 mt15 size20 bold"><img style="vertical-align: middle;margin-top: -3px;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/ticket.png"> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.ticket_caption");?></div>
                        <div class="mt35">本月总计</div>
                        <div class="size32 bold color32"><?php echo $novelstat['ticket']['month_num'];?></div>
                        <div class="mt30 bold">优秀作品排名 <span class="color2"><?php echo $novelstat['ticket']['month_rank'];?></span></div>
                        <button class="mt20 bold btn-interactive-vote">我要投票</button>
                    </div>
                    <div style="width: 265px;border-right: 1px solid #E5E5E5;">
                        <div class="color2 mt15 size20 bold"><img style="vertical-align: middle;margin-top: -3px;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/reward.png"> 打赏</div>
                        <div class="mt35">本月打赏人数</div>
                        <div class="size32 bold color32"><?php echo $novelstat['reward']['month_people'];?></div>
                        <div class="mt30 bold">总计打赏人数 <span class="color2"><?php echo $novelstat['reward']['total_people'];?></span></div>
                        <button class="mt20 bold btn-interactive-reward">我要打赏</button>
                    </div>
                    <div style="width: 365px;">
                        <img class="mt10" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/interactive.png" alt="书迷动态">
                        <?php if(empty($novelstat['dynamic'])):?>
                        <div class="mt50">暂无数据</div>
                        <?php else:?>
                        <ul class="mt10" style="width: 220px;margin: auto;">
                            <?php if(is_array($novelstat['dynamic'])): foreach($novelstat['dynamic'] as $key =>$loop):?>
                            <?php if($loop['type'] == 'ticket'):?>
                            <li>
                                <span class="color32"><?php echo $loop['username'];?></span> 投了 <span class="color32"><?php echo $loop['num'];?>张<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.ticket_caption");?></span>
                                <img class="fr" style="margin-top: 3px;width: 16px;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/ticket.png">
                            </li>
                            <?php elseif($loop['type'] == 'reward'):?>
                            <li>
                                <span class="color2"><?php echo $loop['username'];?></span> 打赏 <span class="color2"><?php echo $loop['num'];?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
                                <img class="fr" style="margin-top: 3px;width: 16px;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/reward.png">
                            </li>
                            <?php endif;?>
                            <?php endforeach; endif;?>
                        </ul>
                        <?php endif;?>
                    </div>
                </div>
            </div>
            <?php $allchapterlist=\Kuxin\Block::show('chapter.list', ['novelid'=>$novel['id'],'sort'=>'asc']);?>
            <?php if(!$source['id']):?>
            <div class="pt-chapter mt10" style="display: none;">
                <div class="title">
                    <input type="checkbox" id="select_all_chapters"><label class="color32 size16 bold ml25" for="select_all_chapters">选择全部章节</label>
                    <span class="bold">已选 <span class="color2 selected_num">0</span> 章</span>
                    <?php if($userinfo['vip_expire_time'] < time()):?>
                    <a class="fr color2 size14 ptb5" href="<?php echo \Kuxin\Helper\Url::build("user.pay.vip",[],"");?>">享更多优惠</a>
                    <a class="fr color1 size14 bg-red plr10 ptb5 mr10" href="<?php echo \Kuxin\Helper\Url::build("user.pay.vip",[],"");?>">升级超级VIP</a>
                    <?php endif;?>
                    <span class="fr size14 color32 mr35" style="margin-top: -2px;">
                        <?php $charge=\Kuxin\Block::show('novel.charge', ['novelid'=>$novel['id']]);?>
                        <?php  $charge = $userinfo['vip_expire_time'] < time()?$charge['words_money']:$charge['words_vip_money'];?>
                        <span class="color2 size20 bold mr5"><?php echo $charge;?></span>
                        <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>/千字
                    </span>
                    <span class="fr color14 ptb5 mr10"><?php if($userinfo['vip_expire_time'] < time()):?>普通用户<?php else:?>超级VIP<?php endif;?></span>
                </div>
                <ul class="pt-chapter-subscribe mt20"">
                    <li class="color62">
                        <span><span class="pl50">章节</span></span>
                        <span>字数</span>
                        <span>价格（<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>）</span>
                    </li>
                    <?php if(is_array($allchapterlist)): foreach($allchapterlist as $key =>$loop):?>
                    <?php if($loop['type'] == App\Model\Novel\Chapter::TYPE_TOLL):?>
                    <?php $price=\Kuxin\Block::show('chapter.calculatepricebyprice', ['wordsnum'=>$loop['words'],'price'=>$charge]);?>
                    <li class="item">
                        <span class="color32">
                            <?php if($novel['type'] == App\Model\Novel\Novel::TYPE_VIP_FREE && $userinfo['vip_expire_time'] > time()):?>
                                <?php  $issubscribe = true;;?>
                            <?php else:?>
                                <?php $issubscribe=\Kuxin\Block::show('chapter.issubscribe', ['userid'=>$userinfo['id'],'novelid'=>$novel['id'],'chapterid'=>$loop['chapterid']]);?>
                            <?php endif;?>
                            <input type="checkbox" value="<?php echo $loop['chapterid'];?>" data-price="<?php echo $issubscribe?0:$price;?>" id="chapter_<?php echo $loop['chapterid'];?>" <?php echo $issubscribe?'':'checked="checked"';?>>
                            <label class="pl30" for="chapter_<?php echo $loop['chapterid'];?>"><?php echo $loop['name'];?></label>
                        </span>
                        <span class="color92"><?php echo $loop['words'];?></span>
                        <span class="color2"><?php echo $issubscribe?0:$price;?></span>
                    </li>
                    <?php endif;?>
                    <?php endforeach; endif;?>
                </ul>
                <div class="pt-chapter-subscribe-order">
                    <div>
                        <span class="inline-block mt30">已选 <span class="selected_num color2">0</span> 章</span>
                        <div class="switch"><div></div></div>
                        <span class="size14">自动订阅新章节</span>
                        <button class="btn-subscribe">确认提交</button>
                        <span class="fr size18 color32 mt30 mr20">
                            余额 <span class="size20 color2 total"><?php echo $userinfo['assets']['balance'];?></span> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>
                            ●
                            共计 <span class="selected_money size20 color2">0</span> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>
                        </span>
                    </div>
                </div>
            </div>
            <?php endif;?>
            <div class="pt-chapter mt10">
                <div class="size18 color5 pt-chapter-title">
                    <a title="<?php echo $novel['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="pt-chapter-select">章节目录</a>
                </div>
                <div class="pt-chapter-content">
                    <div class="w100 pt-chapter-cont">
                        <div class="size18 color32 bold pt-chapter-cont-title">最新章节</div>
                        <div class="pt-chapter-cont-detail">
                            <?php $list=\Kuxin\Block::show('chapter.list', ['novelid'=>$novel['id'],'num'=>9,'sort'=>'desc']);?>
                            <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                            <a title="<?php echo $loop['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>$loop['chapterid']],"");?>">
                                <span><?php echo $loop['name'];?></span>
                                <?php if($novel['type'] == App\Model\Novel\Novel::TYPE_TOLL || $novel['type'] == App\Model\Novel\Novel::TYPE_VIP_FREE && $userinfo['vip_expire_time'] < time()):?>
                                    <?php if($loop['type'] == App\Model\Novel\Chapter::TYPE_TOLL):?>
                                        <?php $issubscribe=\Kuxin\Block::show('chapter.issubscribe', ['userid'=>$userinfo['id'],'novelid'=>$novel['id'],'chapterid'=>$loop['chapterid']]);?>
                                        <?php if(!$issubscribe):?>
                                        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/lock.png" alt="收费章节">
                                        <?php endif;?>
                                    <?php endif;?>
                                <?php endif;?>
                            </a>
                            <?php endforeach; endif;?>
                        </div>
                    </div>
                    <div class="w100 pt-chapter-cont">
                        <div class="size18 color32 bold pt-chapter-cont-title">章节列表</div>
                        <div class="pt-chapter-cont-detail full">
                            <?php if(is_array($allchapterlist)): foreach($allchapterlist as $key =>$loop):?>
                            <a title="<?php echo $loop['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>$loop['chapterid']],"");?>" class="compulsory-row-one none">
                                <span><?php echo $loop['name'];?></span>
                                <?php if($novel['type'] == App\Model\Novel\Novel::TYPE_VIP_FREE && $userinfo['vip_expire_time'] > time()):?>
                                    <?php if($loop['type'] == App\Model\Novel\Chapter::TYPE_TOLL):?>
                                        <img class="toll">
                                    <?php endif;?>
                                <?php elseif($novel['type'] != App\Model\Novel\Novel::TYPE_DEFAULT):?>
                                    <?php if($loop['type'] == App\Model\Novel\Chapter::TYPE_TOLL):?>
                                        <?php $issubscribe=\Kuxin\Block::show('chapter.issubscribe', ['userid'=>$userinfo['id'],'novelid'=>$novel['id'],'chapterid'=>$loop['chapterid']]);?>
                                        <?php if($issubscribe):?>
                                        <img class="toll">
                                        <?php else:?>
                                        <img class="toll" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/lock.png" alt="收费章节">
                                        <?php endif;?>
                                    <?php endif;?>
                                <?php endif;?>
                            </a>
                            <?php endforeach; endif;?>
                        </div>
                    </div>
                </div>
            </div>
            <div class="pt-chapter">
                <div class="size18 color5 pt-chapter-title">
                    <a title="<?php echo $novel['name'];?>评论区" href="<?php echo \Kuxin\Helper\Url::build("novel.comment.list",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="pt-chapter-select">小说评论区</a>
                </div>
                <div>
                    <?php $commentlist=\Kuxin\Block::show('comment.list', ['type'=>'novel','userid'=>$userinfo['id'],'typeid'=>$novel['id']]);?>
                    <div class="clear">
                        <div class="size16 pt-chapter-cont-title"><a href="<?php echo \Kuxin\Helper\Url::build("novel.comment.list",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="color2 ">全部评论(<?php echo $data['comment'];?>条)</a></div>
                        <ul class="commentlist clearfix">
                            <?php if(is_array($commentlist)): foreach($commentlist as $key =>$loop):?>
                            <li data-comment-id="<?php echo $loop['id'];?>">
                                <div class="fl">
                                    <div class="avatar"><img src="<?php echo $loop['user']['avatar'];?>" alt="<?php echo $loop['user']['name'];?>"></div>
                                </div>
                                <div class="fr">
                                    <div class="comment-title">
                                        <div class="comment-name"><b><?php echo $loop['user']['name'];?></b> 发表了帖子</div>
                                        <div class="comment-time"><?php echo \Kuxin\View::date($loop['datetime'],"Y-m-d H:i:s");?></div>
                                    </div>
                                    <div class="comment-content">
                                        <?php echo $loop['content'];?>
                                    </div>
                                    <div class="comment-btn <?php echo \Kuxin\View::default(boolval($loop['rating']),'','disable');?>">
                                        <div class="comment-btn-up mr30 <?php echo $loop['rating']=='good'?'active':'';?>">
                                            <span class="comment-btn-up-btn"></span>
                                            <span class="number"><?php echo $loop['good_num'];?></span>
                                        </div>
                                        <div class="comment-btn-down <?php echo $loop['rating']=='bad'?'active':'';?>">
                                            <span class="comment-btn-down-btn"></span>
                                            <span class="number"><?php echo $loop['bad_num'];?></span>
                                        </div>
                                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.comment.post",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'commentid'=>$loop['id']],"");?>">
                                            <span class="comment-btn-reply color2"><?php echo $loop['post_num'];?> 条回复</span>
                                        </a>
                                    </div>
                                </div>
                            </li>
                            <?php endforeach; endif;?>
                        </ul>
                    </div>
                    <form onsubmit="return false;" class="addcomment">
                        <textarea></textarea>
                        <button>发表</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="fr" style="width:240px;">
                <!-- 猜你喜欢 -->
            <div class="fr pt-new-recomment mt10">
                <div class="pt-new-recomment-title">猜你喜欢</div>
                <ul class="pt-new-recomment-list">
                    <?php $list=\Kuxin\Block::show('novel.list', ['order'=>'allvisit','category'=>$category['id'],'sort'=>'desc','num'=>15]);?>
                    <?php if(is_array($list) && (array()!=$list)): $i=array(); $i['loop']=array_slice($list,0,null,true); $i['total']=count($list); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                    <li>
                        <a class="color4 pt-text" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>"><?php echo $loop['novel']['name'];?></a>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </div>
            <!-- 周榜、月榜 -->
            <div class="pt-sexselect mt10">
                <?php $rankinfo=\Kuxin\Block::show('rank.info', ['key'=>'weekvisit']);?>
                <div class="pt-sexselect-title border-b"><span class="fl pt-sexselect-title-icon"></span><?php echo $rankinfo['name'];?>
                </div>
                <ul class="pt-sexselect-list">
                    <?php $list=\Kuxin\Block::show('novel.list', ['order'=>$rankinfo['key'],'num'=>20]);?>
                    <?php if(is_array($list) && (array()!=$list)): $i=array(); $i['loop']=array_slice($list,0,null,true); $i['total']=count($list); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                    <li>
                        <span class="<?php echo $i['index']<3?'bg-red':'bg-ccc';?> pt-sexselect-square"><?php echo $i['order'];?></span>
                        <a class="color5" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>"><?php echo $loop['novel']['name'];?></a>
                        <a title="<?php echo $loop['author']['name'];?>" class="color3 fr" href="<?php echo \Kuxin\Helper\Url::build("author.space.index",['authorid'=>$loop['author']['id'],'pinyin'=>$loop['author']['pinyin'],'name'=>$loop['author']['name']],"");?>"><?php echo $loop['author']['name'];?></a>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </div>
        </div>
    </div>
</div>
<div style="display: none;" id="tpl_booklist_add_novel">
    <form method="post" class="plr40" action="<?php echo \Kuxin\Helper\Url::build("user.booklist.addnovel",[],"");?>">
        <h1 class="color62 size18 mt40 text-center">添加书评</h1>
        <input type="hidden" name="booklistid" value="0">
        <input type="hidden" name="novelid" value="<?php echo $novel['id'];?>">
        <div class="mtb15">
            <label class="mr5" style="width: 25%;">书籍名称</label>
            <input type="text" style="width: 75%;padding:6px;background-color:#f5f5f5;border: 1px solid #e9e9e9;" value="<?php echo $novel['name'];?>" disabled>
        </div>
        <div class="mtb15">
            <input type="hidden" name="star" value="5">
            <label class="mr5" style="width: 25%;">推荐指数</label>
            <span class="pt-photo" data-star="5" style="width: 75%;">
                <span title="不知所云">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="随便看看">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="值得一读">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="不容错过">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
                <span title="经典必读">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star1.png" class="high">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/star.png" class="nohigh">
                </span>
            </span>
        </div>
        <div class="mtb15" style="position: relative;">
            <label class="mr5" style="width: 25%;position: relative;top:-60px">书籍评论</label>
            <textarea rows="3" name="comment" style="width: 75%;padding:6px;background-color:#f5f5f5;border: 1px solid #e9e9e9;"></textarea>
        </div>
        <div class="text-center">
            <button class="bg-red color1 plr20 ptb10 ">确认提交</button>
        </div>
    </form>
</div>
<div style="display: none;" class="pt-interactive-model">
    <div class="label" style="background-color: #F5F5F5;">
        <ul>
            <li data-type="vote" class="fl color4 size18 bold text-center">投票</li>
            <li data-type="reward" class="fl color4 size18 bold text-center">打赏</li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="container">
        <ul>
            <li class="text-center login <?php echo $islogin?'pt-active':'pt-active';?>">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/user.png" alt="请先登录" style="margin-top: 60px;">
                <h1 class="mt35 size18">需要您登录后才可以进行操作</h1>
                <a class="m10 color2" href="<?php echo \Kuxin\Helper\Url::build("user.auth.login",[],"");?>">前往登录</a>
            </li>
            <li class="text-center vote">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/images/ticket1.png" alt="投票" style="margin-top: 40px;">
                <h1 class="mt35 size18">您总计有 <span class="color2 total"><?php echo $userinfo['assets']['surplus_ticket'];?></span> 张月票，请选择你要投的票数。</h1>
                <div class="ticket_select mt35">
                    <button class="bold minus">-</button>
                    <span class="size18 plr15 color2 bold">1</span>
                    <button class="bold plus">+</button>
                </div>
                <button class="mt20 size14 color1 bold bg-red plr20 ptb10 btn-submit">立即提交</button>
            </li>
            <li class="text-center reward">
                <div class="moneylist" style="margin-top: 40px;">
                    <?php if(is_array(\Kuxin\Helper\Arr::getValue($_kxcms_config, "reward.list"))): foreach(\Kuxin\Helper\Arr::getValue($_kxcms_config, "reward.list") as $key =>$loop):?>
                    <span data-money="<?php echo $loop;?>"><?php echo $loop;?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
                    <?php endforeach; endif;?>
                </div>
                <div class="clear"></div>
                <h1 class="mt35 size14">您的账户余额为 <span class="color2 total"><?php echo $userinfo['assets']['balance'];?></span> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>，本次打赏 <span class="color2 money">0</span> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>。</h1>
                <button class="mt20 size14 color1 bold bg-red plr20 ptb10 btn-submit">立即提交</button>
            </li>
        </ul>
    </div>
</div>
<div style="display: none;" class="pt-insufficient-balance-model">
    <div class="title pl20 ptb10" style="background-color:#f4f5f6;">订阅</div>
    <div class="text-center mt50 pt25">
        <h1 class="size18 color32 mb10">本次消费将消费<span class="total color2">0</span>个<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></h1>
        <p>当前余额<?php echo $userinfo['assets']['balance']?:0;?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>，还需支付<span class="missing color2">0</span><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></p>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.pay.recharge",[],"");?>" class="inline-block mt20 size14 color1 bold bg-red plr20 ptb10 mt40">前往充值</a>
    </div>
</div>
<!-- 底部版权-->
<div class="pt-copyright">
    <div class="pt-copyright-line"></div>
    <div class="color2 aboutlink">
        <?php $list=\Kuxin\Block::show('page.list', []);?>
        <?php if(is_array($list)): foreach($list as $key =>$loop):?>
        <a href="<?php echo \Kuxin\Helper\Url::build("page.detail",['pageid'=>$loop['id'],'key'=>$loop['key']],"");?>" title="<?php echo $loop['name'];?>"><?php echo $loop['name'];?></a>
        <?php endforeach; endif;?>
    </div>
    <div class="color4 footer-info" style="margin-top:28px;">Copyright © 2009 - 2019 <a href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>" target="_blank"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></a>. All Rights Reserved . 版权所有<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></div>
    <div class="color4 footer-info">本站内容系<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>根据您的指令搜索各大小说站得到的链接列表，不代表<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>赞成被搜索网站的内容或立场</div>
    <div class="color4 footer-info">如果版权人认为在本站放置您的作品有损您的利益，请发邮件至“<?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "email")):?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "email");?><?php else:?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "qq");?>@qq.com<?php endif;?>”，本站确认后将会立即删除。</div>
    <div class="color4 footer-info">Power by <a href="http://www.ptcms.com" target="_blank">PT聚合小说搜索聚合程序 <?php echo PRO_VERSION;?> Build<?php echo PRO_TIME;?></a>，模版设计：<a href="http://www.pakey.net" target="_blank">Pakey</a>，<a href="http://www.miitbeian.gov.cn/" target="_blank" rel="nofollow"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></a></div>
    <div class="color4 footer-info"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/js/jquery-3.3.1.js"></script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/js/layer/layer.js"></script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.pc");?>
    <?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "app.use_cdn")):?>
    <script src="/api/stat/novel/info.js"></script>
    <script src="/api/stat/novel/read.js"></script>
    <?php endif;?>
</div>

<!-- js -->
<script>
    var __IS_LOGIN=parseInt('<?php echo $islogin;?>'),__IS_VIP=parseInt('<?php echo $userinfo['vip_expire_time'] < time()?0:1;?>'),__IS_FREE_FOR_VIP=parseInt('<?php echo $novel['type'] == App\Model\Novel\Novel::TYPE_VIP_FREE?1:0;?>'),__ADD_STAR='<?php echo \Kuxin\Helper\Url::build("user.star.add",[],"");?>',__NOVEL_ID='<?php echo $novel['id'];?>',__NOVEL_NAME='<?php echo $novel['name'];?>',__ADD_MARK='<?php echo \Kuxin\Helper\Url::build("user.mark.add",[],"");?>',__DEL_MARK='<?php echo \Kuxin\Helper\Url::build("user.mark.del",[],"");?>',__ADD_VOTE='<?php echo \Kuxin\Helper\Url::build("user.vote.add",[],"");?>',__RATING_COMMENT='<?php echo \Kuxin\Helper\Url::build("novel.comment.rating",[],"");?>',__ADD_COMMENT='<?php echo \Kuxin\Helper\Url::build("novel.comment.add",[],"");?>',__USER_BOOKLIST='<?php echo \Kuxin\Helper\Url::build("user.booklist.index",[],'json');?>',__USER_ADD_BOOKLIST='<?php echo \Kuxin\Helper\Url::build("user.booklist.detail",[],"");?>',__ADD_REWARD='<?php echo \Kuxin\Helper\Url::build("novel.novel.reward",[],"");?>',__ADD_VOTE_TICKET='<?php echo \Kuxin\Helper\Url::build("novel.novel.ticket",[],"");?>',__SUBSCRIBE='<?php echo \Kuxin\Helper\Url::build("novel.novel.subscribe",[],"");?>',__RECHARGE_URL='<?php echo \Kuxin\Helper\Url::build("user.pay.recharge",[],"");?>';
</script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/js/novel.js"></script>
</body>
</html>