<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<title>{$seo['title']}</title>
<meta name="Keywords" content="{$seo['keywords']}">
<meta name="Description" content="{$seo['description']}">
<link href="mhkskin/style/reset.css" type="text/css" rel="stylesheet" />
<link href="mhkskin/style/style.css" type="text/css" rel="stylesheet" />
<link href="mhkskin/style/post.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/validator/validator.min.js"></script>
<link href="js/validator/validator.css" type="text/css" rel="stylesheet" />
</head>
{splitword()}
<body class="home-page">
<div class="wrapper">
	<!--{template header}-->
	<!-- 主体 -->
	<form name="post" id="form_post" action="" method="post" enctype="multipart/form-data">
	<div id="content">
		<div class="thd clearfix"><b>发布步骤：</b><span>1.选择企业分类</span><span class="current">2.填写企业相关内容</span><span>3.申请完成</span></div>

		<div class="fbd">
			<div class="edit_box">
				<ul>
					<li><span class="span_1">&nbsp;</span><span class="span_2" style="font-size:12px;">您的ip地址是：<span class="red_skin">{$ip}</span>，请填写真实企业信息</span></li>
					<li><span class="span_1">所选类别：</span><span class="span_2"><b>{$com_catinfo[catname]}</b>—> <a href="postcom.php"> 返回重选类别</a></span></li>
					<li><span class="span_1">*选择地区：</span><span class="span_2">
					<select name=areaid id="areaid">
					<option value=0>请选择地区</option>
					{$area_option}
					</select>
					</span></li>
					<li><span class="span_1">*企业名称：</span><span class="span_2" style="font-size:12px; color:#888;"><input id="comnane" name="comname"  type="text" size="58"> 
					不要超过40个文字</span></li>
					<li><span class="span_1">*标题图片：</span>
					<span class="span_2"><input type="file" class="textInt" size="30" name="thumb" id="thumb" />
					</span></li>

					<li><span class="span_1">*营业时间：</span><span class="span_2" style="font-size:12px; color:#888;"><input id="hours" name="hours"  type="text" size="58"></span></li>

					<li><span class="span_1">企业介绍：</span><span class="span_2" style="font-size:12px; color:#888;"><textarea cols="115" rows="8" name="content" ></textarea>
					<p></span></li>
					
					<li><span class="span_1">企业图片：</span><span class="span_2" style=" width: 650px;">
					<input type="file" class="textInt" size="30" name="file1" />
					<input type="file" class="textInt" size="30" name="file2" />
					<input type="file" class="textInt" size="30" name="file3" />
					<input type="file" class="textInt" size="30" name="file4" />
					<input type="file" class="textInt" size="30" name="file5" />
					<input type="file" class="textInt" size="30" name="file6" /><br>最多可上传6张图片，不超过500K，图片支持jpg 、gif 、png格式！
					</span></li>

					<li><span class="span_1">联系人：</span><span class="span_2"><input type="text" class="textInt" size="30" name="linkman" value=""/></span></li>
					<li><span class="span_1">联系QQ：</span><span class="span_2"><input type="text" class="textInt" size="30" name="qq" id="qq" value="{$member[qq]}"/></span> <span id="links">QQ、电话和邮件必须填写一项。</span></li>
					<li><span class="span_1">联系电话：</span><span class="span_2"><input type="text" class="textInt" size="30" name="phone" id="phone" value="{$member[phone]}"/></span></li>
					<li><span class="span_1">传真：</span><span class="span_2"><input type="text" class="textInt" size="30" name="fax" id="fax" value="{$member[fax]}"/></span></li>
					<li><span class="span_1">邮件：</span><span class="span_2"><input type="text" class="textInt" size="30" name="email" id="email" value="{$member[email]}"/></span></li>
					<li><span class="span_1">地址：</span><span class="span_2"><input type="text" class="textInt" size="60" name="address" /></span></li>

					{if $CFG[map]}
					<script type="text/javascript" src="js/msgbox/msgbox.js"></script>
					<link href="js/msgbox/msgbox.css" type="text/css" rel="stylesheet" />
					<li><span class="span_1">地图：</span><span class="span_2"><input id='mappoint'class="textInt"  name='mappoint' type=text value="{$member[mappoint]}" size="30" /> <input name="markmap" type="button" value="标注地图" class="gray" onclick="Yubox.win('do.php?act=small_map&mark=1&width=500&height=250&p={$CFG[map]}',500,340,'标注地图',null,null,null,true);"></span></li>
					{/if}
					<li><span class="span_1">&nbsp;</span><span class="span_2">
					<input type="image" src="mhkskin/images/fabu2_03.png" />
					<input id="keyword" type="hidden" name="keyword" />
					<input type="hidden" name="catid" value="{$catid}" />
					<input type="hidden" name="act" value="postok" /></span></li>
				</ul>
		  </div>		
		</div>
	</div>
	<!-- 主体 结束 -->
	</form>
	<!--{template footer}-->
</div>
<script type="text/javascript">
$.validator("comname")
.setTipSpanId("tip_span_comname")
.setFocusMsg("4～18个字，不能填写电话、特殊符号")
.setRequired("请填写企业名称")
.setServerCharset("UTF-8")
.setStrlenType("symbol")
.setMinLength(4, "企业名称不足4个字")
.setMaxLength(18, "企业名称字数多于18个字");

$.validator("areaid")
.setTipSpanId("tip_span_areaid")
.setFocusMsg("请选择地区")
.setRequired("请选择地区")
.setServerCharset("UTF-8")
.setStrlenType("symbol");

$.validator("phone")
//.setRequired("请正确填写电话")
.setTipSpanId("tip_span_phone")
.setFocusMsg("请正确填写电话，分机用“-”分开")
.setRegexp(/^1[3458]\d{9}$|^(0\d{2,4}-)?[2-9]\d{6,7}(-\d{2,5})?$|^[48]00(-?\d){7,10}$/, "电话格式错误，如87654321-001或400-1234-5678或138********", false)
;

$.validator("qq")
.setTipSpanId("tip_span_qq");

$.validator("email")
.setRegexp(/^\w+((-|\.)\w+)*@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/, "电子邮箱格式错误，如myname@example.com", false)
.setServerCharset("UTF-8")
.setStrlenType("symbol");

$('form').submit(function(){
	if($('#phone').val()=='' && $('#qq').val()=='' && $('#email').val()=='') {
		$('#links').html("<font color=red>QQ、电话和邮件必须填写一项。</font>");
		$('#qq').focus();
		return false;
	}
});
</script>
</body>
</html>
