westdc-zf1/application/admin/views/scripts/stat/index.phtml

131 lines
3.2 KiB
PHTML

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
?>
<style>
.tables{width:320px;float:left;}
.tables .stitle{width:100%;font-size:16px;font-weight:bold;}
</style>
<div id="divContent">
<div id="leftPanel">
<?= $this->partial('stat/left.phtml'); ?>
</div>
<div id="rightPanel">
<div class="tables">
<div class="stitle">概况</div>
<table>
<thead>
<tr><td width="200">key</td><td width="100">value</td></tr>
</thead>
<tr>
<td>用户总数</td>
<td><?php echo $this->alluser['num'];?></td>
</tr>
<tr>
<td>metadata数据总数</td>
<td><?php echo $this->alldata['num'];?></td>
</tr>
<tr>
<td>数据下载总次数</td>
<td><?php echo $this->alldown['num'];?></td>
</tr>
<tr>
<td>已通过的离线申请</td>
<td><?php echo $this->allpass['num'];?></td>
</tr>
<tr>
<td>未通过的离线申请</td>
<td><?php echo $this->nopass['num'];?></td>
</tr>
<tr>
<td>在线下载申请次数</td>
<td><?php echo $this->onlinedown['num'];?></td>
</tr>
</table>
</div>
<div class="tables">
<div class="stitle">数据下载量概况</div>
<table>
<thead>
<tr><td width="200"></td><td width="100">单位:GB</td></tr>
</thead>
<tr>
<td>总下载数据量</td>
<td><?php echo round($this->allsize['num'],2);?></td>
</tr>
<tr>
<td>离线下载数据量</td>
<td><?php echo round($this->offlinesize['num'],2);?></td>
</tr>
<tr>
<td>在线下载数据量</td>
<td><?php echo round($this->onlinesize['num'],2);?></td>
</tr>
</table>
</div>
<div class="tables">
<div class="stitle">各单位离线下载情况</div>
<table>
<thead>
<tr>
<td width="200">单位名称</td>
<td width="100">离线下载次数</td>
</tr>
</thead>
<?php
foreach($this->unitoffline as $k=>$v)
{
echo '<tr>
<td>'.$v['unit'].'</td>
<td>'.$v['num'].'</td>
</tr>';
}
?>
</table>
</div>
<div class="tables">
<div class="stitle">各单位在线下载情况</div>
<table>
<thead>
<tr>
<td width="200">单位名称</td>
<td width="100">在线下载次数</td>
</tr>
</thead>
<?php
foreach($this->unitonline as $k=>$v)
{
echo '<tr>
<td>'.$v['unit'].'</td>
<td>'.$v['num'].'</td>
</tr>';
}
?>
</table>
</div>
</div>
</div>
<script type="text/javascript" language="javascript">
$(function(){
$('#rightPanel').masonry({
itemSelector : '.tables',
columnWidth : 340
});
});
</script>