{template admin/header}

<script src="./js/date/WdatePicker.js" type="text/javascript"></script>
<script src="./js/topicManage.js" type="text/javascript"></script>
<div id="main_wp" class="mt10">
<form action="admin.php" method="get" name="search">
<input type="hidden" name="mod" value="qun" />
<input type="hidden" name="code" value="manage" />
<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">
			<div style="float:left; margin-right:10px;">
				<select id="top_cat" name="top_cat">
					{$cat_selected['first']}
				</select>
			</div>
			<div style="float:left; ">
				<select id="sub_cat" name="sub_cat">
					{$cat_selected['second']}
				</select>
			</div>
		</td>
	</tr>-->
	<tr>
		<td class="altbg1" width="150">
		微群等级
		</td>
		<td class="altbg2">
			<select name="qun_level">
				<option value="0">不限</option>
				<!--{loop $level_ary $level}-->
					<option value="{$level['level_id']}" <!--{if $qun_level==$level['level_id']}-->selected="selected"<!--{/if}-->>{$level['level_name']}</option>
				<!--{/loop}-->
			</select>
		</td>
	</tr>
	<tr>
		<td class="altbg1" width="150">
		微群名称
		</td>
		<td class="altbg2">
		<input type="text" name="qun_name" id="qun_name" value="{$key_qun_name}" size="40">		
		</td>
	</tr>
	<tr>
		<td class="altbg1" width="150">
		创始人昵称
		</td>
		<td class="altbg2">
		<input type="text" name="nickname" id="nickname" value="{$key_nickname}" size="40">
		<span style="margin-left:10px;"></span>	
		</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>
</table>
<center>
	<button class="button" type="submit" name="search_submit" value="">搜索一下</button>
	&nbsp;
	<button class="button" type="button" onclick="window.location.href='admin.php?mod=qun&code=manage';return false;">全部微群</button>
</center>
</form>

<!--微群管理 Begin-->
<form action="admin.php?mod=qun&code=domanage" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableborder tl" style="margin-top:10px;">
	<tr class="header">
		<td colspan="15">微群管理</td>
	</tr>
	<tr class="list_h_2">
		<td width="5%"><input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form, 'ids')" >删?</td>
		<td width="30%">群组名称(标签)</td>
		<td width="15%">所属分类</td>
		<td width="15%">创建人</td>
		<td width="10%">创建时间</td>
		<td width="5%">推荐</td>
		<td width="20%">操作</td>
	</tr>
	<!--{if $count}-->
		<!--{loop $qun_list $key $value}-->
			<tr>
				<td class="td2">
					<input class="checkbox" type="checkbox" name="ids[]" value="$value[qid]" >
					<input type="hidden" name="qids[]" value="$value[qid]" >
				</td>
				<td class="td2">
				  <b></b>
				  <a href="index.php?mod=qun&qid={$value['qid']}" target="_blank">{$value['name']}</a>
				  <!--{if $value['tagname']}-->($value['tagname'])<!--{/if}-->
				</td>
				<td class="td2">
					<a href="index.php?mod=qun&code=category&cat_id={$value['top_cat_id']}" target="_blank">$value['top_cat']</a>
					<!--{if $value['sub_cat']}-->
					&nbsp;>&nbsp;
					<a href="index.php?mod=qun&code=category&cat_id={$value['cat_id']}" target="_blank">$value['sub_cat']</a>
					<!--{/if}-->
				</td>
				<td class="td2">
				  <a href="index.php?mod={$value['founderuid']}" target="_blank">{$value['nickname']}</a>
				  [IP:<!--{if $value['postip']}-->{$value['postip']}<!--{else}-->无<!--{/if}-->]</td>
				<td class="td2">$value['dateline']</td>
				<td class="td2">
					<input class="checkbox" type="checkbox" name="recd_ids[{$value[qid]}]" value="1" {$value[recd_checked]}>
				</td>
				<td class="td2">
				    <A href="javascript:void(0);" onclick="sendemailtoleader('$value[founderuid]','$value[qid]','qun');">上报</A>
				    &nbsp;
					<a href="admin.php?mod=qun&code=manage&op=edit&qid={$value['qid']}">编辑</a>
					&nbsp;
					<a href="admin.php?mod=qun&code=domanage&op=delete&qid={$value['qid']}" onclick="return confirm('你确实要删除吗?不可恢复');">删除</a>
					&nbsp;
					<A href="javascript:void(0);" onclick="force_out('$value[founderuid]');">封杀此用户</A>
					&nbsp;
					<a href="admin.php?mod=qun&code=joinqun&qid={$value['qid']}">拉人入群</a>
				</td>
			</tr>
		<!--{/loop}-->
		<!--{if $page_arr[html]}-->
		<tr align="center">
			<td colspan="15" class="td2">
			{$page_arr[html]}
			</td>
		</tr>
		<!--{/if}-->
	<!--{else}-->
		<tr>
			<td colspan="5">还有没有微群记录</td>
		</tr>
	<!--{/if}-->
</table>
<!--微群管理 End-->

<center><input class="button" type="submit" name="submit" value="提 交"></center>
</form>
</div>