<?php
require("../e/class/connect.php");
require("../e/class/db_sql.php");
require("../e/class/q_functions.php");
require("../e/member/class/user.php");
require("../e/member/class/member_actfun.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
eCheckCloseMods('member');//关闭模块
if(!$public_r['opengetpass'])
{
	printerror2('为开启密码找回功能');
}
$r=CheckGetPassword($_GET,1);
$username=$r['username'];
?>
<!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="setfrom" action="/e/member/doaction.php" method="post">
      <input name="enews" type="hidden" id="enews" value="DoGetPassword">      
              <input name="id" type="hidden" id="id" value="<?=$r[id]?>">
        <input name="tt" type="hidden" id="tt" value="<?=$r[tt]?>">
        <input name="cc" type="hidden" id="cc" value="<?=$r[cc]?>">
        <div class="ui-form" id="sign-primary">
          <div class="ui-form-item fn-clear">
            <label for="email" class="ui-label w130">新密码：</label>
            <input type="text" id="newpassword" name="newpassword" class="ui-input w220" value="" />
            <p class="ui-message" id="newpasswordTip">请输入需要设置的新密码</p>
          </div>
          <div class="ui-form-item fn-clear">
            <label for="username" class="ui-label w130">重复新密码：</label>
            <input type="text" id="renewpassword" name="renewpassword" class="ui-input w220" value="" />
            <p class="ui-message" id="renewpasswordTip">请再次输入设置的新密码</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:"setform",
		debug:false,
		submitOnce:false,
		onSuccess:function(){
	$("#setform").submit();	
		},
		onError:function(msg,obj,errorlist){
			$("#errorlist").empty();
			$.map(errorlist,function(msg){
				$("#errorlist").append("<li>" + msg + "</li>")
			});
			//alert(msg);
		},
		submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
	});
	$("#newpassword").formValidator({
		onShow:"请输入密码",
		onFocus:"至少6个长度",
		onCorrect:"密码输入正确",
		onError:'密码在6-16位'
	})
	.inputValidator({
		min:6,
		empty:{
			leftEmpty:false,
			rightEmpty:false,
			emptyError:"密码两边不能有空符号"
		},onError:"密码在6-16位"
	});

	// Verifypassword
	$("#renewpassword").formValidator({
		onShow:"输再次输入密码",
		onFocus:"至少6个长度",
		onCorrect:"密码一致"
	})
	.inputValidator({
		min:6,
		empty:{
			leftEmpty:false,
			rightEmpty:false,
			emptyError:"重复密码两边不能有空符号"
		},onError:"重复密码不能为空,请确认"
	})
	.compareValidator({
		desID:"newpassword",
		operateor:"=",
		onError:"2次密码不一致,请确认"
	});
		
	</script>
</div>

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