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

📄 admin_changeadmininfo.asp

📁 公交管理系统查询
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<% option explicit %>
<!--#include file="admin_check.asp"-->
<!--#include file="md5.asp"-->
<%
If Request("action") = "login" Then
    Dim objXML,loadResult
    Dim userNameNode, passwordNode
    Set objXML = server.CreateObject("Msxml2.DOMDocument")
    loadResult = objXML.Load(server.MapPath("config.xml"))
    If Not loadResult Then
        Response.Write ("加载config.xml文件出错。")
        Response.end
    End If
    Set userNameNode = objXML.getElementsByTagName("用户名")
    Set passwordNode = objXML.getElementsByTagName("密码")
    If md5(Request("text1")) <> userNameNode.item(0).Text Then
        Response.Write ("<strong><font color=""#FF0000"">用户名错误</strong></font>")
    Else
        If md5(Request("text2")) <> passwordNode.item(0).Text Then
            Response.Write ("<strong><font color=""#FF0000"">密码错误</strong></font>")
        Else
			userNameNode.item(0).Text=md5(request("text3"))
			passwordNode.item(0).Text=md5(request("text4"))
			objXML.save(server.MapPath("config.xml"))
			Response.Write ("<strong><font color=""#FF0000"">密码修改成功</strong></font>")
			response.End()
        End If
    End If
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改管理员登陆信息</title>
<style type="text/css">
body,tr,td {
	text-align: center;
	font-family: 宋体;
	font-size: 13px
}
</style>
<script language="JavaScript">
function checkInput(){
	var f1=document.form1
	if (f1.text1.value==""){
		alert("请输入用户名");
		f1.text1.focus();
		return false;
	}else if(f1.text2.value==""){
		alert("请输入密码")
		f1.text2.focus();
		return false;
	}else if (f1.text3.value==""){
		alert("请输入新用户名");
		f1.text3.focus();
		return false;
	}else if (f1.text4.value==""){
		alert("请输入新密码");
		f1.text4.focus();
		return false;
	}else if (f1.text5.value==""){
		alert("请输入确认新密码");
		f1.text5.focus();
		return false;
	}else if (f1.text4.value != f1.text5.value){
		alert("两次输入的新密码不一致");
		f1.text4.value="";
		f1.text5.value="";
		f1.text4.focus();
		return false;
	}else{
		return true;
	}
}
</script>
</head>

<body bgcolor="#E8F3FF" leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" bgcolor="#003399" cellpadding="3" cellspacing="1" align="center">
  <tr> 
    <td height="20" background="images/topbg.gif"></td>
  </tr>
  <tr bgcolor="#7DA4EC"> 
    <td height="20"><font color="#FFFFFF"><strong>修改管理员资料 ━━ 安徽省淮南市公交车查询系统</strong></font></td>
  </tr>
  <tr bgcolor="#E8F3FF"> 
    <td> <form action="admin_changeAdminInfo.asp" method="post" name="form1" onSubmit="return checkInput();" target="_self">
        <input type="hidden" name="action" value="login">
        <table width="300" border="0" bgcolor="#003399" cellpadding="3" cellspacing="1" align="center">
          <tr bgcolor="#7DA4EC"> 
            <td colspan="2"><div align="center"><strong><font color="#FFFFFF"><strong>修改管理员资料</strong></font></strong></div></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td width="84"><strong>原用户名</strong></td>
            <td width="201"><input type="text" name="text1" style="width:150px"></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td><strong>原密码</strong></td>
            <td><input type="password" name="text2" style="width:150px"></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td><strong><font color="#FF0000">新用户名</font></strong></td>
            <td><input type="text" name="text3" style="width:150px"></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td><strong><font color="#FF0000">新密码</font></strong></td>
            <td><input type="password" name="text4" style="width:150px"></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td><strong><font color="#FF0000">确认新密码</font></strong></td>
            <td><input type="password" name="text5" style="width:150px"></td>
          </tr>
          <tr bgcolor="#E8F3FF"> 
            <td colspan="2"><div align="center"></div>
              <div align="center"> 
                <input type="submit" name="Submit" value="登 录">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                <input type="reset" name="Submit2" value="重 置">
              </div></td>
          </tr>
        </table>
      </form></td>
  </tr>
  <tr> 
    <td height="20" background="images/bottombg.gif"></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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