?? printpage.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/ubbcode.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>
<BODY bgcolor="#ffffff" alink="#333333" vlink="#333333" link="#333333" topmargin="10" leftmargin="10">
<%
dim rs,sql
dim urs,usql
dim rsboard,boardsql
dim boardid
dim announceid
dim username
dim rootid
dim topic
dim abgcolor
abgcolor="#FFFFFF"
Rem ------獲取參數(get or post的)------
Rem ------包括版面的ID和頁次------
Call getInput()
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()
if founderr then call error()
end if
if err.number<>0 then err.clear
end sub
sub announceinfo()
sql="select boardtype from board where boardID="&BoardID
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
boardtype=rs("boardtype")
else
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>您指定的論壇版面不存在</li>"
exit sub
end if
rs.close
'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="<%=tablewidth%>" align=center>
<TBODY>
<TR>
<TD valign=middle align=top>
<b>以文本方式查看主題</b><br><br>
- <b><%=ForumName%></b> (<%=HostURL%><%=ForumURL%>index.asp)<br>
-- <b><%=boardtype%></b> (<%=HostURL%><%=ForumURL%>bbs.asp?boardid=<%=boardid%>)<br>
---- <b><%=htmlencode(topic)%></b> (<%=HostURL%><%=ForumURL%>dispbbs.asp?boardid=<%=boardid%>&rootid=<%=rootid%>&id=<%=announceid%>)
</TD></TR></TBODY></TABLE>
<br>
<hr>
<%
Rs.open "Select UserName,Topic,dateandtime,body from bbs1 where boardid="&boardid&" and rootid="&rootid&" order by announceid",conn,1,1
do while not rs.eof
%>
<TABLE border=0 width="750" align=center>
<TBODY>
<TR>
<TD valign=middle align=top>
-- 作者:<%=rs("username")%><br>
-- 發布時間:<%=rs("dateandtime")%><br><br>
-- <%=htmlencode(rs("topic"))%><br>
<%=ubbcode(rs("body"))%>
<hr>
</TD></TR></TBODY></TABLE>
<%
rs.movenext
loop
rs.close
%>
<!----------------------貼子顯示End---------------------->
<%
end sub
Sub getInput()
'On Error Resume Next
Rem ------獲取版面ID------
BoardID = Request("BoardID")
AnnounceID=Cstr(Request("ID"))
RootID=request("RootID")
End Sub
sub chkInput
'on error resume next
if boardID="" then
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>請指定論壇版面</li>"
end if
if announceid="" then
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>請指定相關貼子</li>"
end if
if rootid="" then
foundErr = true
ErrMsg=ErrMsg+"<br>"+"<li>請指定相關貼子</li>"
end if
end sub
set urs=nothing
set rs=nothing
stats="瀏覽帖子"
call endline()
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -