📄 postdel.asp
字号:
<%@LANGUAGE="VBScript" CODEPAGE="936"%>
<!--#include file="SESSION.asp" -->
<!--#include file="CONN.asp" -->
<%
id=request.QueryString("id")
If id="" or IsNumeric(id)=False Then
response.Redirect("error.asp")
end if
strsql="select PostID,PostUser,ReplyID from bbs where PostID="&id
set rs=conn.execute(strsql)
PostID=rs("PostID")
ReplyID=rs("ReplyID")
PostUser=rs("PostUser")
rs.close
set rs=nothing
if PostUser=session("username") or session("usergroup")=3 then
If ReplyID=0 Then
'删除主题
strsql="delete from bbs where ReplyID="&id
conn.execute(strsql)
strsql="delete from bbs where PostID="&id
conn.execute(strsql)
CloseDatabase
response.Redirect("postview.asp")
else
'删除回复
strsql="delete from bbs where PostID="&id
conn.execute(strsql)
'更新回复数
strsql="update bbs set ReplyNo=ReplyNo-1 where PostID="&ReplyID
conn.execute(strsql)
CloseDatabase
response.Redirect("postdisplay.asp?id="&ReplyID)
end if
else
CloseDatabase
response.Redirect("error.asp")
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -