📄 manage_admin.asp
字号:
<!--#include file="cookies.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>爱斯特淋浴设备有限公司管理后台</title>
<link href="../file/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/validator.js"></script>
<style type="text/css">
<!--
.STYLE1 {
color: #003366;
font-weight: bold;
}
-->
</style>
</head>
<body>
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from product_admin order by id asc"
rs.open sql,conn,1,3
%>
<table cellpadding="2" cellspacing="1" border="0" width="96%" class="tableBorder" align=center>
<tr bgcolor="#f0f0f0">
<th height="25" colspan="5">管理管理员
<font color="#FF0000">(特别提醒:不要把所有的用户全部删除,否则不能进入后台管理系统!)</font></th>
</tr>
<tr align="center" >
<td width="100" class="BodyTitle">用户名</td>
<td width="150" class="BodyTitle">密码</td>
<td width="100" class="BodyTitle">修改</td>
<td width="100" class="BodyTitle">删除</td>
<td width="250" class="BodyTitle"> </td>
</tr>
<!--#include file="../page1.asp"-->
<% for i=1 to x %>
<form name="form1" method="post" action="?action=save" onSubmit="return Validator.Validate(this,2)">
<tr bgcolor="#FFFFFF">
<td width="100" align="center" bgcolor="#FFFFFF" class="TableRow2"><input name="username" type="text" class="form2" value="<%=rs("username")%>"/></td>
<td width="150" align="center" bgcolor="#FFFFFF" class="TableRow2"><input name="userpassword" type="password" class="form2" id="userpassword" size="15" dataType="Require" msg="请填写您的新密码!">
<font color="#FF0000">*</font></td>
<td width="100" align="center" bgcolor="#FFFFFF" class="TableRow2"><input type="submit" name="Submit" value=" 修 改 "><input type="hidden" value="<%=rs("id")%>" name="delid"></td>
<td width="100" align="center" bgcolor="#FFFFFF" class="TableRow2"><a href="?id=<%=rs("id")%>&action=delete" onClick="return confirm('您确定要删除吗?');">删除</a></td>
<td width="250" align="center" bgcolor="#FFFFFF" class="TableRow2"> </td>
</tr></form>
<%rs.movenext
next %>
<tr align="center" bgcolor="#FFFFFF">
<td height="35" colspan="5" align="left" bgcolor="#FFFFFF" class="TableRow2"> <!--#include file="../page2.asp"--></td>
</tr>
</table>
</body>
</html>
<% if request.querystring("action")="save" then
if trim(request.form("userpassword"))="" or trim(request.form("username"))=""then
response.Write "<script language=javascript>alert('请正确填写表单!');window.location.href='manage_admin.asp';</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from product_admin where id="&request.form("delid")
rs.open sql,conn,1,3
rs("username")=trim(request.form("username"))
rs("userpassword")=md5(trim(request.form("userpassword")))
rs.update
response.Write "<script language=javascript>alert('管理员修改成功!');window.location.href='manage_admin.asp';</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<% if request.querystring("action")="delete" then
deltxt="delete from product_admin where id in ("&trim(request.QueryString("id"))&")"
conn.execute deltxt
response.Write "<script language=javascript>alert('管理员删除成功!');window.location.href='manage_admin.asp';</script>"
conn.close
set conn=nothing
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -