<% '## Do Cookie stuff with reload nRefreshTime = Request.Cookies(strCookieURL & "Reload") if Request.form("cookie") = "1" then if strSetCookieToForum = 1 then Response.Cookies(strCookieURL & "Reload").Path = strCookieURL end if Response.Cookies(strCookieURL & "Reload") = Request.Form("RefreshTime") Response.Cookies(strCookieURL & "Reload").expires = strForumTimeAdjust + 365 nRefreshTime = Request.Form("RefreshTime") end if if nRefreshTime = "" then nRefreshTime = 0 end if '## Do Cookie stuffs with show last date if Request.form("cookie") = "2" then MostRecent = Request.Form("ShowSinceDateTime") end if if MostRecent = "" then MostRecent = "10" 'end if %> <% if IsEmpty(Session(strCookieURL & "last_here_date")) then Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) end if if lastDate = "" then lastDate = Session(strCookieURL & "last_here_date") end if if Request.Form("AllRead") = "Y" then Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) lastDate = Session(strCookieURL & "last_here_date") MostRecent = "" end if '## Forum_SQL - Get all active topics from last visit strSQL1 = "SELECT" strSQL2 = "SELECT TOP " & MostRecent strSQL3 = " " & strTablePrefix & "FORUM.F_SUBJECT" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_STATUS" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_VIEW_COUNT" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.FORUM_ID" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.TOPIC_ID" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.CAT_ID" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_SUBJECT" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_STICKY" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_AUTHOR" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_REPLIES" strSQL3 = strSQL3 & ", " & strMemberTablePrefix & "MEMBERS.M_NAME" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_DATE" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_LAST_POST" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_ISEVENT" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_ISPOLL" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_MSGICON" strSQL3 = strSQL3 & ", MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME" strSQL3 = strSQL3 & " FROM " & strMemberTablePrefix & "MEMBERS" strSQL3 = strSQL3 & ", " & strTablePrefix & "FORUM" strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS" strSQL3 = strSQL3 & ", " & strMemberTablePrefix & "MEMBERS AS MEMBERS_1" strSQL3 = strSQL3 & " WHERE " & strTablePrefix & "FORUM.F_PRIVATEFORUMS = 0" strSQL3 = strSQL3 & " AND " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID" strSQL3 = strSQL3 & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID" strSQL3 = strSQL3 & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID" strSQL3 = strSQL3 & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR" '## UPDATE strSQL3 = strSQL3 & " ORDER BY " & strTablePrefix & "TOPICS.T_LAST_POST DESC" '## UPDATE 'strSQL3 = strSQL3 & " ORDER BY " & strTablePrefix & "TOPICS.T_STICKY DESC" 'strSQL3 = strSQL3 & ", " & strTablePrefix & "TOPICS.T_LAST_POST DESC" strSQL4 = " LIMIT " & MostRecent Set rs = Server.CreateObject("ADODB.Recordset") if strDBType = "mysql" then rs.open strSQL1 & strSQL3 & strSQL4, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText else rs.open strSQL2 & strSQL3, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText end if if rs.EOF then 'RecordSet Topics Recent = False iRecentCount = "" rs.Close set rs = nothing else Recent = True arrRecent = rs.GetRows(adGetRowsRest) iRecentCount = UBound(arrRecent,2) rs.Close set rs = nothing Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen,"","") & " " & fLang(strLangAll_Forums00010) & "
" & vbNewLine & _ getCurrentSkinIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " " & fLang(strLangForum00910) & vbNewLine & _ " " & vbNewLine & _ " " & fLang(strLangForum00920) & 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 = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine if Recent = False then if strMessageIcons = "1" and strTopicRating = "1" then MIColspan = "8" else MIColspan = "7" end if Response.Write " " & vbNewLine & _ " " & vbNewLine if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine else currForum = 0 fDisplayCount = 0 intI = 0 rF_SUBJECT = 0 rT_STATUS = 1 rT_VIEW_COUNT = 2 rFORUM_ID = 3 rTOPIC_ID = 4 rCAT_ID = 5 rT_SUBJECT = 6 rT_STICKY = 7 rT_AUTHOR = 8 rT_REPLIES = 9 rM_NAME = 10 rT_DATE = 11 rT_LAST_POST_AUTHOR = 12 rT_LAST_POST = 13 rT_ISEVENT = 14 rT_ISPOLL = 15 rT_MSGICON = 16 rLAST_POST_AUTHOR_NAME = 17 for iForum = 0 to iRecentCount Recent_F_SUBJECT = arrRecent(rF_SUBJECT, iForum) Recent_T_STATUS = arrRecent(rT_STATUS, iForum) Recent_T_VIEW_COUNT = arrRecent(rT_VIEW_COUNT, iForum) Recent_FORUM_ID = arrRecent(rFORUM_ID, iForum) Recent_TOPIC_ID = arrRecent(rTOPIC_ID, iForum) Recent_CAT_ID = arrRecent(rCAT_ID, iForum) Recent_T_SUBJECT = arrRecent(rT_SUBJECT, iForum) Recent_T_STICKY = arrRecent(rT_STICKY, iForum) Recent_T_AUTHOR = arrRecent(rT_AUTHOR, iForum) Recent_T_REPLIES = arrRecent(rT_REPLIES, iForum) Recent_M_NAME = arrRecent(rM_NAME, iForum) Recent_T_DATE = arrRecent(rT_DATE, iForum) Recent_T_LAST_POST_AUTHOR = arrRecent(rT_LAST_POST_AUTHOR, iForum) Recent_T_LAST_POST = arrRecent(rT_LAST_POST, iForum) Recent_T_ISEVENT = arrRecent(rT_ISEVENT, iForum) Recent_T_ISPOLL = arrRecent(rT_ISPOLL, iForum) Recent_T_MSGICON = arrRecent(rT_MSGICON, iForum) Recent_LAST_POST_AUTHOR_NAME = arrRecent(rLAST_POST_AUTHOR_NAME, iForum) '## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists strSQL = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " strSQL = strSQL & " " & strTablePrefix & "CATEGORY.CAT_ID, " strSQL = strSQL & " " & strTablePrefix & "CATEGORY.CAT_NAME " strSQL = strSQL & " FROM " & strTablePrefix & "CATEGORY " strSQL = strSQL & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Recent_CAT_ID Set rsCStatus = Server.CreateObject("ADODB.Recordset") rsCStatus.open strSQL, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsCStatus.EOF then rsCStatus.Close set rsCStatus = nothing else Cat_Status = rsCStatus("CAT_STATUS") Cat_ID = rsCStatus("CAT_ID") Cat_Name = rsCStatus("CAT_NAME") rsCStatus.Close set rsCStatus = nothing end if '## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists strSQLF = "SELECT " & strTablePrefix & "FORUM.F_STATUS " strSQLF = strSQLF & " FROM " & strTablePrefix & "FORUM " strSQLF = strSQLF & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Recent_FORUM_ID Set rsFStatus = Server.CreateObject("ADODB.Recordset") rsFStatus.open strSQLF, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsFStatus.EOF then rsFStatus.Close set rsFStatus = nothing else Forum_F_STATUS = rsFStatus("F_STATUS") rsFStatus.Close set rsFStatus = nothing end if ' if ChkForumAccess(Forum_ID, MemberID, true) then if mLev = 4 then AdminAllowed = 1 else AdminAllowed = 0 end if fDisplayCount = fDisplayCount + 1 if currForum <> Recent_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 (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine elseif (mLev = 3) then Response.Write " " & vbNewLine else 'do nothing end if Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine & _ " " & vbNewLine if strMessageIcons = "1" then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if strTopicRating = "1" then TopicRatingAvg = GetTopicRatingAvg( Recent_TOPIC_ID ) Response.Write " " & vbNewLine end if if IsNull(Recent_T_LAST_POST_AUTHOR) then strLastAuthor = "" else strLastAuthor = "
" & fLang(strLangBy00010) & " " if strUseExtendedProfile then strLastAuthor = strLastAuthor & " " else strLastAuthor = strLastAuthor & " " end if strLastAuthor = strLastAuthor & Recent_LAST_POST_AUTHOR_NAME & "" end if Response.Write " " & vbNewLine if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine elseif (mLev = 3) then Response.Write " " & vbNewLine end if Response.Write " " & vbNewLine ' end if currForum = Recent_FORUM_ID '-------------------------------- intI = intI + 1 if intI = 2 then intI = 0 end if next end if 'RecordSet Topics '-------------------------------- if fDisplayCount = 0 then if strMessageIcons = "1" and strTopicRating = "1" then MIColspan = "9" else MIColspan = "8" end if Response.Write " " & vbNewLine & _ " " & vbNewLine if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine end if end if Response.Write " " & vbNewLine & _ "
  " & fLang(strLangHead_Topic00010) & "" & fLang(strLangAuthor00010) & "" & fLang(strLangReplies00010) & "" & fLang(strLangRead00010) & "" & fLang(strLangTopic_Rating00010) & "" & fLang(strLangLast_Post00010) & " 
" & fLang(strLangForum00930) & " 
" & vbNewLine & _ " " & vbNewLine & _ " " & ChkString(Cat_Name,"display") & "" & vbNewLine & _ " /" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & ChkString(Recent_F_SUBJECT,"display") & "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine Call ForumAdminOptions() Response.Write "  
" & vbNewLine '---------- TOPIC IS OPEN if Recent_T_STATUS = 1 or Recent_T_STATUS = 11 then if lcase(strHotTopic) = "1" then '---------- HOT TOPIC OR NOT 'if it's not a HOT TOPIC then it's either a Sticky Topic, 'an Event, a Poll or even a Normal Topic if Recent_T_REPLIES >= intHotTopicNum then Icon = getCurrentIcon(strIconFolderNewHot,fLang(strLangHot_Topic00010),"") Response.Write " " & Icon & "" & vbNewLine else '---------- TOPIC IS STICKY if Recent_T_STICKY = "1" then 'Open and Sticky Icon = getCurrentIcon(strIconFolderSticky,fLang(strLangForum00200),"") Response.Write " " & Icon & "" & vbNewLine '---------- TOPIC IS EVENT elseif Recent_T_ISEVENT = "1" then Icon = getCurrentIcon(strIconEvent,fLang(strLangForum00940),"") Response.Write " " & Icon & vbNewLine '---------- TOPIC IS POLL elseif Recent_T_ISPOLL = "1" then Icon = getCurrentIcon(strIconPoll,fLang(strLangNew_Poll00010),"") Response.Write " " & Icon & vbNewLine '---------- TOPIC IS A NORMAL TOPIC else Icon = getCurrentIcon(strIconFolderNew,fLang(strLangNew_Topic00010),"") Response.Write " " & Icon & vbNewLine end if end if else 'shouldn't be possible but anyway... Icon = getCurrentIcon(strIconOnline,fLang(strLangNew_Topic00010),"") Response.Write " " & Icon & vbNewLine end if '---------- TOPIC IS LOCKED elseif Recent_T_STATUS = 0 then '---------- TOPIC IS STICKY if Recent_T_STICKY = "1" then Icon = getCurrentIcon(strIconFolderStickyLocked,fLang(strLangForum00950),"") Response.Write " " & Icon & vbNewLine '---------- TOPIC IS EVENT elseif Recent_T_ISEVENT = "1" then Icon = getCurrentIcon(strIconEvent,fLang(strLangForum00940),"") Response.Write " " & Icon & vbNewLine '---------- TOPIC IS POLL elseif Recent_T_ISPOLL = "1" then Icon = getCurrentIcon(strIconPoll,fLang(strLangNew_Poll00010),"") Response.Write " " & Icon & vbNewLine '---------- TOPIC IS NORMAL LOCKED TOPIC else Icon = getCurrentIcon(strIconFolderLocked,fLang(strLangLockedTopic00010),"") Response.Write " " & Icon & vbNewLine end if else 'shouldn't be possible but anyway... Icon = getCurrentIcon(strIconOffline,fLang(strLangNew_Topic00010),"") Response.Write " " & Icon & vbNewLine end if Response.Write " " & vbNewLine & _ " " & vbNewLine if Recent_T_ISEVENT="1" then Response.Write getCurrentIcon(strIconEvent,"","") elseif Recent_T_ISPOLL="1" then Response.Write getCurrentIcon(strIconPoll2,"","") elseif Recent_T_STATUS = 11 then Response.Write getCurrentIcon(strIconTopicSecret,fLang(strLangTopic01010),"align=""absmiddle""") else Response.Write getCurrentIcon(getCurrentMsgIcon(Recent_T_MSGICON),"","hspace=""0""") end if Response.Write "" & vbNewLine '---------- STICKY TOPICS, EVENTS AND POLLS PRE-TEXT 'if Recent_T_STICKY and strStickyTopic = "1" then Response.Write fLang(strLangForum00270) if Recent_T_STICKY and strStickyTopic = "1" and Recent_T_ISPOLL then Response.Write fLang(strLangForum00860) elseif Recent_T_STICKY and strStickyTopic = "1" and not(Recent_T_ISPOLL) then Response.Write fLang(strLangForum00270) elseif Recent_T_ISPOLL then Response.Write fLang(strLangForum00870) end if if Recent_T_ISEVENT="1" then Response.Write fLang(strLangCla00190) if Recent_T_STATUS = 11 then Response.Write fLang(strLangTopic01020) Response.Write " " & ChkString(left(Recent_T_SUBJECT, 50),"display") & " " & vbNewLine if strShowPaging = "1" then TopicPaging() end if Response.Write " " & ChkString(Recent_M_NAME,"display") & "" 'strTopicDate = mid(Topic_Date,5,2) & "/" & mid(Topic_Date,7,2) & "/" & mid(Topic_Date,3,2) response.write "
" & ChkDate(Recent_T_DATE, "" ,false) & "" Response.Write "
" & Recent_T_REPLIES & "" & Recent_T_VIEW_COUNT & "" if strShowRatingStars = "1" then Response.Write("" & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "") else Response.Write("" & TopicRatingAvg & "") Response.Write "" & ChkDate1(Recent_T_LAST_POST) & " " & ChkTime1(Recent_T_LAST_POST) & strLastAuthor & "" & vbNewLine '---------- CATEGORY IS LOCKED if Cat_Status = 0 then Response.Write " " & getCurrentIcon(strIconFolderUnlocked,fLang(strLangUnLock_Category00010),"") & "" & vbNewLine else '---------- FORUM IS LOCKED if Forum_F_STATUS = 0 then Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Topic00010),"") & "" & vbNewLine else if Recent_T_STATUS <> 0 then Response.Write " " & getCurrentIcon(strIconLock,fLang(strLangLock_Topic00010),"") & "" & vbNewLine else Response.Write " " & getCurrentIcon(strIconUnlock,fLang(strLangUnLock_Topic00010),"") & "" & vbNewLine end if end if end if if (AdminAllowed = 1) or (Cat_Status <> 0 and Forum_F_STATUS <> 0 and Recent_T_STATUS <> 0) then Response.Write " " & getCurrentIcon(strIconPencil,fLang(strLangEdit_Topic00010),"") & "" & vbNewLine end if Response.Write " " & getCurrentIcon(strIconTrashcan,fLang(strLangDelete_Topic00010),"") & "" & vbNewLine & _ " " & getCurrentIcon(strIconReplyTopic,fLang(strLangReply_to_Topic00010),"") & "" & vbNewLine & _ " " & vbNewLine & _ "  
" & fLang(strLangForum00930) & " 
" & vbNewLine Call CornerBottom Response.Write "
" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ "  " & vbNewLine & _ " " & vbNewLine %><% Response.Write "
" & vbNewLine WriteFooter Response.End sub ForumAdminOptions() if (AdminAllowed = 1) 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),"") end if else if Forum_F_STATUS <> 0 then Response.Write "" & getCurrentIcon(strIconFolderLocked,fLang(strLangLock_Forum00010),"") & "" & vbNewLine else Response.Write "" & getCurrentIcon(strIconFolderUnlocked,fLang(strLangForum_Locked00010),"") & "" & vbNewLine end if end if if (Cat_Status <> 0 and Forum_F_STATUS <> 0) or (AdminAllowed = 1) then Response.Write "" & getCurrentIcon(strIconFolderPencil,fLang(strLangForum_Properties00010),"") & "" & vbNewLine end if Response.Write "" & getCurrentIcon(strIconFolderDelete,fLang(strLangDelete_Forum00010),"") & "" & vbNewLine & _ "" & getCurrentIcon(strIconFolderNewTopic,fLang(strLangNew_Topic00010),"") & "" & vbNewLine end if 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 %>