<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <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/kxmobileno1/css/global.css"/>
	<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/flexible.min.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'];?>" />
    <style>
        .tags {
            width: 100%;
            overflow-x:scroll;
            margin-top: 5px;
            margin-bottom: 10px;
        }
        .tags ul {
            width: 999px;
            white-space: nowrap;
        }
        .tags li{
            display: inline-block;
            padding-left: 10px;
            padding-right: 10px;
            font-size: 14px;
            color: #626267;
            float: left;
        }
        .tags li.active{
            border: 1px solid #f55;
            border-radius: 14px;
        }
        .tags li.active a{
            color: #f55 !important;
        }
    </style>
</head>
<body>
	<div class="w100  bg-white flex-wrp flex-align-center flex-between lh100 plr15 ptb15 border-b">
		<img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/return.png" class="pt-return" onclick="window.history.back();">
		<div class="size18 bold color37">书单列表</div>
        <div>
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/ellipsis.png" class="mr5 pt-ellipsis">
        </div>
        <div class="pt5 pb5 pt-tip">
            <a href="<?php echo \Kuxin\Helper\Url::build("index.index",[],"");?>" class="block color1 text-center pt-tip-item" title="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>">前往首页</a>
            <a href="<?php echo \Kuxin\Helper\Url::build("user.booklist.detail",[],"");?>" class="block color1 text-center pt-tip-item" title="<?php echo $novel['name'];?>">创建书单</a>
            <a href="<?php echo \Kuxin\Helper\Url::build("user.booklist.index",[],"");?>" class="block color1 text-center pt-tip-item">我的书单</a>
        </div>
	</div>
    <div class="pt-popular-cont">
        <?php $hottags=\Kuxin\Block::show('booklist.hottags', []);?>
        <div  class="tags">
            <ul>
                <li class="<?php echo $_GET['tagid']?'':'active';?>"><a href="<?php echo \Kuxin\Helper\Url::build("index",[],"");?>">全部</a></li>
                <?php if(is_array($hottags)): foreach($hottags as $key =>$loop):?>
                <li class="<?php echo $_GET['tagid'] && $_GET['tagid']==$loop['id']?'active':'';?>"><a href="<?php echo \Kuxin\Helper\Url::build("index",['tagid'=>$loop['id']],"");?>"><?php echo $loop['name'];?></a></li>
                <?php endforeach; endif;?>
            </ul>
        </div>
        <?php $count=\Kuxin\Block::show('booklist.count', ['userid'=>$userinfo['id'],'tags'=>$_GET['tagid']]);?>
        <?php $paginate=\Kuxin\Block::show('pagination', ['page'=>$page,'limit'=>$pagesize,'count'=>$count,'maxpage'=>50,'section'=>3]);?>
        <?php $list=\Kuxin\Block::show('booklist.list', ['userid'=>$userinfo['id'],'tags'=>$_GET['tagid'],'num'=>$paginate['limit'],'page'=>$paginate['current']]);?>
        <?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'];?>
        <a href="<?php echo \Kuxin\Helper\Url::build("detail",['booklistid'=>$loop['id']],"");?>">
            <div class="flex-wrp pt-popular-item">
                <img src="<?php echo $loop['cover'];?>" class="mr15" alt="<?php echo $loop['title'];?>">
                <div class="flex-item pt5">
                    <div class="flex-wrp flex-between">
                        <div class="size14">
                            <span class="color7"><?php echo $loop['title'];?></span>
                        </div>
                    </div>
                    <div class="size12 compulsory-row mb10 mt10 lh130 color4">
                        <?php echo showIntroLine($loop['intro']);?>
                    </div>
                    <div class="size12">
                        书籍 <span class="color2 mr5"><?php echo $loop['num_novel'];?></span><span class="color3 mr5">/</span>
                        浏览 <span class="color2 mr5"><?php echo $loop['num_allvisit'];?></span><span class="color3 mr5">/</span>
                        收藏 <span class="color2"><?php echo $loop['num_mark'];?></span>
                    </div>
                </div>
            </div>
        </a>
        <?php endforeach; endif;?>
    </div>
    <?php if($paginate['total'] > 1):?>
    <div class="flex-wrp flex-between bg-white ptb15 plr15 mt10">
        <?php if($paginate['first'] != $paginate['current']):?>
        <div class="flex-wrp flex-around flex-center pt-page4">
            <a href="<?php echo \Kuxin\Helper\Url::build("booklist.booklist.index",['tagid'=>$_GET['tagid'],'page'=>$paginate['first']],"");?>">
                <span class="size14 color2">首页</span>
            </a>
        </div>
        <?php endif;?>
        <?php if($paginate['prev']):?>
        <div class="flex-wrp flex-around flex-center pt-page4">
            <a href="<?php echo \Kuxin\Helper\Url::build("booklist.booklist.index",['tagid'=>$_GET['tagid'],'page'=>$paginate['prev']],"");?>">
                <span class="size14 color2">上一页</span>
            </a>
        </div>
        <?php endif;?>
        <?php if($paginate['next']):?>
        <div class="flex-wrp flex-around flex-center pt-page4">
            <a href="<?php echo \Kuxin\Helper\Url::build("booklist.booklist.index",['tagid'=>$_GET['tagid'],'page'=>$paginate['next']],"");?>">
                <span class="size14 color2">下一页</span>
            </a>
        </div>
        <?php endif;?>
        <?php if($paginate['last'] != $paginate['current']):?>
        <div class="flex-wrp flex-around flex-center pt-page4">
            <a href="<?php echo \Kuxin\Helper\Url::build("booklist.booklist.index",['tagid'=>$_GET['tagid'],'page'=>$paginate['last']],"");?>">
                <span class="size14 color2">尾页</span>
            </a>
        </div>
        <?php endif;?>
    </div>
    <?php endif;?>

    <!-- 底部版权 -->
    <div class="pt-copyright">
    <div class="size12  w100 text-center mt15 mb10"><a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私声明</a> | <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a> | <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a></div>
    <div class="size12 color4 w100 text-center mb10">Copyright © 2009-<?php echo date(Y);?> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></div>
    <div class="size12  w100 text-center"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<!-- js -->
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/jquery-3.3.1.js"></script>
<script>
    $('.pt-return,.pt-recall').click(function(){
        window.history.back();
    });
    $('.pt-ellipsis').click(function(){
        $('.pt-tip').toggle()
    });
    $('.pt-tip .pt-tip-item').click(function(){
        $('.pt-tip').toggle()
    });
</script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.mobile");?>
    <?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>
</body>
</html>