<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/md5.asp"-->
<%
If DateDiff("s",Request.Cookies("hx66")("vtime"),Now())<60 Then 
       URL=Request.ServerVariables("Http_REFERER") 
       Response.Write("<meta http-equiv=""refresh"" content=""2;URL="&URL&""">") 
       Response.Write("对不起,本系统采用了防刷新机制,2秒后返回...") 
       Response.End
End IF 
Response.Cookies("hx66")("vtime")=Now()
HaveSubmit=request.Form("HaveSubmit")
if HaveSubmit<>"ok" then 
  Response.Write ("<SCRIPT LANGUAGE=javascript>alert('请不要非法访问!!系统将返回!');window.location='http://www.eove.cn/';</SCRIPT>")
  response.end 
end if
HX_AccountName=checkspace(trim(Request.Form("HX_AccountName"))) 
HX_Question=trim(Request.Form("HX_Question"))  
HX_Answer=trim(Request.Form("HX_Answer")) 
sqlFindUser = "SELECT * FROM [User] WHERE UserName='"&HX_AccountName&"'"
set rs = conn.Execute(sqlFindUser)
if not rs.eof then 
   if HX_Question<>rs("Question") OR md5(HX_Answer)<>rs("Answer") then 	
 	Response.Write ("<SCRIPT LANGUAGE=javascript>alert('输入的密码提示问题或答案不对!系统将返回!');window.history.back();</SCRIPT>")
	response.end
   else
        NewPassword=Password_GenPass(6,"")
        if NewPassword<>"" then 
           conn.EXECUTE "update [User] set [Password]='"&md5(NewPassword)&"' where UserID="&clng(rs("UserID"))
        end if
start="找回密码成功"
call head()
call menu()
        response.Write("<table width=760 border=0 align=center cellpadding=1 cellspacing=1 class=table-hx66s bgcolor=#FFFFFF><tr bgcolor=#FFFFFF align=center><td height=34> <span><b>找回密码成功</b></span></td> </tr> <tr> <td height=34 align=center>&nbsp;<br>恭喜您!［<font color=red>"&request("HX_AccountName")&"</font>］, 您的密码已经重新设置为［<font color=red>"&NewPassword&"</font>］,请牢记!<br><br>密码为［］内红色部分,区分大小写!<br><br>请立即用此密码<a href='index.asp'><font color=red><b>〖 登陆 〗</b></font></a>后修改您的密码!</font><br><br></td></tr></table>")
   end if
else 
Response.Write ("<SCRIPT LANGUAGE=javascript>alert('系统不存在此用户!系统将返回!');window.history.back();</SCRIPT>")
response.end
end if 		
rs.close
call footer()
%>

