⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_updateadmin.asp

📁 源代码竟供大家参考
💻 ASP
字号:
<!--
=========================================================
超e工作室(http://www.chaoe.com)
用专业的心,做专业的事。。。
==========================================================
本系统是超e工作室专门为黑龙江广厦学院开发的高考录取程序,没有参照任何脚本,盗用必追究其法律责任。
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
作者:徐佳
QQ:95973
邮件:jia@chaoe.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-->
<%if session("adminuser")<>"" then%>
<html>
<head>
<title>黑龙江广厦学院高考录取查询系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CCS/Style.css" rel="stylesheet" type="text/css">
</head>
<!--#include file="conn.asp"-->
<script language=javascript>
function checkform(){
  if(form1.oldpassword.value==""){
  alert("旧密码不能为空!");
   from1.oldpassword.focus();
  return false;
  }
  if(form1.newpassword.value==""){
   alert("新密码为空!");
   from1.newpassword.focus();
  return false;
  }
  document.form1.submit();
}
</script>
<body bgcolor="#F7f7f7" text="#000000" topmargin="0">
<table width="76%" border="0" cellspacing="0" cellpadding="0" height="100%" align="center" class="bian">
  <tr> 
    <td height="28" align="center">&nbsp; </td>
  </tr>
  <tr> 
    <td height="54" align="center">&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top"> <%
	action=request("action")
	select case action
	 case "add"
	 call add()
	 case else
	 call main()
	end select
	sub main()%>
      <form name="form1" method="post" action="admin_updateadmin.asp?action=add">
        <table width="389" height="247" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC" class="xuxian">
          <tr bgcolor="e1e1e1"> 
            <td height="31" colspan="2" valign="middle"><b><font color="#FF0000"> [ 
              修改管理员信息 ] </font></b></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td width="117" height="36" align="center" valign="middle"><font color="#000000">用户名:</font></td>
            <td width="265" height="36" bgcolor="#FFFFFF"><font color="#000000">   
              <input type="hidden" name="adminuser" class="rad" value="<%=session("adminuser")%>">
              <%=session("adminuser")%> </font></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td height="35" align="center" valign="middle"><font color="#000000">新用户名:</font></td>
            <td height="35" bgcolor="#FFFFFF"><font color="#000000">  
              <input name="adminusername" type="text" class="rad" id="adminusername">
              </font></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td width="117" height="35" align="center" valign="middle"><font color="#000000">旧密码:</font></td>
            <td width="265" height="35" bgcolor="#FFFFFF"><font color="#000000">   
              <input type="password" name="oldpassword" class="rad">
              </font></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td width="117" height="38" align="center" valign="middle"><font color="#000000">新密码:</font></td>
            <td width="265" height="38" bgcolor="#FFFFFF"><font color="#000000">   
              <input type="password" name="newpassword" class="rad">
              </font></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td height="35" colspan="2" align="center" valign="middle"> <font color="#000000"> 
              <input type="button" name="Submit" value="增加" class="rad" onclick="checkform()">
                 
              <input type="reset" name="Submit2" value="重设" class="rad">
              </font></td>
          </tr>
          <tr bgcolor="e1e1e1"> 
            <td height="29" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table>
      </form>
      <%end sub
	  sub add()
	  adminuser=request.form("adminuser")
	  adminusername=request.Form("adminusername")
	  oldpassword=request.form("oldpassword")
	  newpassword=request.form("newpassword")
	  sql="select * from admin where adminuser='"&adminuser&"'"
	  set rs=server.createobject("adodb.recordset")
	  rs.open sql,conn,1,3
	  if rs.eof or  rs.bof then
	 rs.close
	 closeconn
	 response.write "<script language=javascript>"
	 response.write "alert('没有这个管理员');"
	 response.write "javascript:history.go(-1);"
	 response.write "</script>"
	 elseif oldpassword<>rs("adminpassword") then
	  rs.close
	 closeconn
	 response.write "<script language=javascript>"
	 response.write "alert('旧密码不对!');"
	 response.write "javascript:history.go(-1);"
	 response.write "</script>"
	 else
	 rs.update
	 rs("adminuser")=adminusername
	 rs("adminpassword")=newpassword
	 rs.update
	 rs.close
	  %>
      <table width="390" height="72" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#e1e1e1" class="xuxian">
        <tr> 
          <td height="33" bgcolor="e1e1e1"><b> <font color="#FF0000"> [ 修改管理密码 
            ]</font></b></td>
        </tr>
        <tr>
          <td height="39" bgcolor="#FFFFFF">    <font color="#FF0000">原管理员  <%=adminuser%> 修改为:<%=adminusername%><br>
                <font color="#FF0000">原管理员密码  <%=oldpassword%> 修改为:<%=newpassword%></font> 
            </font></td>
        </tr>
      </table>
      <%end if
	  end sub%>
    </td>
  </tr>
</table>
</body>
</html><%
else
 response.write "<script language=javascript>"
 response.write "alert('管理员操作超 时..........');"
 response.write "javascript:history.go(-1)"
 response.write "</script>"
end if%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -