<!--{template 'head'}-->
<table width='100%' border='0' align='center' cellpadding='2' cellspacing='0' class='tableborder'>
	<tr><th align='center' class=submenu colspan=2><b>系统数据统计</b></th></tr>
	<tr>
		<td  class="tablerow"><strong>管理：</strong><a href="system.php?sys=count&action=manage">系统统计</a> | <a href="system.php?sys=count&action=category">栏目统计</a> </td>
	</tr>
</table>

<!--{if $action == 'manage'}-->
<style type="text/css">
#mytable td{padding-top:1px;padding-bottom:1px}
</style>
<table cellpadding="2" cellspacing="1" class="tableborder bg">
	<tr>
		<th colspan="8">系统数据</th>
	</tr>
	<tr>
		<td class="tablerowl" width="100">频道</td>
		<td class="tablerow" width="100">{$data['channel']} 个</td>
		<td class="tablerowl" width="100">栏目</td>
		<td class="tablerow" width="100">{$data['category']} 个</td>
		<td class="tablerowl" width="100">文档</td>
		<td class="tablerow" width="100">{$data['doc']} 篇</td>		
		<td class="tablerowl" width="100">管理人员</td>
		<td class="tablerow">{$data['manager']} 人</td>
	</tr>
</table>
<style type="text/css">
.relative{position:relative;width:100%;height:24px;}
.relative .len{position:absolute;left:0;top:0;height:24px;background-color:red}
.relative .word{position:absolute;left:0;top:0;color:#000;height:24px;line-height:24px;padding-left:15px;}
</style>
<table cellpadding="0" cellspacing="0" class="tableborder bg" id="mytable">
	<tr>
		<td width="120" class="tablerowhighlight">日期</td>
		<td class="tablerowhighlight">
			文档分布：
			<select id="type" onchange="window.location.href='system.php?sys=count&action=manage&type='+this.value+'&uid={echo urlencode($uid)}';">
				<option value="y"<!--{if $type == 'y'}--> selected<!--{/if}-->>按年</option>
				<option value="m"<!--{if $type == 'm'}--> selected<!--{/if}-->>按月</option>
				<option value="d"<!--{if $type == 'd'}--> selected<!--{/if}-->>按天</option>
			</select>
			<select id="uid" onchange="window.location.href='system.php?sys=count&action=manage&type={$type}&uid='+this.value;">
			<option value="">所有人</option>
			<!--{loop $manager $val}-->
			<option value="{echo urlencode($val['username'])}" <!--{if $uid == $val['username']}--> selected<!--{/if}-->>{$val['username']}</option>
			<!--{/loop}-->
			</select>
		</td>
	</tr>
	<!--{if $data['data']}-->
	<!--{loop $data['data'] $key $val}-->
	<!--{eval $key++;}-->
	<tr class="item" id="item-{$key}">
		<td class="tablerowl">
			<input type="hidden" id="ids-{$key}" name="ids[]" value="{$key}" />{$val['ym']}{$val['d']}
		</td>
		<td>
			<div class="relative">
				<div class="len" style="width:<!--{echo ($val['num'] / $max) * 100}-->%"></div>
				<div class="word">{$val['num']}</div>
			</div>
		</td>
	</tr>
	<!--{/loop}-->
	<!--{else}-->
	<tr class="item" id="item-1">
		<td class="tablerowl" colspan="2">
			<input type="hidden" id="ids-1" name="ids[]" value="1" />
			<p style="padding:20px;">没有找到相关数据</p>
		</td>
	</tr>
	<!--{/if}-->
</table>
<!--{/if}-->

<!--{if $action == 'category'}-->
<table cellpadding="0" cellspacing="0" class="tableborder bg" id="mytable">
	<tr>
		<th colspan="8">栏目数据</th>
	</tr>
	<tr>
		<td width="60" class="tablerowhighlight">ID</td>
		<td width="60" class="tablerowhighlight">频道ID</td>
		<td width="80" class="tablerowhighlight">频道名称</td>
		<td width="300" class="tablerowhighlight">栏目</td>
		<td width="80" class="tablerowhighlight">已审文档</td>
		<td width="80" class="tablerowhighlight">待审文档</td>
	</tr>	
	<!--{loop $data $channelid $item}-->
		<!--{loop $item $val}-->
		<tr id="item-{$val['cid']}" class="item">
			<td class="tablerowl">{$val['cid']}</td>
			<td class="tablerowl">{$channelid}</td>
			<td class="tablerow" align="center">{$channel[$channelid]['channelname']}</td>
			<td class="tablerow" style="padding-left:12px;">{$val['pre']}{$val['title']}</td>
			<td class="tablerow" align="center">{$val['cnum']}</td>
			<td class="tablerow" align="center">{$val['wnum']}</td>
		</tr>
		<!--{/loop}-->
	<!--{/loop}-->
</table>
<!--{/if}-->


<!--{template 'foot'}-->