📄 dispbbs.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!--#include file="inc/stats.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/char.asp" -->
<!--#include file="inc/grade.asp"-->
<HTML><HEAD><TITLE><%=ForumName%>--显示贴子</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="forum.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<!--#include file="inc/theme.asp"-->
<BODY bgcolor="#ffffff" alink="#333333" vlink="#333333" link="#333333" topmargin="0" leftmargin="0">
<br>
<%
dim rs,sql
dim boardtype
dim foundErr
dim ErrMsg
dim boardid
dim announceid
dim username
dim rootid
dim topic
dim star
dim totalrec
dim p
dim tableback
dim tabletitle
dim tablebody
dim atablebody
dim tablefont
dim tablecontent
dim alertfont
foundErr = false
ErrMsg = ""
Rem ------包括版面的ID和页次------
call chkInput()
set rs=server.createobject("adodb.recordset")
if foundErr then
call error()
else
call showPage()
end if
sub showPage()
'on error resume next
if foundErr then
call error()
else
call announceinfo()
call listpage()
if founderr then call error()
end if
if err.number<>0 then err.clear
end sub
sub announceinfo()
sql="select boardtype,boardskin,Tableback,Tabletitle,Tablebody,aTablebody,TableFont,TableContent,AlertFont from board where boardID="&BoardID
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
boardtype=rs("boardtype")
boardskin=rs("boardskin")
Tableback=trim(rs("Tableback"))
Tabletitle=trim(rs("Tabletitle"))
Tablebody=trim(rs("Tablebody"))
aTablebody=trim(rs("aTablebody"))
TableFont=trim(rs("TableFont"))
TableContent=trim(rs("TableContent"))
AlertFont=trim(rs("AlertFont"))
else
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>您指定的论坛版面不存在</li>"
exit sub
end if
rs.close
set rs=conn.execute("update bbs1 set hits=hits+1 where announceID="&AnnounceID&"")
'Rs.open "Select topic from bbs1 Where announceID="&AnnounceID&"",conn,1,1
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>"
exit sub
end if
rs.close
%>
<TABLE border=0 width="95%" align=center>
<TBODY>
<TR>
<TD vAlign=top width=30%><a href="<%=HostURL%>"><img border="0" src="<%=logo%>"></a></TD>
<TD valign=middle align=top>
<img src="<%=picurl%>closedfold.gif" border=0> <a href="index.asp"><%=ForumName%></a><br>
<img src="<%=picurl%>bar.gif" border=0 width=15 height=15><img src="<%=picurl%>closedfold.gif" border=0> <a href="list.asp?boardid=<%=boardid%>&skin=<%=request("skin")%>"><%=boardtype%></a>
<br>
<img src="<%=picurl%>bar.gif" border=0 width=15 height=15><img src="<%=picurl%>openfold.gif" border=0> <%=htmlencode(topic)%>
</TD></TR></TBODY></TABLE>
<br>
<table cellpadding=1 cellspacing=0 border=0 width="95%" align=center>
<tr>
<td align=center width=2 valign=middle>
</td>
<td align=left width=130 valign=bottom>
<a href="announce.asp?boardid=<%=boardid%>&skin=<%=request("skin")%>"><%if boardskin=0 then%><img src="<%=picurl%>newthread.gif" border="0" alt="发表一个新主题"><%else%><img src="<%=picurl%>post.gif" border="0" alt="发表一个新主题"><%end if%></a></a>
</td>
<td valign=bottom align=left width=90>
<img src="<%=picurl%>printpage.gif" border=0 width=16 height=16 alt="显示可打印的版本"> <a href="printpage.asp?boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>">文字版本</a>
</td>
<td valign=bottom align=left width=90>
<img src="<%=picurl%>pag.gif" border=0 width=16 height=16 alt="把本贴打包邮递"> <a href="javascript:openScript('pag.asp?boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>',500,400)">打包邮递</a>
</td>
<td valign=bottom align=left width=100>
<IMG SRC="<%=picurl%>fav_add.gif" BORDER="0" width=15 height=15 alt="把本贴加入论坛收藏夹"> <a href="favadd.asp?boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>">加入收藏夹</a>
</td>
<td valign=bottom align=left width=100>
<img src="<%=picurl%>emailtofriend.gif" border=0 width=16 height=16 alt="发送本页面给朋友"> <a href="sendpage.asp?boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>">发送给朋友</a>
</td>
<td align=center valign=bottom>
</td>
<td align=right valign=bottom width=*><a href="javascript:this.location.reload()"><img src="<%=picurl%>refresh.gif" border=0 alt="刷新本主题" width=38 height=12></a>
</td>
<td align=center width=2 valign=middle>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="95%" bgcolor="<%=Tableback%>" align=center>
<tr><td height=1>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="95%" align=center>
<tr>
<td bgcolor="<%=Tableback%>" valign=middle width=1 height=24>
</td>
<td bgcolor="<%=Tabletitle%>" colspan=2 align="left" valign="middle" width=*>
<table cellpadding=0 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor="<%=Tabletitle%>" align="left" valign="middle"><font color="<%=TableFont%>">
<b>* 贴子主题</B>: <%=htmlencode(topic)%></font>
</td>
</tr>
</table>
</td>
<td bgcolor="<%=Tableback%>" valign=middle width=1 height=24>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="95%" bgcolor="<%=Tableback%>" align=center>
<tr><td height=1>
</td>
</tr>
</table>
<%
'on error resume next
sql="Select bbs1.username,bbs1.AnnounceID,bbs1.boardID,bbs1.UserName,bbs1.Topic,bbs1.dateandtime,bbs1.body,bbs1.Expression,bbs1.ip,bbs1.rootid,bbs1.signflag,[user].useremail,[user].homepage,[user].oicq,[user].sign,[user].userclass,[user].article,[user].face,[user].addDate,[user].width,[user].height from bbs1,[user] where bbs1.boardid="&boardid&" and bbs1.rootid="&rootid&" and bbs1.username=[user].username order by bbs1.announceid"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
else
totalrec=rs.recordcount
if star<1 then
star=1
end if
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
rs.close
end if
end sub
sub showannounce()
dim i
i=0
do while not rs.eof
%>
<table cellpadding=0 cellspacing=0 border=0 width="95%" align=center>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -