229 lines
6.9 KiB
PHTML
229 lines
6.9 KiB
PHTML
<?php
|
||
$this->headTitle($this->config->title->site);
|
||
$this->headTitle('后台管理');
|
||
$this->headTitle()->setSeparator(' - ');
|
||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||
$this->headLink()->appendStylesheet('/css/jquery.jqplot.css');
|
||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||
$this->breadcrumb('<a href="/">首页</a>');
|
||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||
$this->breadcrumb('<a href="/admin/stat">统计</a>');
|
||
$this->breadcrumb('按月统计');
|
||
$this->breadcrumb()->setSeparator(' > ');
|
||
?>
|
||
<style>
|
||
.charts{margin:30px 0px;}
|
||
.charts .title{color:#003366;}
|
||
.cp {line-height:24px;}
|
||
.cp a{color:#4bb2c5;line-height:24px;}
|
||
.cp a:hover{color:#FFF;background:#4bb2c5;}
|
||
</style>
|
||
<div id="leftPanel">
|
||
<?= $this->partial('stat/left.phtml'); ?>
|
||
</div>
|
||
<div id="rightPanel">
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/jquery.jqplot.js"></script>
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.barRenderer.js"></script>
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.pieRenderer.js"></script>
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.categoryAxisRenderer.js"></script>
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.highlighter.js"></script>
|
||
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.pointLabels.js"></script>
|
||
<div class="cp">
|
||
<span>选择年份:</span>
|
||
<a href="/admin/stat/month/">所有年份</a>
|
||
<a href="/admin/stat/month/y/2004">2004</a>
|
||
<a href="/admin/stat/month/y/2005">2005</a>
|
||
<a href="/admin/stat/month/y/2006">2006</a>
|
||
<a href="/admin/stat/month/y/2007">2007</a>
|
||
<a href="/admin/stat/month/y/2008">2008</a>
|
||
<a href="/admin/stat/month/y/2009">2009</a>
|
||
<a href="/admin/stat/month/y/2010">2010</a>
|
||
<a href="/admin/stat/month/y/2011">2011</a>
|
||
<a href="/admin/stat/month/y/2012">2012</a>
|
||
<a href="/admin/stat/month/y/2013">2013</a>
|
||
<a href="/admin/stat/month/y/2014">2014</a>
|
||
<a href="/admin/stat/month/y/2015">2015</a>
|
||
</div>
|
||
<div class="charts">
|
||
<div class="title" id="title_online"><?php echo $this->y.'年按月在线下载条数(有用途记录,且无数据重复)统计';?></div>
|
||
<?php
|
||
|
||
if($this->data!='' && count($this->data)!= 0)
|
||
{
|
||
$data = $this->data;
|
||
?>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
<?php
|
||
$vars = array();
|
||
$month = array();
|
||
foreach ($data as $v)
|
||
{
|
||
$vars[] = $v['c'];
|
||
$month[]= "'".$v['m']."月'";
|
||
}
|
||
?>
|
||
var s1 = [<?php echo join(',',$vars); ?>];
|
||
var ticks = [<?php echo join(',',$month); ?>];
|
||
|
||
plot1 = $.jqplot('chart_div_online', [s1], {
|
||
seriesDefaults:{
|
||
renderer:$.jqplot.BarRenderer,
|
||
pointLabels: { show: true }
|
||
},
|
||
axes: {
|
||
xaxis: {
|
||
renderer: $.jqplot.CategoryAxisRenderer,
|
||
ticks: ticks
|
||
}
|
||
},
|
||
highlighter: { show: false }
|
||
});
|
||
});
|
||
</script>
|
||
<div class="content" id="chart_div_online" <?php if ($this->y) echo ' style="width:600px;"'; ?>></div>
|
||
<?php
|
||
}else
|
||
{
|
||
echo "暂无数据 (注:在线下载统计从2011年9月份起)";
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
<div class="charts">
|
||
<div class="title" id="title_online1"><?php echo $this->y.'年按月在线下载条数(根据用户下载记录,9月之前无用途记录)统计';?></div>
|
||
<?php
|
||
|
||
if($this->online!='' && count($this->online)!= 0)
|
||
{
|
||
$online = $this->online;
|
||
?>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
<?php
|
||
$vars_online = array();
|
||
$month_online = array();
|
||
foreach ($online as $v)
|
||
{
|
||
$vars_online[] = $v['c'];
|
||
$month_online[]= "'".$v['m']."月'";
|
||
}
|
||
?>
|
||
var s1 = [<?php echo join(',',$vars_online); ?>];
|
||
var ticks = [<?php echo join(',',$month_online); ?>];
|
||
|
||
plot1 = $.jqplot('chart_div_online1', [s1], {
|
||
seriesDefaults:{
|
||
renderer:$.jqplot.BarRenderer,
|
||
pointLabels: { show: true }
|
||
},
|
||
axes: {
|
||
xaxis: {
|
||
renderer: $.jqplot.CategoryAxisRenderer,
|
||
ticks: ticks
|
||
}
|
||
},
|
||
highlighter: { show: false }
|
||
});
|
||
});
|
||
</script>
|
||
<div class="content" id="chart_div_online1"<?php if ($this->y) echo ' style="width:600px;"'; ?>></div>
|
||
<?php
|
||
}else
|
||
{
|
||
echo "暂无数据";
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
<div class="charts">
|
||
<div class="title" id="title_offline"><?php echo $this->y.'年按月离线通过申请次数统计';?></div>
|
||
<?php
|
||
if($this->offline!='' && count($this->offline)!= 0)
|
||
{
|
||
$offline = $this->offline;
|
||
?>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
<?php
|
||
$vars_offline = array();
|
||
$month_offline = array();
|
||
foreach ($offline as $v)
|
||
{
|
||
$vars_offline[] = $v['c'];
|
||
$month_offline[]= "'".$v['m']."月'";
|
||
}
|
||
?>
|
||
var s1 = [<?php echo join(',',$vars_offline); ?>];
|
||
var ticks = [<?php echo join(',',$month_offline); ?>];
|
||
|
||
plot1 = $.jqplot('chart_div_offline', [s1], {
|
||
seriesDefaults:{
|
||
renderer:$.jqplot.BarRenderer,
|
||
pointLabels: { show: true }
|
||
},
|
||
axes: {
|
||
xaxis: {
|
||
renderer: $.jqplot.CategoryAxisRenderer,
|
||
ticks: ticks
|
||
}
|
||
},
|
||
highlighter: { show: false }
|
||
});
|
||
});
|
||
</script>
|
||
<div class="content" id="chart_div_offline" <?php if ($this->y) echo ' style="width:600px;"'; ?>></div>
|
||
<?php
|
||
}else
|
||
{
|
||
echo "暂无数据";
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
<div class="charts">
|
||
<div class="title" id="title_newuser"><?php echo $this->y.'年按月新用户注册量';?></div>
|
||
<?php
|
||
if($this->newuser!='' && count($this->newuser)!=0)
|
||
{
|
||
$newuser = $this->newuser;
|
||
?>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
<?php
|
||
$vars_newuser = array();
|
||
$month_newuser = array();
|
||
foreach ($newuser as $v)
|
||
{
|
||
$vars_newuser[] = $v['c'];
|
||
$month_newuser[]= "'".$v['m']."月'";
|
||
}
|
||
?>
|
||
var s1 = [<?php echo join(',',$vars_newuser); ?>];
|
||
var ticks = [<?php echo join(',',$month_newuser); ?>];
|
||
|
||
plot1 = $.jqplot('chart_div_newuser', [s1], {
|
||
seriesDefaults:{
|
||
renderer:$.jqplot.BarRenderer,
|
||
pointLabels: { show: true }
|
||
},
|
||
axes: {
|
||
xaxis: {
|
||
renderer: $.jqplot.CategoryAxisRenderer,
|
||
ticks: ticks
|
||
}
|
||
},
|
||
highlighter: { show: false }
|
||
});
|
||
});
|
||
</script>
|
||
<div class="content" id="chart_div_newuser" <?php if ($this->y) echo ' style="width:600px;"'; ?>></div>
|
||
<?php
|
||
}else
|
||
{
|
||
echo "暂无数据";
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
</div>
|