<!--<?php
require($this->getSegmentFile('dianpu.nav'));
print <<<EOT
-->
<!--店铺审核-->
<script type="text/javascript">
var dianpu = {
	doOpen : function(){
		if(confirm('你确定要批量开启吗?')){
			return this.doSubmit(document.FORM);
		}
		return false;
	},
	doDelete:function(){
		if(confirm('你确定要批量删除吗?')){
			document.FORM.doing.value = 'delete';
			return this.doSubmit(document.FORM);
		}
		return false;
	},
	doSubmit : function(form){
		setTimeout(function(){
			form.submit();
		},0);
	},
	remove : function(url){
		if(confirm('你确定要删除吗?')){
			setTimeout(function(){
				window.location.href = url;
			},100);
		}
		return false;
	}
};
</script>
<h2 class="h1">店铺搜索</h2>
<!--
EOT;
$keyword = ($_viewer->keyword) ? stripslashes($_viewer->keyword) : '';
print <<<EOT
-->
<form action="{$_viewer->baseUrl}&action=searchverify" method="post">
<input type="hidden" name="step" value="2" />
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr1">
			<td class="td2">
				<input name="act_title" type="text" class="input input_wa mr10" value="{$keyword}" />
				<label class="mr10"><input name="type" type="radio" value="dianpu" {$_viewer->checked[dianpu]} />店铺名</label>
				<label class="mr10"><input name="type" type="radio" value="owner" {$_viewer->checked[owner]} />店主</label>
				<span class="btn2"><span><button type="submit">搜索</button></span></span>
			</td>
		</tr>
	</table>
</div>
</form>
<h2 class="h1">店铺列表</h2>
<form action="{$_viewer->baseUrl}&action=batchverify" method="post" name="FORM">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="doing" value="open" />
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr2">
			<td width="55" class="td2"><label><span onClick="CheckAll(document.FORM)" style = "cursor:pointer;">全选</span></label></td>
			<td class="td2">店铺名称</td>
			<td class="td2">地区</td>
			<td class="td2">分类</td>
			<td class="td2">店主</td>
			<td width="110">创建时间</td>
			<td width="200">操作</td>
		</tr>
<!--
EOT;
if(!$_viewer->dianpus){
print <<<EOT
-->
		<tr class="tr1 vt">
			<td class="p10" colspan="7"><div class="admin_tips">没有需要导入的店铺数据</div></td>
		</tr>
<!--
EOT;
}else{
foreach($_viewer->dianpus as $dianpu){
$ifcheckname = ($dianpu['ifcheck'] == 1) ? '删除' : '开通';
$ifcheck = ($dianpu['ifcheck'] == 1) ? 0 : 1;
print <<<EOT
-->
		<tr class="tr1">
			<td class="td2"><input name="dianpus[]" type="checkbox" value="{$dianpu[dianpuid]}" /></td>
			<td class="td2"><a href="{$_viewer->indexUrl}&c=info&id={$dianpu[dianpuid]}" target="_blank">$dianpu[title]</a></td>
			<td class="td2">$dianpu[area]</td>
			<td class="td2">$dianpu[parent] &raquo; $dianpu[child]</td>
			<td class="td2"><a href="u.php?uid=$dianpu[uid]" target="_blank">$dianpu[username]</a></td>
			<td class="td2">$dianpu[createtime]</td>
			<td class="td2">
				<a href="{$_viewer->baseUrl}&action=edit&id={$dianpu[dianpuid]}" class="mr5">[编辑]</a>
				<a href="{$_viewer->baseUrl}&action=stateverify&dianpus={$dianpu[dianpuid]}&ifcheck={$ifcheck}" class="mr5">[{$ifcheckname}]</a>
				<a href="javascript:;" onclick="dianpu.remove('{$_viewer->baseUrl}&action=deletedianpu&dianpuid={$dianpu[dianpuid]}');">[删除]</a>
			</td>
		</tr>
<!-- 
EOT;
}
print <<<EOT
-->		
		<tr class="tr2">
			<td width="50"><input type="checkbox" onclick="PW.selectAll('dianpus[]',this)" /><span onClick="CheckAll(document.FORM)" style = "cursor:pointer;"> 全选</span></td>
			<td><span class="bt2"><span><button type="button" onclick="dianpu.doOpen()">批量开通</button></span></span><span class="bt2"><span><button type="button" onclick="dianpu.doDelete()">批量删除</button></span></span></td>
			<td colspan="6">&nbsp;</td>
		</tr>
<!-- 
EOT;
}
print <<<EOT
-->		
	</table>
	<div class="cc">{$_viewer->pager}</div>
</div>
</form>
<!--
EOT;
?>