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

<!--{if $action == 'log'}-->
<script language="JavaScript">
setSubject("用户付费纪录");
</script>
<table cellpadding="0" cellspacing="0" class="tableborder mt5">
	<tr>
		<td class="tablerow">
			<b>管理选项:</b> <a href="system.php?sys=pay&action=log" class="mr12">付费纪录</a><a href="javascript:void(0)" onclick="searchForm()">搜索</a>
		</td>
	</tr>
</table>
<form method="get" action="system.php" style="overflow:hidden;height:0px">
<input type="hidden" name="sys" value="pay" />
<input type="hidden" name="action" value="log" />
<input type="hidden" name="op" value="search" />
<table cellpadding="0" cellspacing="1" border="0" align="center" class="tableborder border" id="search-form">
	<tr>
		<td class="tablerowr" width="20%">付费用户名</td>
		<td class="tablerow"><input type="text" class="f-text" name="username" value="{$param['username']}" style="width:175px" /></td>
	</tr>
	<tr>
		<td class="tablerowr">支付时间</td>
		<td class="tablerow"><input type="text" class="f-text readonly" name="dateline_start" id="dateline_start" value="{$param['dateline_start']}" style="width:80px" /> - <input type="text" class="f-text readonly" name="dateline_end" id="dateline_end" value="{$param['dateline_end']}"  style="width:80px" /></td>
	</tr>
	<tr>
		<td class="tablerowr">支付文档ID</td>
		<td class="tablerow">
			<input type="text" class="f-text" name="id" value="{$param['id']}" style="width:175px" />
			<select name="channelid">
			<!--{loop $channel $cv}--><option value="{$cv['channelid']}"<!--{if $cv['channelid'] == $param['channelid']}--> selected<!--{/if}-->>{$cv['channelname']}</option><!--{/loop}-->
			</select>
		</td>
	</tr>
	<tr>
		<td class="tablerowr"></td>
		<td class="tablerow">
			<input type="submit" class="f-button" value=" 搜索记录 " />
		</td>
	</tr>
</table>
</form>
<form method="post" id="myForm" name="form" action="system.php?sys=pay&action=log">
<table cellpadding="0" cellspacing="0" class="tableborder mt5" id="mytable">
	<tr align="center">
		<td width="35" class="tablerowhighlight">选中</td>
		<td width="80" class="tablerowhighlight">用户</td>
		<td width="60" class="tablerowhighlight">点数</td>
		<td width="110" class="tablerowhighlight">支付时间</td>
		<td width="60" class="tablerowhighlight">频道</td>
		<td width="70" class="tablerowhighlight">文档ID</td>
		<td class="tablerowhighlight">文档标题</td>
		<td width="100" class="tablerowhighlight">管理操作</td>
	</tr>
	<!--{if $data}-->
	<!--{loop $data $val}-->
	<tr class="item" height=27 id="item-{$val[pid]}">
		<td class="tablerowl">
			<input type="checkbox" onclick="try{event.cancelBubble=true;}catch(e){event.stopPropagation();}" name="pid[]"  id="ids_{$val[pid]}" value="{$val[pid]}">
			<input type="hidden" name="pid[]"  id="pid[]" value="{$val[pid]}" />
		</td>
		<td align="center">
			<a href="###">{$val['username']}</a>
		</td>
		<td align="center">{$val['pay_point']}</td>
		<td align="center"><!--{echo qbase::formatTime('Y-n-d H:i', $val['pay_dateline'])}--></td>
		<td align="center">{$channel[$val['channelid']]['channelname']}</td>
		<td align="center">{$val['id']}</td>
		<td style="padding:5px;">
			<!--{if $val['subject']}-->
				<a href="{$val['url']}" target="_blank">{$val['subject']}</a>
			<!--{else}-->
				<font color="red">非正常文档</font>
			<!--{/if}-->
		</td>
		<td align="center">
			<a href="system.php?sys=pay&action=log&channelid={$val['channelid']}&id={$val['id']}">同主题付费</a>
		</td>
	</tr>
	<!--{/loop}-->
	<!--{else}-->
	<tr class="item" height=27>
		<td align="center" colspan="8">
			<p style="padding:12px;">没有找到付费记录</p>
		</td>
	</tr>
	<!--{/if}-->
	<tr>
		<td colspan=8 class="tablerow" align=center>
			<!--{eval new pager($total,$pagesize);}-->
		</td>
	</tr>
</table>
</form>
<script language=javascript>
	function searchForm(){
		var obj = $('search-form');
		var h = obj.offsetHeight;
		var timer;
		clearInterval(timer);
		var b=parseInt(obj.parentNode.style.height);
		b = isNaN(b) ? h : b;
		var c = b < 10 ? h-b : 0 - b;
		var d = 10,t=0,ttl=30;
		(function (me){
			clearInterval(timer);
			timer=setInterval(function (){
				var m = Math.ceil(Tweener.easeOutCubic(t,b,c,d)) ;
				obj.parentNode.style.height = m + 'px';
				if(t<d) t++; 
				else{
					clearInterval(timer);
					obj.parentNode.style.height = (c+b) + 'px';
				}
			},ttl)
		})(this);
	};
	new qmeCms.Calendar("dateline_start");
	new qmeCms.Calendar("dateline_end");
	<!--{if !empty($param)}-->
	searchForm();
	<!--{/if}-->
</script>
<!--{/if}-->
<!--{template 'foot'}-->