<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<!-- #include file="include/168soft_SqlIn.Asp" -->
<%
pw1 = trim(request("txtpassword1"))
Oldpw = trim(request("txtpassword12"))
set rs = server.CreateObject("adodb.recordset")
sql = "select ID from AdminUser where UserName = 'admin' and Password = '" & Oldpw & "' "
rs.Open sql,conn
if rs.recordcount<=0 then%>
	<script language="javascript">
		alert("系统提示：您输入旧密码不对，请检查!");
		history.back();
	</script>
<%
response.end
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="include/e1.css" type="text/css">
</HEAD>
<BODY>
-------------------------修改密码中...............<br>
<%
	Set RsUpdate = Server.CreateObject("adodb.recordset")
	sqlUpdate = " select * from AdminUser where id =1"
	RsUpdate.open sqlUpdate, conn, 1, 2
	If RsUpdate.eof or RsUpdate.bof then
	Else  
		RsUpdate("Password") = pw1  
		RsUpdate.update
	End If 
	
	RsUpdate.Close
	Set RsUpdate = Nothing
	
'set rs=server.CreateObject("adodb.recordset")
'sql = "update AdminUser set Password = '" & pw1 & "' where id =1"
'rs.Open sql,conn
%>
<script language="javascript">
	alert("密码修改成功!");
	history.back();
</script>
</BODY>
</HTML>