📄 admin_edit.asp
字号:
<!-- #include file="Include/Chk.asp" -->
<!-- #include file="Include/Conn.asp" -->
<!-- #include file="Include/MD5.asp" -->
<%
SQL="Select * from A_d_m_i_n where id="&Request("id")
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,1,3
if rs.eof and rs.bof then
Response.Write "<script language='javascript'>alert('参数错误!');document.location.href('Admin_Manage.asp');</script>"
Response.End()
end if
if Request("Action")=1 then
if Trim(Request("pass"))="" then
Response.write "<script language='javascript'>alert('信息填写不完整!');history.go(-1);</script>"
Response.End()
end if
SQL="Select * from A_d_m_i_n where id="&Request("id")
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,1,3
'rs("name")=Trim(Request("name"))
rs("pass")=MD5(Trim(Request("pass")))
rs("flag")=Request("flag")
rs.Update
rs.Close
Set rs=nothing
Response.Write "<script language='javascript'>alert('修改成功!');document.location.href('Admin_Manage.asp');</script>"
Response.End()
else
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="../Images/font.css" rel="stylesheet" type="text/css" />
<link href="Images/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<form id="form1" name="form1" method="post" action="?Action=1&id=<%=Request("id")%>">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td height="25" colspan="2" bgcolor="#3385D1" class="window-0"> 修改管理员密码</td>
</tr>
<tr>
<td width="68" align="right" valign="middle" bgcolor="#efefef" class="font1">登陆名:</td>
<td width="689" bgcolor="#efefef"><%=rs("name")%></td>
</tr>
<tr>
<td align="right" valign="middle" bgcolor="#efefef" class="font1">新密码:</td>
<td bgcolor="#efefef"><input name="pass" type="text" id="pass" size="20" maxlength="20" /></td>
</tr>
<tr>
<td height="25" align="right" valign="middle" bgcolor="#efefef" >权 限:</td>
<td height="25" bgcolor="#efefef"><select name="flag" id="flag">
<option value="<%=rs("flag")%>"><%=rs("flag")%></option>
<option value="系统管理员">系统管理员</option>
<option value="试题管理员">试题管理员</option>
<option value="学员管理员">学员管理员</option>
</select>
</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" bgcolor="#efefef"> </td>
<td height="25" bgcolor="#efefef"><input type="submit" name="Submit" value="提交" />
<input type="button" name="Submit2" value="取消" onClick="history.back();"></td>
</tr>
</table>
</form>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -