📄 topic_stats.asp
字号:
<%
'#############################################################
'# 中国在线--极酷论坛 ver.2001 3.0
'#
'# 版权所有: 中国在线 (ChinaXP.Net)
'#
'# 制作人 : 周周 (SeeYa!)
'#
'#
'# 主页地址: http://www.ChinaXP.net/ 中国在线
'# http://bbs.ChinaXP.Net 中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
If Request("whichpage") = "" or Request("whichpage") <= 0 then
mypage = 1
Else
mypage = CINT(Request("whichpage"))
End If
sort_order=request("sort_order")
if sort_order="" then
sort_order="T_VIEW_COUNT"
end if
strSQL = "SELECT T_SUBJECT, T_VIEW_COUNT, T_REPLIES, TOPIC_ID, T_DATE, T_AUTHOR, T_LAST_POST_AUTHOR FROM " & strTablePrefix & "TOPICS WHERE " & sort_order & ">0 order by " & sort_order & " DESC"
Set stats_RS = CreateObject("ADODB.Recordset")
stats_RS.cachesize=20
stats_RS.open strSql, my_Conn, 3
if not(stats_RS.Eof or stats_RS.Bof) then
stats_RS.MoveFirst
stats_RS.PageSize = strPageSize
stats_RS.CacheSize = stats_RS.PageSize
maxPages = stats_RS.PageCount
If myPage > stats_RS.PageCount Then
myPage = stats_RS.PageCount
end if
stats_RS.AbsolutePage = myPage
StartPageNum=1
do while StartPageNum+10<=myPage
StartPageNum = StartPageNum+10
Loop
EndPageNum = StartPageNum+9
If EndPageNum>stats_RS.Pagecount then EndPageNum=stats_RS.Pagecount
end if
%>
<% '################################## %>
<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
<TR>
<TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0"> <% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0"> 论坛主题统计
</FONT></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<% '################################## %>
<TABLE width="<% Response.Write strTableWidth %>" align="center" border=0>
<TR>
<td width="33%" align="left" nowrap></td>
<td align=right>
<% if maxpages > 1 then %>
<font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><B>本论坛共有 <FONT color="<% =strInsistFontColor %>"><% Response.Write maxpages %></FONT> 页</B>: <% Call Paging() %></FONT>
<% end if %>
</td>
</TR>
</TABLE>
<table border="0" width="<% Response.Write strTableWidth %>" align="center" cellpadding="4" cellspacing="1" bgcolor="<% =strTableBorderColor %>">
<tr>
<td width="38%" bgcolor="<%= strCategoryCellColor %>" align="Center"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong>主题</strong></font></td>
<td width="10%" bgcolor="<%= strCategoryCellColor %>" align="Center"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong>作者</strong></font></td>
<td width="15%" bgcolor="<%= strCategoryCellColor %>" align="left"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong>日期</strong></font></td>
<td width="5%" bgcolor="<%= strCategoryCellColor %>" align="left"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong><a href="topic_stats.asp?sort_order=T_VIEW_COUNT">人气</a></strong></td>
<td width="5%" bgcolor="<%= strCategoryCellColor %>" align="left"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong><a href="topic_stats.asp?sort_order=T_REPLIES">回复</a></strong></td>
<td width="10%" bgcolor="<%= strCategoryCellColor %>" align="Center"><font color="<%= strCategoryFontColor %>" size="<%= strDefaultFontSize %>"><strong>最后回复</strong></font></td>
</tr>
<% if stats_RS.EOF or stats_RS.BOF then %>
<TR>
<TD colspan="6" bgcolor="<% Response.Write strForumCellColor %>"><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><b>没有找到任何主题</b></font></TD>
</TR>
<% else
rec = 1
do until stats_RS.EOF or (rec = strPageSize + 1)
if rec mod 2 then
tdcolor = strForumCellColor
else
tdcolor = strAltForumcellColor
end if
%>
<tr>
<td width="38%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<a href="link.asp?TOPIC_ID=<%=stats_RS("TOPIC_ID")%>">
<%=stats_RS("T_SUBJECT")%></a></td>
<td width="10%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<a href="member_profile.asp?mode=display&id=<%=stats_RS("T_AUTHOR")%>">
<%=getMemberName(stats_RS("T_AUTHOR"))%></a></td>
<td width="12%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<font size=1> <%=chkdate(stats_RS("T_DATE"))%>, <%=chktime(stats_RS("T_DATE"))%></td>
<td width="5%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<%=stats_RS("T_VIEW_COUNT")%></td>
<td width="5%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<%=stats_RS("T_REPLIES")%></td>
<td width="5%" bgcolor="<%=tdcolor%>" valign=top><font size="<%= strFooterFontSize+1 %>">
<%
if stats_RS("T_LAST_POST_AUTHOR")<>0 then
response.write "<a href=""member_profile.asp?mode=display&id="&stats_RS("T_LAST_POST_AUTHOR")&""">"
response.write getmemberName(stats_RS("T_LAST_POST_AUTHOR"))&"</a> "
else
response.write " "
end if
%></td>
</tr>
<%
rec = rec + 1
stats_RS.movenext
loop
end if
stats_RS.close
set stats_RS = Nothing
%>
</table>
<% if maxpages > 1 then %>
<TABLE border=0 width="<% Response.Write strTableWidth %>" align="center">
<TR>
<TD><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><B>本论坛共有 <FONT color="<% =strInsistFontColor %>"><% Response.Write maxpages %></FONT> 页</B>: <% Call Paging() %></FONT></TD>
</TR>
</TABLE>
<% end if %>
<!--#INCLUDE FILE="inc_adv.asp" -->
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
sub Paging()
if maxpages > 1 then
sScriptName = Request.ServerVariables("script_name")
'####################################
if sort_order <> "" then
ref2 = "&sort_order=" & sort_order
end if
'####################################
ref = "<B>[ "
if myPage-10 > 0 then
ref = ref & "<A HREF=""" & sScriptName
ref = ref & "?whichpage=" & StartPageNum - 1
ref = ref & ref2
ref = ref & """>←</a> "
end if
For I = StartPageNum to EndPageNum
if I <> myPage then
ref = ref & "<A href=""" & sScriptName & "?whichpage=" & I
ref = ref & ref2
ref = ref & """>" & I & "</a> "
else
ref = ref & "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strInsistFontColor & ">" & I & "</FONT> "
end if
Next
if EndPageNum < maxpages then
ref = ref & "<A href=""" & sScriptName & "?whichpage=" & EndPageNum + 1
ref = ref & ref2
ref = ref & """>→</a> "
end if
ref = ref & "]</B>"
Response.Write (ref)
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -