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

📄 default.asp

📁 代码名称: Snitz Forums 2000 代码语言: 英文 代码类型: 国外代码 运行环境: ASP 授权方式: 免费代码 代码大小: 530kb 代码等级: 3 整
💻 ASP
📖 第 1 页 / 共 4 页
字号:
	strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_POSTS > 0 AND M_STATUS=1"

	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql, my_Conn

	if not rs.EOF then
		Member_Count = rs("U_COUNT")
	else
		Member_Count = 0
	end if

	rs.close
	set rs = nothing

	'## Forum_SQL - Get membercount from DB 
	strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_STATUS=1"

	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql, my_Conn

	if not rs.EOF then
		User_Count = rs("U_COUNT")
	else
		User_Count = 0
	end if

	rs.close
	set rs = nothing

	LastPostDate = ""
 	LastPostLink = ""
	LastPostAuthorLink = ""

	if not (intLastPostForum_ID = "") then	
		ForumTopicReplies = intTopicReplies
		ForumLastPostTopicID = intLastPostTopic_ID
		ForumLastPostReplyID = intLastPostReply_ID

		LastPostDate = ChkDate(strLastPostDate,"",true)
		LastPostLink = DoLastPostLink(false)
		LastPostAuthorLink = " by: <span class=""spnMessageText"">" & profileLink(chkString(strLastPostMember_Name,"display"),intLastPostMember_ID) & "</span>"
	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 " &_
				 " FROM " & strTablePrefix & "TOPICS " &_
				 " WHERE (((" & strTablePrefix & "TOPICS.T_LAST_POST)>'"& Session(strCookieURL & "last_here_date") & "'))" &_
				 " AND " & strTablePrefix & "TOPICS.T_STATUS <= 1"

			set rs = Server.CreateObject("ADODB.Recordset")
			rs.open strSql, my_Conn
			
			if not rs.EOF then
				ActiveTopicCount = rs("NUM_ACTIVE")
			else
				ActiveTopicCount = 0
			end if

			rs.close
			set rs = nothing
		end if
	end if

	ArchivedPostCount = 0
	ArchivedTopicCount = 0
	if not blnHiddenForums and strArchiveState = "1" then
		'## Forum_SQL
		strSql = "SELECT P_A_COUNT, T_A_COUNT FROM " & strTablePrefix & "TOTALS"

		set rs = Server.CreateObject("ADODB.Recordset")
		rs.open strSql, my_Conn

		if not rs.EOF then
			ArchivedPostCount = rs("P_A_COUNT")
			ArchivedTopicCount = rs("T_A_COUNT")
		else
			ArchivedPostCount = 0
			ArchivedTopicCount = 0
		end if

		rs.Close
		set rs = nothing
	end if

	'ShowLastHere = (cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1)) > 0)
	Response.Write	"              <tr>" & vbNewline & _
			"                <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) &_
			"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Statistics</b></font></td>" & vbNewline & _
			"              </tr>" & vbNewline & _
			"              <tr>" & vbNewline & _
			"                <td rowspan=""" 
	intStatRowSpan = 3
        if ShowLastHere then
        	intStatRowSpan = intStatRowspan + 1
        end if	
        if ArchivedPostCount > 0 and strArchiveState = "1" then
        	intStatRowSpan = intStatRowspan + 1
        end if
 	Response.Write intStatRowSpan
	Response.Write	""" bgcolor=""" & strForumCellColor & """>&nbsp;</td>" & vbNewline
	if ShowLastHere then 
		Response.Write	"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
				""">" & _
		       		"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>You last visited on " & ChkDate(Session(strCookieURL & "last_here_date"), " " ,true) & "</font></td>" & vbNewline & _
		       		"              </tr>" & vbNewline & _
		  		"              <tr>" & vbNewLine
	end if
	if intPostCount > 0 then
		Response.Write	"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
				""">" & _
				"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>"
		if Member_Count = 1 and User_Count = 1 then
			Response.Write	"1 Member has "
		else
			Response.Write	Member_Count & " of " & User_Count & " <span class=""spnMessageText""><a href=""members.asp"">Members</a></span> have "
		end if
		Response.Write	" made "
		if intPostCount = 1 then
			Response.Write	"1 post "
		else
			Response.Write	intPostCount & " posts"
		end if
		Response.Write	" in "
		if intForumCount = 1 then
			Response.Write	"1 forum"
		else
			Response.Write	intForumCount & " forums"
		end if
		if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then 
			Response.Write	"." 
		else
			Response.Write	", with the last post on <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"
			if  LastPostAuthorLink <> "" then
				Response.Write	LastPostAuthorLink & "."
			else
				Response.Write	"."
			end if
		end if
		Response.Write	"</font></td>" & vbNewline & _
			    	"              </tr>" & vbNewline & _
				"              <tr>" & vbNewline
	end if
	Response.Write	"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
			""">" & _
			"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>There "
	if intTopicCount = 1 then
		Response.Write	"is "
	else
		Response.Write	"are "
	end if
	Response.Write	" currently "
	if intTopicCount > 0 then
		Response.Write	intTopicCount
	else
		Response.Write	"no"
	end if
	if intTopicCount = 1 then
		Response.Write	" topic"
	else
		Response.Write	" topics"
	end if
	if ActiveTopicCount > 0 then
		Response.Write	" and " & ActiveTopicCount & " <span class=""spnMessageText""><a href=""active.asp"">active "
		if ActiveTopicCount = 1 then
			Response.Write	"topic"
		else
			Response.Write	"topics"
		end if
		Response.Write	"</a></span> since you last visited."
	elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then
		Response.Write	" and there are <span class=""spnMessageText""><a href=""active.asp"">active topics</a></span> since you last visited."
	elseif not(ShowLastHere) then
		Response.Write	"."
	else
		Response.Write	" and no active topics since you last visited."
	end if
	Response.Write	"</font></td>" & vbNewline & _
			"              </tr>" & vbNewline

	if ArchivedPostCount > 0 and strArchiveState = "1" then 
		Response.Write	"              <tr>" & vbNewline & _
				"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
				"""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & _
				"There "
		if ArchivedPostCount = 1 then
			Response.Write	"is "
		else
			Response.Write	"are "
		end if
		Response.Write	ArchivedPostCount & " "
		if ArchivedPostCount = 1 then
			Response.Write	" archived post "
		else
			Response.Write	" archived posts"
		end if
		if ArchivedTopicCount > 0 then
			Response.Write	" in " & ArchivedTopicCount 
			if ArchivedTopicCount = 1 then
				Response.Write	" archived topic"
			else
				Response.Write	" archived topics"
			end if
		end if
		Response.Write	"</font></td>" & vbNewline & _
				"              </tr>" & vbNewline
	end if 
	if NewMember_Name <> "" then 
		Response.Write	"              <tr>" & vbNewline & _
				"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
				""">" & _
				"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>Please welcome our newest member: " & _
				"<span class=""spnMessageText"">" & profileLink(NewMember_Name,NewMember_Id) & "</span>.</font></td>" & vbNewline & _
				"              </tr>" & vbNewline
	end if 
end sub 

Sub DoHideCategory(intCatId)
       	HideForumCat = strUniqueID & "HideCat" & intCatId
     	if Request.QueryString(HideForumCat) = "Y" then
     		Response.Cookies(HideForumCat) = "Y"
       		Response.Cookies(HideForumCat).Expires = dateAdd("d", 30, strForumTimeAdjust)
       	else
       		if Request.QueryString(HideForumCat) = "N" then
       			Response.Cookies(HideForumCat) = "N"
       			Response.Cookies(HideForumCat).Expires = dateadd("d", -2, strForumTimeAdjust)
       		end if
       	end if
end sub

Function DoLastPostLink(showicon)
	if ForumLastPostReplyID <> 0 then
		PageLink = "whichpage=-1&"
		AnchorLink = "&REPLY_ID="
		DoLastPostLink = "<a href=""topic.asp?" & PageLink & "TOPIC_ID=" & ForumLastPostTopicID & AnchorLink & ForumLastPostReplyID & """>"
		if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & "</a>"
	elseif ForumLastPostTopicID <> 0 then
		DoLastPostLink = "<a href=""topic.asp?TOPIC_ID=" & ForumLastPostTopicID & """>"
		if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & "</a>"
	else
		DoLastPostLink = ""
	end if
end function

function listForumModerators(fForum_ID)
	fForumMods = split(strForumMods,"|")
	for iModerator = 0 to ubound(fForumMods)
		fForumMod = split(fForumMods(iModerator),",")
		ModForumID = fForumMod(0)
		ModMemID = fForumMod(1)
		ModMemName = fForumMod(2)
		if cLng(ModForumID) = cLng(fForum_ID) then
			if fMods = "" then
				fMods = "<nobr>" & profileLink(chkString(ModMemName,"display"),ModMemID) & "</nobr>"
			else
				fMods = fMods & ", <nobr>" & profileLink(chkString(ModMemName,"display"),ModMemID) & "</nobr>"
			end if
		end if
	next
	if fMods = "" then fMods = "&nbsp;"
	listForumModerators = fMods
end function
%>

⌨️ 快捷键说明

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