<!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=gb2312" />
<title>新会员注册</title>
<link href="/skin/{anxinMall:global.cfg_siteskin}/template/web/style_reg2/css/base.css" rel="stylesheet" />
<link href="/skin/{anxinMall:global.cfg_siteskin}/template/web/style_reg2/css/load.css" rel="stylesheet" />
<script src="/skin/{anxinMall:global.cfg_siteskin}/template/web/style_reg2/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<style>.w300{width:300px;} .w950{width:950px;}</style>
<script type="text/javascript" src="/file/js/config.js"></script>
<script type="text/javascript" src="/file/js/jquery.js"></script>
<script type="text/javascript" src="/file/js/jquery.thickbox.js"></script>
<script type="text/javascript" src="/file/js/jquery.validate.js"></script>
<script type="text/javascript" src="/skin{anxinMall:global.cfg_siteskin}js/common.js"></script>
<script type="text/javascript"> 
$(document).ready(function() {

$('#query_type').change(function()
{/*直接使用jqurey进行绑定性触发*/
	var query_type = $('#query_type').val();
	//alert(query_type);
	//ajax传值
	$.ajax({
	type: "GET",
	url: "getcity.ajax.asp",
	data: {'query_type':query_type},
	success:function(msg){
	//alert( "Data Saved: " + msg );
	$('#currentShi').empty();
	$('#query_object2').empty();//2015-04-16改变省时,区县级清空
	$('#currentShi').append(msg);
	//alert(msg);
}
});
});//下拉列表改变绑定结束

$('#currentShi').change(function()
{/*直接使用jqurey进行绑定性触发*/
	var query_type2 = $('#currentShi').val();
	//alert(query_type2);
	//ajax传值
	$.ajax({
	type: "GET",
	url: "getxian.ajax.asp",
	data: {'currentShi':query_type2},
	success:function(msg){
	//alert( "Data Saved: " + msg );
	$('#query_object2').empty();

	$('#query_object2').append(msg);
	//alert(msg);
}
});
});//下拉列表改变绑定结束

var v = jQuery("#register_form").validate({
submitHandler: function(form) {
	form.submit()
},
rules: {
username: {
	required: true,
	rangelength:[{anxinMall:global.cfg_member_username_min},{anxinMall:global.cfg_member_username_max}],
	remote:"register.asp?action=checkusername"
},
password: {
	required: true,
	rangelength:[{anxinMall:global.cfg_member_password_min},{anxinMall:global.cfg_member_password_max}]
},
password2: {
	required: true,
	rangelength:[{anxinMall:global.cfg_member_password_min},{anxinMall:global.cfg_member_password_max}],
	equalTo: "#password"
},
email: {
	required: true,
	email: true
},
checkcode: {
	required: true,
	remote:"../include/anxinMall.checkcode.asp?action=ajaxcheck"
},
usertel: {
	required: true
},
agreelicense: "required"
},
messages: {
	username: {
		required: "<font color=red>* 请输入用户名</font>",
		rangelength: "<font color=red>*帐号长度不符合要求</font>",
		remote: "<font color=red>*帐号已经被占用</font>",
	},
	password: {
		required: "<font color=red>* 请输入密码</font>",
		rangelength: "<font color=red>*密码输入错误</font>"
	},
	password2: {
		required: "<font color=red>* 请再次输入密码</font>",
		rangelength: "<font color=red>* 密码重复输入错误</font>",
		equalTo: "<font color=red>* 2次输入不一致</font>"
	},
	email: "<font color=red>* 请输入有效的email地址</font>",
	checkcode: {
		required: "<font color=red>* 请输入验证码</font>",
		remote: "<font color=red>* 验证码输入错误</font>"
	},
	usertel: {
		required: "<font color=red>* 请填写手机号</font>"
	},
	agreelicense: "必须同意服务条款"
},
errorPlacement:function(error,element){error.appendTo(element.parent("div").next("div"));
}
});
});



function get(obj) {//2015-08-21增加手机短信功能
    var partten = /^\d{10,13}$/;
    if (!partten.test(document.getElementById("usertel").value)) {
        alert('请输入正确的手机号码');
        return;
    }
  obj.disabled = true;

  $.ajax({
      url: "sms.asp",
      type: "Post",
      data: "Tel=" + $("#usertel").val(),
      success: function(msg) {
          obj.disabled = false;//按钮变灰
	  switch(msg)
	{
	case "1":
	  alert("验证码已经发送")
	  break;
	case "-5":
	  alert("请后台绑定短信平台!")//
	  break;
	case "-22error-22":
	  alert("发送失败,请绑定短信平台,并充值!")//正式运行可去掉
	  break;
	case "-1error-1":
	  alert("发送失败,请绑定短信平台,并充值!")//正式运行可去掉
	  break;
	default:
	 ////alert("具体返回的值是参数值 "+msg)
	alert("发送成功！")
	//alert("免费版不支持手机短信,请管理员关闭发短信验证！\n或联系安信科技官方[400-018-0198],接入短信平台!")
	}
	  //alert(msg);//用来调试，返回1代表成功
   }
  })
  settime(Button1);  
}
</script>

<script type = "text/javascript">
var countdown = 90;
function settime(val) {
    if (countdown == 0) {
        val.removeAttribute("disabled");
        val.value = "发送验证码";
        countdown = 90;
    } else {
        val.setAttribute("disabled", true);
        val.value = "重新发送(" + countdown + ")";
        countdown--;



    }
	if (countdown == 90) {
		return;
	}
    setTimeout(function() {
        settime(val)
    },
    1000)

}
</script> 

</head>

<body>
<!--<div class="bg_ed h12 block" style="width:500px; height:12px;"></div>-->
<div class="m p w980 clearfix mt35">
    <div class="fl w290 h40"><a href="/"><img src="{anxinMall:global.cfg_sitelogo}" width="300" height="70" /></a></div>
    <div class="fr w500 h40 "><img src="/skin/{anxinMall:global.cfg_siteskin}/template/web/style_reg2/images/400.jpg" width="500" height="40" border="0"/></div>
</div>
<div class="m p w980 clearfix mt35">
    <div class="fl w290 bg_load_l_01"></div>
    <div class="fl w690">
	<div class="fl w180 pr">
	    <div class="w180 pa mt35 ld_menu cur">
		<ul>
		    <li class="lh42 pl30 "><a href="/user/login.asp">会员登录</a></li>
		    <li class="lh42 pl30 selected"><a href="/user/register.asp"><font class="ffff">新会员注册</font></a></li>
		</ul>
	    </div>
	</div>
	<div class="fr w515">
	    <div class="fl bg_load_t"></div>
	    <div class="fl bg_load_bg">
<form id="register_form" name="register_form" method="post" action="?action=save&fromurl={anxinMall:global.server.URLEncode(fromurl)}">

<div class="fl pt5 pl90 fb f14">手 机 号：<input type="text" name="username" id="usertel" class="w200 bd_eb h25 f7a fn f12" value="" onkeyup="if(value.match(/^\d{20}$/))value="/value.replace(value,parseInt(value/10))";value="/value.replace(/\.\d*\./g,'."')" onKeyPress="if((event.keyCode<48 || event.keyCode>57) && event.keyCode!=46 && event.keyCode!=45 || value.match(/^\d{20}$/) || /\.\d{20}$/.test(value)) {event.returnValue=false}"/>&nbsp;

{if:{anxinMall:global.cfg_sendSmSTouser_zhuceYanzheng}=1}
<input id="Button1" type="button" value="发送验证码" onClick="get(this)" style="{anxinMall:field.showsendsms}padding:3px 5px 3px 5px;font-size: 14px;height:28px;background-color: #ece9d8;border-width: 1;"/>
{end if}
</div>

<div class="fl pl150 lh20 mt5 fcb cl"><em>用户使用手机帐号登录</em><em></em></div>


<div class="fl pt10 pl90 fb f14 cl" style="width:500px;">密　　码：<input type="password" name="password" id="password" class="w200 bd_eb h25 f7a fn f12" value=""/></div>

<div class="fl pl150 lh20 mt5 fcb cl"><em>密码由{anxinMall:global.cfg_member_password_min}-{anxinMall:global.cfg_member_password_max}位任意字符组成</em><em></em></div>

<div class="fl pt5 pl90 fb f14" style="width:500px;">重复密码：<input type="password" name="password2" id="password2" class="w200 bd_eb h25 f7a fn f12" value=""/></div>
<div class="fl pl150 lh20 mt5 fcb cl"><em>请重复输入确认密码</em><em></em></div>


<div class="fl pt5 pl90 fb mt10 f14">验证码：<input type="text" value="" class="w80 bd_eb h25 f7a fn f12" name="checkcode" id="checkcode"/>
{if:{anxinMall:global.cfg_sendSmSTouser_zhuceYanzheng}=0}
<span id="xcd"><img src="../include/anxinMall.checkcode.asp" onclick="this.src='../include/anxinMall.checkcode.asp?rnd='+Math.random();" style="width:90px;height:40px;" alt="点击刷新验证码" class="checkcode" /><em></em><em></em></span>
<span id="xcd"><font color=#cbcbcb>请输入验证码!</font><em></em><em></em></span>
{else}
<span id="xcd"><font color=#cbcbcb>请输入手机验证码!</font><em></em><em></em></span>
{end if}
</div>


<div class="fl pl150 lh20 w200 mt20"><input class="bg_sub_02 no_border cur" value="" type="submit"/> </div>
<div class="fl pl150 lh20 mt10 mb20  cl w300 mb5">有任何问题请点击 <a href="javascript:voide(0)" class="fred">帮助中心</a></div>
</form>
	    </div>
	    <div class="fl bg_load_b"></div>
	</div>
    </div>
</div>
<div class="" style="margin-top:20px;"></div>
<div class="m p clearfix bg_ed h95">
    <div class="w980 m p tc">
	<p class=" pt20">
<a target="_blank" href="/index.asp?" class="current">网站首页</a>&nbsp;|&nbsp;
<a target="_blank" href="/index.asp?a=news">新闻资讯</a>&nbsp;|&nbsp;
<a target="_blank" href="/index.asp?a=brand">品牌大全</a>&nbsp;|&nbsp;
<a target="_blank" href="/index.asp?a=plist">商品展示</a>&nbsp;|&nbsp;
<a target="_blank" href="/index.asp?a=gbw">咨询反馈</a>&nbsp;|&nbsp;
<a target="_blank" href="/user/user/index.asp">用户中心</a>&nbsp;|&nbsp;
<a target="_blank" href="/file/help/10.html">关于我们</a>
	</p>
	<p class="mt13 pb25">
	    {anxinMall:global.cfg_copycode}
	    <a href="http://www.miibeian.gov.cn/" target="_blank">{anxinMall:global.cfg_icp}</a>
	    <div style="display:none;">{anxinMall:global.cfg_statcode}</div>
	</p>
    </div>
</div>

</body>
</html>