{template admin/header}

<!--基本设置-->
<!--{if $this->Code == 'setting'}-->
<div id="main_wp" class="mt10">
<form action="admin.php?mod=event&code=dosetting" method="post" name="setting">
<table cellspacing="1" width="100%" align="center" class="tableborder">
	<tr class="header">
		<td colspan="2">基本设置</td>
	</tr>
	<tr>
		<td class="altbg1" width="150">
		是非开启活动应用
		</td>
		<td class="altbg2">
			<input name='config' id='open' type='radio' value='1' class="radio" {$checked['open'][1]} >
			<label for='open_1'>是</label>
			<input name='config' id='open' type='radio' value='0' class="radio" {$checked['open'][0]} >
			<label for='open_0'>否</label>	
		</td>
	</tr>
</table>
<center><input class="button" type="submit" name="setting_submit" value="提 交"></center>
</form>
</div>
<!--{/if}-->

<!--活动管理-->
<!--{if $this->Code == 'manage'}-->
<script src="./js/date/WdatePicker.js" type="text/javascript"></script>
<script src="./js/topicManage.js" type="text/javascript"></script>
	<form action="admin.php" method="get" name="search">
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header">
			<td colspan="2">搜索活动</td>
		</tr>
		<!--<input name="per_page_num" type="hidden" value="{$per_page_num}">-->
		<tr>
			<td class="altbg1" width="150">
			活动ID:
			</td>
			<td class="altbg2">
			<input name="id" type="text" id="id" value="{$id}" size="40">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			活动标题:
			</td>
			<td class="altbg2">
			<input type="text" name="type" value="{$type}" size="40">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			时间:
			</td>
			<td class="altbg2">
		  	  <input type="text" id="timefrom" name="timefrom" value="{$timefrom}" readonly onFocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"/>
			  &nbsp;&nbsp;至&nbsp;&nbsp;
			  <input type="text" id="timeto" name="timeto" value="{$timeto}" readonly onFocus="var fromt=document.getElementById('timefrom').value;WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true,minDate:fromt})"/>
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">&nbsp;</td>
			<td class="altbg2">
			  <button name="do" value='' type="submit" class="button">搜索一下</button> &nbsp;
			  <button class="button" type="button" onclick="window.location.href='admin.php?mod=event&code=manage';return false;">全部活动</button>
			  <input name="mod" type="hidden" value="event">
			  <input name="code" type="hidden" value="$this->Code">
			</td>
		</tr>
		
	</table>
	</form>
	
	<form method="post" action="admin.php?mod=event&code=delete">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
			<tr class="header">
				<td width="5%">
				  <label><input class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="checkall(this.form, 'ids')" >删除</label>
				</td>
				<td width="30%">活动标题</td>
				<td width="10%">活动主题</td>
				<td width="10%">活动发起者</td>
				<td width="10%">报名数/参与数</td>
				<td width="10%">开始/结束时间</td>
				<td width="5%">推荐</td>
				<td width="20%">操作</td>
			</tr>
			<!--{if $count}-->
				<!--{loop $rs $value}-->
				<tr class="altbg2" onmouseover="this.className='altbg1'" onmouseout="this.className='altbg2'">
					<td style="border-bottom:1px dotted #EDEDED"><input class="checkbox" type="checkbox" name="ids[]" value="$value[id]" ></td>
					<td style="border-bottom:1px dotted #EDEDED">
					  <a href="index.php?mod=event&code=detail&id={$value[id]}" target="_blank">{$value[title]}</a>
					  <input type="hidden" name="vid[]" value="$value[id]" >
					</td>
					<td style="border-bottom:1px dotted #EDEDED">{$value[type]}</td>
					<td style="border-bottom:1px dotted #EDEDED"><a href="index.php?mod={$value[postman]}" target="_blank">{$value[nickname]}</a><br>[IP:{$value[postip]}]</td>
					<td style="border-bottom:1px dotted #EDEDED">{$value[app_num]}/{$value[play_num]}人</td>
					<td style="border-bottom:1px dotted #EDEDED"><!--{eval echo my_date_format($value[fromt], 'Y-m-d')}--><br><!--{eval echo my_date_format($value[tot], 'Y-m-d')}--></td>
					<td style="border-bottom:1px dotted #EDEDED" align="center">
					  <input class="checkbox" type="checkbox" name="up_id[]" value="$value[id]" {$value[recd_checked]}>
					</td>
					<td style="border-bottom:1px dotted #EDEDED">
					  <A href="javascript:void(0);" onclick="sendemailtoleader('$value[postman]','$value[id]','event');" title="上报给相关负责人处理">上报</A>&nbsp;|&nbsp;
					  <A href="admin.php?mod=event&code=editevent&id={$value[id]}">编辑</A>&nbsp;|&nbsp;
					  <A href="admin.php?mod=event&code=delete&id={$value[id]}" onclick="return confirm('你确实要删除吗?不可恢复');">删除</A>&nbsp;|&nbsp;
		        	  <A href="javascript:void(0);" onclick="force_out('$value[postman]');">封杀此用户</A>
					</td>
				</tr>
				<!--{/loop}-->
				<!--{if $page_arr[html]}-->
				<tr align="center">
					<td colspan="8" class="altbg1">
					{$page_arr[html]}
					</td>
				</tr>
				<!--{/if}-->
			<!--{else}-->
				<tr align="center">
					<td colspan="8">
						还没有活动记录
					</td>
				</tr>
			<!--{/if}-->
		</table>
	
		<center><input class="button" type="submit" name="cronssubmit" value="提 交"></center>
	</form>
<!--{/if}-->

<!--活动审核-->
<!--{if $this->Code == 'verify'}-->
	<form action="admin.php" method="get" name="search">
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header">
			<td colspan="2">搜索活动</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			活动ID:
			</td>
			<td class="altbg2">
			<input name="id" type="text" id="id" value="{$id}" size="40">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			活动标题:
			</td>
			<td class="altbg2">
			<input type="text" name="type" value="{$type}" size="40">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">&nbsp;</td>
			<td class="altbg2">
			  <button name="do" value='' type="submit" class="button">搜索一下</button> &nbsp;
			  <button class="button" type="button" onclick="window.location.href='admin.php?mod=event&code=verify';return false;">全部活动</button>
			  <input name="mod" type="hidden" value="event">
			  <input name="code" type="hidden" value="verify">
			</td>
		</tr>
		
	</table>
	</form>

	<form method="post" action="admin.php?mod=event&code=doverify&act=1">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
			<tr class="header">
				<td width="10%">
				  <label><input class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="checkall(this.form, 'ids')" >通过</label>
				</td>
				<td>活动标题</td>
				<td width="15%">活动主题</td>
				<td width="15%">活动发起者</td>
				<td width="15%">时间</td>
				<td width="15%">操作</td>
			</tr>
			<!--{if $count}-->
				<!--{loop $rs $value}-->
				<tr class="altbg2" onmouseover="this.className='altbg1'" onmouseout="this.className='altbg2'">
					<td style="border-bottom:1px dotted #EDEDED"><input class="checkbox" type="checkbox" name="ids[]" value="$value[id]" ></td>
					<td style="border-bottom:1px dotted #EDEDED">
						<a href="index.php?mod=event&code=detail&id={$value[id]}" target="_blank">{$value[title]}</a>
						<input type="hidden" name="vid[]" value="$value[id]" >
					</td>
					<td style="border-bottom:1px dotted #EDEDED">{$value[type]}</td>
					<td style="border-bottom:1px dotted #EDEDED"><a href="index.php?mod={$value['username']}" target="_blank">{$value[nickname]}</a><br>[IP:{$value[postip]}]</td>
					<td style="border-bottom:1px dotted #EDEDED"><!--{eval echo my_date_format($value[fromt], 'Y-m-d')}--><br><!--{eval echo my_date_format($value[tot], 'Y-m-d')}--></td>
					<td style="border-bottom:1px dotted #EDEDED">
					<A href="admin.php?mod=event&code=editevent&id={$value[id]}">编辑</A>
					<span>&nbsp;|&nbsp;</span>
					  <A href="admin.php?mod=event&code=doverify&act=0&id={$value[id]}" onclick="return confirm('你确实要删除吗?不可恢复');">删除</A>
					</td>
				</tr>
				<!--{/loop}-->
				<!--{if $page_arr[html]}-->
				<tr align="center">
					<td colspan="5" class="altbg1">
					{$page_arr[html]}
					</td>
				</tr>
				<!--{/if}-->
			<!--{else}-->
				<tr align="center">
					<td colspan="5">
						还没有活动记录
					</td>
				</tr>
			<!--{/if}-->
		</table>
	
		<center><input class="button" type="submit" name="cronssubmit" value="提 交"></center>
	</form>
<!--{/if}-->