www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/zbm.asp

    <!--#include file="conn.asp"-->
<!--#include file="gyhs.asp"-->
<head>
<title><%=request.cookies("mc")%> - 帖子列表</title>
<meta name="keywords" content="<%=request.cookies("gjz")%>">
</head>
<body topmargin=0>
<!--#include file="gyym.asp"-->
<%
bz="select banzhu from zwbk where id="&request("id")&" and ltbh='"&ltbh&"'"
set bzs=conn.execute(bz)
banzhu=bzs("banzhu")
bzs.close
set bzs=nothing
%>

<%
dbbkxs
%>
<table height="30" cellSpacing="0" cellPadding="0" width="97%" align="center" border="0">
	<tr>
		<td align="left" width="20%">
		<a href="newtopic.asp?forumid=<%=request("id")%>&ltbh=<%=ltbh%>">
		<img src="imgs/skins/<%=request.cookies("fg")%>/post.gif" border="0" alt="发表文章"></a></td>
		<td align="right" width="80%">
		<img border="0" src="imgs/team.gif" width="11" height="12">&nbsp;<%=banzhu%>&nbsp;</td>
	</tr>
</table>
<table height="28" cellSpacing="1" cellPadding="1" width="97%" align="center" border="0">
	<tr>
		<td align="middle" width="3%">
		<img border="0" src="imgs/announce.gif" width="18" height="18"></td>
		<td>		
		<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollAmount="3" width="90%">
		<%
		sqlggao="select id,cnggtitle from zwggao where ltbh='"&ltbh&"'"
		set ggaos=conn.execute(sqlggao)
		do while not ggaos.eof
		%>
		<a target="_blank" href="gonggao.asp?id=<%=ggaos("id")%>&ltbh=<%=ltbh%>"><%=ggaos("cnggtitle")%></a>
		<%
		ggaos.movenext
		loop
		ggaos.close
		set ggaos=nothing
		%>
		</marquee>		
		</td>
	</tr>
</table>
<SCRIPT>valigntop()</SCRIPT>
<table class="a2" cellSpacing="1" cellPadding="0" width="97%" align="center" border="0">
	<tr id="TableTitleLink" height="25">
		<td class="a1" width="3%"> </td>
		<td class="a1" width="3%"> </td>
		<td class="a1" align="middle" width="45%" height="24">
		主题</td>
		<td class="a1" align="middle" width="9%" height="24">
		作者</td>
		<td class="a1" align="middle" width="6%" height="24">
		回复</td>
		<td class="a1" align="middle" width="7%" height="24">
		点击</td>
		<td class="a1" align="middle" width="20%" height="24">
		最后更新时间</td>
	</tr>
<%
dim Ym
bkid=request("id")
Ym="zbm.asp?ltbh="&ltbh&"&id="&bkid&"&"  '设置本程序页的名称
%>
<%
set rs=server.createobject("adodb.recordset")
rs.activeconnection=conn
sql="select id,ltbh,cntitle,cnuser,cnhfzs,cndjs,cnzd,cnjh,cnzhgx from zwtizi where ltbh='"&ltbh&"'and cnbkid="&bkid&" order by cnzd,id desc"    '设置sql
rs.cursortype=3 '设置静态指针常用与寻找和建立记录
rs.open sql
rs.pagesize=20 '每页记录条数
%>

<%
page=clng(request.QueryString("page")) '接收页码

'判断接受的页码是否小于第一页,是就设置成1
if page<1 then 
page=1
end if 

'判断接受的页码是否大于总页数,是就为最后一页
if page>rs.pagecount then
page=rs.pagecount
end if
on error resume next
rs.absolutepage=page '将接收的页码当前记录所在页
	'循环显示
for i=1 to rs.pagesize
if rs.eof then 
exit for
else
%>
	
	<tr height="25">
		<td class="a4" align="middle" width="3%">
        <%if rs("cnzd")=true then%>
        <img src="imgs/f_top.gif" border="0">
        <%elseif rs("cnjh")=true then%>
		<img src="imgs/topicgood.gif" border="0">
		<%elseif rs("cndjs")>10 then%>
		<img src="imgs/f_hot.gif" border="0">
		<%else%>
		<img src="imgs/f_norm.gif" border="0">
		<%end if%>
		</td>
		<td class="a3" align="middle" width="3%">
        <%
		username=Request.Cookies("username")
        a=rs("cnuser")
		if username=a then
		%>
		<img src="imgs/my.gif">
		<%end if%>
		</td>
		<td class="a4" width="45%">&nbsp;<a href="ShowPost.asp?ltbh=<%=ltbh%>&ids=<%=rs("id")%>&id=<%=bkid%>&bt=<%=rs("cntitle")%>"><%=rs("cntitle")%></a>
		</td>
		<td class="a3" align="middle" width="9%">
		<%=rs("cnuser")%></td>
		<td class="a4" align="middle" width="6%"><%=rs("cnhfzs")%></td>
		<td class="a3" align="middle" width="7%"><%=rs("cndjs")%></td>
		<td class="a4" width="27%">
		<p align="center"><%=rs("cnzhgx")%></td>
	</tr>
<%
end if
rs.movenext
next
%>	
	</table>
<SCRIPT>valignbottom()</SCRIPT>
<table cellSpacing="1" cellPadding="1" width="97%" align="center" border="0">
	<tr height="25">
		<td width="100%" height="2">
		<table cellSpacing="0" cellPadding="3" width="100%" border="0">
			<tr>
				<td height="2">
<p align="center"><a href="<%=Ym%>page=1"><span style="font-size: 12px"><strong>
<font color="#000000"><span style="text-decoration: none">首页</span></font></strong></span></a><span style="font-size: 12px"><strong>
<%
if page<=1 then
%>
<font color="#C0C0C0">上一页</font>
<%else%>
<a href="<%=Ym%>page=<%=(page-1)%>"><font color="#000000">
<span style="text-decoration: none">上一页</span></font></a>
<%end if%>

<%
if page>=rs.pagecount then
%>
<font color="#C0C0C0">下一页</font>
<%else%>
<a href="<%=Ym%>page=<%=(page+1)%>"><font color="#000000">
<span style="text-decoration: none">下一页</span></font></a> </strong></span>
<%end if%>

<a href="<%=Ym%>page=<%=rs.pagecount%>"><font color="#000000">
<span style="font-size: 12px; text-decoration: none"><strong>尾页</strong></span></font></a>
<%
rs.close
set rs=nothing
%>
				
				</td>
				<form name="form" method="post" action="searchs.asp?ltbh=<%=ltbh%>&menu=xss&searchxm=username&searchxm2=cntitle&search=key">
					<td align="right" height="2">快速搜索:<input onblur="javascript:blurEdit(this)" onkeyup="ValidateTextboxAdd(this, 'btnadd')" onpropertychange="ValidateTextboxAdd(this, 'btnadd')" onfocus="javascript:focusEdit(this)" value="关键词" name="gjzs" helptext="关键词">
					<input id="btnadd" disabled type="submit" value="搜索" name="submit"> 
					</td>
				</form>
			</tr>
		</table>
		</td>
	</tr>
</table>
<table cellSpacing="4" cellPadding="0" width="80%" align="center" border="0">
	<tr>
		<td noWrap width="25%">
		<img alt="" src="imgs/f_hot.gif" border="0" width="17" height="15"> 
		热门主题</td>
		<td noWrap width="25%">
		<img alt="" src="imgs/f_top.gif" border="0"> 
		置顶主题</td>
		<td noWrap width="25%">
		<img src="imgs/topicgood.gif"> 
		精华主题</td>
		<td noWrap width="25%">
		<img src="imgs/my.gif"> 自己发表的主题</td>
	</tr>
	</table>
	<br>
<%
call bq
dbjl.close
set dbjl=nothing
%><%dbclose%>