<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% option explicit %>
<!--#include file="cn.asp"-->
<!--#include file="session.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>乡下人仿百度留言本V1.2</title>
<meta http-equiv="Page-Enter" content="revealTrans(Duration=0.5,Transition=23)">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	color: #FFFFFF;
}
body {
	background-color: #023047;
}
-->
</style>
</head>

<BODY leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<%
cnopen
if request.QueryString("action")="modify" then
	dim pass,pass1,pass2
	pass=request.Form("pass")
	pass1=request.Form("pass1")
	pass2=request.Form("pass2")
	if pass<>"" and pass1<>"" and pass2<>"" then
		if pass1<>pass2 then
	response.Write("<br><br><br><br><table width=""80%""  border=0 cellpadding=0 cellspacing=0 align=center><tr><td width=""40%"" align=""center""></td><td  class=""wb12hui"">对不起,您输错了!<br>新密码与确认密码不一样!</td></tr></table>")
			call cnclose()
			response.end()
		end if
		set rs=cn.execute("select userpassword from [admin] where username='"&session("adminname")&"'")
		if lcase(rs(0))=lcase(pass) then
			cn.execute("update [admin] set userpassword='"&pass1&"' where username='"&session("adminname")&"'")
		%>
		<meta http-equiv="Page-Enter" content="revealTrans(Duration=0.5,Transition=23)">
        <br>
        <br>
        <br>
        <br>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgColor=#f8f8fa>
  <tr>
    <td width="40%" align="center" nowrap>&nbsp;</td>
    <td height="50" colspan="2" nowrap align="left" class=wb12hui>恭喜您！密码修改成功！<br>下次登陆请用新密码！</td>
  </tr>
</table>
		<%
		else
	response.Write("<br><br><br><br><table width=""80%""  border=0 cellpadding=0 cellspacing=0 align=center><tr><td width=""40%"" align=""center""></td><td  class=""wb12hui"">对不起,您的原始密码输入错误！<br>请重新输入!</td></tr></table>")
		end if
		call cnclose()
		response.end()
	end if
end if
%>
<form action="?action=modify" method="post" name="form1">
<br>
<br>
<br>
<br>
<TABLE width=259 border=0 align="center" 
                        cellPadding=0 cellSpacing=0 class=wb12hui>
                                
                                  <TR>
                                    <TD width=64 height="30" align=right class="wb12hui">旧密码：</TD>
                                    <TD width=195><input name="pass" type="password" class="button1" id="pass"></TD>
                                  </TR>
                                  <TR>
                                    <TD height="30" align=right>新密码：</TD>
                                    <TD><input name="pass1" type="password" class="button1" id="pwd2"></TD>
                                  </TR>
								  <TR>
                                    <TD height="30" align=right>确认密码：</TD>
                                    <TD><input name="pass2" type="password" class="button1" id="pass2"></TD>
								  </TR>
                                  <TR vAlign=bottom>
                                    <TD colSpan=2 height=40 align=center>                                      
                                      <input name=../imageButton1 type=image id=imageButton1 src="image/ok.gif" width="62" height="23" border=0>
                                      &nbsp;
<a href="javascript://"><img src="image/cancel.gif" width="62" height="23" border=0 onClick="document.form1.reset();"></a>&nbsp;&nbsp;</TD>
                                  </TR>
  </TABLE>
</form>


<%
call cnclose()%>

</body>
</html>