<% if IsEmpty(Session(strCookieURL & "last_here_date")) then Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) end if nDays = Request.Cookies(strCookieURL & "PollDays") if Request.form("cookie") = 1 then if strSetCookieToForum = "1" then Response.Cookies(strCookieURL & "PollDays").Path = strCookieURL end if Response.Cookies(strCookieURL & "PollDays") = Request.Form("PollDays") Response.Cookies(strCookieURL & "PollDays").expires = strForumTimeAdjust + 365 nDays = Request.Form("PollDays") end if if nDays = "" then nDays = 0 end if defDate = DateToStr(DateAdd("d", -(nDays), strForumTimeAdjust)) 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 - Get all active polls strSql = "SELECT C.CAT_ID, C.CAT_STATUS, F.FORUM_ID, F.F_SUBJECT, F.F_STATUS, T.TOPIC_ID, " &_ "T.T_SUBJECT, T.T_STATUS, T.T_AUTHOR, T.T_REPLIES ,M.MEMBER_ID, M.M_NAME, P.P_LASTVOTE, T.T_MSGICON, T.T_ISPOLL, T.T_DATE, T.T_LAST_POST, T.T_STICKY, F.F_REPLY_AUTH " For nCount = 1 To 15 strSql = strSql & ", P.ANSWER" & CStr(nCount) strSql = strSql & ", P.COUNT" & CStr(nCount) Next strSql = strSql & " FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F, " &_ strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "POLLS P " &_ "WHERE C.CAT_ID = T.CAT_ID AND F.FORUM_ID = T.FORUM_ID AND P.TOPIC_ID = T.TOPIC_ID " &_ "AND M.MEMBER_ID = T.T_AUTHOR AND T.T_ISPOLL = 1" if nDays > 0 then strSql = strSql & " AND P.P_LASTVOTE > '" & defDate & "'" end if strSql = strSql & " ORDER BY T.FORUM_ID, P.P_LASTVOTE DESC" Set rs = Server.CreateObject("ADODB.Recordset") if strDBType <> "mysql" then rs.cachesize = 50 rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rs.EOF then recActivePollsCount = "" else allActivePolls = rs.GetRows(adGetRowsRest) recActivePollsCount = UBound(allActivePolls,2) end if rs.Close set rs = nothing Dim vAnswers(15) Dim vCount(15) Response.Write "" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen, "", "") & " " & fLang(strLangAll_Forums00010) & "
" & vbNewLine & _ " " & getCurrentSkinIcon(strIconBar, "", "") & getCurrentIcon(strIconFolderOpen, "", "") & " " & fLang(strLangActive_Polls00010) & "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine Call CornerTop Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if strMessageIcons = "1" then Response.Write(" " & vbNewLine) Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if strTopicRating = "1" then Response.Write(" " & vbNewLine) Response.Write " " & vbNewLine if (mLev > 0) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine if recActivePollsCount = "" then if strMessageIcons = "1" and strTopicRating = "1" then MIColspan = "9" else MIColspan = "8" end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine else currForum = 0 fDisplayCount = 0 aCount = 0 for Rowcount = 0 to recActivePollsCount Cat_ID = allActivePolls(0,Rowcount) Cat_Status = allActivePolls(1,Rowcount) Forum_ID = allActivePolls(2,Rowcount) Forum_Subject = allActivePolls(3,Rowcount) Forum_Status = allActivePolls(4,Rowcount) Topic_ID = allActivePolls(5,Rowcount) Topic_Subject = allActivePolls(6,Rowcount) Topic_Status = allActivePolls(7,Rowcount) Topic_Author = allActivePolls(8,Rowcount) Topic_Replies = allActivePolls(9,Rowcount) Member_Member_ID = allActivePolls(10,Rowcount) Member_Name = allActivePolls(11,Rowcount) Last_Vote = allActivePolls(12,Rowcount) Topic_MsgIcon = allActivePolls(13,Rowcount) IsPoll = allActivePolls(14,Rowcount) Topic_Date = allActivePolls(15,Rowcount) Topic_Last_post = allActivePolls(16,Rowcount) Topic_Sticky = allActivePolls(17,Rowcount) intReplyAuth = allActivePolls(18,Rowcount) nCount = 19 For i = 1 to 15 vAnswers(i) = allActivePolls(nCount,Rowcount) nCount = nCount + 1 vCount(i) = allActivePolls(nCount,Rowcount) nCount = nCount + 1 Next TopicRatingAvg = GetTopicRatingAvg( TOPIC_ID ) if chkForumAccess(Forum_ID, MemberID, false) then if mLev = 4 then ModerateAllowed = "Y" elseif mLev = 3 and ModOfForums <> "" then if (strAuthType = "nt") then if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N" else if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) then ModerateAllowed = "Y" else ModerateAllowed = "N" end if else ModerateAllowed = "N" end if fDisplayCount = fDisplayCount + 1 if currForum <> Forum_ID then if strMessageIcons = "1" and strTopicRating = "1" then MIColspan2 = "8" elseif strTopicRating = "1" then MIColspan2 = "7" elseif strMessageIcons = "1" then MIColspan2 = "7" else MIColspan2 = "6" end if Response.Write " " & vbNewLine & _ " " & vbNewLine if (mLev > 0) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewline elseif (mLev = 3) then Response.Write " " & vbNewline end if Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine & _ " " & vbNewLine if strMessageIcons = "1" then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine & _ " " & vbNewLine Response.Write " " & vbNewLine Response.Write " " & vbNewLine if strTopicRating = "1" then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine if (mLev > 0) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine end if currForum = Forum_ID next if fDisplayCount = 0 then if strMessageIcons = "1" and strTopicRating = "1" then MIColspan3 = "8" else MIColspan3 = "7" end if Response.Write " " & vbNewLine & _ " " & vbNewLine if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if end if end if Response.Write "
  " & fLang(strLangActive_Polls00110) & "" & fLang(strLangAuthor00010) & "" & fLang(strLangReplies00010) & "" & fLang(strLangActive_Polls00140) & "" & fLang(strLangTopic_Rating00010) & "" & fLang(strLangActive_Polls00150) & " 
" & fLang(strLangActive_Polls00160) & "
" & vbNewLine & _ " " & chkString(Forum_Subject,"display") & "" & vbNewLine & _ " " & vbNewLine if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then call ForumAdminOptions else if Cat_Status <> 0 and Forum_Status <> 0 then ForumMemberOptions else Response.Write "  " & vbNewLine end if end if Response.Write "  
" & vbNewLine Response.Write "" if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then if Topic_Sticky and strStickyTopic = "1" then if Topic_LastPost > Session(strCookieURL & "last_here_date") then Response.Write getCurrentIcon(strIconFolderNewSticky,fLang(strLangForum00190),"hspace=""0""") else Response.Write getCurrentIcon(strIconFolderSticky,fLang(strLangForum00200),"hspace=""0""") end if else ' DEM --> Added code for topic moderation if Topic_Status = 2 then UnApprovedFound = "Y" Response.Write getCurrentIcon(strIconFolderUnmoderated,fLang(strLangNot_Moderated00010),"hspace=""0""") & "" & vbNewline elseif Topic_Status = 3 then HeldFound = "Y" Response.Write getCurrentIcon(strIconFolderHold,fLang(strLangTopic_Hold00010),"hspace=""0""") & "" & vbNewline ' DEM --> end of code Added for topic moderation elseif lcase(strHotTopic) = "1" and Topic_Replies >= intHotTopicNum then if Topic_Last_Post < Session(strCookieURL & "last_here_date") then Response.Write getCurrentIcon(strIconFolderHot,fLang(strLangBookmark00140),"hspace=""0""") & "" & vbNewline else Response.Write getCurrentIcon(strIconFolderNewHot,fLang(strLangActive00340),"hspace=""0""") & "" & vbNewline end if elseif Topic_Last_Post < Session(strCookieURL & "last_here_date") then Response.Write getCurrentIcon(strIconFolder,fLang(strLangActive00350),"") & "" & vbNewline else Response.Write getCurrentIcon(strIconFolderNew,fLang(strLangActive_Polls00180),"") & "" & vbNewline end if end if else if Cat_Status = 0 then strAltText = fLang(strLangCategory_Locked00010) elseif Forum_Status = 0 then strAltText = fLang(strLangForum_Locked00010) else strAltText = fLang(strLangActive_Polls00210) end if if Topic_Last_Post < Session(strCookieURL & "last_here_date") then if Topic_Sticky and strStickyTopic = "1" then Response.Write getCurrentIcon(strIconFolderNewStickyLocked,strAltText,"hspace=""0""") else Response.Write getCurrentIcon(strIconFolderNewLocked,strAltText,"hspace=""0""") end if else if Topic_Sticky and strStickyTopic = "1" then Response.Write getCurrentIcon(strIconFolderStickyLocked,strAltText,"hspace=""0""") else Response.Write getCurrentIcon(strIconFolderLocked,strAltText,"hspace=""0""") end if end if Response.Write "" & vbNewline end if 'Go through all and get total nTotal = 0 For nCount = 1 To 15 If trim(vAnswers(nCount)) <> "" Then nTotal = nTotal + vCount(nCount) End If Next Response.Write " " & vbNewLine if IsPoll="1" then Response.Write getCurrentIcon(strIconPoll2,"","") else Response.Write getCurrentIcon(getCurrentMsgIcon(Topic_MsgIcon),"","hspace=""0""") end if Response.Write "" & vbNewLine & _ " " if IsPoll then Response.Write fLang(strLangForum00870) end if Response.Write "" & chkString(left(Topic_Subject, 50),"display") & " " & vbNewLine if strShowPaging = "1" then TopicPaging() Response.Write " " & profileLink(chkString(Member_Name,"display"),Topic_Author) & "" if strMemberRating = "1" then iReplyRating = GetMemberRatingAvg( Topic_Author ) if iReplyRating > 0 Then if strUseExtendedProfile then Response.Write "
" else Response.Write "
" end if Response.Write "" & vbNewLine end if end if 'strTopicDate = mid(Topic_Date,5,2) & "/" & mid(Topic_Date,7,2) & "/" & mid(Topic_Date,3,2) response.write "
" & ChkDate(Topic_Date, "" ,false) Response.Write "
" & Topic_Replies & "" & nTotal & "" if strShowRatingStars = "1" then Response.Write("" & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "") else Response.Write("" & TopicRatingAvg & "") Response.Write "" if cint(nTotal) > 0 then Response.Write(chkDate(Last_Vote, " -", true)) else Response.Write fLang(strLangActive_Polls00360) Response.Write "" & vbNewLine if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then call TopicAdminOptions else if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then call TopicMemberOptions else Response.Write "  " & vbNewline end if end if elseif (mLev = 3) then Response.Write " 
" & fLang(strLangNo_Topics00010) & " 
" Call CornerBottom Response.Write "
" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine %><% Response.Write "
" & vbNewLine WriteFooter Response.End sub ForumAdminOptions() if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then if Cat_Status = 0 then if mlev = 4 then Response.Write " " & getCurrentIcon(strIconFolderUnlocked,fLang(strLangUnLock_Category00010),"") & "" & vbNewline else Response.Write " " & getCurrentIcon(strIconFolderLocked,fLang(strLangCategory_Locked00010),"") & vbNewline end if else if Forum_Status <> 0 then Response.Write " " & getCurrentIcon(strIconFolderLocked,fLang(strLangLock_Forum00010),"") & "" & vbNewline else Response.Write " " & getCurrentIcon(strIconFolderUnlocked,fLang(strLangUnLock_Forum00010),"") & "" & vbNewline end if end if if (Cat_Status <> 0 and Forum_Status <> 0) or (ModerateAllowed = "Y") then Response.Write " " & getCurrentIcon(strIconFolderPencil,fLang(strLangForum_Properties00010),"hspace=""0""") & "" & vbNewline end if if mLev = 4 or lcase(strNoCookies) = "1" then Response.Write(" " & getCurrentIcon(strIconFolderDelete,fLang(strLangDelete_Forum00010),"") & "" & vbNewLine) Response.Write " " & getCurrentIcon(strIconFolderNewTopic,fLang(strLangNew_Poll00010),"") & "" & vbNewLine end if end sub sub ForumMemberOptions() if (mlev > 0) then Response.Write " " & getCurrentIcon(strIconFolderNewTopic,fLang(strLangNew_Topic00010),"") & "" & vbNewLine ' DEM --> Start of Code added to handle subscription processing. if (strSubscription > 0 and strSubscription < 4) and CatSubscription > 0 and ForumSubscription = 1 and strEmail = 1 then if InArray(strForumSubs, Forum_ID) then Response.Write ShowSubLink ("U", Cat_ID, Forum_ID, 0, "N") elseif strBoardSubs <> "Y" and not(InArray(strCatSubs,Cat_ID)) then Response.Write ShowSubLink ("S", Cat_ID, Forum_ID, 0, "N") end if end if end if end sub sub TopicAdminOptions() if Cat_Status = 0 then Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Category00010),"hspace=""0""") & "" & vbNewLine elseif Forum_Status = 0 then Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Forum00010),"hspace=""0""") & "" & vbNewLine elseif Topic_Status <> 0 then Response.Write " " & getCurrentIcon(strIconLock,fLang(strLangLock_Topic00010),"hspace=""0""") & "" & vbNewLine else Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Topic00010),"hspace=""0""") & "" & vbNewLine end if if (ModerateAllowed = "Y") or (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangEdit_Topic00010),"hspace=""0""") & "" & vbNewLine end if Response.Write " " & getCurrentIcon(strIconTrashcan,fLang(strLangDelete_Topic00010),"hspace=""0""") & "" & vbNewLine if Topic_Status <= 1 then Response.Write " " & getCurrentIcon(strIconReplyTopic,fLang(strLangReply_to_Topic00010),"hspace=""0""") & "" & vbNewLine end if ' DEM --> Start of Code for Full Moderation if Topic_Status > 1 then TopicString = "TOPIC_ID=" & Topic_ID & "&CAT_ID=" & Cat_ID & "&FORUM_ID=" & Forum_ID Response.Write " " & getCurrentIcon(strIconFolderModerate,fLang(strLangApproveHoldReject_Topic00010),"hspace=""0""") & "" & vbNewline end if ' DEM --> End of Code for Full Moderation ' DEM --> Start of Code added to handle subscription processing. if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then if InArray(strTopicSubs, Topic_ID) then Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N") elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N") end if end if ' DEM --> End of code added to handle subscription processing. end sub sub TopicMemberOptions() if (Topic_Status > 0 and Topic_Author = MemberID) or (ModerateAllowed = "Y") then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangEdit_Topic00010),"hspace=""0""") & "" & vbNewLine end if if (Topic_Status > 0 and Topic_Author = MemberID and Topic_Replies = 0) or (ModerateAllowed = "Y") then Response.Write " " & getCurrentIcon(strIconTrashcan,fLang(strLangDelete_Topic00010),"hspace=""0""") & "" & vbNewLine end if if Topic_Status <= 1 then if mlev >= IntReplyAuth then Response.Write " " & getCurrentIcon(strIconReplyTopic,fLang(strLangReply_to_Topic00010),"hspace=""0""") & "" & vbNewLine else Response.Write " " end if end if if (strSubscription < 4 and strSubscription > 0) and (CatSubscription > 0) and ForumSubscription > 0 and strEmail = 1 then if InArray(strTopicSubs, Topic_ID) then Response.Write " " & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "N") elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then Response.Write " " & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "N") end if end if ' DEM --> End of code added to handle subscription processing. end sub sub TopicPaging() page_limit = 5 first_pages = 3 last_pages = 3 mxpages = (Topic_Replies / strPageSize) if mxPages <> cLng(mxPages) then mxpages = int(mxpages) + 1 end if if mxpages > 1 then Response.Write(" " & vbNewLine) Response.Write(" " & vbNewLine) Response.Write(" " & vbNewLine) if mxpages > page_limit then ref = " " for counter = 1 to first_pages ref = ref & " " next ref = ref & " " if last_pages = 0 then ref = ref & " " else for counter = (mxpages-last_pages+1) to mxpages ref = ref & " " next end if Response.Write ref & vbNewLine else for counter = 1 to mxpages ref = " " Response.Write ref & vbNewLine if counter mod strPageNumberSize = 0 and counter < mxpages then Response.Write(" " & vbNewLine) Response.Write(" " & vbNewLine) Response.Write(" " & vbNewLine) end if next end if Response.Write(" " & vbNewLine) Response.Write("
" & getCurrentIcon(strIconPosticon,"","") & "" ref = ref & " " & fLang(strLangPages00010) & " ("& mxpages & "): " ref = ref & widenum(counter) & " " & counter & "" ref = ref & " ...." ref = ref & widenum(counter) & " Last " ref = ref & widenum(counter) & " " & counter & "" if ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) then ref = ref & " " end if ref = ref & widenum(counter) & "" & counter & "
 
" & vbNewLine) end if end sub %>