<!--#include file="../inchuayuwebrlzywzhyweb/CONN.ASP"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_huayuweb()^191563631.asp"-->
<!--#include file="../inchuayuwebrlzywzhyweb/md5.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="../inchuayuwebrlzywzhyweb/style.css">
<%
oa.chkadmin()
 if oa.act="mod" then 

' response.write ("select * from admin where adminid="&oa.adminid&" and adminpswd='"&md5(trim(request("oldpd")),32)&"'")
 'response.end()
 set rs=oa.execute("select * from admin where adminid="&oa.adminid&" and adminpswd='"&md5(trim(request("oldpd")),32)&"'") 
 if rs.eof or rs.bof then
 oa.erro("您输入的旧密码不正确！请重新输入！")
 end if
 rs.close
 oa.execute("update admin set adminpswd='"&md5(trim(request("newpd")),32)&"' where adminid="&oa.adminid&" and adminpswd='"&md5(trim(request("oldpd")),32)&"'")
 response.Write("<script>alert('修改成功');location.href='admin_uppswd.asp'</script>")
response.end()
end if
%>  

<form name="form1" method="post" action="admin_uppswd.asp" onSubmit="return check()">
  
    <table width="98%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" background="../img/1.gif">
      <tr>
        <td height="35" align="center" bgcolor="#6298E1" style="color:white"><div align="left"><strong>&nbsp;<img src="../img/Explain.gif" width="18" height="18" align="absmiddle" />&nbsp;管理员密码修改</strong>
          </div>
        </div></td>
      </tr>
  </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6298E1">
      <tr>
        <td bgcolor="#FFFFFF"><table width="99%"  border="0" cellpadding="3" cellspacing="0">
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td align="right">用户名：</td>
              <td><input name="username" readonly="yes"  class="wenbenkuang" id="username" value="<%=oa.adminname%>" /></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td width="29%" align="right">旧密码：</td>
              <td width="46%"><input name="oldpd" type="password" class="wenbenkuang" id="oldpd">                  </td>
              <td width="25%"><p></p></td>
            </tr>
            <tr>
              <td align="right">新密码：</td>
              <td><input name="newpd" type="password" class="wenbenkuang" id="newpd"></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td align="right">确认密码：</td>
              <td><input name="conpd" type="password" class="wenbenkuang" id="conpd"></td>
              <td><input name="action" type="hidden" id="action" value="mod"></td>
            </tr>
            <tr>
              <td></td>
              <td>
                <input type="submit" name="Submit" value="保存修改">
                <input type="reset" name="Submit" value="重  填">
                <input type="button" name="Submit" value="取  消" onClick="javascript:history.go(-1)">              </td>
              <td>&nbsp;</td>
            </tr>
        </table></td>
      </tr>
  </table>
 
</form>
<script language="JavaScript">
<!--
function check() {
if (document.form1.oldpd.value=="") {
window.alert ("请输入旧密码 ！")
document.form1.oldpd.focus()
return false
}
if (document.form1.oldpd.value.length<6) {
window.alert ("请输入6位以上旧密码 ！")
document.form1.oldpd.focus()
return false
}
if (document.form1.newpd.value=="") {
window.alert ("请输入新密码 ！")
document.form1.newpd.focus()
return false
}
if (document.form1.newpd.value.length<6) {
window.alert ("请输入6位以上新密码 ！")
document.form1.newpd.focus()
return false
}
if (document.form1.conpd.value=="") {
window.alert ("请输入确认密码 ！")
document.form1.conpd.focus()
return false
}
if (document.form1.conpd.value.length<6) {
window.alert ("请输入6位以上确认密码！")
document.form1.conpd.focus()
return false
}
if(document.form1.conpd.value!=document.form1.newpd.value) {
window.alert ("两次输入的密码不一样 ！")
document.form1.conpd.focus()
return false
}
  if ((document.form1.oldpd.value.indexOf(",")>-1)||(document.form1.newpd.value.indexOf("=")>-1)||(document.form1.oldpd.value.indexOf("=")>-1)||(document.form1.newpd.value.indexOf(".")>-1)||(document.form1.oldpd.value.indexOf(".")>-1)||(document.form1.newpd.value.indexOf(",")>-1)||(document.form1.oldpd.value.indexOf("'")>-1)||(document.form1.newpd.value.indexOf("'")>-1)||(document.form1.oldpd.value.indexOf("'")>-1)||(document.form1.newpd.value.indexOf("'")>-1)||(document.form1.newpd.value.indexOf("?")>-1)||(document.form1.oldpd.value.indexOf("?")>-1)||(document.form1.newpd.value.indexOf(";")>-1)||(document.form1.oldpd.value.indexOf(";")>-1)||(document.form1.newpd.value.indexOf("=")>-1)||(document.form1.oldpd.value.indexOf("=")>-1)||(document.form1.newpd.value.indexOf("+")>-1)||(document.form1.oldpd.value.indexOf("+")>-1)||(document.form1.newpd.value.indexOf("-")>-1)||(document.form1.oldpd.value.indexOf("-")>-1)||(document.form1.newpd.value.indexOf("&")>-1)||(document.form1.oldpd.value.indexOf("&")>-1)||(document.form1.newpd.value.indexOf("/")>-1))
  {
alert("请勿输入非法字符！")
return false;
}
return true
}
-->
</SCRIPT>
