<% '################################################################################# '## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %> <% Cat_ID = Request.QueryString("CAT_ID") scriptname = request.servervariables("script_name") 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 if strShowStatistics <> "1" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "TOTALS.P_COUNT, " &_ strTablePrefix & "TOTALS.T_COUNT, " &_ strTablePrefix & "TOTALS.U_COUNT " &_ " FROM " & strTablePrefix & "TOTALS" Set rs1 = Server.CreateObject("ADODB.Recordset") rs1.open strSql, my_Conn Users = rs1("U_COUNT") Topics = rs1("T_COUNT") Posts = rs1("P_COUNT") rs1.Close set rs1 = nothing end if '## Forum_SQL - Get all Categories from the DB strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " &_ strTablePrefix & "CATEGORY.CAT_STATUS, " &_ strTablePrefix & "CATEGORY.CAT_NAME, " &_ strTablePrefix & "CATEGORY.CAT_ORDER, " &_ strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " &_ strTablePrefix & "CATEGORY.CAT_MODERATION " &_ " FROM " & strTablePrefix & "CATEGORY " if Cat_ID <> "" then strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Cat_ID end if strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_ORDER ASC, " &_ strTablePrefix & "CATEGORY.CAT_NAME ASC;" set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn Response.Write "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewline ' If Whole Board Subscription is allowed, check for a subscription by this user. if strSubscription = 1 then Response.Write " " & vbNewline Response.Write " " & vbNewline Response.Write "
" & vbNewline CheckSubscription "BOARD", MemberID, 0, 0, 0, "", "" Response.Write "
" & vbNewline Response.Write "
" & vbNewline end if ShowLastHere = (cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) > 0) if strShowStatistics <> "1" then Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewline if ShowLasthere then Response.Write " You Last Visited - " & ChkDate(Session(strCookieURL & "last_here_date")) & " " & ChkTime(Session(strCookieURL & "last_here_date")) & "" & vbNewline else Response.Write "  " & vbNewline end if Response.Write " There are " & Posts & " Posts in " & Topics & " Topics and " & Users & " Users  
" & vbNewline else Response.Write "   " & vbNewline end if Response.Write "
" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then Response.Write " " & vbNewline end if Response.Write " " & vbNewline Response.Write " " & vbNewline if rs.EOF or rs.BOF then Response.Write " " & vbNewline & _ " " & vbNewline if (mlev = 4 or mlev = 3) then Response.Write "" & vbNewline end if Response.Write " " & vbNewline else intPostCount = 0 intTopicCount = 0 intForumCount = 0 strLastPostDate = "" do until rs.EOF CatSubscription = rs("CAT_SUBSCRIPTION") CatModeration = rs("CAT_MODERATION") '## Forum_SQL - Build SQL to get forums via category strSql = "SELECT " & strTablePrefix & "FORUM.FORUM_ID, " &_ strTablePrefix & "FORUM.F_STATUS, " &_ strTablePrefix & "FORUM.CAT_ID, " &_ strTablePrefix & "FORUM.F_SUBJECT, " &_ strTablePrefix & "FORUM.F_URL, " &_ strTablePrefix & "FORUM.F_DESCRIPTION, " &_ strTablePrefix & "FORUM.F_TOPICS, " &_ strTablePrefix & "FORUM.F_COUNT, " &_ strTablePrefix & "FORUM.F_LAST_POST, " &_ strTablePrefix & "FORUM.F_TYPE, " &_ strTablePrefix & "FORUM.F_ORDER, " &_ strTablePrefix & "FORUM.F_PRIVATEFORUMS, " &_ strTablePrefix & "FORUM.F_A_COUNT, " &_ strMemberTablePrefix & "FORUM.F_SUBSCRIPTION, " &_ strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &_ strMemberTablePrefix & "MEMBERS.M_NAME " &_ "FROM " & strTablePrefix & "FORUM " &_ "LEFT JOIN " & strMemberTablePrefix & "MEMBERS ON " &_ strTablePrefix & "FORUM.F_LAST_POST_AUTHOR = " &_ strMemberTablePrefix & "MEMBERS.MEMBER_ID " &_ " WHERE " & strTablePrefix & "FORUM.CAT_ID = " & rs("CAT_ID") & " " &_ " ORDER BY " & strTablePrefix & "FORUM.F_ORDER ASC" &_ ", " & strTablePrefix & "FORUM.F_SUBJECT ASC;" set rsForum = Server.CreateObject("ADODB.Recordset") rsForum.open strSql, my_Conn chkDisplayHeader = true if rsForum.eof or rsForum.bof then Response.Write " " & vbNewline & _ " " & vbNewline else Response.Write "" & ChkString(rs("CAT_NAME"),"display") & "" & vbNewline end if if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewline end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline ' if (mlev = 4 or mlev = 3) then ' Response.Write " " & vbNewline ' end if Response.Write " " & vbNewline else blnHiddenForums = false do until rsForum.Eof ForumSubscription = rsForum("F_SUBSCRIPTION") Dim AdminAllowed, ModerateAllowed if mLev = 4 then AdminAllowed = "Y" else AdminAllowed = "N" end if if mLev = 4 or (chkForumModerator(rsForum("FORUM_ID"), strDBNTUserName) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N" end if if ChkDisplayForum(rsForum("FORUM_ID")) then if rsForum("F_TYPE") <> "1" then intPostCount = intPostCount + rsForum("F_COUNT") intTopicCount = intTopicCount + rsForum("F_TOPICS") intForumCount = intForumCount + 1 if rsForum("F_LAST_POST") > strLastPostDate then strLastPostDate = rsForum("F_LAST_POST") intLastPostForum_ID = rsForum("FORUM_ID") intLastPostMember_ID = rsForum("MEMBER_ID") strLastPostMember_Name = rsForum("M_NAME") end if end if if chkDisplayHeader then Call DoHideCategory(rs("Cat_ID")) Response.Write " " & vbNewline & _ " " & vbNewline else Response.Write " " & ChkString(rs("CAT_NAME"),"display") & "  " & vbNewline end if '##### Above code will specify whether or not to show the forums under a category ##### Response.Write " " & vbNewline Response.Write " " & vbNewline chkDisplayHeader = false end if if Request.Cookies(strUniqueID & HideForumCat) <> "Y" then '##### added as part of Minimize Category Mod ##### Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & chkString(rsForum("F_SUBJECT"),"display") & "
" & vbNewline & _ " " & vbNewline & _ rsForum("F_DESCRIPTION") & vbNewline & _ " " & vbNewline if rsForum("F_TYPE") = 0 then if IsNull(rsForum("F_TOPICS")) then Response.Write "
" & vbNewline else Response.Write " " & vbNewline end if if IsNull(rsForum("F_COUNT")) then Response.Write " " & vbNewline else Response.Write " " & vbNewline end if if IsNull(rsForum("MEMBER_ID")) then strLastUser = "" else strLastUser = "
by: " if strUseExtendedProfile then strLastUser = strLastUser & "" else strLastUser = strLastUser & "" end if strLastUser = strLastUser & chkString(rsForum("M_NAME"),"display") & "" & vbNewline end if Response.Write "
" & vbNewline else if rsForum("F_TYPE") = 1 then '## Do Nothing end if end if if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then Response.Write " " & vbNewline end if Response.Write " " & vbNewline Response.Write " " & vbNewline end if ' ##### Added as part of Minimize Category Mod ##### else blnHiddenForums = true end if ' ChkDisplayForum() rsForum.MoveNext loop rsForum.close set rsForum = nothing end if rs.MoveNext loop rs.close set rs = nothing end if if strShowStatistics = "1" then WriteStatistics end if Response.Write "
" if Cat_ID <> "" then Response.Write " " else Response.Write "  " end if Response.Write " ForumTopicsPostsLast PostModerator(s)" & vbNewline if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then call PostingOptions() else Response.write " " end if Response.Write "
0 ) then Response.Write "6" else Response.Write "5" end if Response.Write """>No Categories/Forums Found 
" if Cat_ID = "" then Response.Write "" & ChkString(rs("CAT_NAME"),"display") & "" & vbNewline call CategoryAdminOptions() Response.Write "
No Forums Found 
" '##### This code will specify whether or not to show the forums under a category ##### HideForumCat = "HideCat" & rs("Cat_ID") if Request.Cookies(strUniqueID & HideForumCat) = "Y" then Response.Write"" else Response.Write"" end if if Cat_ID = "" then Response.Write " " & ChkString(rs("CAT_NAME"),"display") & "  " & vbNewline if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then call CategoryAdminOptions() elseif (mLev > 0) then call CategoryMemberOptions() end if Response.Write "
" & vbNewline if rsForum("F_TYPE") = 0 then ChkIsNew(rsForum("F_LAST_POST")) else if rsForum("F_TYPE") = 1 then Response.Write " " & vbNewline end if end if Response.Write " 0" & rsForum("F_TOPICS") & "0" & rsForum("F_COUNT") & "" & vbNewline & _ " " & ChkDate(rsForum("F_LAST_POST")) & "
" & vbNewline & _ " " & ChkTime(rsForum("F_LAST_POST")) & strLastUser & vbNewline & _ "
" & vbNewline if (listForumModerators(rsForum("FORUM_ID")) <> "") then Response.Write listForumModerators(rsForum("FORUM_ID")) & vbNewline else Response.Write "  " & vbNewline end if Response.Write " " & vbNewline if AdminAllowed = "Y" or (lcase(strNoCookies) = "1") then call ForumAdminOptions elseif mlev > 0 then call ForumMemberOptions end if Response.Write "
" & vbNewline & _ "
" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewline & _ " " & vbNewline & _ " Contains new posts since last visit.
" & vbNewline & _ " No new posts since the last visit.
" & vbNewline ' DEM --> Start of Code added for moderation if UnapprovedFound = "Y" then Response.Write " Posts which have not been approved by the administrator/moderator.
" & vbNewline end if ' DEM --> End of Code added for moderation Response.Write "
" & vbNewline & _ "
" & vbNewline & _ "
" & vbNewline WriteFooter sub PostingOptions() if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & _ "" & _ " " & _ "" & _ " " & _ "" & _ "" & vbNewline ' DEM --> Start of Code for Full Moderation if CheckForUnmoderatedPosts("BOARD", 0, 0, 0) > 0 then Response.Write " " & _ "Approve/Hold/Reject all Unmoderated Posts" & _ "" & vbNewline end if ' DEM --> End of Code for Full Moderation ' DEM - Added to allow for sorting Response.Write "" & vbNewline else Response.Write "  " & vbNewline end if end sub ' DEM --> Changed ChkIsNew to a sub and altered it to do all the folder_icon setting and to incorporate moderation into the code. sub ChkIsNew(dt) Response.Write " " if rs("CAT_ID") <> 0 and rsForum("F_STATUS") <> 0 then if strModeration > 0 and ModerateAllowed = "Y" and (CheckForUnmoderatedPosts("FORUM", rs("CAT_ID"), rsForum("FORUM_ID"), 0) > 0) then UnApprovedFound = "Y" Response.Write "Unmoderated Posts" elseif dt > Session(strCookieURL & "last_here_date") and (rsForum("F_COUNT") > 0 or rsForum("F_TOPICS") > 0) then Response.Write "New Posts" else Response.Write "Old Posts" end if Response.Write "" elseif rsForum("F_LAST_POST") > Session(strCookieURL & "last_here_date") then Response.Write " 0 then Response.Write "alt=""Category Locked"">" else Response.Write "alt=""Forum Locked"">" end if else Response.Write " 0 then Response.Write "alt=""Category Locked"">" else Response.Write "alt=""Forum Locked"">" end if end if end sub sub CategoryAdminOptions() if (mlev = 4) or (lcase(strNoCookies) = "1") then if (rs("CAT_STATUS") <> 0) then Response.Write " " & vbNewline else Response.Write " " & vbNewline end if if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbNewline end if Response.Write " " & vbNewline if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbNewline end if if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbNewline end if if (rs("CAT_STATUS") <> 0) or (mlev = 4) then '## Forum_SQL strSQL = "SELECT FORUM_ID FROM " & strTablePrefix & "FORUM WHERE CAT_ID=" & rs("CAT_ID") Set rsArchive = Server.CreateObject("ADODB.Recordset") rsArchive.open strSql, my_Conn archID = "" do while not rsArchive.EOF if archID <> "" then archID = archID & "," end if archID = archID & rsArchive("FORUM_ID") rsArchive.movenext loop Response.write "" & vbNewline rsArchive.close set rsArchive = nothing end if if CheckForUnmoderatedPosts("CAT", rs("CAT_ID"), 0, 0) > 0 then Response.Write " Approve/Hold/Reject all Unmoderated Posts in this Category" & vbNewline end if if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 then CheckSubscription "NOTEXTCAT", MemberID, rs("CAT_ID"), 0, 0, "", "" end if ' DEM --> End of Code for Full Moderation else Response.Write " " & vbNewline end if end sub sub CategoryMemberOptions() if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 then CheckSubscription "NOTEXTCAT", MemberID, rs("CAT_ID"), 0, 0, "", "" end if end sub sub ForumAdminOptions() if (AdminAllowed = "Y") or (lcase(strNoCookies) = "1") then if rsForum("F_TYPE") = 0 then if rs("CAT_STATUS") = 0 then if (mlev = 4) then Response.Write " " & vbNewline end if else if rsForum("F_STATUS") = 1 then Response.Write " " & vbNewline else Response.Write " " & vbNewline end if end if end if if rsForum("F_TYPE") = 0 then if (rs("CAT_STATUS") <> 0 and rsForum("F_STATUS") <> 0) or (AdminAllowed = "Y") then Response.Write " " & vbNewline end if else if rsForum("F_TYPE") = 1 then Response.Write " " & vbNewline end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewline end if if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewline end if if CheckForUnModeratedPosts("FORUM", rsForum("CAT_ID"), rsForum("Forum_ID"), 0) > 0 then Response.Write " Approve/Hold/Reject All Unmoderated Posts for this Forum" & vbNewline end if ' DEM --> End of Code for Full Moderation strSQL = "SELECT TOPIC_ID FROM " & strArchiveTablePrefix & "TOPICS WHERE FORUM_ID=" & rsForum("FORUM_ID") ' Set rsArchive = Server.CreateObject("ADODB.Recordset") ' rsArchive.open strSql, my_Conn ' if not rsArchive.eof then if rsForum("F_TYPE") = 0 and rsForum("F_A_COUNT") > 0 then Response.Write "" & _ "" & vbNewline end if ' rsArchive.close ' set rsArchive = nothing if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 then CheckSubscription "FORUMNOTEXT", MemberID, rsForum("CAT_ID"), rsForum("Forum_ID"), -1, "", "" end if if rsForum("F_TYPE") = 0 then Response.Write " " & vbNewline end if else Response.Write "  " & vbNewline end if end sub sub ForumMemberOptions() if (mlev > 0) then if rsForum("F_TYPE") = 0 and rsForum("F_STATUS") > 0 and rs("CAT_STATUS") > 0 then Response.Write "" & vbNewline end if '## Forum_SQL - Archive Stuff strSQL = "SELECT TOPIC_ID FROM " & strArchiveTablePrefix & "TOPICS WHERE FORUM_ID=" & rsForum("FORUM_ID") ' Set rsArchive = Server.CreateObject("ADODB.Recordset") ' rsArchive.open strSql, my_Conn ' if not rsArchive.eof then if rsForum("F_TYPE") = 0 and rsForum("F_A_COUNT") > 0 then Response.Write "" & _ "" & vbNewline end if ' rsArchive.close ' set rsArchive = nothing ' DEM --> Start of code for Subscription if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 then CheckSubscription "FORUMNOTEXT", MemberID, rsForum("CAT_ID"), rsForum("Forum_ID"), -1, "", "" end if ' DEM --> End of Code for Full Moderation else Response.Write "  " & vbNewline end if end sub sub WriteStatistics() Dim Forum_Count Dim NewMember_Name, NewMember_Id, Member_Count Dim LastPostDate, LastPostLink set rs = Server.CreateObject("ADODB.Recordset") Forum_Count = intForumCount '## 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 " &_ " ORDER BY MEMBER_ID desc;" Set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn if not rs.EOF then NewMember_Name = chkString(rs("M_NAME"), "display") NewMember_Id = rs("MEMBER_ID") else NewMember_Name = "" end if rs.close set rs = nothing '## 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 = 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 LastPostDate = "" LastPostLink = "" LastPostAuthorLink = "" if not (intLastPostForum_ID = "") then '## Forum_SQL - Get link to that last post from DB strSql = "SELECT " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " &_ strTablePrefix & "TOPICS.T_LAST_POST, " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR " &_ " FROM " & strTablePrefix & "TOPICS " &_ " WHERE " & strTablePrefix & "TOPICS.FORUM_ID = " & intLastPostForum_ID & " " if mlev <> 4 then strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_STATUS < 2 " ' Ignore unapproved/held posts end if strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.TOPIC_ID DESC;" Set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn if not rs.EOF then LastPostDate = ChkDate(strLastPostDate) & ChkTime(strLastPostDate) LastPostLink = "topic.asp?TOPIC_ID=" & rs("TOPIC_ID") LastPostAuthorLink = " by: " if strUseExtendedProfile then LastPostAuthorLink = LastPostAuthorLink & "" else LastPostAuthorLink = LastPostAuthorLink & "" end if LastPostAuthorLink = LastPostAuthorLink & chkString(strLastPostMember_Name,"display") & "" end if rs.close set rs = nothing 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 then '## Forum_SQL - Get ActiveTopicCount from DB ' strSql = "SELECT COUNT(" & strArchiveTablePrefix & "REPLY.REPLY_ID) AS NUM_REPLY_ARCHIVED, " &_ ' "COUNT(" & strArchiveTablePrefix & "TOPICS.TOPIC_ID) AS NUM_TOPIC_ARCHIVED " &_ ' " FROM " & strArchiveTablePrefix & "REPLY, " &_ ' strArchiveTablePrefix & "TOPICS " ' ' Set rs = Server.CreateObject("ADODB.Recordset") ' rs.open strSql, my_Conn ' if not rs.EOF then ' ArchivedPostCount = rs("NUM_REPLY_ARCHIVED") + rs("NUM_TOPIC_ARCHIVED") ' ArchivedTopicCount = rs("NUM_TOPIC_ARCHIVED") ' else ' ArchivedPostCount = 0 ' ArchivedTopicCount = 0 ' end if ' end if ' rs.close ' set rs = nothing ShowLastHere = (cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) > 0) Response.Write " " & vbNewline & _ " Statistics" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "  " & vbNewline if ShowLastHere then Response.Write " " & vbNewline & _ " You last visited on " & ChkDate(Session(strCookieURL & "last_here_date")) & " " & ChkTime(Session(strCookieURL & "last_here_date")) & "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " end if if intPostCount > 0 then Response.Write " " & vbNewline & _ " " if Member_Count = 1 then Response.Write "1 Member has " else Response.Write Member_Count & " Members 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 "& lastPostDate & "" if LastPostAuthorLink <> "" then Response.Write LastPostAuthorLink & "." else Response.Write "." end if end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline end if Response.Write " " & vbNewline & _ " There " if intTopicCount = 1 then Response.Write "is " else Response.Write "are " end if Response.Write " currently " & intTopicCount & " " if intTopicCount = 1 then Response.Write " topic " else Response.Write " topics" end if if ActiveTopicCount > 0 then Response.Write " and " & ActiveTopicCount & " active " if ActiveTopicCount = 1 then Response.Write "topic" else Response.Write "topics" end if Response.Write " since you last visited." elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then Response.Write " and there are active topics 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 "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline if ArchivedPostCount > 0 then Response.Write " " & vbNewline & _ " " & vbNewline & _ "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 "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline end if if NewMember_Name <> "" then Response.Write " " & vbNewline & _ " " & vbNewline & _ " Please welcome our newest member:" & vbNewline if strUseExtendedProfile then Response.Write " " else Response.Write " " end if Response.Write NewMember_Name & "." & vbNewline & _ " " & vbNewline & _ " " & vbNewline end if end sub Sub DoHideCategory(intCatId) HideForumCat = "HideCat" & intCatId If Request.QueryString(HideForumCat) = "Y" then Response.Cookies(strUniqueID & HideForumCat) = "Y" Response.Cookies(strUniqueID & HideForumCat).Expires = dateAdd("d", 30, strForumTimeAdjust) Else If Request.QueryString(HideForumCat) = "N" then Response.Cookies(strUniqueID & HideForumCat) = "N" Response.Cookies(strUniqueID & HideForumCat).Expires = dateAdd("d", 30, strForumTimeAdjust) End If End If end sub %>