<!--<?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');
?>-->