<?php
$title='代理首页';
include './head.php';
$row=$DB->get_row("SELECT * FROM moyu_daili WHERE user='".$MoYo['user']."'");
$gls=$DB->count("SELECT count(*) from moyu_cache WHERE owner=\"".$MoYo['id']."\"");
if($MoYo['access_token']==''){	
echo '<script>layer.alert("您还未绑定QQ快捷登陆！点击绑定",{icon:"5"},function(index){window.location.href="./User.php";})</script>';

}
?>
<!--页面主要内容-->
<main class="lyear-layout-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header"><h4>轮播图</h4></div>
<div class="card-body">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active"><img src="../assets/LightYear/images/gg1.jpg" alt="广告图片一"></div>
<div class="item"><img src="../assets/LightYear/images/gg2.jpg" alt="广告图片二"></div>
<div class="item"><img src="../assets/LightYear/images/gg3.jpg" alt="广告图片三"></div>
</div>
<a class="left carousel-control" href="#carouselExampleIndicators" role="button" data-slide="prev"><span class="icon-left-open-big icon-prev" aria-hidden="true"></span><span class="sr-only">Previous</span></a>
<a class="right carousel-control" href="#carouselExampleIndicators" role="button" data-slide="next"><span class="icon-right-open-big icon-next" aria-hidden="true"></span><span class="sr-only">Next</span></a>
</div>
</div>
</div>
 
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="card bg-danger">
<div class="card-body clearfix">
<div class="pull-right">
<p class="h6 text-white m-t-0">加密文件</p>
<p class="h3 text-white m-b-0"><?php echo $gls ?>/个</p>
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-arrow-down-bold fa-1-5x"></i></span> </div>
</div>
</div>
</div>  
<div class="col-sm-6 col-lg-6">
<div class="card bg-primary">
<div class="card-body clearfix">
<div class="pull-right"align="right">
<p class="h6 text-white m-t-0"> 账号余额</p>
<p class="h3 text-white m-b-0"><?php echo $MoYo['rmb'] ?>/元</p>
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-currency-cny fa-1-5x"></i></span> </div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h4>加密记录</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>程序名称</th>
<th>项目名称</th>
<th>项目日期</th>
<th> 执行操作</th>
</tr>
</thead>
<tbody>
<?php
$pagesize=10;
$pages=intval($numrows/$pagesize);
if ($numrows%$pagesize)
{
 $pages++;
 }
if (isset($_GET['page'])){
$page=intval($_GET['page']);
}
else{
$page=1;
}
$offset=$pagesize*($page - 1);

$rs=$DB->query("SELECT * FROM moyu_cache WHERE owner=\"".$MoYo['id']."\" order by id desc limit $offset,$pagesize");
while($res = $DB->fetch($rs))
{
echo '<td>'.$res['file'].'</td><td>'.$res['type'].'</td><td>'.$res['upload'].'</td><td><a href="../down.php?id='.$res['space'].'"><span class="label label-success">重新下载</span></a></td></tr>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</p><center><small class="help-block">首页仅显示10条记录更多到导航查看。</small></center>
</div>
</div>
</div>
</div> 
</div>
</div>   
</main>
<!--End 页面主要内容-->
</div>
</div>
<script type="text/javascript" src="../assets/LightYear/js/jquery.min.js"></script>
<script type="text/javascript" src="../assets/LightYear/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../assets/LightYear/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../assets/LightYear/js/main.min.js"></script>
</body>
</html>