<!--#include file="../main.asp" -->
<!--#include file="../IsLogin.asp" -->
<!--#include file="../Include/md5.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>管理中心-这里是所有管理的入口</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/global.css" type=text/css rel=stylesheet><LINK 
href="images/main.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.218" name=GENERATOR></HEAD>
<BODY id=main background="../images/bj.gif">
<%
  Dim mOldPassword,mOldPassword2,mNewPassword
  Dim mUserName,mUserID
  Dim rs,mSql
  mUserID = Request.Cookies("aspxnet")("CurUserID")
  mUserName = Request.Cookies("aspxnet")("CurUserName")

  if Request.ServerVariables("REQUEST_METHOD")="POST" then
    mOldPassword = md5(Trim(Request.Form("txtOldPassword")))
    mNewPassword = Trim(Request.Form("txtNewPassword"))
    mNewPassword2 = Trim(Request.Form("txtNewPassword2"))
	mSql="Select F_Password From T_Member Where F_ID="&mUserID&" and F_PassWord='"&mOldPassword&"'"
    Set rs=conn.Execute(mSql)
    If rs.Eof Then
      response.write "<script>alert('对不起，旧密码输入错误！');history.back();</Script>"
	  response.end
	Else
	    '密码修改成功
	  mSql="Update T_Member Set F_PassWord='"&md5(mNewPassword)&"' Where F_ID=" & mUserID
	  conn.Execute(mSql)
	  response.write "<script>alert('祝贺您,密码修改成功！');history.back();</Script>"
	End if
End if
%>
<DIV id=wrapper>
<!--#include file="top.asp"-->
<DIV class=row>
<!--#include file="left.asp"-->
<DIV class=right_side>
<DIV class=col id=bulletin>
<DIV class=col_head>
<H3><IMG height=16 alt=a hspace=3 src="images/ico_dots.gif" 
width=20 align=left vspace=3>修改密码</H3>
</DIV>
<DIV class=col_body>
<form name="form1" method="post" action="?">
  <TABLE  width="577" border=1 cellPadding=1 cellSpacing=0 bordercolor="#CCCCCC" id=AutoNumber58>
    <TBODY>
      <TR>
        <TD height=30 colspan="2"><B><SPAN 
                  style="FONT-SIZE: 14px">个人帐号(
          <% = mUserName %>
          )</SPAN></B></TD>
      </TR>
      <TR>
        <TD width="23%" align="center">旧 密 码:</TD>
        <TD width="77%" vAlign=top><input name="txtOldPassword" type="password" size="33" maxlength="16">
          *</TD>
      </TR>
      <TR>
        <TD align="center" bgcolor="fcfcfc">新 密 码:</TD>
        <TD vAlign=top><input name="txtNewPassword" type="password" size="33" maxlength="16">
          *</TD>
      </TR>
      <TR>
        <TD align="center" bgcolor="fcfcfc">确认密码:</TD>
        <TD vAlign=top><input name="txtNewPassword2" type="password" size="33" maxlength="16">
          *</TD>
      </TR>
      <TR>
        <TD vAlign=top>　</TD>
        <TD vAlign=top><input type="submit" name="Submit2" value=" 确 定 ">
            <input type="reset" name="Submit2" value=" 取 消 ">
        </TD>
      </TR>
    </TBODY>
  </TABLE>
</form>
<%
   CloseDatabase()
%>
</DIV>
</DIV>
</DIV>
</DIV>
<!--#include file="bottom.asp"-->

</DIV></BODY></HTML>
