<% data_path="../../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
 <!--#include file="../checkrole.asp"-->
 <%
   call checkuser("xm")

	if issession=0 then
	id=Replace_Text(request.Cookies("Yxmemberid"))
	else
	id=session("id")
	end if

  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
 
if Not ChkPost then 
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
end if
 
 
oldpass=Replace_Text(request.form("oldpass"))
pass=Replace_Text(request.form("pass"))
question=Replace_Text(request.form("question"))
answer=Replace_Text(request.form("answer"))

 
sql="select id from Websen_corporation where flag=1 and id="&id&" and pass='"&oldpass&"'" 
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof then
response.write"<SCRIPT language=JavaScript>alert('您填写的旧密码不正确，请返回重新填写！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
end if

set rs=server.CreateObject ("adodb.recordset")
sql="select * from Websen_corporation where flag=1 and  id="&id&""
rs.open sql,conn,1,3
rs("pass")=pass
rs("question")=question
rs("answer")=answer
rs.update
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='3;url=modify_pass.asp'>
</head>

<%
Content="<center>恭喜您，您的密码已经修改成功!<br><br><input name='' type='button' value='返回' onclick='javascript:history.go(-1)'></center>"

Call Operation(Content,1)%>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>