⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 statistics.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	       http://bbs.ChinaXP.Net    中国在线--极酷论坛
'#
'#############################################################

	Dim Forum_Count
'	Dim NewMember_Name, NewMember_Id, Member_Count
	Dim LastPostDate, LastPostLink
	Forum_Count = intForumCount

	if NewMember_Name<>"" then
		set rs = Server.CreateObject("ADODB.Recordset")

		'## Forum_SQL - Get newest membername and id from DB
		strSql = "SELECT M_NAME, MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE M_STATUS=1 AND MEMBER_ID > 1"
		strSql = strSQL & " ORDER BY M_DATE desc;"
		set rs = my_Conn.Execute(strSql)
		if not rs.EOF then
			NewMember_Name = ChkString(rs("M_NAME"), "display")
			NewMember_Id = rs("MEMBER_ID")
		else
			NewMember_Name = ""
		end if
	end if

	'## Forum_SQL - Get Active membercount from DB
	strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_POSTS > 0 AND M_STATUS=1"
	set rs = my_Conn.Execute(strSql)
	
	if not rs.EOF then
		Member_Count = rs("U_COUNT")
	else
		Member_Count = 0
	end if
	
	LastPostDate = ""
 	LastPostLink = ""
	LastPostAuthorLink = ""
	
	if not (intLastPostForum_ID = "") then	
		'## Forum_SQL - Get lastPostDate and link to that post from DB
		strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "FORUM.FORUM_ID, "
		strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, "
		strSql = strSql & strTablePrefix & "TOPICS.T_LAST_POST, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
		strSql = strSql & "FROM " & strTablePrefix & "FORUM, " & strTablePrefix & "TOPICS, "
		strSql = strSql & strMemberTablePrefix & "MEMBERS "
		strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID "
		strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID "
		strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
		strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & intLastPostForum_ID & " "
		strSql = strSql & "ORDER BY " & strTablePrefix & "TOPICS.T_LAST_POST DESC;"

	 	set rs = my_Conn.Execute(strSql)
 	
 		if not rs.EOF then
			LastPostDate = ChkDate(rs("T_LAST_POST")) & ChkTime(rs("T_LAST_POST"))
			LastPostLink = "topic.asp?TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & rs("CAT_ID")
			LastPostAuthorLink = " 作者:"
			strMember_ID = rs("MEMBER_ID")
			strM_NAME = ChkString(rs("M_NAME"),"display")
			if strUseExtendedProfile then
				LastPostAuthorLink = LastPostAuthorLink & "<a href=""pop_profile.asp?mode=display&id="& strMember_ID & """>"
			else
				LastPostAuthorLink = LastPostAuthorLink & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & strMember_ID & "')"">"
			end if
            LastPostAuthorLink = LastPostAuthorLink  & strM_NAME & "</a>"
		end if
	end if

	ActiveTopicCount = -1
	if not IsNull(Session(strCookieURL & "last_here_date")) then
		if not blnHiddenForums then
			'## Forum_SQL - Get ActiveTopicCount from DB
			strSql = "SELECT COUNT(" & strTablePrefix & "TOPICS.T_LAST_POST) AS NUM_ACTIVE "
			strSql = strSql & "FROM " & strTablePrefix & "TOPICS "
			strSql = strSql & "WHERE (((" & strTablePrefix & "TOPICS.T_LAST_POST)>'"& Session(strCookieURL & "last_here_date") & "'))"

			set rs = my_Conn.Execute(strSql)
			if not rs.EOF then
				ActiveTopicCount = rs("NUM_ACTIVE")
			else
				ActiveTopicCount = 0
			end if
		end if
	end if

	rs.close
	set rs = nothing
%>
	<TR>
          <TD bgcolor="<% =strCategoryCellColor %>" colspan="<% if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then Response.Write("2") else Response.Write("1")%>">
<%		HideForumStat = "HideCat" & 0
		If Request.Cookies(HideForumStat) = "Y" then %>
<%			if (InStr(1, ScriptName, "default.asp", 1)) then %>
			        <a href="<% =ScriptName & "?" %><% =HideForumStat & "=N" %>"><img src="<%=strImageURL %>icon_1.gif" border="0"></a>
<%			else %>
				<a href="<% =ScriptName & "default.asp?" %><% =HideForumStat & "=N" %>"><img src="<%=strImageURL %>icon_1.gif" border="0"></a>
<%			end if %>
<%		Else %>
<%			if (InStr(1, ScriptName, "default.asp", 1)) then %>
				<a href="<% =ScriptName & "?" %><% =HideForumStat & "=Y" %>"><img src="<%=strImageURL %>icon_2.gif" border="0"></a>
<%			else %>
				<a href="<% =ScriptName & "default.asp?" %><% =HideForumStat & "=Y" %>"><img src="<%=strImageURL %>icon_2.gif" border="0"></a>
<%			end if %>
<%		end if %>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" size="+1"><b>论坛状态列</b></font></td>
        </TR>

<%     if Request.Cookies(HideForumStat) <> "Y" then
	strRowspan = 4
	if NewMember_Name = "" then
		strRowspan = strRowspan -1
	end if
	if not ShowLastHere then
		strRowspan = strRowspan -1
	end if

'if (ShowLastHere and NewMember_Name <> "") then Response.Write("4") else Response.Write("3") end if
%>
	<tr>
	  <td rowspan="<% Response.Write strRowspan %>" bgcolor="<%= strAltForumCellColor %>">&nbsp;</td>
<%
SET strRowspan = Nothing
	if ShowLastHere then
%>
          <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("1") else Response.Write("1") end if %>"><font align=left face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">您上次到访的时间:<% =ChkDate(Session(strCookieURL & "last_here_date")) %> <% =ChkTime(Session(strCookieURL & "last_here_date")) %></font></td>
	</tr>
	  <tr>
<%	end if %>
<%
	if intPostCount > 0 or IsNull(intPostCount) then
%>
        <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("1") else Response.Write("1") end if%>">
        <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<%
		strUser = Users & " 名会员"
		if Member_Count = 1 then
				if users = 1 then
					Response.Write(strUser & ",发表了 ")
				else
					Response.Write(strUser & "中的 1 位,发表了 ")
				end if
		else
				Response.Write(strUser & "中的 " & Member_Count & " 位,发表了 ")
		end if
		Response.Write(intPostCount & " 篇文章在 ")
		Response.Write(intForumCount & " 个讨论区")

		if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then
			Response.Write("。")
		else
			Response.Write(",而最新发表的文章是在 <a href=""" & lastPostLink & """>"& lastPostDate & "</a>")
			if  LastPostAuthorLink <> "" then
				Response.Write(LastPostAuthorLink & "。")
			else
				Response.Write("。")
			end if
		end if
%>
		  </font>
          </td>
        </tr>

        <tr>
<%
	end if
%>
        <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("1") else Response.Write("1") end if%>">
        <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>">本论坛共有 <%= intPostCount %> 篇文章<% if ActiveTopicCount > 0 then %>,其中有 <%= ActiveTopicCount %> 个<a href="active.asp">主题有新文章</a>。<% elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then %>,其中有<a href="active.asp">主题有新文章</a>。<% elseif not(ShowLastHere) then Response.Write "。" else %>,但是并没有新文章。<% end if %></font>
        </td>
      </tr>
<%
	if NewMember_Name <> "" then
%>
      <tr>
        <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("1") else Response.Write("1") end if%>">
        <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>">热烈欢迎我们的新会员:
</font>
<%
		if strUseExtendedProfile then
			Response.Write "        <a href=""pop_profile.asp?mode=display&id="& NewMember_Id & """>"
		else
			Response.Write "        <a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & NewMember_Id & "')"">"
		end if
		Response.Write NewMember_Name & "</a>.</font>" & vbcrlf
%></td></tr><%
	end if
End If %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -