<!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=utf-8" />
<title>{$seo['title']}</title>
<meta name="Keywords" content="{$seo['keywords']}">
<meta name="Description" content="{$seo['description']}">
<link href="templates/{$CFG[tplname]}/style/reg.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>
<body>
<!--{template header}-->
<div class="clearfix h_15"></div>
<div class="wrapper">
	<!-- 主体 -->

    <form name="reg" method="post" action="member.php" >
    <div class="reg_left">
		<ul>
          <li><h3>用户名</h3><input class="inputs" type="text" id="username" name="username" /><span id=c_username></span></li>
          <li><h3>密码</h3><input class="inputs" type="password" id="password" name="password" /> <span id=c_password></span></li>
          <li><h3>确认密码</h3><input class="inputs" type="password" id="repassword" name="repassword" /><span id=c_repassword></span></li>
          <li><h3>验证码</h3><input type="text" name="answer" id="answer" style="width:80px;" class="inputs"/><img title="点击刷新" src="plus_math.php" onclick="this.src='plus_math.php?'+Math.random();" align="absmiddle" height="30px" style="margin:-4px 0 0 4px;border-radius:5px;" /> 不清楚?点图片刷新<span id=tip_answer></span></li>
          <li><h3>&nbsp;</h3>
           <input type="hidden" name="act" value="act_register">
           <input type="hidden" name="submit" value="1">
           <input type="submit" name="submit" class="btn_1 fontyh fb" value="同意以下协议并注册">
          </li>
          <li style="line-height:10px;"><h3>&nbsp;</h3>《<a href="about.php?id=5" target="_blank">{$CFG['webname']}用户协议</a>》</li>
        </ul>
	</div>
	</form>
    <div class="reg_right">
      <h3>已有{$CFG['webname']}帐号？</h3>
      <div class="clearfix h_15"></div>
      <p><a href="member.php?act=login" class="btn_1 fontyh fb">会员登录</a></p>
    </div>
	<!-- 主体 结束 -->
    </div>
<!--{template footer}-->

 <script type="text/javascript">
$.validator("username")
.setFocusMsg("4-16个字符(一个汉字两个字符)")
.setRequired("请填写用户名")
.setServerCharset("GBK")
.setStrlenType("byte")
.setMinLength(4, "4-16个字符(一个汉字两个字符)")
.setMaxLength(16, "4-16个字符(一个汉字两个字符)")
.setAjax("member.php?act=ajax&type=username", "用户名已被注册")
.setCallback(function(str){ return /^[\w|\u4E00-\u9FA5|-]*$/.test(str); }, "仅可使用汉字、字母、数字、中线、下划线")
.setCallback(function(str){ return ! /^\d{11}$/.test(str); }, "用户名不能是11位数字，请另换一个");

$.validator("password")
.setFocusMsg("6至12个字符(字母区分大小写)")
.setRequired("请填写密码")
//.setRegexp(/^\w+$/, "密码只能由数字、字母和下划线组成", false)
.setServerCharset("gbk")
.setStrlenType("symbol")
.setMinLength(6, "密码太短，最少为6位")
.setMaxLength(12, "密码不应超过12个字符")
.setCallback(is_complex_password, "您的密码太过简单，请更换更复杂的密码")
.setCompareField("!=", "username", "密码不能和用户名相同");

$.validator("repassword")
.setFocusMsg("请输入一致密码")
.setRequired("请再输入一遍密码")
//.setRegexp(/^\w+$/, "密码只能由数字、字母和下划线组成", false)
.setServerCharset("gbk")
.setStrlenType("symbol")
.setMinLength(6, "密码太短，最少为6位")
.setMaxLength(12, "密码不应超过12个字符")
.setCompareField("==", "password", "两次输入的密码不一致");

$.validator("answer")
.setRequired("请填写问题验证")
.setTipSpanId("tip_answer")
.setAjax("do.php?act=postver","回答错误");
</script>
</body>
</html>
