?? reannounce.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!--#include file="inc/theme.asp"-->
<!--#include file="inc/form1.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
dim AnnounceID
dim RootID
dim BoardID
dim rs
dim sql
dim rsBoard
dim boardsql
dim userclass
dim username
dim dateandtime
dim abgcolor
dim con,content
dim boardstat
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定論壇版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面參數。"
else
boardid=request("boardid")
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
AnnounceID=request("id")
end if
if request("RootID")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請指定相關貼子。"
elseif not isInteger(request("RootID")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的貼子參數。"
else
RootID=request("RootID")
end if
select case boardskin
case 1
boardstat="常規論壇,只允許<a href=reg.asp><font color="&TableFontcolor&">注冊會員</a>發言"
case 2
boardstat="開放論壇,允許所有人發言"
case 3
boardstat="評論論壇,壇主和版主允許發言,其他<a href=reg.asp><font color="&TableFontcolor&">注冊用戶</font></a>只能回復"
case 4
boardstat="精華區,只允許版主和壇主發言和操作"
if not(boardmaster or master) then
Founderr=true
Errmsg=Errmsg+"<br>"+"<li>精華區,只允許版主和壇主發言和操作"
end if
case 5
boardstat="認證論壇,除壇主和版主外,其他<a href=reg.asp><font color="&TableFontcolor&">注冊用戶</font></a>登陸論壇需要認證"
if membername="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>本論壇為認證論壇,請<a href=login.asp>登陸</a>并確認您的用戶名已經得到管理員的認證后進入。"
else
if chkboardlogin(boardid,membername)=false then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>本論壇為認證論壇,請確認您的用戶名已經得到管理員的認證后進入。"
end if
end if
case 6
boardstat="正規論壇,只有<a href=login.asp><font color="&TableFontcolor&">登陸用戶</a>才能瀏覽論壇并發言"
if membername="" then
Founderr=true
Errmsg=Errmsg+"<br>"+"<li>正規論壇,只有<a href=login.asp><font color="&TableContentColor&">登陸用戶</a>才能瀏覽論壇并發言"
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+"<br>"+"<li>您指定的貼子不存在</li>"
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+"<br>"+"<li>本主題已被鎖定,不能發表回復。"
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 "<hr width='"&tablewidth&"'>"
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
if bgcolor=TableBodyColor then
bgcolor=aTableBodyColor
abgcolor=TableBodyColor
else
bgcolor=TableBodyColor
abgcolor=aTableBodyColor
end if
%>
<TABLE border=0 width="<%=tablewidth%>" align=center bgcolor="<%=bgcolor%>">
<TBODY>
<TR>
<TD valign=middle align=top><font color="<%=TableContentColor%>">
-- 作者:<%=rs("username")%><br>
-- 發布時間:<%=rs("dateandtime")%><br><br>
-- <%=htmlencode(rs("topic"))%><br>
<%=ubbcode(rs("body"))%></font>
<hr size=1>
</TD></TR></TBODY></TABLE>
<%
rs.movenext
loop
rs.close
end sub
set rs=nothing
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -