<?php
error_reporting(0); 
include("../../config/qiantai.php");
session_start();
if(!isset($_SESSION['username'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
$username=ubo($_SESSION['username']);
$type="where name='$username'";
$user=queryall(user,$type);
$userid=$user['userid'];
if(!$user){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>代理前台</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="/2019newui/qiantai/css/x-admin.css" media="all">
<script src="/2019newui/js/jquery.min.js"></script>

</head>
<body>
<div class="layui-layout layui-layout-admin">
<div class="layui-header header header-demo">
<div class="layui-main">
<div class="admin-logo-box"><span class="logo">代理前台</span>
<div class="larry-side-menu"><i class="fa fa-th-large" aria-hidden="true"></i></div>

</div>
<ul class="layui-nav" lay-filter="gg">
<img src="<?php echo $user['tx']?>" class="layui-circle" style="border: 2px solid #A9B7B7;margin-top:-3px;" width="20px" alt="">
<span style="margin-left:15px;margin-top:16px;"><?php echo $user[nikname]?></span>
<?php 
$sql = mysql_query("SELECT tz,userid FROM gonggao WHERE   tz='未读' and userid='$userid'");
$xinxi = mysql_num_rows($sql);
?>
<?php if($xinxi){?>
<li class="layui-nav-item"  id="xx" ><a  href="javascript:;" _href="/xinxi<?php echo $dshz?>" title="消息" ><i class="layui-icon" style="top: 2px;">&#xF0A2;</i><span class="layui-badge" ><?php echo $xinxi?></span></a></li> 
<?php }?>
<li class="layui-nav-item x-index"><a  href='/tui<?php echo $dshz?>' title="退出后台"  target="_parent" ><i class="layui-icon" style="top: 1px;">&#xF011;</i></a>  </li>
</ul>
</div>
</div>
<div class="layui-side layui-bg-black x-side" style="left:0px;">
<div class="layui-side-scroll">
<ul class="layui-nav layui-nav-tree site-demo-nav" lay-filter="side">
<li class="layui-nav-item"> <a class="javascript:;"  _href="/gonggao<?php echo $dshz?>"> <i class="layui-icon" style="top: 3px;" >&#xF0A1;</i><cite>系统公告</cite> </a></li>
<?php if($mb=='1'){?>
<li class="layui-nav-item"> <a class="javascript:;" href="javascript:;"> <i class="layui-icon" style="top: 3px;">&#xF00B;</i><cite> 模板选择</cite> </a>
<dl class="layui-nav-child">
<dd class=""> <a href="javascript:;" _href="/hezi<?php echo $dshz?>"> <cite>盒子模板选择</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/dsmb<?php echo $dshz?>"> <cite>打赏模板选择</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/linkmb<?php echo $dshz?>"> <cite>总链模板选择</cite> </a> </dd>
</dl>
</li>
<?php }?> 
<li class="layui-nav-item"> <a class="javascript:;" href="javascript:;"> <i class="layui-icon" style="top: 3px;" >&#xF045;</i><cite>开始赚钱</cite> </a>
<dl class="layui-nav-child">
<dd class="">
<dd class=""> <a href="javascript:;" _href="/dlfenlei<?php echo $dshz?>"> <cite>我的分类</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/xitong<?php echo $dshz?>"> <cite>公共片库</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/shipin<?php echo $dshz?>"> <cite>私有片库</cite> </a> </dd>
<?php if($shipin=='1'){?>
<dd class=""> <a href="javascript:;" _href="/fabushipin<?php echo $dshz?>"> <cite>发布打赏</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/tjshipin<?php echo $dshz?>"> <cite>添加外链</cite> </a> </dd>
<?php }?>
</dd>
</dl>
</li>
<li class="layui-nav-item"> <a class="javascript:;" href="javascript:;"> <i class="layui-icon" style="top: 3px;">&#xF079;</i><cite>收入明细</cite> </a>
<dl class="layui-nav-child">
<dd class=""> <a href="javascript:;" _href="/dingdan<?php echo $dshz?>"> <cite>打赏记录</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/pay<?php echo $dshz?>"> <cite>提现记录</cite> </a> </dd>
</dl>
</li>
<li class="layui-nav-item"> <a class="javascript:;" href="javascript:;"> <i class="layui-icon" style="top: 3px;">&#xF007;</i><cite> 用户信息</cite> </a>
<dl class="layui-nav-child">
<dd class=""> <a href="javascript:;" _href="/user<?php echo $dshz?>"> <cite>基本资料</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/xiauser<?php echo $dshz?>"> <cite>下线用户</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/yqm<?php echo $dshz?>"> <cite>邀请码列表</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/fanyong<?php echo $dshz?>"> <cite>返佣明细</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/tx<?php echo $dshz?>"> <cite>申请提现</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/userip<?php echo $dshz?>"> <cite>登陆日志</cite> </a> </dd>
</dl>
</li>
<?php if($hezi=='1'){?>
<li class="layui-nav-item"> <a class="javascript:;" href="javascript:;"> <i class="layui-icon" style="top: 3px;">&#xF009;</i><cite> 推广盒子</cite> </a>
<dl class="layui-nav-child">
<dd class=""> <a href="javascript:;" _href="/wangzhan<?php echo $dshz?>"> <cite>盒子推广列表</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/shipintj<?php echo $dshz?>"> <cite>单一视频推广</cite> </a> </dd>
<dd class=""> <a href="javascript:;" _href="/scjilu<?php echo $dshz?>"> <cite>生成历史记录</cite> </a> </dd>
</dl>
</li>
<?php }?> 

<li class="layui-nav-item" style="height: 30px; text-align: center"></li>
</ul>
</div>
</div>
<div class="layui-tab layui-tab-card site-demo-title x-main" lay-filter="x-tab" lay-allowclose="true" style="left: 200px;border-left: solid 2px #2299ee;">
<ul class="layui-tab-title">
<li class="layui-this"> 控制面板 <i class="layui-icon layui-unselect layui-tab-close">&#xF00A;</i> </li>
</ul>
<div class="layui-tab-content site-demo site-demo-body">
<div class="layui-tab-item layui-show">
<iframe frameborder="0" src="/home<?php echo $dshz?>" class="x-iframe"  scrolling="yes" ></iframe>
</div>
</div>
</div>
<div class="site-mobile-shade"> </div>
</div>
<script src="/layui/layui.js"></script>
<script src="/2019newui/js/x-admin.js"></script> 
<?php if($xinxi){?>
<script type="text/javascript">
layer.tips('您有新的消息', '#xx', {
tips: 3
});
</script> 
<audio src="/2019newui/tip.mp3"  autoplay="autoplay"></audio>
<?php }?>
</body>
</html>