📄 admin.user.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<style>
<!--
table, body, tr, td, main, a, input, textarea, select { font-family: 宋体; font-size: 9pt; text-decoration: none }
-->
</style>
</head>
<body>
<!--#include file="conn.asp"-->
<!--#include file="admin.Asp" -->
<!--#include file="md5.Asp" -->
<%
'-------------------open del
if Request("id")<>"" and Request("del")="del" then
Response.Write("你确定删除吗?<a href=?del=yes&id="&Request("id")&">[Yes]</a> <a href=?>[No]</a>")
Response.End
End if
if Request("del")="yes" and Request("id")<>"" then
set rsdel=server.createobject("adodb.recordset")
rsdel.open "Delete * from admin where id = "&Request("id")&" ",conn,1,3
Response.Write("删除成功! <a href=?>返回</a> ")
Response.End
rsdel.close
set rsdel = nothing
End if
'-------------------open add
if Request("username")<>"" and Request.form("userpass")<>"" and Request("id")="" then
set rssee=server.createobject("adodb.recordset")
rssee.open "select * from admin ",conn,1,3
rssee.addnew
rssee("username")=HTMLEncode(Request("username"))
rssee("userpass")=md5(Request("userpass"))
rssee.update
Response.Write("添加成功! <a href=?>返回</a> ")
Response.End
rssee.close
set rssee = nothing
End if
'-------------------open update
if Request("username")<>"" and Request.form("userpass")<>"" and Request("id")<>"" and isnumeric(Request("id")) then
set rssee=server.createobject("adodb.recordset")
rssee.open "select * from admin where id = "&Request("id")&" ",conn,1,3
rssee("userpass")=md5(Request("userpass"))
rssee.update
Response.Write("修改成功! <a href=?>返回</a> ")
Response.End
rssee.close
set rssee = nothing
End if
'-------------------exit
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 4px double #808080; padding: 3" bordercolor="#111111" width="95%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" height="35" align="center"><a href="admin.title.asp">
栏目分类管理</a> <a href="admin.article.asp">文章管理</a>
<a href="admin.link.asp">友情链接管理</a> <a href="admin.user.asp">
管理员管理</a> <a href="admin.login.asp?post=quit">退出系统</a></td>
</tr>
<tr>
<td width="100%" align="center"><hr noshade color="#808080" size="1"></td>
</tr>
<tr>
<td width="100%" align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-left:6; padding-right:6" bordercolor="#808080" width="923">
<tr>
<td width="460" height="25" bgcolor="#F7F7F7" align="center">管理员名称</td>
<td width="461" height="25" bgcolor="#F7F7F7" align="center">操作</td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from admin ",conn,1,3
if not rs.eof then
for i1= 1 to rs.recordcount
%>
<tr>
<td width="460" align="center" height="30">
<p>
<%=rs("username")%>
</td>
<td width="461" align="center" height="30">
<a href="?id=<%=rs("id")%>&username=<%=rs("username")%>">修改密码</a> <a href="?del=yes&id=<%=rs("id")%>">删除</a></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
End if
%>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center" height="35">
</td>
</tr>
<tr>
<td width="100%" align="center" height="30">
<form method="POST" action="?id=<%=Request("id")%>">
<p>用户名:<input type="text" name="username" size="20" style="border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #808080; padding: 0" value="<%=Request("username")%>"> 密码:<input type="text" name="userpass" size="20" style="border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #808080; padding: 0">
<input type="submit" value="提交" name="B1" style="border: 1px solid #FFFFFF; padding: 0"></p>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -