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

📄 admin_edit.asp

📁 使用Asp+Access+FSO+Jmail+Servu开发
💻 ASP
字号:
<%@ language="VBScript"%>
<%response.Expires = 0%>

<!--#include file="../inc/md5.asp"-->
<!--#include file="admin.asp"-->
<%chk_admin_login(3)%>
<%
if request("action")="edit" then
id=request.form("id")
sql="select * from manage_user where id="&id
rs.open sql,conn,1,3
if request.form("pwd")<>rs("password") then
rs("password")=md5(request.form("pwd"))
end if
rs("flag")=request.Form("flag")
rs.update
rs.close
response.write"<script>alert('修改成功!');location.href='admin_admin.asp'</script>"
end if
sql="select * from manage_user where id="&request("id")
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function check_input()  
{  
	if (form1.pwd.value.length < 6 ){
		alert ("对不起,密码长度至少为6位!");
		form1.pwd.focus();
		return false;
	}
	if (form1.flag.value ==0){
		alert ("请选择等级!");
		form1.flag.focus();
		return false;
	}
    return true;
}
//-->
</script>
</head>
<body>
<table width="300" border="1" align="center" cellpadding="4" cellspacing="0" class="table-line">
  <form name="form1"  action="?action=edit" method="post" onSubmit="return check_input()">
    <tr align="center">
      <td colspan="2" class="td-title-color"><table  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="shadow">管理密码修改</td>
        </tr>
      </table>      </td>
    </tr>
    <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
      <td align="right"> 用户名:</td>
      <td width="207"><%=rs("username")%></td>
    </tr>
    <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
      <td align="right"> 密 码:</td>
      <td>
        <input name="pwd" type="text" id="pwd" value="<%=rs("password")%>" size="32" maxlength="20">        </td>
    </tr>
    <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
      <td align="right">等 级: </td>
      <td><select name="flag">
        <option value="">请选择</option>
        <option value="1" <%if rs("flag")="1" then%>selected<%end if%>>输入员</option>
        <option value="2" <%if rs("flag")="2" then%>selected<%end if%>>审核员</option>
        <option value="3" <%if rs("flag")="3" then%>selected<%end if%>>管理员</option>
      </select></td>
    </tr>
    <tr align="center">
      <td colspan="2">
        <input name="id" type="hidden" value="<%=request("id")%>">
        <INPUT  type=submit value='确认修改' name=Submit2>
      </td>
    </tr>
  </form>
</table>
</body>
</html>

⌨️ 快捷键说明

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