<!--#include file="inc/config.asp"-->
<!--#include file="inc/md5.asp"-->
<%
act=request.QueryString("act")
if act="edit" then
if request("ucuser")="" then
		response.Write "<script >alert('提示：\n\n请填写用户名,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
if request("Issue")="" then
		response.Write "<script >alert('提示：\n\n请填写提示问题,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
if request("Answer")="" then
		response.Write "<script >alert('提示：\n\n请填写提示答案,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
if request("newpass1")="" or request("newpass2")="" then
		response.Write "<script >alert('提示：\n\n请填写新的密码,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
if request("newpass1")<>request("newpass2") then
		response.Write "<script >alert('提示：\n\n密码输入不一致,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_user where ucuser='"&request("ucuser")&"' and Answer='"&request("Issue")&"' and Issue='"&request("Issue")&"'"
	rs.open sql,conn,1,3
	if  rs.eof then
		response.Write "<script >alert('提示：\n\n原始提示问题或者答案不对,立即返回...');history.back(-1);</script>"
		response.End()	
	else
	rs("ucpass")=md5(request("newpass1"))
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n修改成功,您的密码是："&request("newpass1")&"立即登陆...');location.href='login.asp';</script>"
	response.End()	
	end if
end if	
%>
<!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><%=W_title%>,会员注册</title>
<meta name="keywords" content="<%=W_keywords%>" />
<meta name="description" content="<%=W_description%>" />
<link href="images/css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--#include file="top.asp"-->
<table width="960" height="80" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="271" align="center">
	<form name="form" action="pass_edit.asp?act=edit" method="post" target="_self">
	<table width="596" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><table width="570" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" class="reg"><strong><%=W_title%>取回密码 （带*的为必填选项）</strong></td>
            </tr>
          </table>
            <table width="580" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#FBA124"></td>
              </tr>
            </table>
            <table width="288" height="3" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
            <table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="145" height="40" align="right">用 户 名：</td>
                <td width="209">
                  <input name="ucuser" type="text" class="reginput" id="ucuser" />                </td>
                <td width="226" align="left">请输入你常用的账户</td>
              </tr>
              <tr>
                <td height="40" align="right" >提示问题：</td>
                <td><input name="Issue" type="text" class="reginput" id="Issue" /></td>
                <td align="left">您的提示问题</td>
              </tr>
              <tr>
                <td height="40" align="right">提示答案：</td>
                <td><input name="Answer" type="text" class="reginput" id="Answer" /></td>
                <td align="left">您的答案</td>
              </tr>
              <tr>
                <td height="40" align="right">新的密码：</td>
                <td><input name="newpass1" type="password" class="reginput" id="newpass1" /></td>
                <td align="left">新密码</td>
              </tr>
              <tr>
                <td height="40" align="right">确认新密码：</td>
                <td><input name="newpass2" type="password" class="reginput" id="newpass2" /></td>
                <td align="left">确认新密码</td>
              </tr>
            </table>
            
            <table width="288" height="3" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
            <table width="580" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#FBA124"></td>
              </tr>
            </table>
          <table width="580" height="70" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#FFFFFF"><table width="369" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="85"><input type="image" name="img" src="images/pass_edit.gif" style="border:0" /></td>
                      <td width="284">如果你没有填写提示问题，请联系系统管理员<span class="lv"></span> </td>
                    </tr>
                </table></td>
              </tr>
            </table>          </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
	</form>	</td>
  </tr>
</table>

<!--#include file="end.asp"-->
</body>
</html>
