<?php defined('KX_ROOT') || exit('Permission denied');?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>专区首页 - 原创专区 - <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></title>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/css/style.css"/>
    <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="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>
        .right .user{
            height: 226px;
            background-color: #fff;
            padding: 0 20px;
        }
        .right .user .info,
        .right .user .stat{
            height:95px;
        }
        .right .user .info{
            padding-top: 15px;
        }
        .right .user .info img{
            width:60px;
            height:60px;
            background:#DBDBDB;
            border-radius:50%;
            margin-left: 40px;
            margin-top: 15px;
        }
        .right .user .stat li{
            margin-top: 20px;
            width: 24%;
        }
        .right .user .stat li:not(:last-child){
            border-right: 1px solid #ededed;
        }
    </style>
</head>
<body>
<div class="header">
    <div>
        <a href="/">
            <div class="logo"><span>原创专区</span></div>
        </a>
    </div>
</div>
<div class="body">
    <div class="left bg-white">
    <style>
        .icon {
            width: 20px;
            height: 20px;
            display: inline-block;
            vertical-align: middle;
            margin-right: 10px;
        }

        .icon-home {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-home.png");
        }

        li.active .icon-home {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-home-active.png");
        }

        .icon-novel {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-novel.png");
        }

        li.active .icon-novel {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-novel-active.png");
        }

        .icon-stat {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-stat.png");
        }

        li.active .icon-stat {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-stat-active.png");
        }

        .icon-money {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-money.png");
        }

        li.active .icon-money {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-money-active.png");
        }

        .icon-userinfo {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-userinfo.png");
        }

        li.active .icon-userinfo {
            background: url("<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-userinfo-active.png");
        }
        .add_novel:before{
            content: '+';
            width: 20px;
            height: 20px;
            display: inline-block;
            left: 60px;
            position: relative;
            margin-left: -20px;
            font-weight: 700;
        }
        .add_novel a{
            color: #929292 !important;
        }
    </style>
    <ul class="nav">
        <li class="<?php echo $pagesign == 'home'?'active':'';?>">
            <a href="<?php echo \Kuxin\Helper\Url::build("author.author.index",[],"");?>">
                <i class="icon icon-home"></i>专区首页
            </a>
        </li>
        <li class="<?php echo in_array($pagesign, ['novel','chapter'])?'active':'';?>">
            <?php if(in_array($pagesign, ['novel','chapter'])):?>
            <a href="javascript:void(0);">
                <i class="icon icon-novel"></i>作品管理
            </a>
            <ul class="sub-nav">
                <?php if(is_array($novels)): foreach($novels as $key =>$loop):?>
                <li class="<?php echo $_GET['novelid']==$loop['id']?'active':'';?>" style="width: 165px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                    <a href="<?php echo \Kuxin\Helper\Url::build("author.chapter.index",['novelid'=>$loop['id']],"");?>" title="<?php echo $loop['name'];?>"><?php echo $loop['name'];?></a>
                </li>
                <?php endforeach; endif;?>
                <li class="add_novel"><a href="<?php echo \Kuxin\Helper\Url::build("author.novel.add",[],"");?>">创建作品</a></li>
            </ul>
            <?php else:?>
            <a href="<?php echo \Kuxin\Helper\Url::build("author.novel.index",[],"");?>">
                <i class="icon icon-novel"></i>作品管理
            </a>
            <?php endif;?>
        </li>
        <li class="<?php echo $pagesign == 'stat'?'active':'';?>">
            <a href="<?php echo \Kuxin\Helper\Url::build("author.stat.index",[],"");?>">
                <i class="icon icon-stat"></i>数据统计
            </a>
        </li>
        <li class="<?php echo in_array($pagesign, ['incomeindex','incomerecord','incomemanage','incomeguarantee'])?'active':'';?>">
            <?php if(in_array($pagesign, ['incomeindex','incomerecord','incomemanage','incomeguarantee'])):?>
            <a href="javascript:void(0);">
                <i class="icon icon-money"></i>稿酬收入
            </a>
            <ul class="sub-nav">
                <li class="<?php echo $pagesign=='incomerecord'?'active':'';?>"><a href="<?php echo \Kuxin\Helper\Url::build("author.income.record",[],"");?>">收入明细</a></li>
                <li class="<?php echo in_array($pagesign, ['incomemanage','incomeguarantee'])?'active':'';?>"><a href="<?php echo \Kuxin\Helper\Url::build("author.income.manage",[],"");?>">提现管理</a></li>
            </ul>
            <?php else:?>
            <a href="<?php echo \Kuxin\Helper\Url::build("author.income.record",[],"");?>">
                <i class="icon icon-money"></i>稿酬收入
            </a>
            <?php endif;?>
        </li>
        <li class="<?php echo $pagesign == 'authorinfo'?'active':'';?>">
            <a href="<?php echo \Kuxin\Helper\Url::build("author.author.info",[],"");?>">
                <i class="icon icon-userinfo"></i>作家资料
            </a>
        </li>
    </ul>
</div>
    <div class="right">
        <div class="user bg-white">
            <div class="info w100">
                <a href="<?php echo \Kuxin\Helper\Url::build("user.info.index",[],"");?>">
                    <img class="fl" src="<?php echo $authorinfo['user']['avatar'];?>" alt="<?php echo $authorinfo['name'];?>">
                </a>
                <div class="fl pt20 pl20" style="width:80%;">
                    <span class="size20 color32 bold"><?php echo $authorinfo['name'];?><?php echo $authorinfo['status'] == \App\Model\Author\Author::STATUS_PENDING?'<span class="color92"> (审核中)</span>':($authorinfo['status'] == \App\Model\Author\Author::STATUS_PASS?'':'<span class="color-red"> (异常)</span>');?></span>
                    <p>尊敬的作者您好，今天是<?php echo date('Y年m月d日');?>，您已累计创作<?php echo (new DateTime())->setTimestamp($authorinfo['data']['create_time'])->diff((new DateTime()))->format('%a')+1;?>天，祝您在创作的道路上越走越远~</p>
                </div>
            </div>
            <ul class="stat text-center border w100">
                <li class="inline-block">
<!--                    <a href="<?php echo \Kuxin\Helper\Url::build("author.novel.index",[],"");?>">-->
                        <p class="color2 size24"><?php echo $authorinfo['stat']['novel'];?> <span class="color92 size14">本</span></p>
                        <span class="color0">我的作品</span>
<!--                    </a>-->
                </li>
                <li class="inline-block">
                    <a href="<?php echo \Kuxin\Helper\Url::build("author.stat.index",[],"");?>">
                        <p class="color2 size24"><?php echo number_format($authorinfo['stat']['words']/10000,'4','.','');?> <span class="color92 size14">万字</span></p>
                        <span class="color0">累计字数</span>
                    </a>
                </li>
                <li class="inline-block">
                    <a href="<?php echo \Kuxin\Helper\Url::build("author.stat.index",[],"");?>">
                        <p class="color2 size24"><?php echo $authorinfo['stat']['mark'];?> <span class="color92 size14">万人</span></p>
                        <span class="color0">累计收藏</span>
                    </a>
                </li>
                <li class="inline-block">
                    <a href="<?php echo \Kuxin\Helper\Url::build("author.stat.index",[],"");?>">
                        <p class="color2 size24"><?php echo $authorinfo['stat']['allvisit'];?> <span class="color92 size14">万次</span></p>
                        <span class="color0">总计访问</span>
                    </a>
                </li>
            </ul>
        </div>
        <style>
            .news ul li::before {
                float: left;
                content: "●";
                color: #e9e9e9;
                display: inline-block;
                width: 15px;
                margin-left: 10px;
            }
            .news ul li:not(:first-child){
                border-top: 1px solid #e9e9e9;
            }
        </style>
        <div class="news bg-white mt10 p20" style="min-height: 475px;">
            <img class="ml20" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/images/icon-novel.png" alt="专题新闻" style="transform:translateY(5px);">
            <span class="ml10 color0 size16" style="line-height: 20px">专题新闻</span>
            <ul class="border mt20">
                <?php $list=\Kuxin\Block::show('news.list', ['num'=>10]);?>
                <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                <li class="p15">
                    <a href="<?php echo \Kuxin\Helper\Url::build("news.detail",['newsid'=>$loop['id']],"");?>" title="<?php echo $loop['title'];?>" target="_blank">
                        <span class="fl compulsory-row-one color0" style="width: 80%">[<?php echo $loop['category']['name'];?>] <?php echo $loop['title'];?></span>&nbsp;
                        <span class="fr colore9">2019-01-02 15:30</span>
                    </a>
                </li>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
</div>
<div class="footer text-center">
    <?php $list=\Kuxin\Block::show('page.list', []);?>
    <span class="aboutlink">
        <?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;?>
    </span>
    <span class="inline-block ml40">Copyright © 2009 - 2019 <a href="<?php echo $pt['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");?></span>
</div>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/js/jquery-3.3.1.js"></script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/js/layer/layer.js"></script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno1/author/js/common.js"></script>
</body>
</html>