?? readmsg.asp
字號:
<link href="style.css" type="text/css" rel="stylesheet">
<!--#include file="conn.asp"-->
<%
if request("act")="del" then
db.execute("delete from msg where id="&request("id"))
response.write "<script>alert('編號為:"&request("id")&"消息刪除成功!');window.location.href='readmsg.asp?uid="&request("uid")&"'</script>"
end if
%>
<%dim xx
xx=request("uid")
sql="select * from msg where uid="&xx&""
set rs=db.execute(sql)
if rs.eof then
response.write "<script>alert('沒有消息了!');history.go(-1)</script>"
else
%><div>
<table width="533" border="1">
<tr>
<td>消息id</td>
<td>消息內容</td>
<td width="33">操作</td>
</tr><%do while not rs.eof%>
<tr><td><%=rs("id")%></td>
<td><%=rs("content")%></td>
<td><a href="readmsg.asp?act=del&id=<%=rs("id")%>&uid=<%=xx%>">刪除</a>
</td>
</tr>
<%rs.movenext
loop%>
</table></div><br>
<%end if%><div><a href="readmsg.asp?act=del_all&uid=<%=xx%>" target="right">刪除所有消息</a> <a href="index.asp" target="right">首頁</a>
<a href="javascript:history.go(-1)" target="right">返回</a>
</div>
<%if request("act")="del_all" then
db.execute("delete from msg where uid="&request("uid"))
response.write "<script>alert('已經刪除所有消息!');history.go(-1)</script>"
end if%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -