📄 list.asp
字号:
<table border=0 cellpadding=0 cellspacing=0 class=tb2>
<tbody>
<TR>
<td>
<table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=0 width=100% style="border-collapse: collapse" align=center>
<tbody>
<tr >
<td width="5%" align="center" height="23" <%=tColor%> class=tdc1>状态</td>
<td width="5%" align="center" <%=tColor%> class=tdc1>图标</td>
<td <%=tColor%> align=center class=tdc1>主题</td>
<td align=center width="10%"<%=tColor%> class=tdc1>话题发起</td>
<td align=center nowrap width="5%" <%=tColor%> class=tdc1>点击</td>
<td align=center nowrap width="5%" <%=tColor%> class=tdc1>回复</td>
<td align=center width="25%" <%=tColor%> class=tdc1 >最后发表</td>
</tr>
</tbody>
<%
page=chktopic(request.querystring("page"))
if page="" then page=1
pages = ""&t_page&""
set rs_topic = server.createobject("adodb.recordset")
sql = "select l_id,t_count,t_content,t_replynum,t_id,t_jinhua,t_title,t_face,t_time,t_username,t_lasttime,t_lastusername,t_top,t_vote,t_lock from topic where (t_top=0 or l_id="&l_id&") and t_lock<>2 "
if Days<>0 then Sql = Sql & " and t_lasttime >#" & defDate & "#"
sql=sql&"order by t_top,"&cpbtime&" "&cpbselect
rs_topic.open sql,conn,1,1
if not(rs_topic.BOF or rs_topic.EOF) then
sql1="select count(t_id) from topic where (t_top=0 or l_id="&l_id&") and t_lock<>2"
if Days<>0 then Sql1 = Sql1 & " and t_lasttime >#" & defDate & "#"
set rs1=conn.execute(sql1)
r=rs1(0)
if r mod pages=0 then
maxpagecount= r \ pages
else
maxpagecount= r \ pages+1
end if
rs_topic.MoveFirst
if int(page) > maxpagecount then page = maxpagecount
if int(page)<1 then page=1
rs_topic.Move (page-1) * pages
rcount=0
do while not rs_topic.eof and rcount <int(pages)
%> <tbody>
<tr>
<td valign=MIDDLE align=center width="5%" bgcolor=<%=tcolor2%> class=tdc height=25> <% if rs_topic("t_top")="0" then %><img src=image/announce.gif alt="总固定帖"><% elseif rs_topic("t_top")="1" then %><img src=image/locktop.gif alt="置顶帖"><% Elseif rs_topic("t_lock")="1" then%><img src=image/lock.gif alt="锁定帖"><% Elseif rs_topic("t_vote")="1" then%><img src=image/vote.gif alt="投票帖"><% Elseif rs_topic("t_count")>h_rtop then%><img src=image/hotclosed.gif alt="热帖"><% Elseif rs_topic("t_count")<1 then %><img src=image/new.gif alt="新帖"><%else%><img src=image/closed.gif alt="普通帖"><%end if %>
</td>
<TD align=center valign=MIDDLE width="2%" bgcolor=<%=tcolor1%>
class=tdc> <a href=topic.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%> target=_blank><img src=<%=rs_topic("t_face")%> alt="弹出新窗口显示" border="0"></a></td>
<TD valign=middle bgcolor=<%=tcolor2%> onmouseover=this.bgColor='<%=tcolor1%>'; onmouseout=this.bgColor='<%=tcolor2%>';
class=tdc>
<% if rs_topic("t_top")="1" then %><B>置顶</b><% end if%> <% if rs_topic("t_jinhua")<>0 then %><img src=image/jh.gif alt=精华><% end if%> <a href=topic.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%> title="主题:<%=HTMLEncode(rs_topic("t_title"))%> 观看:<%=rs_topic("t_count")%>次 回复:<%=rs_topic("t_replynum")%>篇 发起人:<%=rs_topic("t_username")%> 发起时间:<%=rs_topic("t_time")%> 最后回复:<%=rs_topic("t_lastusername")%> 最后回复时间:<%=rs_topic("t_lasttime")%> 主题内容大小:<%=len(rs_topic("t_content"))%>字节" ><%=left(HTMLEncode(rs_topic("t_title")),23)%>.. </a>
<%'判断是否要分页
if rs_topic("t_replynum")>cint(r_page) then
response.write " [<img src=image/multipage.gif alt=分页><b>"
if rs_topic("t_replynum") mod cint(r_page)=0 then
maxreply=rs_topic("t_replynum") \ cint(r_page)
else
maxreply=rs_topic("t_replynum") \ cint(r_page)+1
end if
for i=1 to maxreply
response.write " <a href='topic.asp?l_id="&rslanmu("l_id")&"&t_id="&rs_topic("t_id")&"&page="&i&"'>"&i&"</a>"
if i+1>8 and maxreply<>8 then
response.write "... <a href='topic.asp?l_id="&rslanmu("l_id")&"&t_id="&rs_topic("t_id")&"&page="&maxreply&"'>"&maxreply&"</a>"
exit for
end if
next
response.write "</b>]"
else
maxreply=1
end if
%>
<%if (issupermaster or isbanzhu or ismaster) and isuser then%><BR><div align=right>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=ts" title="将主题提升">提</a>|
<%if issupermaster or ismaster then%>
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=toptop" title="将主题总固顶或者取消总固顶">总</a>|
<%end if%>
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=jinhua" title="将主题加入精华或者取消精华">精</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=top" title="将主题置顶或者取消置顶">固</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=lock" title="锁定该主题或者取消锁定">锁</a>|<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=copy" title="复制该主题">复</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=move" title="移动该主题">移</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=del" title="删除该主题">删</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=gooduser" title="奖励或者惩罚该主题作者">奖/惩</a>|
<a href="up.asp?l_id=<%=rslanmu("l_id")%>&t_id=<%=rs_topic("t_id")%>&action=user" title="屏蔽或者禁止用户发言">蔽</a>|
<a href="announce.asp?l_id=<%=rslanmu("l_id")%>&action=post" title="发布公告">告</a>|</div><%end if%>
</td>
<td valign=MIDDLE bgcolor=<%=tcolor1%>
class=tdc align=center width="10%" ><a href=viewuser.asp?username=<%=rs_topic("t_username")%> target=_blank><%=rs_topic("t_username")%></a> </td>
<td nowrap bgcolor=<%=tcolor2%>
class=tdc align=center valign=MIDDLE width="5%" ><%=rs_topic("t_count")%> </td>
<td align=center bgcolor=<%=tcolor1%>
class=tdc width="5%" ><%=rs_topic("t_replynum")%> </td>
<td bgcolor=<%=tcolor2%>
class=tdc valign=MIDDLE width="25%" align=center><a href=viewuser.asp?username=<%=rs_topic("t_lastusername")%> target=_blank><%=rs_topic("t_lastusername")%></a>|<%=rs_topic("t_lasttime")%>
</td>
</tr>
</tbody>
<%
rs_topic.MoveNext
rcount=rcount+1
loop
%> <tbody>
<tr align="left" height=23>
<td colspan="7" bgcolor=<%=tColor2%> class=tdc >
<%
pagestart=page-5
pageend=page+5
if pagestart<1 then pagestart=1
if pageend>maxpagecount then pageend=maxpagecount
response.write(" [ ")
if maxpagecount > 6 then Response.Write ("<a href=?l_id="&request.querystring("l_id")&"&page=1>1</a> ... ")
for i=pagestart to pageend
if i<>int(page) then
Response.Write (" <a href=?l_id="&request.querystring("l_id")&"&page="&i&">" & i & "</a> ")
else
Response.Write ("<b>"&i&"</b> ")
end if
next
if maxpagecount > page +5 then Response.Write( " ... <a href=?l_id="&request.querystring("l_id")&"&page="&maxpagecount&">"&maxpagecount&"</a>")
response.write(" ] ")
response.write("..页次:"&page&"/"&maxpagecount&"页 每页:"&pages&" 记录数:"&r&" ")%> </tr></tbody>
<%else%>
<tbody>
<tr align="center" height=23>
<td colspan="7" bgcolor=<%=tColor2%> class=tdc >暂无主题</td></tr>
</tbody>
<%
end if
rs_topic.close
set rs_topic=nothing
%>
</table>
</td>
</tr>
</tbody>
</table>
</center>
<table class=tb2 align="center" cellpadding=2 cellspacing=0>
<tr class=tdc><form action=list.asp?l_id=<%=request.querystring("l_id")%> method="post" name="ndays">
<input type=hidden name="action" value="true"><TD>
按照 <select name="cpbtime" class="bdtj3">
<option value="t_title" <%if cpbtime="t_title" then response.write("selected")%>>帖子标题</option>
<option value="t_lasttime" <%if cpbtime="t_lasttime" then response.write("selected")%>>最后发表时间</option>
<option value="t_replynum" <%if cpbtime="t_replynum" then response.write("selected")%>>回复数量</option>
<option value="t_count" <%if cpbtime="t_count" then response.write("selected")%>>人气值</option>
<option value="t_username" <%if cpbtime="t_username" then response.write("selected")%>>作者</option>
<option value="t_time" <%if cpbtime="t_time" then response.write("selected")%>>发表时间</option>
<option value="t_lastusername" <%if cpbtime="t_lastusername" then response.write("selected")%>>最后发表人</option>
</select> 以
<select name="cpbselect" class="bdtj3">
<option value="asc" <%if cpbselect="asc" then response.write("selected")%>>升序</option>
<option value="desc" <%if cpbselect="desc" then response.write("selected")%>>降序</option>
</select>
排列, 显示 <SELECT NAME="Days" class="bdtj3">
<OPTION value="0" <%if days=0 then response.write("selected")%>>论坛全部主题
<option value=1 <%if days=1 then response.write("selected")%>>一天内的主题
<option value=2 <%if days=2 then response.write("selected")%>>两天内的主题
<option value=7 <%if days=7 then response.write("selected")%>>一星期内的主题
<option value=15 <%if days15 then response.write("selected")%>>半个月内的主题
<option value=30 <%if days=30 then response.write("selected")%>>一个月内的主题
<option value=60 <%if days=60 then response.write("selected")%>>两个月内的主题
<option value=180 <%if days=180 then response.write("selected")%>>半年内的主题
<option value=365 <%if days=365 then response.write("selected")%>>一年内的主题
</SELECT> <input type="submit" value="提交" name="B1" class=bdtj></td>
</form>
<td align="right" class=tdc>
跳转到: <select name="menu1" onChange="jump('parent',this,0)" class="bdtj3">
<option value="#" selected > ├<%=rslanmu("l_title")%></option>
<% sqlfen="select f_id,f_title from fenlei order by f_num asc"
set rsfen=conn.execute(sqlfen)
do while not rsfen.eof%>
<option value="#">++<%=rsfen("f_title")%>++</option>
<%sql_lanmu1="select l_id,l_title from lanmu where f_id="&rsfen("f_id")&""
set rs_lanmu1=conn.execute(sql_lanmu1)
%>
<% do while not rs_lanmu1.Eof %>
<option value=list.asp?l_id=<%=rs_lanmu1("l_id")%>> ├<%=rs_lanmu1("l_title")%></option>
<%rs_lanmu1.MoveNext
Loop
set rs_lanmu1=nothing
rsfen.movenext
loop
set rsfen=nothing
set rslanmu=nothing%> </select>
</td>
</tr>
</table>
<div align="center">
<center>
<table width=<%=tdc3%> border="0" style="border-collapse: collapse" class=tb1 cellpadding="4" cellspacing="0" height="60">
<tr <%=tColor%> class=tdc1>
<td height="22" <%=tColor%> colspan="2">
>>论坛图例</td>
<td height="22" width="28%" <%=tColor%>>
当前时间是:<% response.write Nowtime%></td>
<td height="22" width="20%" <%=tColor%>>
<< 所有时间均为<%=h_servertext%></td>
</tr>
<tr bgcolor=<%=tColor2%> class=tdc><td width="25%"><img src=image/closed.gif > 普通帖子</td><td width="25%"><img src=image/new.gif > 新主题</td>
<td width="25%"><img src=image/hotclosed.gif > 热帖(超过<%=h_rtop%>人浏览)</td><td width="25%"><img src=image/vote.gif > 投票帖子</td></tr><tr bgcolor=<%=tColor2%> class=tdc><td width="25%"><img src=image/locktop.gif > 置于顶部的贴子</td>
<td width="25%"><img src=image/jh.gif> 精华帖子</td><td width="25%"> <img src=image/lock.gif > 关闭的主题(不再接受回复)</td><td width="25%"><img src=image/announce.gif> 总固顶贴</td></tr></table>
</td></tr>
</table>
</center>
</div>
<!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -