<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/md5.asp"-->
<!-- #include file="inc/chkinput.asp" -->
<%
Dim username
Dim password
Dim repassword
Dim answer, stats
Dim Rs, SQL
stats = "取回密码"
If request("username") = "" Or request("pass") = "" Or request("repass") = "" Or request("answer") = "" Then
	Response.Write"<script>alert('非法参数！');history.go(-1)</script>"
Else
	username = DownsysClass.checkStr(request("username"))
	password = DownsysClass.checkStr(request("pass"))
	repassword = md5(Trim(Request("repass")))
	answer = md5(Trim(Request("answer")))
	sql = "select password from [NC_user] where username='"&username&"' and password='"&password&"' and answer='"&answer&"'"
	Set rs = server.CreateObject("adodb.recordset")
	rs.Open sql, conn, 1, 3
	If rs.EOF And rs.bof Then
		Response.Write"<script>alert('您返回的用户资料不正确，非法操作！');history.go(-1)</script>"
	Else
		rs("password") = repassword
		rs.update
		Response.Write"<script>alert('您的密码成功激活，请登陆!');location.replace('"& DownsysClass.SetupDir & DownsysClass.Setting(6) &"')</script>"
	End If
	rs.Close
	Set rs = Nothing
End If
CloseConn
%>
