📄 bbs_listall.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<!--#include file="../include/header.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
dim thePageSize,ttlPage,ttlRdCnt
thePageSize=10
if not isnumeric(page) then page=1 else page=clng(page)
if page<1 then page=1
strSQL="select bbs_topic.*,bbs_board.board_name from bbs_topic,bbs_board where bbs_topic.board_id=bbs_board.board_id order by pubtime desc"
objRS.open strSQL,objConn,1,1
if not objRS.eof then
objRS.pagesize=thePageSize
ttlPage=objRS.pagecount
ttlRdCnt=objRS.Recordcount
if Page>ttlPage then Page=ttlPage
objRS.AbsolutePage=Page
end if
%>
<form name="PageForm" method="post" action="bbs_listall.asp?Page=<%=page%>">
<table width="710" border="0" cellspacing="0" cellpadding="0" align="center" class="tablestyle">
<tr>
<td>
<table width="710" border="0" cellpadding="2" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BDBABD">
<tr>
<td background="../resource/images/bbs/bg.gif" bgcolor="#BDBABD" class="tablehead">
<img src="../resource/images/bbs/li.gif" width="9" height="9"><a href="../blog/main.asp"></a><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→<a href="bbs_listall.asp">所有帖子列表</a>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="25%"><a href="bbs_search.asp"><b>搜索文章</b></a></td>
<td width="12%" >共<%=ttlRdCnt%>篇 |</td>
<td width="20%">每页最多显示<%=thePageSize%>篇 |</td>
<td width="10%">共<%=ttlPage%>页 | </td>
<td width="15%">目前第<%=Page%>页 |</td>
<td width="18%">
转到第
<select name="select" onChange="PageForm.submit()">
<% for i=1 to ttlpage %>
<option value="<%=i%>"><%=i%></option>
<% next %>
</select>
页</td>
</tr>
</table>
<table width="710" border="0" cellpadding="4" cellspacing="1" bgcolor="#BDBABD">
<tr align="center">
<td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="5%" align="center">表情</td>
<td width="23%" align="center">标题</td>
<td width="10%" align="center">作者</td>
<td width="17%" align="center">板块</td>
<td width="10%" align="center" >发表时间</td>
<td width="5%" align="center">回复</td>
<td width="5% align="center"" >人气</td>
<td width="25%" align="center">最后更新</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#BDBABD">
<%
dim MouseOverTitle
for i=1 to thePageSize
if objRS.eof then exit for
MouseOverTitle="《"&objrs("title")& "》By:"& objrs("user_name")
%>
<tr align="center" bgcolor="#FFFFFF">
<td width="5%" height="46"><img src="../resource/images/emimage/<%=objRs("EmImage") %>.gif" height="30" width="30"></td>
<td width="23%" align="left" title=<%=MouseOverTitle%>><a href="bbs_show.asp?BoardID=<%=boardid%>&TopicID=<%=objRS("topic_id")%>" title=<%=MouseOverTitle%>>
<%if len(objRs("title"))>12 then response.Write(left(objRs("title"),12)&"...") else response.Write(objRs("title"))%>
</a></td>
<td width="10%"><a href="../common/userinfo.asp?userid=<%=objRs("user_id") %>"><%=objRs("user_name") %></a></td>
<td width="17%"><%=objRs("pubtime") %></td>
<td width="10%"><a href="bbs_list.asp?BoardID=<%=objrs("board_id")%>"><%=objrs("board_name")%></a></td>
<td width="5%"><%=objRs("replycount") %></td>
<td width="5%"><%=objRs("ReadCount") %></td>
<td width="25%"><a href="../common/userinfo.asp"><%=objRs("lastreplyusername") %></a>|<%=objRs("lastreplytime") %></td>
</tr>
<%
objRs.movenext
next%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="68%" background="../resource/images/bj2.gif">分页:
<%for i=1 to ttlpage%>
<a href="bbs_list.asp?page=<%=i%>"> <b><%=i%></b> </a>
<%next %>
</td>
<td align="right" background="../resource/images/bj2.gif">
<a href="bbs_listall.asp?page=1"><b><<</b></a>
<a href="bbs_listall.asp?page=<%=page-1%>"><b><</b></a>
<a href="bbs_listall.asp?page=<%=page+1%>"><b>></b></a>
<a href="bbs_listall.asp?page=<%=ttlpage%>"><b>>></b></a></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -