<!-- #include file="conn.asp" -->
<!-- #include file="include.asp" -->
<%
if Request.Form("action")="mod_com_pass" then
set rs=server.createobject("adodb.recordset")
sql="select * from com_user where com_pass='"&Request.Form("com_pass")&"' and com_id="&session("com_id")
rs.open sql,conn,1,3
if rs.eof then
response.write"<SCRIPT language=JavaScript>alert('原密码错误！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("com_pass")=Request.Form("new_com_pass")
rs.update
end if
rs.Close()
Set rs = Nothing
response.write"<SCRIPT language=JavaScript>alert('恭喜您！密码修改成功！请牢记！');"
response.write"this.location.href='com_mod_pass.asp';</SCRIPT>" 
response.end
end if
%>
<html>
<head>
<title>增加报价--PCBaoJia.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<script language="JavaScript">
<!--
function  check_mod_com_pass() {
  if (mod_com_pass.com_pass.value==""){
	alert("请输入原密码!");
	mod_com_pass.com_pass.focus();
	return false;
	}
  var pwd = document.mod_com_pass.new_com_pass.value;
  if (mod_com_pass.new_com_pass.value=="") {
		alert("请填写密码！");
		mod_com_pass.new_com_pass.focus();		
		    return (false);
  }  
  if (mod_com_pass.new_com_pass.value.length < 6) {
		alert("密码最少６位！");
		mod_com_pass.new_com_pass.focus();		
		    return (false);
  }
  if (mod_com_pass.new_com_pass.value.length > 16) {
		alert("密码最多16位！");
		mod_com_pass.new_com_pass.focus();		
		    return (false);
  }
  var pwd2 = document.mod_com_pass.new_com_pass2.value;
  if (mod_com_pass.new_com_pass2.value=="") {
		alert("请再次输入密码！");
		mod_com_pass.new_com_pass2.focus();		
		    return (false);
  }  
  if (pwd != pwd2) {
    alert("两次密码输入不一致！");
    document.mod_com_pass.new_com_pass.value="";
    document.mod_com_pass.new_com_pass2.value="";
	return false;
  }

else
	document.mod_com_pass.submit();
}
// -->
</script>
<body>
<%call head(0)%>
<table width="764" border="0" cellpadding="0" cellspacing="0" background="images/bg_body.gif" align="center">
  <tr>
    <td align="center"><table width="760" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="159" align="center" valign="top" bgcolor="3E93C9"><TABLE WIDTH=157 BORDER=0 CELLPADDING=0 CELLSPACING=0>
              <TR>
                <TD COLSPAN=3> <IMG SRC="images/login_t.gif" WIDTH=157 HEIGHT=38 ALT=""></TD>
              </TR>
              <TR>
                <TD> <IMG SRC="images/login_l.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
                <TD width="139" align="center" bgcolor="#FFFFFF"><%call login%></TD>
                <TD> <IMG SRC="images/login_r.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
              </TR>
              <TR>
                <TD COLSPAN=3> <IMG SRC="images/login_b.gif" WIDTH=157 HEIGHT=8 ALT=""></TD>
              </TR>
            </TABLE>
              <br>
              <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2F75A6" bgcolor="2F75A6">
                <tr>
                  <td height="3" bgcolor="#3399CC"></td>
                </tr>
                <tr>
                  <td align="center" class="white_b_14">最新加盟经销商</td>
                </tr>
            </table></td>
          <td align="center" valign="top"><TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0>
              <TR>
                <TD> <IMG SRC="images/body_l.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
                <TD></TD>
                <TD align="right"> <IMG SRC="images/body_r.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
              </TR>
            </TABLE>
              <table width="578"  border="0" cellpadding="0" cellspacing="1" bgcolor="2F75A6">
                <tr>
                  <td bgcolor="FFFFFF"><table width="100%" height="235"  border="0" cellpadding="10" cellspacing="0">
                      <tr>
                        <td height="4" bgcolor="ADECF9"></td>
                      </tr>
                      <tr>
                        <td height="408" align="center" valign="top">
                            <TABLE width="100%" border=1 align=center cellPadding=5 cellSpacing=5 borderColorLight=#cccccc borderColorDark=white bgcolor="#EFFCFE">
                                 <form name="mod_com_pass" method="post" action="">
								 <tr align="center" bgcolor="ADECF9">
                                  <td colspan="2" class="title">修改密码</td>
                                </tr><tr bgcolor="#FFFFFF">
                                  <td width="27%" align="right">原密码：</td>
                                  <td width="73%">
                                  <input name="com_pass" type="password" class="input1" size="30" maxlength="16">                                  </td>
                                </tr>
                                <tr bgcolor="#FFFFFF">
                                  <td align="right">新密码：</td>
                                  <td>
                                    <input name="new_com_pass" type="password" class="input1" value="" size="30" maxlength="16">          </td>
                                </tr>
								<tr bgcolor="#FFFFFF">
                                  <td align="right">确认新密码：</td>
                                  <td>
                                    <input name="new_com_pass2" type="password" class="input1" value="" size="30" maxlength="16">          </td>
                                </tr>
                                <tr align="center" bgcolor="ADECF9">
                                  <td colspan="2">
								  <input type="button" name="yes" onClick="check_mod_com_pass()" value="确定">
								  <input type="hidden" name="action" value="mod_com_pass">
                                  <input type="button" name="no" value="重写"></td>
                                </tr></form>
                            </table>                        </td>
                      </tr>
                      <tr>
                        <td height="2" bgcolor="ADECF9"></td>
                      </tr>
                  </table></td>
                </tr>
          </table>
              <table width="96%" height="5"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table>            </td>
        </tr>
    </table></td>
  </tr>
</table>
<TABLE WIDTH=764 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
    <TD> <IMG SRC="images/foot_1.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_2.gif" WIDTH=153 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_3.gif" WIDTH=3 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_4.gif" WIDTH=600 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_5.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
  </TR>
</TABLE>
<!--#include file="foot.asp"-->
</body>
</html>