<%@ Language=VBScript %>
<!--#INCLUDE FILE="inc_Conn.asp" -->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Changepassword</title>
</head>

<body bgcolor="#D6D3CE">

<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="8%">　</td>
      <td width="42%">　</td>
      <td width="42%">　</td>
      <td width="8%">　</td>
    </tr>
    <tr>
      <td width="8%">　</td>
      <td width="84%" colspan="2" align="center">
      <% If Request.QueryString("active")<>"DoIt" Then %>
      <form method="POST" action="Changepassword.asp?active=DoIt">
      
      <div align="center">
        <center>
        <table border="1" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="32%">原密码：</td>
            <td width="68%"><input type="password" name="Password" size="20"></td>
          </tr>
          <tr>
            <td width="32%">新密码：</td>
            <td width="68%"><input type="password" name="NewPassword" size="20"></td>
          </tr>
          <tr>
            <td width="32%">核对密码：</td>
            <td width="68%"><input type="password" name="CheckPassword" size="20"></td>
          </tr>
          <tr>
            <td width="100%" colspan="2" align="center"><input type="submit" value=" 提交 " name="B1">　　　<input type="reset" value="全部重写" name="B2"></td>
          </tr>
        </table>
        </center>
      </div>
      
      </form>
      <% Else %>
      <%
      strPassword=Request.form("Password")
      
      strAdminID=session("AdminID")
      strNewPassword=Request.form("NewPassword")
      strCheckPassword=Request.form("CheckPassword")
      
      strSql="select * from Admin where AdminID=" & strAdminID
      set rs=MyCon.execute(strSql)
      
      If strPassword=rs("News_PassWord") and strNewPassword=StrCheckPassword Then
      strSql="Update Admin set News_PassWord=" & "'" & strNewPassword & "'" 
      strSql=strSql & "where AdminID=" & strAdminID
      MyCon.execute(strSql)
      Response.write "密码修改成功"
      Response.write "<br>" & "请用新密码重新登陆"
      Session.Abandon
      Else
      Session("count")=Session("count")+1
      Response.write "出错啦!!!"
      End If
      
      rs.close
      set rs=nothing
      %>
      <% End If %>
      </td>
      <td width="8%">　</td>
    </tr>
    <tr>
      <td width="8%">　</td>
      <td width="84%" align="center" colspan="2"><a href="Index.asp">返回管理</a></td>
      <td width="8%">　</td>
    </tr>
  </table>
  </center>
</div>
</body>

</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
<%
MyCon.close
set MyCon=nothing
%>
<% 
Else
Response.redirect "Login.asp"
End If
%>
