<!--#include file="top_m.asp"-->
<!--#include file="checkuserflag.asp"-->
<script>
function checkform(){
if (document.form1.oldpassword.value.length==0){
	alert("原密码不能为空!");
	document.form1.oldpassword.focus();
	return false;
}
if(document.form1.password.value.length==0){
	alert("新密码不能为空！");
	document.form1.password.focus();
	return  false;
}
if(document.form1.password2.value.length==0){
	alert("校验密码不能为空！");
	document.form1.password2.focus();
	return  false;
}
if(document.form1.password.value!=document.form1.password2.value){
	alert("新密码与校验密码不一致！");
	document.form1.password.focus();
	return  false;
}
}
</script>
<%call CheckUserFlag("")
If Request.ServerVariables("REQUEST_METHOD")="POST" Then
	Set ObjDCW = Server.CreateObject("dc_data100_v1_0.C_A_Config")
	oldpassword=ObjDCW.RequestText(trim(request.form("oldpassword")))
	password=ObjDCW.RequestText(trim(request.form("password")))
	password2=ObjDCW.RequestText(trim(request.form("password2")))
	if password="" then
		ObjDCW.out "密码不能为空！"
	elseif password2="" then
		ObjDCW.out "校验密码不能为空！"
	elseif password2<>password then
		ObjDCW.out "密码与校验密码不一致！"
	elseif Session("DC_Manage_User")<>"" then
		aaa=ObjDCW.ChangePassword(oldpassword,password,DataPathFile)
	end if
	set ObjDCW=nothing
else
	call main()
end if

sub main() 
%>
<form action="" method="post" name="form1" onSubmit="return checkform();">
 <TABLE align="center" cellSpacing=0 cellPadding=0 width="90%" border=0>
  <TR> 
        <TD vAlign=top width="100%" height="184"> 
        <TABLE cellSpacing=1 cellPadding=5 width="100%" border=0 bgcolor="#5C99DC">
          <TR> 
            <TD colspan="6" background="images/s3wcn_bt.gif"><font color="#FF0000">修改密码 </font></TD>
          </TR>
          <TR bgcolor="#FFFFFF"> 
            <TD width="26%" align="right">用户名：</TD>
            <TD width="74%"> 
              <input name="username" type="text" value="<%=session("DC_Manage_User")%>" size="12" maxlength="20" disabled>            </TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD align="right">原密码：</TD>
            <TD>
            <input name="oldpassword" type="password" value="" size="20" maxlength="20"></TD>
          </TR>
          <TR bgcolor="#FFFFFF"> 
            <TD width="26%" align="right">新密码：</TD>
            <TD width="74%"> 
              <input name="password" type="password" value="" size="20" maxlength="20">            </TD>
          </TR>
          <TR bgcolor="#FFFFFF"> 
            <TD width="26%" align="right">校验密码：</TD>
                  
            <TD width="74%"> 
              <input name="password2" type="password" value="" size="20" maxlength="20">            </TD>
          </TR>
          <TR align="center" bgcolor="#FFFFFF"> 
            <TD colspan="2"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="29%">&nbsp;</td>
                  <td width="71%"><input type="submit" name="Submit" value=" 确 定 "></td>
                </tr>
              </table>
            </TD>
          </TR>
          </TABLE>
       </TD>
            </TR>
      </TABLE>
</form>
<%
end sub
%>