📄 dispbbs.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/grade.asp"-->
<%
dim rs,sql
dim boardid,boardtype,announceid_1
dim foundErr,ErrMsg
dim username,rootid,topic,topic_1
dim star,totalrec,p
dim tableback,tabletitle,tablebody,atablebody
dim tablefont,tablecontent,alertfont
dim strAllowForumCode,strAllowHTML,strIMGInPosts
dim strIcons,strflash,Forumlogo
dim bgcolor,abgcolor,namestyle
dim istop,isvote
dim guestlist,onlineUserList
dim arrrow
dim grade18,grade19,grade20
grade18=grade(18)
grade19=grade(19)
grade20=grade(20)
membername=request.cookies("liulang")("username")
memberclass=request.cookies("liulang")("userclass")
foundErr = false
ErrMsg = ""
if memberclass = grade18 or memberclass = grade19 or memberclass = grade20 then
guestlist=""
else
guestlist=" lockboard<>2 and "
end if
Rem ------包括版面的ID和页次------
call chkInput()
sql="select boardtype,boardskin,Tableback,Tabletitle,Tablebody,aTablebody,TableFont,TableContent,AlertFont,strAllowForumCode,strAllowHTML,strIMGInPosts,strIcons,strflash,Forumlogo from board where "&guestlist&" boardID="&cstr(boardid)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
arrRow=rs.getrows
rs.close : set rs=nothing
boardtype=arrRow(0,0)
boardskin=arrRow(1,0)
Tablebackcolor=arrRow(2,0)
Tabletitlecolor=arrRow(3,0)
Tablebody=arrRow(4,0)
aTablebody=arrRow(5,0)
TableFontcolor=arrRow(6,0)
TableContent=arrRow(7,0)
AlertFont=arrRow(8,0)
strAllowForumCode=arrRow(9,0)
strAllowHTML=arrRow(10,0)
strIMGInPosts=arrRow(11,0)
strIcons=arrRow(12,0)
strflash=arrRow(13,0)
Forumlogo=arrRow(14,0)
else
founderr=true
Errmsg=Errmsg+"<br>"+"<li>您选择的版面不存在或者您没有权限察看该版面。"
end if
conn.execute("update bbs1 set hits=hits+1 where announceID="&AnnounceID_1&"")
sql="select topic,istop,isbest,username,hits from bbs1 where announceID="&rootID&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
arrRow=rs.getrows
rs.close : set rs=nothing
topic_1=arrRow(0,0)
istop=arrRow(1,0)
isbest=arrRow(2,0)
username=arrRow(3,0)
hits_1 = arrRow(4,0)
if username=membername and membername<>"" then call readRe()
else
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
end if
response.write "<html><head>"&_
"<meta NAME=GENERATOR Content=""Microsoft FrontPage 3.0"" CHARSET=GB2312>"&_
"<META HTTP-EQUIV=""Pragma"" CONTENT=""no-cache"">"&_
"<title>"&ForumName&"--浏览贴子</title>"&_
"<link rel=stylesheet type=text/css href=forum.css>"&_
"<body bgcolor=#ffffff alink=#333333 vlink=#333333 link=#333333 topmargin=0 onkeydown=""if(event.keyCode==13 && event.ctrlKey)frmAnnounce.submit()"">"
%>
<!--#include file="inc/stats.asp"-->
<!--#include file="inc/theme.asp"-->
<%
response.write "<br>"
if foundErr then
call error()
else
call showPage()
end if
sub showPage()
'on error resume next
if foundErr then
call error()
else
call subOnline()
call announceinfo()
call listpage()
if founderr then call error()
end if
if err.number<>0 then err.clear
end sub
sub announceinfo()
response.write "<TABLE border=0 width=""95%"" align=center><TBODY><TR>"&_
"<TD vAlign=top width=""30%"">"&_
"<img border=0 src="&Forumlogo&"></a></TD>"&_
"<TD valign=middle align=top> <img src=pic/closedfold.gif border=0> <a href=index.asp>"&ForumName&"</a><br>"&_
" <img src=pic/bar.gif border=0 width=15 height=15><img src=pic/closedfold.gif border=0> "&_
"<a href=list.asp?boardid="&boardid&">"&boardtype&"</a>"&_
"<br> <img src=pic/bar.gif border=0 width=15 height=15><img src=pic/openfold.gif border=0> "&htmlencode(topic_1)&""&_
"<a name=top></a></TD></TR></TBODY></TABLE><br>"
response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" align=center>"&_
"<tr>"&_
"<td align=left>"&_
"<a href=announce.asp?boardid="&boardid&">"&_
"<img src=pic/post.gif border=0 title='发表一个新主题'></a> "&_
"<a href=reannounce.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&"&topic="&topic_1&">"&_
"<img src=pic/newreply.gif border=0 title='发表对该帖子的回复'></a> "&_
"<a href='vote.asp?boardid="&boardid&"'>"&_
"<img src=pic/newpoll.gif border=0 title='发表一个新的投票主题'></a> "&_
"</td>"&_
"<td align=center width=* valign=middle></td>"&_
"<td align=right width=180 valign=bottom>"&_
"您是本帖的第 <b>"&hits_1&"</b> 个浏览者 </td>"&_
"<td align=right valign=bottom width=40>"&_
"<img src=pic/prethread.gif alt=上一篇主题 border=0></a> </td>"&_
"<td align=right valign=bottom width=40> <a href=javascript:this.location.reload()> <img src=pic/refresh_1.gif alt=刷新这个主题 border=0></a> </td>"&_
"<td align=right valign=bottom width=40> <img src=pic/nextthread.gif alt=下一篇主题 border=0> </td>"&_
"</tr></table>"
response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" bgcolor=#FFFFFF align=center>"&_
"<tr> <td height=1> </td></tr></table>"
response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" bgcolor="&Tablebackcolor&" align=center>"&_
"<tr><td height=1> </td></tr></table>"
response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" align=center><tr> "&_
"<td bgcolor="&Tablebackcolor&" valign=middle width=1 height=24> </td>"&_
"<td bgcolor="&Tabletitlecolor&" colspan=2 align=left valign=middle width=*>"&_
"<table cellpadding=0 cellspacing=1 border=0 width=""100%"">"&_
"<tr><td bgcolor="&Tabletitlecolor&" align=left valign=middle><font color="&TableFontcolor&">"&_
" <b>* 贴子主题</B>: "&htmlencode(topic_1)&"</font></td>"&_
"<td bgcolor="&Tabletitlecolor&" align=right valign=middle>"&_
" <a href=report.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&"&topic="&htmlencode(topic_1)&">"&_
"<img src='images/report.gif' title='本帖有问题,发短消息给斑竹' border=0></a> "&_
" <a href=favadd.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&">"&_
"<img src='images/fav.gif' title='加入论坛收藏家' border=0></a> "&_
" <a href=printpage.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&">"&_
"<img src='images/printpage.gif' title='打印该帖子' border=0></a> "&_
" <a href=pag.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&">"&_
"<img src='images/pag.gif' title='打包邮寄' border=0></a> "&_
" <a href=sendpage.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&">"&_
"<img src='images/emailtofriend.gif' title='发送本页面给朋友' border=0></a> "&_
" <a href=""#""><SPAN style=""CURSOR: hand"" onClick=""window.external.AddFavorite('"&ForumUrl&"/dispbbs.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid_1&"', '"&htmlencode(topic_1)&"')"">"&_
"<img src='images/fav_add1.gif' title='把本帖加入IE收藏夹' border=0></a> "&_
"</td>"&_
"</tr>"&_
"</table></td><td bgcolor="&Tablebackcolor&" valign=middle width=1 height=24> </td>"&_
"</tr></table>"&_
"<table cellpadding=0 cellspacing=0 border=0 width=""95%"" bgcolor="&Tablebackcolor&" align=center>"&_
"<tr> <td height=1> </td></tr></table>"
sql="Select B.AnnounceID,B.boardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.rootid,B.signflag,B.isbest,B.isvote,U.username,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP from bbs1 B inner join [user] U on U.username=B.username where B.boardid="&boardid&" and B.rootid="&rootid&" order by announceid"
'response.write sql
'response.end
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
totalrec=rs.recordcount
if star<1 then
star=1
end if
Maxtitlelist=cint(Maxtitlelist)
if (star-1)*Maxtitlelist>totalrec then
if (totalrec mod Maxtitlelist)=0 then
star= totalrec \ Maxtitlelist
else
star= totalrec \ Maxtitlelist + 1
end if
end if
if star=1 then
call showannounce()
else
if (star-1)*Maxtitlelist<totalrec then
rs.move (star-1)*Maxtitlelist
call showannounce()
else
star=1
call showannounce()
end if
end if
end if
end sub
sub showannounce()
arrRow=rs.getrows
rs.close : set rs=nothing
dim i
i=0
for k=0 to Ubound(arrRow,2)
Announceid=arrRow(0,i)
boardid=arrRow(1,i)
username=arrRow(2,i)
topic=arrRow(3,i)
dateandtime=arrRow(4,i)
body=arrRow(5,i)
Expression=arrRow(6,i)
ip=arrRow(7,i)
rootid=arrRow(8,i)
signflag=arrRow(9,i)
isbest=arrRow(10,i)
isvote=arrRow(11,i)
username=arrRow(12,i)
useremail=arrRow(13,i)
homepage=arrRow(14,i)
oicq=arrRow(15,i)
sign=arrRow(16,i)
userclass=arrRow(17,i)
title=arrRow(18,i)
width=arrRow(19,i)
uheight=arrRow(20,i)
article=arrRow(21,i)
face=arrRow(22,i)
addtime=arrRow(23,i)
userWealth=arrRow(24,i)
userEP=arrRow(25,i)
userCP=arrRow(26,i)
if isnumeric(userclass) then
if userclass=18 then
namestyle="filter:glow(color=green,strength=2)"
elseif userclass=19 then
namestyle="filter:glow(color=#660099,strength=2)"
elseif userclass=20 then
namestyle="filter:glow(color=#FF3333,strength=2)"
else
namestyle="filter:glow(color=#798AB7,strength=2)"
end if
end if
if isbgcolor(i)=false then
bgcolor=tablebody
abgcolor=atablebody
else
bgcolor=atablebody
abgcolor=tablebody
end if
'response.write height
response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" align=center>"&_
"<tr><td bgcolor="&Tablebackcolor&" valign=middle width=1 height=24> </td>"&_
"<td bgcolor="&bgcolor&">"&_
"<table width=""100%"" cellpadding=4 cellspacing=0><tr>"&_
"<td bgcolor="&bgcolor&" valign=top width=""20%"" rowspan=2><img src="""" width=0 height=4><BR><table width=""100%"" cellpadding=4 cellspacing=0 style="&namestyle&"><tr><td>"&_
" "&isOnline(username)&" <a name="&announceid&"><B>"&htmlencode(username)&"</B></a></td></tr></table>"
if TitleFlag and title<>"" then response.write " 头衔:"&htmlencode(title)&"<br>"
response.write " <img src="&face&" width="&width&" height="&uheight&"><br>"
if isnumeric(userclass) then
select case userclass
case 1 response.write " <img src=pic/"&gradepic(1)&">"
case 2 response.write " <img src=pic/"&gradepic(2)&">"
case 3 response.write " <img src=pic/"&gradepic(3)&">"
case 4 response.write " <img src=pic/"&gradepic(4)&">"
case 5 response.write " <img src=pic/"&gradepic(5)&">"
case 6 response.write " <img src=pic/"&gradepic(6)&">"
case 7 response.write " <img src=pic/"&gradepic(7)&">"
case 8 response.write " <img src=pic/"&gradepic(8)&">"
case 9 response.write " <img src=pic/"&gradepic(9)&">"
case 10 response.write " <img src=pic/"&gradepic(10)&">"
case 11 response.write " <img src=pic/"&gradepic(11)&">"
case 12 response.write " <img src=pic/"&gradepic(12)&">"
case 13 response.write " <img src=pic/"&gradepic(13)&">"
case 14 response.write " <img src=pic/"&gradepic(14)&">"
case 15 response.write " <img src=pic/"&gradepic(15)&">"
case 16 response.write " <img src=pic/"&gradepic(16)&">"
case 17 response.write " <img src=pic/"&gradepic(17)&">"
case 18 response.write " <img src=pic/"&gradepic(18)&">"
case 19 response.write " <img src=pic/"&gradepic(19)&">"
case 20 response.write " <img src=pic/"&gradepic(20)&">"
end select
response.write "<br> 用户等级: "& grade(userclass) &"<BR>"
end if
response.write " 用户财产:"&userWealth&" ¥<br>"&_
" 用户经验:<img src=pic/bar4.gif width="&int(userEP/1000)*4&" height=8 title="&userEP&"><br>"&_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -