<%
f_id=request.querystring("f_id")
l_id=request.querystring("l_id")
if session("u_name")="" then
Response.Write "<script>alert('您未登陆!');location='detail.asp?l_id="& l_id &"&f_id="& f_id &"';</script>"
else
SQL="select * from bbs_user where u_name='"& session("u_name") &"'"
rs.open SQL,conn
set rs1=server.createobject("adodb.Recordset")
SQL="select * from bbs_lanmu where l_master ='"& session("u_name") &"' and l_id = "& l_id &""
rs1.open SQL,conn
if rs("u_level")<>3 then
if rs1.EOF then
Response.Write "<script>alert('您的权限不够!');location='detail.asp?l_id="& l_id &"&f_id="& f_id &"';</script>"
else
SQL="delete bbs_forum where f_id='"& f_id &"'"
conn.execute SQL
Response.Write "<script>alert('已删除此帖!');location='forum.asp?l_id="& l_id &"';</script>"
end if
else
SQL="delete bbs_forum where f_id="& f_id &""
conn.execute SQL 为第 26 行
Response.Write "<script>alert('已删除此帖!');location='forum.asp?l_id="& l_id &"';</script>"
end if
end if
%>