%
dim AnnounceID
dim RootID
dim BoardID
dim rs
dim sql
dim rsBoard
dim boardsql
dim tabletitle
dim tablefont
dim strAllowForumCode
dim strAllowHTML
dim strIMGInPosts
dim strIcons
dim strflash
dim userclass
dim username
dim dateandtime
dim con,content
dim boardtype
dim boardskin
dim boardstat
boardskin=1
if boardmaster or master then
guestlist=""
else
guestlist=" lockboard=0 and "
end if
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"
"+"
请指定论坛版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"
"+"非法的版面参数。"
else
boardid=request("boardid")
call boardinfo(boardid)
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"
"+"请指定相关贴子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"
"+"非法的贴子参数。"
else
AnnounceID=request("id")
end if
if request("RootID")="" then
founderr=true
Errmsg=Errmsg+"
"+"请指定相关贴子。"
elseif not isInteger(request("RootID")) then
founderr=true
Errmsg=Errmsg+"
"+"非法的贴子参数。"
else
RootID=request("RootID")
end if
select case boardskin
case 1
boardstat="常规论坛,只允许注册会员发言"
case 2
boardstat="开放论坛,允许所有人发言"
case 3
boardstat="评论论坛,坛主和版主允许发言,其他注册用户只能回复"
case 4
boardstat="精华区,只允许版主和坛主发言和操作"
if not(boardmaster or master) then
Founderr=true
Errmsg=Errmsg+"
"+"精华区,只允许版主和坛主发言和操作"
end if
case 5
boardstat="认证论坛,除坛主和版主外,其他注册用户登陆论坛需要认证"
if membername="" then
founderr=true
Errmsg=Errmsg+"
"+"本论坛为认证论坛,请登陆并确认您的用户名已经得到管理员的认证后进入。"
else
if chkboardlogin(boardid,membername)=false then
founderr=true
Errmsg=Errmsg+"
"+"本论坛为认证论坛,请确认您的用户名已经得到管理员的认证后进入。"
end if
end if
case 6
boardstat="正规论坛,只有登陆用户才能浏览论坛并发言"
if membername="" then
Founderr=true
Errmsg=Errmsg+"
"+"正规论坛,只有登陆用户才能浏览论坛并发言"
end if
end select
stats=""&boardtype&"回复发言"
sub chktopic()
set rs=conn.execute("select topic from bbs1 where announceID="&rootID&"")
if not(rs.bof and rs.eof) then
topic=rs("topic")
else
foundErr = true
ErrMsg=ErrMsg+"
"+"您指定的贴子不存在"
end if
rs.close
sql="select body,topic,locktopic,username,dateandtime from bbs1 where AnnounceID="&AnnounceID
rs.open sql,conn,1,1
if rs("locktopic")=1 then
founderr=true
Errmsg=Errmsg+"
"+"本主题已被锁定,不能发表回复。"
else
con=rs("body")
topic=rs("topic")
username=rs("username")
dateandtime=rs("dateandtime")
end if
rs.close
end sub
if founderr then
call nav()
call headline(2)
call error()
else
call chktopic()
if founderr then
call nav()
call headline(2)
call error()
else
call nav()
call headline(2)
call showreform()
call announceinfo()
end if
end if
call endline()
sub announceinfo()
response.write "
"
Rs.open "Select UserName,Topic,dateandtime,body,announceid from bbs1 where boardid="&boardid&" and rootid="&rootid&" order by announceid",conn,1,1
do while not rs.eof
%>
Cint(announceid) then %>bgcolor="<%=atabletitlecolor%>" <% end if %>>
-- 作者:<%=rs("username")%>
-- 发布时间:<%=rs("dateandtime")%>
-- <%=htmlencode(rs("topic"))%>
<%=ubbcode(rs("body"))%>
|
<%
rs.movenext
loop
rs.close
end sub
set rs=nothing
%>