<% '################################################################################# '## Ver.3.4.06 multi-language Skin3D Portal '################################################################################# '## Copyright (C) 2001-07 Gaëtan Dupont All Rights Reserved '## '## By using this program, you are agreeing to the terms of the '## GNU General Public License. '## '## 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 (at your option) any later version. '## '## All copyright notices regarding ImageForums2001 must remain intact '## in the scripts and in the outputted HTML. '## The "Image Forums 2001" text with a link back to '## http://www.forums2001.ca in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## Support can be obtained from support forums at: '## http://www.forums2001.ca '## '## Email: image_forum_2001@hotmail.com '## '################################################################################# '## This Page Contains source code of Snitz Forums 2000 '################################################################################# '## Snitz Forums 2000 v3.4.06 '################################################################################# '## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, '## Huw Reddick and Richard Kinser '## '## 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 (at your option) 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 our support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## manderson@snitz.com '## '################################################################################# %> <% '***Begin Top of left column*** %> <% if intForumMainMenu = 1 then If flag_showmainmenu then Response.Write "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewline & _ " " & vbNewline & _ "
" & vbNewLine if strSubscription = 1 and strEmail = 1 and strDBNTUserName <> "" then %><% end if %> <% Response.Write "" & vbNewLine & _ "" & vbNewLine end if end if %> <% '***End Top of left column*** %> <% call LangDebug("===== default.asp") Dim UnapprovedFound, UnModeratedPosts if Request.QueryString("CAT_ID") <> "" and IsNumeric(Request.QueryString("CAT_ID")) = True then Cat_ID = cLng(Request.QueryString("CAT_ID")) end if scriptname = request.servervariables("script_name") 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 strModeration = "1" and mLev > 2 then UnModeratedPosts = CheckForUnmoderatedPosts("BOARD", 0, 0, 0) end if ' -- Get all the high level(board, category, forum) subscriptions being held by the user Dim strSubString, strSubArray, strBoardSubs, strCatSubs, strForumSubs if MySubCount > 0 then strSubString = PullSubscriptions(0,0,0) strSubArray = Split(strSubString,";") if uBound(strSubArray) < 0 then strBoardSubs = "" strCatSubs = "" strForumSubs = "" else strBoardSubs = strSubArray(0) strCatSubs = strSubArray(1) strForumSubs = strSubArray(2) end if end If if strShowStatistics <> "1" then '## Forum_SQL strSql = "SELECT P_COUNT, T_COUNT, 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 if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then '## Forum_SQL strSql = "SELECT MO.FORUM_ID, ME.MEMBER_ID, ME.M_NAME " & _ " FROM " & strTablePrefix & "MODERATOR MO" & _ " , " & strMemberTablePrefix & "MEMBERS ME" & _ " WHERE (MO.MEMBER_ID = ME.MEMBER_ID )" & _ " ORDER BY MO.FORUM_ID, ME.M_NAME" Set rsChk = Server.CreateObject("ADODB.Recordset") rsChk.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsChk.EOF then recModeratorCount = "" else allModeratorData = rsChk.GetRows(adGetRowsRest) recModeratorCount = UBound(allModeratorData,2) end if rsChk.close set rsChk = nothing if recModeratorCount = "" then fMods = " " else mFORUM_ID = 0 mMEMBER_ID = 1 mM_NAME = 2 for iModerator = 0 to recModeratorCount ModForumID = allModeratorData(mFORUM_ID, iModerator) ModMemID = allModeratorData(mMEMBER_ID, iModerator) ModMemName = replace(allModeratorData(mM_NAME, iModerator),"|","|") if iModerator = 0 then strForumMods = ModForumID & "," & ModMemID & "," & ModMemName else strForumMods = strForumMods & "|" & ModForumID & "," & ModMemID & "," & ModMemName end if next end if end if '## Forum_SQL - Get all Categories from the DB strSql = "SELECT CAT_ID, CAT_STATUS, CAT_NAME, CAT_SUBSCRIPTION " &_ " FROM " & strTablePrefix & "CATEGORY " '############################## Group Cat MoD ##################################### if Cat_ID <> "" then strSql = strSql & " WHERE CAT_ID = " & Cat_ID else if Group > 1 and strGroupCategories = "1" then strSql = strSql & " WHERE CAT_ID = 0" if recGroupCatCount <> "" then for iGroupCat = 0 to recGroupCatCount strSql = strSql & " or CAT_ID = " & allGroupCatData(1, iGroupCat) next end if end if end if '############################## Group Cat MoD ##################################### strSql = strSql & " ORDER BY CAT_ORDER ASC, CAT_NAME ASC;" set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rs.EOF then if Cat_ID <> "" then response.redirect("default.asp") recCategoryCount = "" else allCategoryData = rs.GetRows(adGetRowsRest) recCategoryCount = UBound(allCategoryData,2) end if rs.close set rs = nothing if mlev = 3 then strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _ " WHERE MEMBER_ID = " & MemberID Set rsMod = Server.CreateObject("ADODB.Recordset") rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsMod.EOF then recModCount = "" else allModData = rsMod.GetRows(adGetRowsRest) recModCount = UBound(allModData,2) end if RsMod.close set RsMod = nothing if recModCount <> "" then for x = 0 to recModCount if x = 0 then ModOfForums = allModData(0,x) else ModOfForums = ModOfForums & "," & allModData(0,x) end if next else ModOfForums = "" end if else ModOfForums = "" end if '## Forum_SQL - Build SQL to get forums via category strSql = "SELECT F.FORUM_ID, F.F_STATUS, F.CAT_ID, F.F_SUBJECT, F.F_URL, F.F_URLIMAGE, F.F_TOPICS, " &_ "F.F_COUNT, F.F_LAST_POST, F.F_LAST_POST_TOPIC_ID, F.F_LAST_POST_REPLY_ID, F.F_TYPE, " & _ "F.F_ORDER, F.F_A_COUNT, F.F_SUBSCRIPTION, F_PRIVATEFORUMS, F_PASSWORD_NEW, " & _ "M.MEMBER_ID, M.M_NAME, " & _ "T.T_REPLIES, T.T_UREPLIES, " & _ "F.F_DESCRIPTION, T.T_SUBJECT, F.F_TOPIC_AUTH " & _ "FROM ((" & strTablePrefix & "FORUM F " &_ "LEFT JOIN " & strMemberTablePrefix & "MEMBERS M ON " &_ "F.F_LAST_POST_AUTHOR = M.MEMBER_ID) " & _ "LEFT JOIN " & strTablePrefix & "TOPICS T ON " & _ "F.F_LAST_POST_TOPIC_ID = T.TOPIC_ID) " '############################## Group Cat MoD ##################################### if Cat_ID <> "" then strSql = strSql & " WHERE F.CAT_ID = " & Cat_ID else if Group > 1 and strGroupCategories = "1" then strSql = strSql & " WHERE F.CAT_ID = 0" if recGroupCatCount <> "" then for iGroupCat = 0 to recGroupCatCount strSql = strSql & " OR F.CAT_ID = " & allGroupCatData(1, iGroupCat) next end if end if end if '############################## Group Cat MoD ##################################### strSql = strSql & " ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;" set rsForum = Server.CreateObject("ADODB.Recordset") rsForum.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsForum.EOF then recForumCount = "" else allForumData = rsForum.GetRows(adGetRowsRest) recForumCount = UBound(allForumData,2) end if rsForum.close set rsForum = nothing if Cat_ID <> "" then Cat_Name = allCategoryData(2,0) Response.Write " " & vbNewLine end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline else Response.Write "" & vbNewline end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" ' If Whole Board Subscription is allowed, check for a subscription by this user. if strSubscription = 1 and strEmail = 1 and strDBNTUserName <> "" then Response.Write vbNewLine Response.Write " " & vbNewline Response.Write " " & vbNewLine Response.Write " " & vbNewLine Response.Write " " & vbNewline Response.Write "
" If strBoardSubs = "Y" then Response.Write ShowSubLink ("U", 0, 0, 0, "Y") Else Response.Write ShowSubLink ("S", 0, 0, 0, "Y") End If Response.Write "
" & vbNewline Response.Write "
" end if ShowLastHere = (mLev > 0) if strShowStatistics <> "1" then Response.Write vbNewLine & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" if ShowLasthere then Response.Write "" & fLangN(strLangDefault00010, ChkDate(Session(strCookieURL & "last_here_date"), " " ,true)) & "" else Response.Write " " end if Response.Write "" & fLangN(strLangDefault00020,Posts &"|"& Topics &"|"& Users) & "  
" & vbNewline & _ "
" & vbNewline & _ " " & vbNewline %><% Response.Write " " & 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 recCategoryCount = "" then Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline else intPostCount = 0 intTopicCount = 0 intForumCount = 0 strLastPostDate = "" cCAT_ID = 0 cCAT_STATUS = 1 cCAT_NAME = 2 cCAT_SUBSCRIPTION = 3 fFORUM_ID = 0 fF_STATUS = 1 fCAT_ID = 2 fF_SUBJECT = 3 fF_URL = 4 fF_URLIMAGE = 5 fF_TOPICS = 6 fF_COUNT = 7 fF_LAST_POST = 8 fF_LAST_POST_TOPIC_ID = 9 fF_LAST_POST_REPLY_ID = 10 fF_TYPE = 11 fF_ORDER = 12 fF_A_COUNT = 13 fF_SUBSCRIPTION = 14 fF_PRIVATEFORUMS = 15 fF_PASSWORD_NEW = 16 fMEMBER_ID = 17 fM_NAME = 18 fT_REPLIES = 19 fT_UREPLIES = 20 fF_DESCRIPTION = 21 fT_SUBJECT = 22 fF_TOPIC_AUTH = 23 blnHiddenForums = false for iCategory = 0 to recCategoryCount CatID = allCategoryData(cCAT_ID,iCategory) CatStatus = allCategoryData(cCAT_STATUS,iCategory) CatName = allCategoryData(cCAT_NAME,iCategory) CatSubscription = allCategoryData(cCAT_SUBSCRIPTION,iCategory) chkDisplayHeader = true bContainsForum = False if recForumCount <> "" then for iForumCheck = 0 to recForumCount if CatID = allForumData(fCAT_ID, iForumCheck) then bContainsForum = True next end if if (recForumCount = "" or not bContainsForum) and (mLev = 4) then Response.Write " " & vbNewline & _ " " & vbNewline else Response.Write "" & ChkString(CatName,"display") & "" & vbNewline end if if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewline end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline else for iForum = 0 to recForumCount if CatID = allForumData(fCAT_ID, iForum) then '## Forum exists ForumID = allForumData(fFORUM_ID,iForum) ForumStatus = allForumData(fF_STATUS,iForum) ForumCatID = allForumData(fCAT_ID,iForum) ForumSubject = allForumData(fF_SUBJECT,iForum) ForumURL = allForumData(fF_URL,iForum) ForumURLIMAGE = allForumData(fF_URLIMAGE,iForum) ForumTopics = allForumData(fF_TOPICS,iForum) ForumCount = allForumData(fF_COUNT,iForum) ForumLastPost = allForumData(fF_LAST_POST,iForum) ForumLastPostTopicID = allForumData(fF_LAST_POST_TOPIC_ID,iForum) ForumLastPostReplyID = allForumData(fF_LAST_POST_REPLY_ID,iForum) ForumFType = allForumData(fF_TYPE,iForum) ForumOrder = allForumData(fF_ORDER,iForum) ForumACount = allForumData(fF_A_COUNT,iForum) ForumSubscription = allForumData(fF_SUBSCRIPTION,iForum) ForumPrivateForums = allForumData(fF_PRIVATEFORUMS,iForum) ForumFPasswordNew = allForumData(fF_PASSWORD_NEW,iForum) ForumMemberID = allForumData(fMEMBER_ID,iForum) ForumMemberName = allForumData(fM_NAME,iForum) ForumTopicReplies = allForumData(fT_REPLIES,iForum) ForumTopicUReplies = allForumData(fT_UREPLIES,iForum) ForumDescription = allForumData(fF_DESCRIPTION,iForum) ForumTopicSubject = allForumData(fT_SUBJECT,iForum) intTopicAuth = allForumData(fF_TOPIC_AUTH,iForum) Dim AdminAllowed, ModerateAllowed if mLev = 4 then AdminAllowed = "Y" else AdminAllowed = "N" end if if mLev = 4 then ModerateAllowed = "Y" elseif mLev = 3 and ModOfForums <> "" then if (strAuthType = "nt") then if (chkForumModerator(ForumID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N" else if (instr("," & ModOfForums & "," ,"," & ForumID & ",") <> 0) then ModerateAllowed = "Y" else ModerateAllowed = "N" end if else ModerateAllowed = "N" end if if ModerateAllowed = "Y" and ForumTopicUReplies > 0 then ForumTopicReplies = ForumTopicReplies + ForumTopicUReplies end if if ChkDisplayForum(ForumPrivateForums,ForumFPasswordNew,ForumID,MemberID) then if ForumFType <> "1" then intPostCount = intPostCount + ForumCount intTopicCount = intTopicCount + ForumTopics intForumCount = intForumCount + 1 if ForumLastPost > strLastPostDate then strLastPostDate = ForumLastPost intLastPostTopic_ID = ForumLastPostTopicID intLastPostReply_ID = ForumLastPostReplyID intTopicReplies = ForumTopicReplies intLastPostForum_ID = ForumID intLastPostMember_ID = ForumMemberID strLastPostMember_Name = ForumMemberName end if end if if chkDisplayHeader then Call DoHideCategory(CatID) Response.Write " " & vbNewline & _ " " & vbNewline else Response.Write " " & ChkString(CatName,"display") & "  " & vbNewline end if '##### Above code will specify whether or not to show the forums under a category ##### if Request.Cookies(HideForumCat) = "Y" then Response.Write "" & vbNewline Response.Write " " & vbNewline chkDisplayHeader = false end if if Request.Cookies(HideForumCat) <> "Y" then '##### added as part of Minimize Category Mod ##### Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline if ForumFType = 1 then Response.Write "" & vbNewline end if if ForumFType = 0 then if IsNull(ForumTopics) then Response.Write " " & vbNewline else Response.Write " " & vbNewline end if if IsNull(ForumCount) then Response.Write " " & vbNewline else Response.Write " " & vbNewline end if if IsNull(ForumMemberID) then strLastUser = " " else strLastUser = "
" & fLang(strLangBy00010) & " " & profileLink(chkString(ForumMemberName,"display"),ForumMemberID) & " " if strJumpLastPost = "1" then strLastUser = strLastUser & " " & DoLastPostLink(true) end if Response.Write " " & vbNewline else '## Do Nothing 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() end if next '## Next Forum end if next '## Next Category end if if intForumPhotoAlbum = 1 then If flag_showforumalbum then %><% end if end if if intForumFileLister = 1 then If flag_showforumfiles then %><% end if end if %> <% if strShowStatistics = "1" then WriteStatistics end if Response.Write "
" if Cat_ID <> "" then Response.Write "" & getCurrentIcon(strIconFolderSmilie,fLang(strLangDefault00030),"hspace=""0""") & "" else Response.Write " " end if Response.Write "" ' ################ start fix for translating predefined groups ############################# ' # also modified: inc_groupjump_to.asp, default_forum.asp tempGROUPNAME = GROUPNAME if GROUPNAME = "All Categories you have access to" then tempGROUPNAME = fLang(strLangInc_Groupjump_To00050) if GROUPNAME = "Default Categories" then tempGROUPNAME = fLang(strLangInc_Groupjump_To00060) ' ################ to cut off the fix delete the above lines and replace tempGROUPNAME with GROUPNAME in the following line if strGroupCategories = "1" then Response.Write(tempGROUPNAME) else Response.Write(fLang(strLangHead_Forum00010)) Response.Write "" & fLang(strLangTopics00010) & "" & fLang(strLangPosts00010) & "" & fLang(strLangLast_Post00010) & "" & fLang(strLangDefault00080) & "" 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 """>" & fLang(strLangNoCategories_Forums00010) & " 
" if Cat_ID = "" then Response.Write "" & ChkString(CatName,"display") & "" call CategoryAdminOptions() Response.Write "
" & fLang(strLangDefault00110) & "
" & getCurrentIcon(strIconPlus,fLang(strLangExpand00010),"") & "" else Response.Write " class=category>" & getCurrentIcon(strIconMinus,fLang(strLangCollapse00010),"") & "" end if if Cat_ID = "" then Response.Write " " & ChkString(CatName,"display") & "  " else Response.Write "" end if if (mLev = 4 or mLev = 3) or (lcase(strNoCookies) = "1") then call CategoryAdminOptions() elseif (mLev > 0) then call CategoryMemberOptions() else Response.Write(" ") end if Response.Write "
" if ForumFType = 0 then ChkIsNew(ForumLastPost) else Response.Write "" & getCurrentIcon(strIconUrl,fLangN(strLangDefault00150,chkString(ForumSubject,"display")),"hspace=""0""") & "" end if Response.Write "" & _ "" & chkString(ForumSubject,"display") & "
" & _ "" & _ formatStr(ForumDescription) & vbNewLine Response.Write "
 " if ForumURLIMAGE <> "" then Response.Write "" End If Response.Write " 0" & ForumTopics & "0" & ForumCount & "" if intLastPostInfo = "1" then if ForumLastPostReplyID <> 0 then PageLink = "whichpage=-1&" AnchorLink = "&REPLY_ID=" Response.Write " " if len(ForumTopicSubject) > 16 then ForumTopicSubject = left(ForumTopicSubject,16) & "...." end if Response.Write "" & ForumTopicSubject & "
" elseif ForumLastPostTopicID <> 0 then Response.Write " " if len(ForumTopicSubject) > 16 then ForumTopicSubject = left(ForumTopicSubject,16) & "...." end if Response.Write "" & ForumTopicSubject & "
" else 'DoLastPostLink = "" end if end if Response.Write "" & ChkDate(ForumLastPost, "
" ,true) & strLastUser & "
" & listForumModerators(ForumID) & "" if ModerateAllowed = "Y" or (lcase(strNoCookies) = "1") then call ForumAdminOptions else call ForumMemberOptions end if Response.Write "
" & vbNewline & _ "
" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewline & _ " " & getCurrentIcon(strIconFolderSmilieNew,fLang(strLangNew_Posts00010),"align=""absmiddle""") & " " & fLang(strLangDefault00180) & "
" & vbNewline & _ " " & getCurrentIcon(strIconFolderSmilie,fLang(strLangOld_Posts00010),"align=""absmiddle""") & " " & fLang(strLangDefault00200) & "
" & vbNewline & _ "
" & vbNewline '***End of left column*** if intForumMainMenu = 1 then If flag_showmainmenu then Response.Write "
" & vbNewline end if end if '***End of left column*** end if'<-----Ban IP WriteFooter Response.End sub PostingOptions() if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write "" if Session(strCookieURL & "Approval") = "15916941253" then Response.Write("" & getCurrentIcon(strIconLock,fLang(strLangDefault00210),"hspace=""0""") & "") Response.Write " " & getCurrentIcon(strIconFolderNewTopic,fLang(strLangDefault00220),"hspace=""0""") & "" if strArchiveState = "1" then Response.Write(" " & getCurrentIcon(strIconFolderArchive,fLang(strLangDefault00230),"hspace=""0""") & "") Response.Write("") ' DEM --> Start of Code for Full Moderation if UnModeratedPosts > 0 then Response.Write " " & getCurrentIcon(strIconFolderModerate,fLang(strLangAll_UnModerated00010),"hspace=""0""") & "" 'Response.Write " " & getCurrentIcon(strIconFolderModerate,fLang(strLangUnModerated_Posts00010),"hspace=""0""") & "" end if ' DEM --> End of Code for Full Moderation ' DEM - Added to allow for sorting Response.Write " " & getCurrentIcon(strIconSort,fLang(strLangDefault00260),"hspace=""0""") & "" '############################## Group Cat MoD ##################################### if strGroupCategories = "1" then Response.Write(" " & getCurrentIcon(strIconGroupCategories,fLang(strLangDefault00270),"hspace=""0""") & "") '############################## Group Cat MoD ##################################### elseif (mlev = 3) then if UnModeratedPosts > 0 then Response.Write " " & getCurrentIcon(strIconFolderModerate,fLang(strLangAll_UnModerated00010),"hspace=""0""") & "" else Response.Write " " end if else Response.Write " " end if end sub sub ChkIsNew(dt) Response.Write "" if CatStatus <> 0 and ForumStatus <> 0 then if dt > Session(strCookieURL & "last_here_date") and (ForumCount > 0 or ForumTopics > 0) then Response.Write getCurrentIcon(strIconFolderSmilieNew,fLang(strLangNew_Posts00010),"hspace=""0""") & "" else Response.Write getCurrentIcon(strIconFolderSmilie,fLang(strLangOld_Posts00010),"hspace=""0""") & "" end if elseif ForumLastPost > Session(strCookieURL & "last_here_date") then if CatStatus = 0 then strAltText = fLang(strLangCategory_Locked00010) else strAltText = fLang(strLangForum_Locked00010) end if Response.Write getCurrentIcon(strIconFolderNewLocked,strAltText,"hspace=""0""") & "" else if CatStatus = 0 then strAltText = fLang(strLangCategory_Locked00010) else strAltText = fLang(strLangForum_Locked00010) end if Response.Write getCurrentIcon(strIconFolderLocked,strAltText,"hspace=""0""") & "" end if end sub sub CategoryAdminOptions() if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then if (mlev = 4) or (lcase(strNoCookies) = "1") then if (CatStatus <> 0) then Response.Write " " & getCurrentIcon(strIconLock,fLang(strLangLock_Category00010),"hspace=""0""") & "" else Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Category00010),"hspace=""0""") & "" end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then if (CatStatus <> 0) then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangDefault00330),"hspace=""0""") & "" end if end if if mlev = 4 or (lcase(strNoCookies) = "1") then Response.Write " " & getCurrentIcon(strIconTrashcan,fLang(strLangDelete_Category00010),"hspace=""0""") & "" end if if (mlev = 4) or (lcase(strNoCookies) = "1") then if (CatStatus <> 0) then Response.Write " " & getCurrentIcon(strIconFolderNewTopic,fLang(strLangDefault00350),"hspace=""0""") & "" end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then if (CatStatus <> 0) then Response.Write " " & getCurrentIcon(strIconUrl,fLang(strLangDefault00360),"hspace=""0""") & "" end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then if (CatStatus <> 0) and strArchiveState = "1" then ''## Forum_SQL 'strSQL = "SELECT FORUM_ID FROM " & strTablePrefix & "FORUM WHERE CAT_ID=" & CatID & " AND F_TYPE = 0" '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 'if archID <> "" then Response.Write " " & getCurrentIcon(strIconFolderArchive,fLang(strLangDefault00370),"hspace=""0""") & "" 'rsArchive.close 'set rsArchive = nothing end if end if if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 and strEmail = 1 then if InArray(strCatSubs,CatID) then Response.Write " " & ShowSubLink ("U", CatID, 0, 0, "N") elseif strBoardSubs <> "Y" then Response.Write " " & ShowSubLink ("S", CatID, 0, 0, "N") end if elseif mLev = "3" then Response.Write " " end if else Response.Write " " end if end sub sub CategoryMemberOptions() if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 and CatStatus <> 0 and strEmail = 1 then if InArray(strCatSubs,CatID) then Response.Write " " & ShowSubLink ("U", CatID, 0, 0, "N") elseif strBoardSubs <> "Y" then Response.Write " " & ShowSubLink ("S", CatID, 0, 0, "N") end If else Response.Write " " end if end sub sub ForumAdminOptions() if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then if ForumFType = 0 then if CatStatus = 0 then if (mlev = 4) then Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Category00010),"hspace=""0""") & "" end if else if ForumStatus = 1 then Response.Write " " & getCurrentIcon(strIconLock,fLang(strLangLock_Forum00010),"hspace=""0""") & "" else Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Forum00010),"hspace=""0""") & "" end if end if end if if ForumFType = 0 then if (CatStatus <> 0 and ForumStatus <> 0) or (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangForum_Properties00010),"hspace=""0""") & "" end if else if ForumFType = 1 then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangDefault00410),"hspace=""0""") & "" end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & getCurrentIcon(strIconTrashcan,fLang(strLangDelete_Forum00010),"hspace=""0""") & "" end if if ForumFType = 0 then Response.Write " " & getCurrentIcon(strIconFolderNewTopic,fLang(strLangNew_Topic00010),"hspace=""0""") & "" end if if ((mlev = 4) or (lcase(strNoCookies) = "1")) and (ForumFType = 0) and (strArchiveState = "1") then Response.Write " " & getCurrentIcon(strIconFolderArchive,fLang(strLangArchive_Forum00010),"hspace=""0""") & "" end if if ((mlev = 4) or (lcase(strNoCookies) = "1")) and (ForumFType = 0 and ForumACount > 0) and (strArchiveState = "1") then Response.Write " " & getCurrentIcon(strIconFolderUnArchive,fLang(strLangRestore_Archive00010),"hspace=""0""") & "" end if if (ForumFType = 0 and ForumACount > 0) and strArchiveState = "1" then Response.Write " " & getCurrentIcon(strIconFolderArchived,fLang(strLangDefault00450),"hspace=""0""") & "" end if if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and strEmail = 1 then if InArray(strForumSubs,ForumID) then Response.Write " " & ShowSubLink ("U", ForumCatID, ForumID, 0, "N") elseif strBoardSubs <> "Y" and not(InArray(strCatSubs,ForumCatID)) then Response.Write " " & ShowSubLink ("S", ForumCatID, ForumID, 0, "N") end if end if else Response.Write " " end if end sub sub ForumMemberOptions() if (mlev > 0) then if (mlev >= intTopicAuth) then if ForumFType = 0 and ForumStatus > 0 and CatStatus > 0 then Response.Write "" & getCurrentIcon(strIconFolderNewTopic,fLang(strLangNew_Topic00010),"hspace=""0""") & "" else Response.Write " " end if else Response.Write " " end if end if if (ForumFType = 0 and ForumACount > 0) and strArchiveState = "1" then Response.Write " " & _ getCurrentIcon(strIconFolderArchived,fLang(strLangDefault00450),"hspace=""0""") & "" else Response.Write " " end if ' DEM --> Start of code for Subscription if ForumFType = 0 and (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and (mlev > 0) and strEmail = 1 then if InArray(strForumSubs,ForumID) then Response.Write " " & ShowSubLink ("U", ForumCatID, ForumID, 0, "N") elseif strBoardSubs <> "Y" and not(InArray(strCatSubs,ForumCatID)) then Response.Write " " & ShowSubLink ("S", ForumCatID, ForumID, 0, "N") end if end if ' DEM --> End of Code for Subscription end sub sub WriteStatistics() Dim Forum_Count Dim NewMember_Name, NewMember_Country, NewMember_Id, Member_Count Dim LastPostDate, LastPostLink Forum_Count = intForumCount '## Forum_SQL - Get newest membername and id from DB strSql = "SELECT M_NAME, M_COUNTRY, 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 TopSQL(strSql,1), my_Conn if not rs.EOF then NewMember_Name = chkString(rs("M_NAME"), "display") NewMember_Country = chkString(rs("M_COUNTRY"), "display") NewMember_Id = rs("MEMBER_ID") else NewMember_Name = "" NewMember_Country = "" 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 '## 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 = " " & fLang(strLangBy00010) & " " & profileLink(chkString(strLastPostMember_Name,"display"),intLastPostMember_ID) & "" 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) app = "defaultstats" apptitle = "Statistics" strShow = "strShow" & app strSize = "strSize" & app window = app & "Window" strSize = (request.querystring(app)) if strSize <> "" then '#### Set Cookies For Menu Window Response.Cookies(strUniqueID)(window)=(strSize) '#### End of Set Cookies For Window end if if (Request.Cookies(strUniqueID)(Window)= "1") then '### Check Cookie For Minimize Status ' here is the code for the closed window display Response.Write " " & vbNewline & _ " " & getCurrentIcon(strIconPlus,fLang(strLangExpand00010),"") & " " & fLang(strLangStatistics00010) & "" & vbNewline & _ " " & vbNewline else ' and here comes the code of the open window. Response.Write " " & vbNewline & _ " " & getCurrentIcon(strIconMinus,fLang(strLangCollapse00010),"") & " " & fLang(strLangStatistics00010) & "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " 0 and strArchiveState = "1" then intStatRowSpan = intStatRowspan + 1 end if if NewMember_Name <> "" then intStatRowSpan = intStatRowspan + 1 end if Response.Write intStatRowSpan Response.Write """ class=forumcellcolordark> " & vbNewline if ShowLastHere then Response.Write " " & _ "" & fLangN(strLangDefault00480, ChkDate(Session(strCookieURL & "last_here_date"), " " ,true)) & "" & vbNewline & _ " " & vbNewline & _ " " & vbNewLine end if if intPostCount > 0 then Response.Write " " & _ "" if Member_Count = 1 and User_Count = 1 then Response.Write fLang(strLangDefault00490) else Response.Write Member_Count & " " & fLang(strLangDefault00500) & " " & User_Count & " " & fLang(strLangMembers200010) & "" & fLang(strLangDefault00520) end if Response.Write fLang(strLangDefault00530) if intPostCount = 1 then Response.Write fLang(strLangDefault00540) else Response.Write intPostCount & fLang(strLangDefault00550) end if Response.Write fLang(strLangDefault00560) if intForumCount = 1 then Response.Write fLang(strLangDefault00570) else Response.Write intForumCount & fLang(strLangDefault00580) end if if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then Response.Write "." else Response.Write ", " & fLang(strLangDefault00590) & " " & LastPostLink & LastPostDate & "" if LastPostAuthorLink <> "" then Response.Write LastPostAuthorLink & "." else Response.Write "." end if end if Response.Write "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline end if Response.Write " " & _ "" & fLang(strLangDefault00600) if intTopicCount = 1 then Response.Write fLang(strLangDefault00610) else Response.Write fLang(strLangDefault00620) end if Response.Write fLang(strLangDefault00630) if intTopicCount > 0 then Response.Write intTopicCount else Response.Write fLang(strLangDefault00640) end if if intTopicCount = 1 then Response.Write fLang(strLangDefault00650) else Response.Write fLang(strLangDefault00660) end if if ActiveTopicCount > 0 then Response.Write " " & fLang(strLangDefault00670) & " " & ActiveTopicCount & " " & fLang(strLangDefault00680) if ActiveTopicCount = 1 then Response.Write fLang(strLangDefault00690) else Response.Write fLang(strLangDefault00700) end if Response.Write " " & fLang(strLangDefault00710) & "." elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then Response.Write fLangN(strLangDefault00720, "" & "|" & "") elseif not(ShowLastHere) then Response.Write "." else Response.Write fLang(strLangDefault00730) end if Response.Write "" & vbNewline & _ " " & vbNewline & _ " " & vbNewline if ArchivedPostCount > 0 and strArchiveState = "1" then Response.Write " " & vbNewline & _ " " & fLang(strLangDefault00740) if ArchivedPostCount = 1 then Response.Write fLang(strLangDefault00610) else Response.Write fLang(strLangDefault00620) end if Response.Write ArchivedPostCount & " " if ArchivedPostCount = 1 then Response.Write fLang(strLangDefault00750) else Response.Write fLang(strLangDefault00760) end if if ArchivedTopicCount > 0 then Response.Write " " & fLang(strLangDefault00770) & " " & ArchivedTopicCount if ArchivedTopicCount = 1 then Response.Write fLang(strLangDefault00780) else Response.Write fLang(strLangDefault00790) end if end if Response.Write "" & vbNewline & _ " " & vbNewline end if if NewMember_Name <> "" then Response.Write " " & vbNewline & _ " " & _ "" & fLang(strLangDefault00800) & " " & _ "" & profileLink(NewMember_Name,NewMember_Id) & "" & vbNewline if strCountry = "1" and trim(NewMember_Country) <> "" then Response.Write " " & vbNewline end if Response.Write "" & vbNewline & _ " " & vbNewline end if Response.Write " " & vbNewline & _ " " & _ "" & vbNewline & _ "" & fLang(strLangDefault00820) & "." & vbNewline & _ "" & vbNewline & _ " " & 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 = "" if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,fLang(strLangJump_Last_Post00010),"align=""absmiddle""") & "" elseif ForumLastPostTopicID <> 0 then DoLastPostLink = "" if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,fLang(strLangJump_Last_Post00010),"align=""absmiddle""") & "" 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 = "" & profileLink(chkString(ModMemName,"display"),ModMemID) & "" else fMods = fMods & ", " & profileLink(chkString(ModMemName,"display"),ModMemID) & "" end if end if next if fMods = "" then fMods = " " listForumModerators = fMods end function %>