<!--#include file="top.asp"-->
<div class="nch-breadcrumb-layout">
  </div>
<style type="text/css">
.public-top-layout, .head-app, .head-search-bar, .head-user-menu, .public-nav-layout, .nch-breadcrumb-layout, #faq {
	display: none !important;
}
.public-head-layout {
	margin: 10px auto -10px auto;
}
.wrapper {
	width: 1000px;
}
#footer {
	border-top: none!important;
	padding-top: 30px;
}
</style>
<div class="nc-login-layout">
  <div class="nc-login">
    <div class="nc-login-title">
      <h3>用户注册</h3>
    </div>
    <div class="nc-login-content">
      <form id="register_form" method="post" action="http://www.21577.com/index.php?act=login&op=usersave">
      <input type='hidden' name='formhash' value='UfqKqS7zSnBeQtiGQme1qKV_mJgqL3Y' />        <dl>
          <dt>用户名</dt>
          <dd style="min-height:54px;">
            <input type="text" id="user_name" name="user_name" class="text tip" title="3-20位字符，可由中文、英文、数字及“_”、“-”组成"/>
            <label></label>
          </dd>
        </dl>
        <dl>
          <dt>设置密码</dt>
          <dd style="min-height:54px;">
            <input type="password" id="password" name="password" class="text tip" title="6-16位字符，可由英文、数字及标点符号组成" />
            <label></label>
          </dd>
        </dl>
        <dl>
          <dt>确认密码</dt>
          <dd style="min-height:54px;">
            <input type="password" id="password_confirm" name="password_confirm" class="text tip" title="请再次输入您的密码"/>
            <label></label>
          </dd>
        </dl>
        <dl>
          <dt>邮箱</dt>
          <dd style="min-height:54px;">
            <input type="text" id="email" name="email" class="text tip" title="请输入常用的邮箱，将用来找回密码、接受订单通知等" />
            <label></label>
          </dd>
        </dl>
        <dl>
          <dt>联系电话</dt>
          <dd style="min-height:54px;">
            <input type="text" id="tel" name="tel" class="text tip" title="您的电话号码" />
            <label></label>
          </dd>
        </dl>
                <dl>
          <dt>验证码</dt>
          <dd style="min-height:54px;">
            <input type="text" id="captcha" name="captcha" class="text w50 fl tip" maxlength="4" size="10" title="请输入验证码，不区分大小写" />
            <img src="index.php?act=seccode&op=makecode&nchash=1a1178d6" title="" name="codeimage" border="0" id="codeimage" class="fl ml5"/> <a href="javascript:void(0)" class="ml5" onclick="javascript:document.getElementById('codeimage').src='index.php?act=seccode&op=makecode&nchash=1a1178d6&t=' + Math.random();">看不清，换一张</a>
            <label></label>
          </dd>
        </dl>
                <dl>
          <dt>&nbsp;</dt>
          <dd>
            <input type="button" id="Submit" value="立即注册" class="submit" title="立即注册" />
            <input name="agree" type="checkbox" class="vm ml10" id="clause" value="1" checked="checked" />
            <span for="clause" class="ml5">阅读并同意<a href="#" target="_blank" class="agreement" title="阅读并同意">服务协议</a></span>
            <label></label>
          </dd>
        </dl>
        <input type="hidden" value="http://www.21577.com/index.php?act=activity&op=index&activity_id=3" name="ref_url">
        <input name="nchash" type="hidden" value="1a1178d6" />
      </form>
      <div class="clear"></div>
    </div>
    <div class="nc-login-bottom"></div>
  </div>
  <div class="nc-login-left">
    <h3>注册之后您可以</h3>
    <ol>
      <li class="ico05"><i></i>购买商品支付订单</li>
      <li class="ico01"><i></i>申请开店销售商品</li>
      <li class="ico03"><i></i>空间好友推送分享</li>
      <li class="ico02"><i></i>收藏商品关注店铺</li>
      <li class="ico06"><i></i>商品咨询服务评价</li>
      <li class="ico04"><i></i>安全交易诚信无忧</li>
      <div class="clear"></div>
    </ol>
    <h3 class="mt20">如果您是本站用户</h3>
    <div class="nc-login-now mt10"><span class="ml20">我已经注册过帐号，立即<a href="index.php?act=login&ref_url=" title="" class="register">登录</a></span><span>或是<a class="forget" href="index.php?act=login&op=forget_password">找回密码？</a></span></div>
  </div>
</div>
<script type="text/javascript" src="/skin/waimai/template/style_waimai/js/jquery.poshytip.min.js" charset="utf-8"></script> 
<script>
//注册表单提示
$('.tip').poshytip({
	className: 'tip-yellowsimple',
	showOn: 'focus',
	alignTo: 'target',
	alignX: 'center',
	alignY: 'top',
	offsetX: 0,
	offsetY: 5,
	allowTipHover: false
});

//注册表单验证
$(function(){
    $('#Submit').click(function(){
        if($("#register_form").valid()){
        	ajaxpost('register_form', '', '', 'onerror');
        } else{
        	document.getElementById('codeimage').src='http://www.21577.com/index.php?act=seccode&op=makecode&nchash=1a1178d6&t=' + Math.random();
        }
    });
		jQuery.validator.addMethod("lettersonly", function(value, element) {
			return this.optional(element) || /^[^:%,'\*\"\s\<\>\&]+$/i.test(value);
		}, "Letters only please"); 
		jQuery.validator.addMethod("lettersmin", function(value, element) {
			return this.optional(element) || ($.trim(value.replace(/[^\u0000-\u00ff]/g,"aa")).length>=3);
		}, "Letters min please"); 
		jQuery.validator.addMethod("lettersmax", function(value, element) {
			return this.optional(element) || ($.trim(value.replace(/[^\u0000-\u00ff]/g,"aa")).length<=15);
		}, "Letters max please");
    $("#register_form").validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('dd');
            error_td.find('label').hide();
            error_td.append(error);
        },
        submitHandler:function(form){
            ajaxpost('register_form', '', '', 'onerror') 
        },
        rules : {
            user_name : {
                required : true,
                lettersmin : true,
                lettersmax : true,
                lettersonly : true,
                remote   : {
                    url :'index.php?act=login&op=check_member&column=ok',
                    type:'get',
                    data:{
                        user_name : function(){
                            return $('#user_name').val();
                        }
                    }
                }
            },
            password : {
                required : true,
                minlength: 6,
				maxlength: 20
            },
			tel : {
                required : true,
                minlength: 11,
				maxlength: 11
            },
            password_confirm : {
                required : true,
                equalTo  : '#password'
            },
            email : {
                required : true,
                email    : true,
                remote   : {
                    url : 'index.php?act=login&op=check_email',
                    type: 'get',
                    data:{
                        email : function(){
                            return $('#email').val();
                        }
                    }
                }
            },
			            captcha : {
                required : true,
                minlength: 4,
                remote   : {
                    url : 'index.php?act=seccode&op=check&nchash=1a1178d6',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#captcha').val();
                        }
                    }
                }
            },
			            agree : {
                required : true
            }
        },
        messages : {
            user_name : {
                required : '用户名不能为空',
                lettersmin : '用户名必须在3-15个字符之间',
                lettersmax : '用户名必须在3-15个字符之间',
				lettersonly: '用户名不能包含敏感字符',
				remote	 : '该用户名已经存在'
            },
            password  : {
                required : '密码不能为空',
                minlength: '密码长度应在6-20个字符之间',
				maxlength: '密码长度应在6-20个字符之间'
            },
			tel  : {
                required : '手机号码位数不对',
                minlength: '手机号码位数不对',
				maxlength: '手机号码位数不对'
            },
            password_confirm : {
                required : '请再次输入您的密码',
                equalTo  : '两次输入的密码不一致'
            },
            email : {
                required : '电子邮箱不能为空',
                email    : '这不是一个有效的电子邮箱',
				remote	 : '该电子邮箱已经存在'
            },
			            captcha : {
                required : '请输入验证码',
                minlength: '验证码不正确',
				remote	 : '验证码不正确'
            },
			            agree : {
                required : '请阅读并同意该协议'
            }
        }
    });
});
</script><div id="faq">
  <!--#include file="bottom.asp"-->
