<!--#include file="check.asp"-->
<!--#include file="webconn.asp"-->
<!--#include file="../inc/aspip.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
id=request("id")
oldpwd=server.HTMLEncode(trim(request("txt_oldpwd")))
repwd=server.HTMLEncode(trim(request("txt_newpwdt")))
newpwd=server.HTMLEncode(trim(request("txt_newpwd")))
md5pwd=md5(oldpwd)
%>
<%
if oldpwd="" or repwd=""or newpwd="" then 
response.write "<script>alert('信息提示：\n\n新旧密码均不能为空！');history.go(-1);</Script>"
elseif repwd<>newpwd then 
response.write "<script>alert('信息提示：\n\n两次密码输入不一致！');history.go(-1);</Script>"
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from system where s_pwd='"& md5pwd &"' and s_id="& id
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then 
rs("s_pwd")=md5(newpwd)
rs.update
rs.close
set rs=nothing
%>
<div align="center">修改成功
<a href="javascript:window.opener=null;window.close()">返回</a>
<%
else
response.write "<script>alert('信息提示：\n\n您的旧密码错误！');history.go(-1);</Script>"
%>
<%
end if
end if
%>
<!--#include file="copyright.asp"-->
</div>
