<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<div class="nav3 mb10">
  <ul class="cc">
    <li $cls_topic><a href="$baseurl&type=topic">主題統計</a></li>
    <li $cls_reply><a href="$baseurl&type=reply">回復統計</a></li>
    <li $cls_regmen><a href="$baseurl&type=regmen">注冊統計</a></li>
    <li $cls_postmenc><a href="$baseurl&type=postmen">發帖人數統計</a></li>
	<li><a href="$admin_file?adminjob=app&admintype=yunstatistics" onclick="openNewUrl('yunstatistics','雲統計',this.href);return false;"><span class="beta">雲統計</span></a></li>
  </ul>
</div>
<div class="admin_info mb10">
  <h3 class="h1"><b>提示信息</b></h3>
  <div class="legend">本功能詳細統計網站每日主題、回復、注冊和發帖用戶數，幫助站長更直觀的了解網站的發展狀況!</div>
</div>
<!--
EOT;
if(!$action){
$slang = array('topic'=>'本月主題數','reply'=>'本月回復數','regmen'=>'本月注冊人數','postmen'=>'平均每日發帖人數');
print <<<EOT
-->
<h2 class="h1"><a href="$basename&c_year=$p_year">&laquo;</a>&nbsp; $c_year &nbsp;<a href="$basename&c_year=$n_year">&raquo;</a></h2>
<div class="admin_table mb10">
  <table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr2 vt td_bgB">
      <td>月份</td>
      <td>{$slang[$type]}</td>
      <td>操作</td>
    </tr>
<!--
EOT;
foreach($sortdb as $key=>$value){print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><a href="$basename&action=month&year=$c_year&month=$key">$c_year - $key</a></td>
      <td class="td2"><img src="$imgpath/post/vote/tab-two.gif" width="$value[w]" height="10" /> {$value[$type]}</td>
      <td class="td2"><a href="$basename&action=msort&year=$c_year&month=$key" onclick="sort(this);return false;">[統計]</a></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
</div>
<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 type="text/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') {
			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 class="h1"><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>
<div class="admin_table mb10">
  <table cellspacing="0" cellpadding="0" width="100%">
    <tr class="tr2 vt td_bgB">
      <td>月份</td>
      <td>{$slang[$type]}</td>
      <td>操作</td>
    </tr>
<!--
EOT;
foreach($sortdb as $key=>$value){print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$year-$month-$key</td>
      <td class="td2"><img src="$imgpath/post/vote/tab-two.gif" width="$value[w]" height="10" /> {$value[$type]}</td>
      <td class="td2"><a href="$basename&action=dsort&year=$year&month=$month&day=$key" onclick="sort(this);return false;">[統計]</a></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
</div>
<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 type="text/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');
?>-->
