<?php
require("../e/class/connect.php");
require("../e/class/db_sql.php");
require("../e/class/q_functions.php");
require("../e/member/class/user.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
eCheckCloseMods('member');//关闭模块
if(!$public_r['opengetpass'])
{
	printerror2('未开启密码找回功能');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?=$public_r[sitename]?> - 取回密码</title>
<link href="temp/css/base.css" type="text/css" rel="stylesheet" />
<script src="temp/css/jq171.js" type="text/javascript"></script>
<script src="temp/css/jqbase.js" type="text/javascript"></script>
<link href="temp/css/box.css" type="text/css" rel="stylesheet" />
<script src="temp/css/formValidator-4.0.1.js" type="text/javascript"></script>
<script src="temp/css/formValidatorRegex.js" type="text/javascript"></script>
<script language="javascript" src="temp/css/DateTimeMask.js" type="text/javascript"></script>
</head>
<body>
<div class="layout" id="sign-header">
  <div id="sign-logo"><a href="<?=$public_r[newsurl]?>"><img src="images/logo.png" alt="" /></a></div>
</div>
<!-- // sign-header end -->
<div class="layout" id="sign-content">
  <div class="ui-box ui-qire sign-focus" id="psw-box">
    <div class="ui-title fn-clear"><span>已有<?=$public_r[sitename]?>帐号？请<a href="login.php">直接登录<?=$public_r[sitename]?></a></span>
      <h2>取回密码</h2>
    </div>
    <div class="ui-cnt fn-clear">
      <form id="getpswform" action="/e/member/doaction.php" method="post" >
      <input name="enews" type="hidden" id="enews" value="SendPassword">
        <div class="ui-form" id="sign-primary">
          <div class="ui-form-item fn-clear">
            <label for="email" class="ui-label w130">您的<strong>Email</strong>地址：</label>
            <input type="text" id="email" name="email" class="ui-input w220" value="" />
            <p class="ui-message" id="emailTip">请输入有效的Email地址</p>
          </div>
          <div class="ui-form-item fn-clear">
            <label for="username" class="ui-label w130">您的用户名：</label>
            <input type="text" id="username" name="username" class="ui-input w220" value="" />
            <p class="ui-message" id="usernameTip">请输入您的用户名</p>
          </div>          
          <div class="ui-form-item fn-clear" id="validate-code">
            <label for="validate" class="ui-label w130">验证码：</label>
            <div class="ui-form-block w120">
              <input type="text" id="validate" name="key" maxlength="10" class="ui-input w110"  value="" />
              <p class="validate-code-btn">看不清? <a href="javascript:void()"  id="verimgbut">换一张</a></p>
            </div>
            <img src="/e/ShowKey/?v=getpassword"  id="verimg" alt="点击图片更换验证码" title="点击图片更换验证码" style="border:1px solid #E5E5E5;height:33px; width:98px; margin-right:11px;" />
            <p class="ui-message" id="validateTip">输入上图字母或数字</p>
          </div>
          <div class="ui-form-item fn-clear">
            <label class="ui-label w130">&nbsp;</label>
            <input type="submit" id="loginbt" class="ui-button w220" value="找回密码" />
          </div>
        </div>
      </form>
      <!-- // ui-form End -->
    </div>
  </div>
  <!-- // sign-box#pswbox end -->
  <script type="text/javascript">
	$.formValidator.initConfig({
		formID:"getpswform",
		debug:false,
		submitOnce:false,
		onSuccess:function(){
	$("#getpswform").submit();	
		},
		onError:function(msg,obj,errorlist){
			$("#errorlist").empty();
			$.map(errorlist,function(msg){
				$("#errorlist").append("<li>" + msg + "</li>")
			});
			//alert(msg);
		},
		submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
	});
	
	$("#username").formValidator({
		onShow:"请输入4-15位的用户名",
		onFocus:"用户名至少4个字符,最多15个字符",
		onCorrect:"该用户名可以注册"
	})
	.inputValidator({
		min:4,
		max:15,
		onError:"你输入的用户名非法,请确认"
	})
	.regexValidator({
		regExp:"myusername",
		dataType:"enum",
		onError:"用户名格式不正确"
	});	
	$("#email").formValidator({
		onShow:"请输入邮箱",
		onFocus:"邮箱至少6个字符,最多100个字符",
		onCorrect:"填写正确",
		defaultValue:""
	})
	.inputValidator({
		min:6,
		max:100,
		onError:"你输入的邮箱不正确,请确认"
	})
	.regexValidator({
		regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onError:"你输入的邮箱格式不正确"
	});
		$("#validate").formValidator({
		onShow:"输入上图字母",
		onFocus:"输入上图字母",
		onCorrect:"验证码正确"
	})
	.inputValidator({
		min:4,
		max:4,
		onError:"验证码错误"
	})
	.regexValidator({
		regExp:"^[A-Za-z0-9]+$",
		onError:"你输入的邮箱格式不正确"
	});
			$("#verimgbut,#verimg").click(function (){
		//	alert("ddddddd");
		$("#verimg").attr('src',"/e/ShowKey/?v=reg&t="+Math.random());
	});
		
	</script>
</div>

<? include_once "temp/footer.php";?>
</body>
</html>