<!--<?php
include_once PrintEot('left');
print <<<EOT
-->

<ul class="nav3">
<li><a href="$baseurl&type=topic" $cls_topic>主题统计</a></li>
<li><a href="$baseurl&type=reply" $cls_reply>回复统计</a></li>
<li><a href="$baseurl&type=regmen" $cls_regmen>注册统计</a></li>
<li><a href="$baseurl&type=postmen" $cls_postmenc>发帖人数统计</a></li>
</ul>
<div class="c"></div>
<h3><b>提示信息</b></h3>
<div class="tr5">本功能详细统计网站每日主题、回复、注册和发帖用户数，帮助站长更直观的了解网站的发展状况!</div>
<!--
EOT;
if(!$action){
$slang = array('topic'=>'本月主题数','reply'=>'本月回复数','regmen'=>'本月注册人数','postmen'=>'平均每日发帖人数');
print <<<EOT
-->
<h2><a href="$basename&c_year=$p_year">&laquo;</a>&nbsp; $c_year &nbsp;<a href="$basename&c_year=$n_year">&raquo;</a></h2>
<table cellspacing="0" cellpadding="0" width="100%">
<tr class="tr3 s3" align="center"><td width="10%">月份</td>
<td class="tal"><b>{$slang[$type]}</b></td>
<td width="12%">操作</td>
</tr>
<!--
EOT;
foreach($sortdb as $key=>$value){print <<<EOT
-->
<tr class="tr3" align="left">
<td align="center"><a href="$basename&action=month&year=$c_year&month=$key">$c_year - $key</a></td>
<td><img src="$imgpath/post/vote/bar1.gif" width="$value[w]" height="10" /> {$value[$type]}</td>
<td align="center"><a href="$basename&action=msort&year=$c_year&month=$key" onclick="sort(this);return false;">统计</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br/>
<div style="padding:13px 30px;display:none;position:absolute;background:#fff;border:1px solid $tablecolor;" id="s_loading"><img src="$imgpath/loading.gif" align="absbottom" /> 正在统计数据...</div>
<script language="JavaScript">
function sort(o) {
	var s = getObj('s_loading');
	s.style.display = '';
	s.style.top  = ietruebody().clientHeight/3 + getTop() + 'px';
	s.style.left = (ietruebody().clientWidth-s.offsetWidth)/2 + 'px';
	ajax.send(o.href,'',function(){
		if (ajax.request.responseText == 'success') {
			window.location.reload();
		}	
	});
}
function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function getTop() {
	return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:ietruebody().scrollTop;
}
function getLeft() {
	return (typeof window.pageXOffset != 'undefined' ? window.pageXOffset:ietruebody().scrollLeft)
}
</script>
<script src="js/pw_ajax.js"></script>
<!--
EOT;
}elseif($action=='month'){
$slang = array('topic'=>'今日主题数','reply'=>'今日回复数','regmen'=>'今日注册人数','postmen'=>'今日发帖人数');
print <<<EOT
-->
<h2><a href="$basename&action=month&year=$p_year&month=$p_month">&laquo;</a>&nbsp; <a href="$basename&c_year=$year">$year-$month</a> &nbsp;<a href="$basename&action=month&year=$n_year&month=$n_month">&raquo;</a></h2>
<table cellspacing="0" cellpadding="0" width="100%">
<tr class="tr3 s3" align="center"><td width="10%">月份</td>
<td class="tal"><b>{$slang[$type]}</b></td>
<td width="12%">操作</td>
</tr>
<!--
EOT;
foreach($sortdb as $key=>$value){print <<<EOT
-->
<tr class="tr3" align="left">
<td align="center">$year-$month-$key</td>
<td><img src="$imgpath/post/vote/bar1.gif" width="$value[w]" height="10" /> {$value[$type]}</td>
<td align="center"><a href="$basename&action=dsort&year=$year&month=$month&day=$key" onclick="sort(this);return false;">统计</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br/>
<div style="padding:13px 30px;display:none;position:absolute;background:#fff;border:1px solid $tablecolor;" id="s_loading"><img src="$imgpath/loading.gif" align="absbottom" /> 正在统计数据...</div>
<script language="JavaScript">
function sort(o) {
	var s = getObj('s_loading');
	s.style.display = '';
	s.style.top  = ietruebody().clientHeight/3 + getTop() + 'px';
	s.style.left = (ietruebody().clientWidth-s.offsetWidth)/2 + 'px';
	ajax.send(o.href,'',function(){
		if (ajax.request.responseText == 'success') {
			window.location.reload();
		}	
	});
}
function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
</script>
<script src="js/pw_ajax.js"></script>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->