📄 bbs_list.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/header.asp" -->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
dim thePageSize,ttlPage,ttlRdCnt
if request.Form("select")<>0 then page=request.Form("select")
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 and bbs_topic.board_id="&boardid&" order by lastreplytime desc"
objRS.open strSQL,objConn,1,1
%>
<form name="PageForm" method="post" action="bbs_list.asp?BoardID=<%=boardid%>&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" bgcolor="#BDBABD">
<tr>
<td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead"><img src="../resource/images/bbs/li.gif" width="9" height="9"><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→<a href="bbs_list.asp?BoardID=<%=boardid%>"><%=objrs("board_name")%></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<%
objrs.close
strSQL="select * from bbs_topic where board_id="&boardid&" 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
%>
<tr>
<td width="25%"><a href="bbs_newtopic.asp?BoardID=<%=boardid%>"><b>发表文章</b></a><a href="bbs_newtopic.asp?BoardID=<%=boardid%>"></a> <a href="bbs_search.asp?BoardID=<%=boardid%>"><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%>" <%if page=i then response.Write("selected")%>><%=i%></option>
<% next %>
</select>
页</td>
</tr>
</table>
<table width="710" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BDBABD">
<tr align="center">
<td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead">
<table width="100%" border="0" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="5%" align="center">表情</td>
<td width="30%" align="center">标题</td>
<td width="10%" align="center">作者</td>
<td width="18%" align="center">发表时间</td>
<td width="5%" align="center">回复</td>
<td width="5% align="center"" >人气</td>
<td width="27%" align="center">最后更新</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="5" cellspacing="1" bordercolor="#FFFFFF" 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%"><img src="../resource/images/emimage/<%=objRs("EmImage") %>.gif" height="30" width="30"></td>
<td width="30%" align="left"><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="18%"><%=objRs("pubtime") %></td>
<td width="5%"><%=objRs("replycount") %></td>
<td width="5%"><%=objRs("readcount") %></td>
<td width="27%"><a href="../common/userinfo.asp?UserId=<%=objRs("lastreplyuserid") %>"><%=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?BoardID=<%=boardid%>&page=<%=i%>"><b><%=i%></b></a>
<%next %>
</td>
<td align="right" background="../resource/images/bj2.gif">
<a href="bbs_list.asp?BoardID=<%=boardid%>&page=1"><b><<</b></a>
<a href="bbs_list.asp?BoardID=<%=boardid%>&page=<%=page-1%>"><b><</b></a>
<a href="bbs_list.asp?BoardID=<%=boardid%>&page=<%=page+1%>"><b>></b></a>
<a href="bbs_list.asp?BoardID=<%=boardid%>&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 + -