<!--<?php
print <<<EOT
-->

<!--
EOT;
require($this->getSegmentFile('manage.nav'));
print <<<EOT
-->
<script type="text/javascript" src="mode/dianpu/js/tools.js"></script>
<script language='javascript' type="text/javascript">
var identify = {
		doSubmit : function(form){
			if(!this.validation(form,'')) return false;
			setTimeout(function(){
				getObj("formid").submit();
			},0);
		},
		
		validation : function (form,type) {
			if(form == null || form == undefined || form == "") {
				DP.tips('error','非法的请求，请检查后再提交');
				return false;
			}
			if(type == '') {
				VALIDATOR.init(form);
			}else{
				VALIDATOR.init_2(form,type);
			}
			//店铺名称验证
			if(type == '' || type == 'title') {
				VALIDATOR.isRequired('title');//必须填写
				VALIDATOR.isLetter('title');//必须输入除换行外的任意字符
				VALIDATOR.isLength('title', 1 , 30);//店铺名称长度0-30个字节
			}
			
			if(type == '' || type == 'areaid') VALIDATOR.isRequired('areaid');//店铺地区验证
			if(type == '' || type == 'categoryid') VALIDATOR.isRequired('categoryid');//店铺行业验证
			if(type == '' || type == 'childid') VALIDATOR.isRequired('childid');//店铺分类验证
			//店铺经营者验证
			if(type == '' || type == 'operator') {
				VALIDATOR.isRequired('operator');
				VALIDATOR.isLetter('operator');//必须输入除换行外的任意字符
				VALIDATOR.isLength('operator', 0, 15);//店铺经营者长度0-30个字节
			}
			//店铺经营者手机验证		
			if(type == '' || type == 'operatorphone') {
				VALIDATOR.isRequired('operatorphone');
				VALIDATOR.isPhone('operatorphone');
				VALIDATOR.isLength('operatorphone', 11, 30);
			}
		
			//公司名字
			if(type == '' || type == 'company') {
				VALIDATOR.isLetter('company');
				VALIDATOR.isLength('company', 0 , 100);
			}
			//法人代表
			if(type == '' || type == 'delegate') {
				VALIDATOR.isLetter('delegate');
				VALIDATOR.isLength('delegate', 0, 15);
			}
			//法人手机
			if(type == '' || type == 'delegatephone') {
				VALIDATOR.isPhone('delegatephone');
				VALIDATOR.isLength('delegatephone', 11, 30);
			}
			//公司地址
			if(type == '' || type == "companyaddress") {
				VALIDATOR.isLetter('companyaddress');
				VALIDATOR.isLength('companyaddress', 0, 100);
			}
			//公司电话
			if(type == '' || type == 'companyphone') {
				VALIDATOR.isPhone('companyphone');
				VALIDATOR.isLength('companyphone',  0, 30);
			}
			//公司传真
			if(type == '' || type == 'companyfax') {
				VALIDATOR.isPhone('companyfax');
				VALIDATOR.isLength('companyfax',  0, 30);
			}
			//公司邮编
			if(type == '' || type == 'companyzipcode') {
				VALIDATOR.isInt('companyzipcode');
				VALIDATOR.isLength('companyzipcode', 6, 8);
			}
			if(type == '' || type == 'ifagree') VALIDATOR.isCheck('ifagree');
			if(!VALIDATOR.result)return false;
			return true;
		}
};
</script>
<script language='javascript' type="text/javascript">
window.onload = function(){
    tools.getChildCategory('index.php?m=dianpu&c=checkin&a=categorychildlist', getObj('categoryid'), '{$_viewer->categoryid}');
}
</script>
<!--
EOT;
$operatorphone = $_viewer->dianpuinfo->operatorphone;
(strlen($operatorphone) == 1 && $operatorphone == 0) && $operatorphone = '';
$companyzipcode = $_viewer->shangjia['companyzipcode'];
(strlen($companyzipcode) == 1 && $companyzipcode == 0 ) && $companyzipcode = '';
print <<<EOT
-->
<div id="contentC" class="fl">
<div class="p15">
<form action="{$_viewer->baseUrl}&a=identify" enctype="multipart/form-data" method="post" name="FORM" id="formid">
<input type="hidden" value="2" name="step" />
<input type="hidden" value="{$_viewer->dianpuinfo->dianpuid}" name="dianpuid" />
<input type="hidden" value="{$_viewer->dianpuinfo->shangjiaid}" name="shangjiaid" />
<h2 class="h1">认证信息</h2>
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr1">
			<td class="td1">店铺名称：<span class="s1">*</span></td>
			<td class="td2"><input name="title" value="{$_viewer->dianpuinfo->title}" type="text" class="input input_wa" id="title" title="店铺名称"  onblur="identify.validation(document.FORM,this.id)"/></td>
			<td class="td2"><div class="help_a"></div></td>
		</tr>
		<tr class="tr1">
			<td class="td1">地区：<span class="s1">*</span></td>
			<td class="td2">{$_viewer->areaSelectHtml}</td>
			<td class="td2"><div class="help_a"></div></td>
		</tr>
		<tr>
			<td class="td1">行业：<span class="s1">*</span></td>
			<td class="td2">{$_viewer->parentCategorySelectHtml}</td>
			<td class="td2"><div class="help_a"></div></td>
		</tr>
		<tr>
			<td class="td1">分类：<span class="s1">*</span></td>
			<td class="td2"><span id="optionitem">{$_viewer->childCategorySelectHtml}</span></td>
			<td class="td2"><div class="help_a"></div></td>
		</tr>
		<tr class="tr1">
			<td class="td1">经营者姓名：<span class="s1">*</span></td>
			<td class="td2">
			  <input name="operator" value="{$_viewer->dianpuinfo->operator}" type="text" class="input input_wa" id="operator" title="经营者姓名"  onblur="identify.validation(document.FORM,this.id)"/></td>
		    <td class="td2"><div class="help_a"></div></td>
		</tr>
		<tr class="tr1">
			<td class="td1">手机：<span class="s1">*</span></td>
			<td class="td2">
			  <input name="operatorphone" value="{$operatorphone}" type="text" class="input input_wa" id="operatorphone" title="手机" onblur="identify.validation(document.FORM,this.id)"/></td>
		    <td class="td2"><div class="help_a"></div></td>
		</tr>
	</table>
</div>

<h2 class="h1">扩展信息</h2>
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr1">
			<td class="td1">公司全称：</td>
			<td class="td2"><input name="company" value="{$_viewer->shangjia['company']}" type="text" class="input input_wb" title="公司全称" id="company"/></td>
		</tr>
		<tr class="tr1">
			<td class="td1">法人代表：</td>
			<td class="td2"><input name="delegate" value="{$_viewer->shangjia['delegate']}" type="text" class="input input_wa" title="法人代表" id="delegate"/></td>
		</tr>
		<tr class="tr1">
		    <td class="td1">法人手机：</td>
			<td class="td2"><input name="delegatephone" value="{$_viewer->shangjia['delegatephone']}" type="text" class="input input_wa" id="delegatephone" title="法人手机"/></td>
		</tr>
		<tr class="tr1">
			<td class="td1">公司地址：</td>
			<td class="td2"><input name="companyaddress" value="{$_viewer->shangjia['companyaddress']}" type="text" class="input input_wb" title="公司地址" id="companyaddress"/></td>
		</tr>
		<tr class="tr1">
		    <td class="td1">公司电话：</td>
			<td class="td2"><input name="companyphone" value="{$_viewer->shangjia['companyphone']}" type="text" class="input input_wa" id="companyphone" title="公司电话"/></td>
		</tr>
		<tr class="tr1">
			<td class="td1">传真：</td>
			<td class="td2"><input name="companyfax" value="{$_viewer->shangjia['companyfax']}" type="text" class="input input_wa" id="companyfax" title="传真"/></td>
		</tr>
		<tr class="tr1">
			<td class="td1">邮编：</td>
			<td class="td2"><input name="companyzipcode" value="{$companyzipcode}" type="text" class="input input_wa" id="companyzipcode" title="邮编"/></td>
		</tr>
	</table>
</div>
<div class="p10 tac"><span class="btn"><span><button type="button" onclick="identify.doSubmit(getObj('formid'))" name="Submit">提 交</button></span></span></div>
</form>
</div>
</div></div>
<!--
EOT;
?>-->