<!--<?php
print <<<EOT
-->
<style type="text/css">
.checkinview {min-height:50px}
.checkinview .view-hover{min-height:50px;}
</style>
<div id="breadCrumb" class="mb5"><a href="{$_viewer->baseName}">{$_viewer->siteName}</a> &raquo; <a href="index.php?m=dianpu&c=checkin">商家入驻</a> &raquo; 资料填写</div>
<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'));
}
</script>
<form action="{$_viewer->baseurl}&a=addShangjiaCheckin" enctype="multipart/form-data" method="post" name="FORM" id="formid">
<input type="hidden" value="step2" name="step"/>
	<div class="B_boxB mb10 cc">
		<h2 class="B_bg B_h5"><span class="B_ico ico_h5">填写商铺信息</span></h2>
		<div class="bgB">
			<div class="c"></div>
		<div class="fillInfo">
			<h2 class="f14 b mb5">必填信息:</h2>
			<table width="100%" class="f14 mb20">
				<tr>
					<th>店铺名称：<span class="s1">*</span></th>
					<td><input name="title" type="text" class="B_ip" id="title"  title="店铺名称" maxlength="30" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>地区：<span class="s1">*</span></th>
					<td>{$_viewer->areaSelectHtml}</td>
				</tr>
				<tr>
					<th>行业：<span class="s1">*</span></th>
					<td>{$_viewer->parentCategorySelectHtml}</td>
				</tr>
				<tr>
					<th>分类：<span class="s1">*</span></th>
					<td><span id="optionitem"></span></td>
				</tr>
				<tr>
					<th>经营者姓名：<span class="s1">*</span></th>
					<td><input name="operator" type="text" class="B_ip" id="operator" title="经营者姓名" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>手机：<span class="s1">*</span></th>
					<td><input name="operatorphone" type="text" class="B_ip" id="operatorphone" title="手机" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
			</table>
			<h2 class="mb5"><span class="f14 b mr10">扩展信息:</span></h2>
			<table width="100%" class="f14 mb20">
				<tr>
					<th>公司全称：</th>
					<td><input name="company" type="text" class="B_ip" title="公司全称" id="company"></td>
				</tr>
				<tr>
					<th>法人代表：</th>
					<td><input name="delegate" type="text" class="B_ip" title="法人代表" id="delegate"></td>
				</tr>
				<tr>
					<th>法人手机：</th>
					<td><input name="delegatephone" type="text" class="B_ip" id="delegatephone" title="法人手机" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>公司地址：</th>
					<td><input name="companyaddress" type="text" class="B_ip" title="公司地址" id="companyaddress"></td>
				</tr>
				<tr>
					<th>公司电话：</th>
					<td><input name="companyphone" type="text" class="B_ip" id="companyphone" title="公司电话" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>传真：</th>
					<td><input name="companyfax" type="text" class="B_ip" id="companyfax" title="传真" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>邮编：</th>
					<td><input name="companyzipcode" type="text" class="B_ip" id="companyzipcode" title="邮编" onblur="identify.validation(document.FORM,this.id)"/></td>
				</tr>
				<tr>
					<th>&nbsp;</th>
					<td><label class="f12"><input name="ifagree" type="checkbox" value="" id="ifagree" title="阅读入驻条款">同意以下入驻条款</label></td>
				</tr>
				<tr>
					<th>&nbsp;</th>
					<td><span class="btn" style="margin:0;">
					       <span><button type="button" name="Submit" onclick="identify.doSubmit(getObj('formid'))">提交资料</button></span></span></td>
				</tr>
			</table>
<!--
EOT;
portalEcho('dianpudoruzhu' ,$_viewer);
print <<<EOT
-->
</form>
<!--
EOT;
?>-->