
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/public/static/assets1/css/layui.css">
    <link rel="stylesheet" href="/public/static/assets1/css/admin.css">
    <link rel="icon" href="/favicon.ico">
    <title>代理管理</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header custom-header">

        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item slide-sidebar" lay-unselect>
                <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
            </li>
            <?php if(session('power')=='1'){?>
            <li class="layui-nav-item  slide-sidebar" style="margin-left: 10px">

                <button class="layui-btn layui-btn-warm" >{:yue()}元</button>

            </li>
            <li class="layui-nav-item  slide-sidebar" style="margin-left: 10px">
                <button class="layui-btn layui-btn-normal" onclick="money('0',{:id()})">代理充值</button>

            </li>
            <?php } ?>
        </ul>

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a href="javascript:;" class="layui-btn layui-btn-radius layui-btn-danger" style="color: #fff">{:power()}</a>

            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">{:name()}</a>
                <dl class="layui-nav-child">

                    <dd><a href="{:url('login/login/dologin')}">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>


    <div class="layui-side custom-admin">
        <div class="layui-side-scroll">

            <div class="custom-logo">
                <?php if(session('power')=='0'){?>
                <img src="/public/static/assets1/images/logo.png" alt=""/>
                <?php } ?>
            </div>
            <ul id="Nav" class="layui-nav layui-nav-tree">

                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe609;</i>
                        <em>主页</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('index/index/index')}">管理中心</a></dd>
                    </dl>

                    <?php if(session('power')=='0'){?>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('vip/advert')}">系统设置</a></dd>

                    </dl>
                  
                  	<dl class="layui-nav-child">
                        <dd><a href="{:url('vip/dxjk')}">短信接口</a></dd>

                    </dl>
                  
                    <dl class="layui-nav-child">
                        <dd><a href="<?php echo url('admin/index'); ?>">管&nbsp;&nbsp;理&nbsp;&nbsp;员</a></dd>
                    </dl>
                    <?php }?>         
                </li>
                <?php if(session('power')=='0'){?>
              
              
              <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>运营设置</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('jiekou/index')}">直播接口</a></dd>
                        <dd><a href="{:url('/index/send/index')}">推送消息</a></dd>
                      <dd><a href="{:url('/index/send/settc')}">弹窗消息</a></dd>
                      <dd><a href="{:url('vip/yyshezi')}">软件设置</a></dd>
                      <dd><a href="{:url('index/user/pass')}">购卡链接</a></dd>
                      <dd><a href="{:url('/index/index/settpay')}">代理提卡</a></dd>
                    </dl>
                </li>
              
              <!--
              <li class="layui-nav-item">
                        <a href="{:url('jiekou/index')}" class="nav-link active">
                            <i class="layui-icon">&#xe678;</i>
                            <span>直播接口</span>
                        </a>
                    </li>  
                <li class="layui-nav-item">
                    <a  href="{:url('/index/send/index')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>推送消息</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li> 
                <li class="layui-nav-item">
                    <a  href="{:url('/index/send/settc')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>弹窗消息</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>-->
              
              
                               <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>消息管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('shangcheng/index')}">消息管理</a></dd>
                        

                    </dl>
                </li>
              
                      <?php }?>                 
              
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>点卡管理</em>
                    </a>
                    <dl class="layui-nav-child">

                        <dd><a href="{:url('dianka/index')}">点卡生成</a></dd>
                        <dd><a href="{:url('dianka/ylog')}">有效点卡</a></dd>
                        <dd><a href="{:url('dianka/slog')}">点卡使用记录</a></dd>

                    </dl>
                </li>
                              <?php if(session('power')=='0'){?>
              <!--  <li class="layui-nav-item">
                    <a  href="{:url('/index/index/settpay')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>代理提卡</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>               
                                   <?php }?>  
                       <!--       <li class="layui-nav-item">
                    <a  href="{:url('index/user/pass')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>购卡链接</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li> 
              -->
              <?php 
				$qx = db('user')->where('id',session('usershshefsdf'))->value('qx');
				if( session('power')== 0 or $qx == 1){ ?>
                <li class="layui-nav-item">
                    <a  href="{:url('/index/banner/index/id/1')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>广告管理</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>    
              <?php }?>
              
                <?php if(session('power')=='0'){?>

             

             <!--   <li class="layui-nav-item">
                    <a  href="{:url('vip/yyshezi')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>运营设置</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>  -->               
              
                <li class="layui-nav-item">
                    <a  href="{:url('user/paylog')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>销售记录</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>                
              
              <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>提现专区</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('yhtx/index')}">提现管理</a></dd>
                        <dd><a href="{:url('yhtx/txjl')}">提现记录</a></dd>

                    </dl>
                </li>
              <!--
                <li class="layui-nav-item">
                    <a  href="{:url('yhtx/index')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>提现管理</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>
                <li class="layui-nav-item">
                    <a  href="{:url('yhtx/txjl')}">
                        <i class="layui-icon">&#xe678;</i>
                        <em>提现记录</em>
                    </a>
                  <dl class="layui-nav-child">
                    </dl>                    
                </li>                 
              
              -->
              
              
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe6ed;</i>
                        <em>影视管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('video/index')}">专题直播</a></dd>
                        <dd><a href="{:url('mn/index')}">首页推荐</a></dd>
                        <dd><a href="{:url('tv/index')}">电视直播</a></dd>

                    </dl>
                </li>
                <?php } ?>

                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe66f;</i>
                        <em>用户管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('vip/index')}">用户管理</a></dd>
                        <dd><a href="{:url('user/index')}">代理管理</a></dd>
                        <dd><a href="{:url('user/clog')}">充值记录</a></dd>
                        <dd><a href="{:url('user/xlog')}">开通记录</a></dd>
                        <?php if(session('power')=='0'){?>
                        <dd><a href="{:url('user/mlog')}">代理记录</a></dd>
                        <dd><a href="{:url('user/daoqi')}">即将到期</a></dd>
                        <?php } ?>

                    </dl>

            </ul>

        </div>
    </div>

    <div class="layui-body">
        <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
            <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
            <div id="appTabPage" class="layui-tab-content">


            </div>
        </div>
    </div>



    <div class="mobile-mask"></div>
</div>
<script src="/public/static/assets1/layui.js"></script>
<script src="/public/static/assets1/index.js" ></script>
<script src="/public/static/assets1/home.js" ></script>
<script>

    function money(status,id){
        if(status=='1')
        {
            var str = 'all';
        }else{
            if(id=='') {
                var str = "";
                $("input:checkbox[name='checkname']:checked").each(function () {
                    str += $(this).val() + ",";
                });

                if (str == '') {
                    return false
                }
            }else{
                var str     =   id
            }
        }


        layer.prompt({title: '请输入充值点数', formType: 3}, function(pass, index) {
            if(!isNaN(pass))
            {
                if(pass<1){
                    $('.layui-layer-content').append('<br><span style="color: red">最低起充金额1元</span>')
                    return false;
                }
                window.location.href='http://app.stb789.cn/daili_pay/?id='+id+'&name=代理自助充点&fee='+pass;
                layer.close(index);
            }else{
                $('.layui-layer-content').append('<br><span style="color: red">请填入纯数字</span>')
                return false;
            }


        })


    }

</script>
</body>
</html>