<!--#include file="0.asp"-->
<!--#include file="../../mycartconn/md5.asp" -->
<!--#include file="../../mycartconn/conn.asp" -->
<%
if request("abc")="pass" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from admin where adminname='"&replace(session("www.coodou.com"),"'","")&"' and adminpass='"&md5(request("password"))&"'"
rs.open sql,conn,1,3
if rs.eof then
Response.Write("<script>alert(""密码错误，不能修改。请确认您的原密码！"");history.back();</script>")
else
rs("adminpass")=md5(request("pass"))
rs.update
rs.close
set rs=nothing
Response.Write("<script>alert(""密码修改成功，请以后用您的新密码登陆"");location.href=""pass.asp"";</script>")
end if
end if
conn.close
set conn=nothing
%> 
      <script language="javascript">
	function checksignup() {
		if ( document.ff.password.value == '' ) {
			window.alert('请输入您的原密码!!');
			document.ff.password.focus();
			return false;
		}
		if ( document.ff.pass.value == '' ) {
			window.alert('请输入您的新密码!!');
			document.ff.pass.focus();
			return false;
		}
		if ( document.ff.pass2.value == '' ) {
			window.alert('请确认新密码!!');
			document.ff.pass2.focus();
			return false;
		}
		if ( document.ff.pass.value!=document.ff.pass2.value) {
			window.alert('新密码与确认码不一致!!');
			document.ff.pass.focus();
			return false;
		}
			return true;
			}
</script>
<link href="../../mycartconn/admin.css" rel="stylesheet" type="text/css">
 
      <p>&nbsp;</p><table width="300" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <form name="ff" method="post" action=?abc=pass&x=yes>
          <tr bgcolor="#f1f1f1"> 
            <td colspan="2" class="d13"><font color="#FF6600">&nbsp;-&gt;&gt; 
              密码修改</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="30%" class="d13" align="center">管理帐号</td>
            <td width="70%" class="d13"><font color="#FF3333"><%=session("www.coodou.com")%></font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="30%" class="d13" align="center">原密码</td>
            <td width="70%" class="d13"> <input name="password" type="password" class="wenbenkuang" id="password" maxlength=20> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="30%" class="d13" align="center">新密码</td>
            <td width="70%" class="d13"> <input name="pass" type="password" class="wenbenkuang" id="pass" maxlength="20"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="30%" class="d13" align="center">新密码确认</td>
            <td width="70%" class="d13"> <input name="pass2" type="password" class="wenbenkuang" id="pass2" maxlength="20"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="center" class="d13">&nbsp; </td>
            <td class="d13"> <input name="Submit22" type="submit" class="go-wenbenkuang" value="修改" onClick="javascript:return checksignup()"> 
              <input name="Submit22" type="reset" class="go-wenbenkuang" value="重写"> 
            </td>
          </tr>
        </form>
      </table>