📄 admin.asp
字号:
<!--#include file="conn.asp"-->
<%
set login=server.createobject("adodb.recordset")
login.open "select * from admin_table where user='"&Request.Cookies("username")&"' and password='"&Request.Cookies("password")&"' ",conn,1,3
if login.eof or login.bof then
Response.Redirect("adminlogin.asp")
login.close
set login=nothing
End if
%>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style type="text/css">
body {font-size:15px}
</style>
</HEAD>
<%
OpenDB()
dim rs
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("select cid,cdate,cauthor,ccontent from ccc_love")
Del=request.QueryString("Del")
if Del=1 then
conn.execute("delete from ccc_love where cid="&request.QueryString("ID"))
Response.write "<script>alert('删除成功!!!');location.href='admin.asp';</script>"
Response.end
end if
%>
<BODY>
<center><h1>管理/<a href="adminlogin.asp?post=quit">退出</a></h1>
<br>
<br>
<table border="0" cellspacing="1" cellpadding="3" width="643" bgcolor="#009ACE">
<tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="5" class=TBtwo>
<tr bgcolor="#eeeeee" class=TBfour>
<td width="10%" align=center> I D </td>
<td width="15%" align=center>作者</td>
<td width="40%" align=center>爱的信息</td>
<td width="20%" align=center>留言时间</td>
<td width="15%"></td>
</tr>
<%
if rs.BOF and rs.EOF then
%>
<tr bgcolor=#FFFFFF class=TBBG9><td colspan=4> </td>
</tr>
<%
else
while not rs.eof
%>
<tr bgcolor=#FFFFFF class=TBBG9>
<td><%=rs("cid")%></td><td><%=rs("cauthor")%></td>
<td><%=rs("ccontent")%></td><td><%=rs("cdate")%></td>
<td><a href=admin.asp?Del=1&ID=<%=rs("cid")%>> 删除操作 </a></td>
</tr>
<%
rs.movenext
wend
end if
rs.Close
set rs=nothing
%>
</table>
</td></tr>
</table>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -