📄 default_category.asp
字号:
<%
'########## Snitz Forums 2000 Version 3.1 SR4 ####################
'# #
'# 汉化修改: 资源搜罗站 #
'# 电子邮件: cgier@21cn.com #
'# 主页地址: http://www.sdsea.com #
'# http://www.99ss.net #
'# http://www.cdown.net #
'# http://www.wzdown.com #
'# http://www.13888.net #
'# 论坛地址:http://ubb.yesky.net #
'# 最后修改日期: 2001/03/12 中文版本:Version 3.1 SR4 #
'#################################################################
'# 原始来源 #
'# Snitz Forums 2000 Version 3.1 SR4 #
'# Copyright 2000 http://forum.snitz.com - All Rights Reserved #
'#################################################################
'#【版权声明】 #
'# #
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,#
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。 #
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓#
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢! #
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作#
'# 如有任何问题请到我们的论坛告诉我们 #
'#################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = Request.Form("Name")
if strAuthType = "nt" then
strDBNTUserName = Session(strCookieURL & "userID")
strDBNTFUserName = Session(strCookieURL & "userID")
end if
if strAutoLogon = 1 then
if (ChkAccountReg() <> "1") then
Response.Redirect "register.asp?mode=DoIt"
end if
end if
if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
set rs1 = Server.CreateObject("ADODB.Recordset")
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "TOTALS.P_COUNT, " & strTablePrefix & "TOTALS.T_COUNT, " & strTablePrefix & "TOTALS.U_COUNT "
strSql = strSql & " FROM " & strTablePrefix & "TOTALS"
rs1.open strSql, my_Conn
Users = rs1("U_COUNT")
Topics = rs1("T_COUNT")
Posts = rs1("P_COUNT")
rs1.Close
set rs1 = nothing
'## Declare Variables
Dim rsCat_ID, rsCat_Name, rsCat_Status, rsCat_Description, rsCat_SumForum, rsCat_SumTopic, rsCat_SumPost, rsCat_LastPost
'## Forum_SQL - Get all Forums From DB - mod 12/17/2000 drv
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " &_
" " & strTablePrefix & "CATEGORY.CAT_NAME, " &_
" " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_
" COUNT(" & strTablePrefix & "FORUM.F_SUBJECT) AS SumForum, " &_
" SUM(" & strTablePrefix & "FORUM.F_TOPICS) AS SumTopic, " &_
" SUM(" & strTablePrefix & "FORUM.F_COUNT) AS SumPost, " &_
" MAX(" & strTablePrefix & "FORUM.F_LAST_POST) AS LastPost " &_
" FROM " & strTablePrefix & "FORUM RIGHT OUTER JOIN " &_
" " & strTablePrefix & "CATEGORY ON " &_
" " & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "CATEGORY.CAT_ID " &_
" GROUP BY " & strTablePrefix & "CATEGORY.CAT_NAME, " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_STATUS " &_
" ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME;"
'response.write strSql
'response.end
set rs = my_Conn.Execute (strSql)
%>
<table border=0 width="95%" cellspacing=0 cellpadding=0 align=center>
<tr>
<td>
<%
ShowLastHere = (cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) > 0)
if strShowStatistics <> "1" then
%>
<table width="100%" border="0">
<tr>
<td>
<%
if ShowLasthere then
%>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">上次登陆时间 - <% =ChkDate(Session(strCookieURL & "last_here_date")) %> <% =ChkTime(Session(strCookieURL & "last_here_date")) %></font>
<%
else
%>
<%
end if
%>
</td>
<td align=right><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">共 <% =Topics %> 个主题,文章 <% =Posts %> 篇,注册会员总数: <% =Users %> </font></td>
</tr>
</table>
<%
else
Response.Write(" ")
end if
%>
</td>
</tr>
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border=0 width="100%" cellspacing=1 cellpadding=4>
<tr>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b> </td>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Forum Categories</font></b></td>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">论坛列表</font></b></td>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">主题</font></b></td> <td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">文章</font></b></td>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">最后发表</font></b></td>
<%
if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then
%>
<td align=center bgcolor="<% =strHeadCellColor %>" nowrap valign="top"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">版主</font></b></td>
<%
end if
if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %>
<td align=center bgcolor="<% =strHeadCellColor %>"><% PostingOptions() %></td>
<%
end if
%>
</tr>
<%
if rs.EOF or rs.BOF then
%>
<tr>
<td bgcolor="<% =strCategoryCellColor %>" colspan="<% if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then Response.Write("7") else Response.Write("6")%>"><font face="<% =strDefaultFontFace %>" color="<% =strCategoryFontColor %>" size="<% =strDefaultFontSize %>" valign="top"><b>没有找到分类或论坛</b></font></td>
<%
if (mlev = 4 or mlev = 3) then
%>
<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" color="<% =strCategoryFontColor %>" size="<% =strDefaultFontSize %>" valign="top"> </font></td>
<%
end if
%>
</tr>
<%
else
intPostCount = 0
intTopicCount = 0
intForumCount = 0
strLastPostDate = ""
do until rs.EOF
' Set Recordset Values to Variables
rsCat_ID = rs.Fields("CAT_ID").Value
rsCat_Name = rs.Fields("CAT_NAME").Value
rsCat_Status = rs.Fields("CAT_STATUS").Value
'rsCat_Description = rs.Fields("CAT_DESCRIPTION").Value
rsCat_SumForum = rs.Fields("SumForum").Value
rsCat_SumTopic = rs.Fields("SumTopic").Value
rsCat_SumPost = rs.Fields("SumPost").Value
rsCat_LastPost = rs.Fields("LastPost").Value
If IsNumeric(rsCat_SumPost) Then intPostCount = intPostCount + rsCat_SumPost
If IsNumeric(rsCat_SumTopic) Then intTopicCount = intTopicCount + rsCat_SumTopic
If IsNumeric(rsCat_SumForum) Then intForumCount = intForumCount + rsCat_SumForum
If (rsCat_LastPost > strLastPostDate) Then strLastPostDate = rsCat_LastPost
Response.Write " <tr>" & vbcrlf
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"" nowrap>" & vbCrLf
if rsCat_Status = 0 then
Response.Write " <a href=""category.asp?CAT_ID=" & rsCat_ID & """>"
if rsCat_LastPost > Session(strCookieURL & "last_here_date") then
Response.Write "<img src=""<%=strImageURL %>icon_folder_new_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""分类已锁定""></a>"
else
Response.Write "<img src=""<%=strImageURL %>icon_folder_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""分类已锁定""></a>"
end if
else
Response.Write " <a href=""category.asp?CAT_ID=" & rsCat_ID & """>" & ChkIsNew(rsCat_LastPost) & "</a>"
end if
Response.Write "</td>" & vbCrLf
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""left"" valign=""top"" nowrap>" & vbCrLf
Response.Write "<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """><a href=""category.asp?CAT_ID=" & rsCat_ID & """>" & ChkString(rs("CAT_NAME"),"display") & "</a></font></td>" & vbcrlf
' Category Forum Count
If IsNull(rsCat_SumForum) Then rsCat_SumForum = 0
Response.Write ("<td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"">" &_
"<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" &_
rsCat_SumForum & "</font></td>" & vbCrLf)
' Category Topic Count
If IsNull(rsCat_SumTopic) Then rsCat_SumTopic = 0
Response.Write ("<td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"">" &_
"<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" &_
rsCat_SumTopic & "</font></td>" & vbCrLf)
' Category Post Count
If IsNull(rsCat_SumPost) Then rsCat_SumPost = 0
Response.Write ("<td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"">" &_
"<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" &_
rsCat_SumPost & "</font></td>" & vbCrLf)
' Category Last Post Date
Response.Write ("<td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"" nowrap>")
Response.Write ("<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>")
If (rsCat_LastPost <> "") Then
Response.Write ("<b>" & ChkDate(rsCat_LastPost) & "</b>" & "<br>" & ChkTime(rsCat_LastPost))
Else
Response.Write (" ")
End If
Response.Write ("</td><td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"" nowrap> </td>")
if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
call CategoryAdminOptions()
Response.Write "</font></b></td>" & vbcrlf
end if
Response.Write " </tr>" & vbcrlf
chkDisplayHeader = false
rs.MoveNext
loop
end if
if strShowStatistics = "1" then%>
<!--#include file="statistics.asp"-->
<%end if %>
<!--#include file="online2.asp"-->
</table>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<img alt="新文章" src="<%=strImageURL %>icon_folder_new.gif" width=8 height=9> 自从上次访问后有新文章<br>
<img alt="旧文章" src="<%=strImageURL %>icon_folder.gif" width=8 height=9> 自从上次访问后无新文章<br>
</font>
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -