<!--<?php
require($this->getSegmentFile('dianpu.nav'));
print <<<EOT
-->
<script type="text/javascript">
function doSubmit(form) {
	var file = form.file.value;
	if (file == '' || file == null || file == 'undefined') {
		alert('请选择要导入的文件！');
		return false;
	}
	return true;
}
</script>
<div class="nav4 mb10">
	<ul class="cc">
		<li><a href="{$_viewer->baseUrl}&action=add">单个添加</a></li>
		<li class="current"><a href="{$_viewer->baseUrl}&action=import">批量导入</a></li>
	</ul>
</div>
<h2 class="h1">文件导入</h2>
<form action="{$_viewer->baseUrl}&action=import&import=1" method="post" enctype="multipart/form-data" name="FORM" onsubmit="return doSubmit(document.FORM)">
<div class="admin_table">
	<table width="100%">
		<tr class="tr1">
			<td class="td2" width="430"><input name="file" type="file" class="mr10 input input_wb" /><span class="btn2"><span><button type="submit">导 入</button></span></span></td>
			<td class="td2"><span>示范文件 <a href="{$_viewer->baseUrl}&action=export">点此下载</a></span></td>
		</tr>
	</table>
</div>
</form>
<div class="admin_table mb10">
<!--
EOT;
if($_viewer->import){
print <<<EOT
-->
	<table width="100%">
		<tr class="tr2">
			<td>店主</td>
			<td>店铺名</td>
			<td>经营者</td>
			<td>电话</td>
			<td>公司全称</td>
			<td>导入结果</td>
		</tr>
<!--
EOT;
if(!$_viewer->dianpuList && $_viewer->message){
print <<<EOT
-->
		<tr class="tr1 vt">
			<td colspan="6" class="p10"><div class="admin_tips">{$_viewer->message}</div></td>
		</tr>
<!--
EOT;
}foreach($_viewer->dianpuList as $key => $value){
print <<<EOT
-->
		<tr class="tr1">
			<td class="td2">{$value[username]}</td>
			<td class="td2">{$value[title]}</td>
			<td class="td2">{$value[operator]}</td>
			<td class="td2">{$value[operatorphone]}</td>
			<td class="td2">{$value[company]}</td>
			<td class="td2">{$value[comments]}</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
	</table>

<!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
?>
