%
if Request.Cookies("username")=empty then error("
您还未登录社区")
id=int(Request("id"))
top
forumid=Conn.Execute("Select forumid From forum where id="&id)(0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if Request.ServerVariables("request_method") = "POST" then
content=HTMLEncode(Request.Form("content"))
topic=HTMLEncode(Request.Form("idtopic"))
if content=empty then message=message&"内容没有填写"
if message<>"" then error(""&message&"")
if isnumeric(""&Request("retopicid")&"") then
sql="select * from reforum where id="&Request("retopicid")&""
else
sql="select * from forum where ID="&ID&" and forumid="&forumid&""
end if
rs.Open sql,Conn,1,3
if rs("username")<>Request.Cookies("username") and instr("|"&Conn.Execute("Select moderated From [bbsconfig] where id="&forumid&"")(0)&"|","|"&Request.Cookies("username")&"|")=0 and membercode<4 then
error("对不起,您的权限不够!")
end if
if topic<>empty then rs("topic")=""&topic&""
content=""&content&"
[此帖子已被 "&Request.Cookies("username")&" 在 "&now()&" 编辑过]"
rs("content")=content
rs.update
rs.close
message="修改帖子成功返回主题返回论坛返回社区首页"
succeed(""&message&"")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sql="select * from bbsconfig where id="&forumid&""
Set Rs=Conn.Execute(sql)
bbsname=rs("bbsname")
logo=rs("logo")
followid=rs("followid")
rs.close
if isnumeric(Request("retopicid")) then
sql="select * from reforum where id="&Request("retopicid")&""
else
sql="select * from forum where ID="&id&" and forumid="&forumid&""
end if
Set Rs=Conn.Execute(sql)
if rs.eof then
error("数据库中不存在此帖子的数据")
end if
if rs("username")<>Request.Cookies("username") and instr("|"&Conn.Execute("Select moderated From [bbsconfig] where id="&forumid&"")(0)&"|","|"&Request.Cookies("username")&"|")=0 and membercode<4 then
error("对不起,您的权限不够!")
end if
content =rs("content")
rs.close
%>
<%
htmlend
%>