<% '### NEW EVENTS CALENDAR MOD FOR SNITZ 3.4.03 ### Response.Write "" & getCurrentIcon(strIconFolderOpen,"","") & " Tutti i Forum
" & vbNewLine & _ getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconEvent,"","align=""absmiddle""") & " " & strCalEventsCalendar & "


" & vbNewLine select case Request.Querystring("view") case "weekly" Call Weeklyview case "monthly" Call Monthlyview case "yearly" Call Yearlyview case "eventslist" Call Eventslistview case else Call Dailyview end select Response.Write "
" WriteFooter '####################################################### Sub Dailyview '## '####################################################### '### Check for valid date input ### dim dateHolder if Request.Querystring("date")="" then dateHolder=DateValue(strForumTimeAdjust) else dateHolder=DateValue(CDate(Request.Querystring("date"))) end if Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalDaily & "" & vbNewLine & _ " " & strCalWeekly & "" & vbNewLine & _ " " & strCalMonthly & "" & vbNewLine & _ " " & strCalYearly & "" & vbNewLine & _ " " & strCalEventsList & "" & vbNewLine & _ "  
" & vbnewline & _ "
" & vbNewLine & _ "

" & vbNewLine & _ " " & strCalTodayIs & FormatDateTime(strForumTimeAdjust,vbLongDate) & "

" & vbNewLine & _ " " & vbNewLine & _ " " & vbnewline '### Small Monthly Calendar ### Response.Write "

" & vbNewLine & _ " " & strCalEventsFor & "
" & FormatDateTime(dateHolder, vbLongDate) & "

" & vbNewLine '### Get the TOPICs from the database ### dim strSql strSql = "SELECT T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.T_MESSAGE, " & _ "T.T_AUTHOR, " & _ "T.T_REPLIES, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "C.CAT_ID, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION, " & _ "M.M_NAME " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F, " & _ strMemberTablePrefix & "MEMBERS M " & _ "WHERE T.T_ISEVENT=1 " & _ "AND T.T_EVENT_DATE = '" & DatetoStr(dateHolder) & "' " & _ "AND T.T_AUTHOR=M.MEMBER_ID " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " dim rs set rs = Server.CreateObject("ADODB.Recordset") rs.Open StrSql, My_conn if rs.EOF then '### There are no events for this date. ### Response.Write ""& strCalNoEvents & "" else do while not(rs.EOF) '### Load the database values into local variables ### TOPIC_ID = rs("TOPIC_ID") TOPIC_Subject = rs("T_SUBJECT") TOPIC_Message = rs("T_MESSAGE") TOPIC_Author = rs("T_AUTHOR") TOPIC_Replies = rs("T_REPLIES") Forum_ID = rs("FORUM_ID") TOPIC_Status = rs("T_STATUS") Cat_ID = rs("CAT_ID") Cat_Moderation = rs("CAT_MODERATION") Forum_Moderation = rs("F_MODERATION") Member_Name = rs("M_NAME") '########### Check for access ########### if mLev = 4 then AdminAllowed = 1 ForumChkSkipAllowed = 1 elseif mLev = 3 then if chkForumModerator(Forum_ID, chkString(strDBNTUserName,"decode")) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 1 else if lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if end if elseif lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if if strPrivateForums = "1" and ForumChkSkipAllowed <> "1" then forumAccess = ChkForumAccess(Forum_ID, MemberID, false) else forumAccess = true end if if strModeration > 0 and Cat_Moderation > 0 and Forum_Moderation > 0 and AdminAllowed = 0 then Moderation = "Y" else Moderation = "N" end if '######################################### if forumAccess and not(Moderation = "Y" and TOPIC_Status > 1 and TOPIC_Author <> MemberID) then '### Output the TOPICs to the page ### Response.Write "

" & getCurrentIcon(strIconEvent,"","vAlign=""midle""") & vbNewLine & _ "" & vbNewLine & _ "" & vbnewline & _ "" & TOPIC_Subject & "
" & vbNewLine & _ "" & vbnewline & _ formatstr(TOPIC_Message) & "
" & vbNewLine & _ "" & vbNewLine &_ strCalPostedBy & "" & profileLink(chkString(Member_Name,"display"),TOPIC_Author) & " " & vbnewline '### Write the number of replies to the TOPIC ### if TOPIC_Replies > 0 then Response.Write "(" & TOPIC_Replies & " " if TOPIC_Replies > 1 then Response.Write strCalReplyPlural else Response.Write strCalReplySingular Response.Write ")" end if Response.Write "" & vbNewLine '### Draw Post Buttons ### if mlev =4 or lcase(strNoCookies) = "1" then if (TOPIC_Status <> 0) then Response.Write "" & getCurrentIcon(strIconFolderLocked,strCalLockTOPIC,"align=""absmiddle""") & "" & vbNewLine else Response.Write "" & getCurrentIcon(strIconFolderUnlocked,strCalUnLockTOPIC,"align=""absmiddle""") & "" & vbNewLine end if end if if ((TOPIC_Status > 0 and TOPIC_Author = MemberID) or mlev =4 or lcase(strNoCookies) = "1" ) then Response.Write "" & getCurrentIcon(strIconPencil,"Edit TOPIC","align=""absmiddle""") & "" & vbNewLine end if if (TOPIC_Author = MemberID and TOPIC_Replies=0) or mlev =4 or lcase(strNoCookies) = "1" then Response.Write "" & getCurrentIcon(strIconTrashCan,strCalDelete,"align=""absmiddle""") & "" & vbNewLine end if if TOPIC_Status <= 1 then Response.Write "" & getCurrentIcon(strIconReplyTOPIC,strCalReply,"align=""absmiddle""") & "" & vbNewLine end if '######################## end if rs.Movenext loop end if rs.close set rs = nothing '### Add Event Form ### call AddEventForm(dateHolder) Response.Write "

" & vbnewline Drawmonth dateHolder,1,1,1 Response.Write "
" & vbNewLine '### Upcoming Events ### Response.Write "" & vbnewline & _ "
" & vbnewline & _ " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalUpcoming & "
" & vbNewLine WriteUpcomingEvents Response.Write "  
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine '### Recent Events ### Response.Write "" & vbnewline & _ "
" & vbnewline & _ " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalRecent & "
" & vbNewLine WriteRecentEvents Response.Write "  
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine End sub 'Dailyview '####################################################### Sub Weeklyview '## '####################################################### '### Check for valid date input ### dim dateHolder if Request.Querystring("date")="" then dateHolder=DateValue(strForumTimeAdjust) else dateHolder=DateValue(CDate(Request.Querystring("date"))) end if dateCursor = dateHolder '### Move to the first day of the week ### do while Weekday(dateCursor) <> intFirstDayofWeek dateCursor = DateAdd("d",-1,dateCursor) loop Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalDaily & "" & vbNewLine & _ " " & strCalWeekly & "" & vbNewLine & _ " " & strCalMonthly & "" & vbNewLine & _ " " & strCalYearly & "" & vbNewLine & _ " " & strCalEventsList & " " & vbNewLine & _ "
" & _ "
" & vbNewLine & _ "

" & vbNewLine & _ " " & strCalTodayIs & FormatDateTime(strForumTimeAdjust,vbLongDate) & "

" & vbNewLine & _ " " & vbNewLine & _ " " & vbnewline '### Small Monthly Calendar ### Response.Write "

" & vbNewLine & _ " " & strCalEventsFor & "
" & _ " " & getCurrentIcon(strIconLeftArrow,strCalPrevWeek,"") & "" & vbNewLine & _ " " & FormatDateTime(dateCursor,vbLongDate) & " - " & FormatDateTime(DateAdd("d",6,dateCursor),vbLongDate) & "" & vbNewLine & _ " " & getCurrentIcon(strIconRightArrow,strCalNextWeek,"") & "

" & vbNewLine '### Get the TOPICs from the database dim strSql strSql = "SELECT T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.T_MESSAGE, " & _ "T.T_AUTHOR, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "T.T_EVENT_DATE, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND T.T_EVENT_DATE >= '" & DatetoStr(dateCursor) & "' " & _ "AND T.T_EVENT_DATE < '" & DatetoStr(DateAdd("d", 7 ,dateCursor)) & "' " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " dim rs set rs = Server.CreateObject("ADODB.Recordset") rs.Open StrSql, My_conn, adOpenStatic '### Determine if there are any events to display ### intEventsforWeek = rs.RecordCount '### 7 days in a week ### dim iWeek for iWeek=1 to 7 Response.Write "" & vbnewline & _ "
" & vbnewline & _ "" & vbnewline & _ "" & vbnewline & _ "
" & vbnewline & _ getCurrentIcon(strIconEvent,"","align=""absmiddle""") & " " & _ FormatDateTime(dateCursor, vbLongDate) & vbnewline & _ "" & vbnewline & _ "
" & vbnewline '### Get the Events for this day only ### if intEventsforWeek > 0 then rs.filter = "" rs.filter="T_EVENT_DATE='" & DateToStr(dateCursor) & "'" end if '### Loop through the recordset to find the events for this date ### if rs.EOF then '### There are no events for this date ### Response.Write ""& strCalNoEvents & "" & vbnewline else do until rs.EOF '### Load the values from the database into local variables ### TOPIC_ID = rs("TOPIC_ID") TOPIC_Subject = rs("T_SUBJECT") TOPIC_Message = rs("T_MESSAGE") TOPIC_Author = rs("T_AUTHOR") Forum_ID = rs("FORUM_ID") TOPIC_Status = rs("T_STATUS") Event_Date = StrToDate(rs("T_EVENT_DATE")) Cat_Moderation = rs("CAT_MODERATION") Forum_Moderation = rs("F_MODERATION") '########### Check for access ########### if mLev = 4 then AdminAllowed = 1 ForumChkSkipAllowed = 1 elseif mLev = 3 then if chkForumModerator(Forum_ID, chkString(strDBNTUserName,"decode")) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 1 else if lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if end if elseif lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if if strPrivateForums = "1" and ForumChkSkipAllowed <> "1" then forumAccess = ChkForumAccess(Forum_ID, MemberID, false) else forumAccess = true end if if strModeration > 0 and Cat_Moderation > 0 and Forum_Moderation > 0 and AdminAllowed = 0 then Moderation = "Y" else Moderation = "N" end if '######################################### if forumAccess and not(Moderation = "Y" and TOPIC_Status > 1 and TOPIC_Author <> MemberID) then '### Output the TOPICs to the page ### Response.Write "

" & getCurrentIcon(strIconRightArrow,"","") & "" & vbNewLine & _ "" & _ "" & TOPIC_Subject & "
" & vbNewLine & _ "" & _ formatstr(TOPIC_Message) & "" & vbNewLine end if rs.movenext loop end if '### Add Event Form ### Response.Write " " & _ "

" & vbnewline call AddEventForm(dateCursor) Response.Write "
" & vbnewline & _ "
" & vbnewline & _ "

" & vbnewline dateCursor = dateAdd("d", 1, dateCursor) next rs.close set rs = nothing Response.Write "
" & vbnewline DrawmonthWeekly dateHolder Response.Write "
" & vbNewLine '### Upcoming Events ### Response.Write "" & vbnewline & _ "
" & vbnewline & _ " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalUpcoming & "
" & vbNewLine WriteUpcomingEvents Response.Write "  
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine '### Recent Events ### Response.Write "" & vbnewline & _ "
" & vbnewline & _ " " & vbNewLine & _ " " & vbnewline & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalRecent & "
" & vbNewLine WriteRecentEvents Response.Write "  
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine End sub 'Weeklyview '####################################################### Sub Monthlyview '## '####################################################### '### Check for valid date input ### dim dateHolder if Request.Querystring("date")<>"" then dateHolder=DateValue(CDate(Request.Querystring("date"))) else if Request.Querystring("month")<>"" and Request.Querystring("year")<>"" then dateHolder=DateSerial(Request.Querystring("year"), Request.Querystring("month"), 1) else dateHolder=DateValue(strForumTimeAdjust) end if end if Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalDaily & "" & vbNewLine & _ " " & strCalWeekly & "" & vbNewLine & _ " " & strCalMonthly & "" & vbNewLine & _ " " & strCalYearly & "" & vbNewLine & _ " " & strCalEventsList & " " & vbNewLine & _ "
" & _ "
" & vbNewLine & _ "

" & vbNewLine & _ " " & strCalTodayIs & FormatDateTime(strForumTimeAdjust,vbLongDate) & "

" & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine '### Create a table, then write the name of the month and the year ### Response.Write "
" & vbNewLine & _ "" & vbNewLine & _ "" & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine '### Generate the days of the week ### Dim intDays, dayofWeek dayofWeek = intFirstDayofWeek - 1 For intDays=1 to 7 Response.Write "" dayofWeek = dayofWeek + 1 Next '### Get the first day of the month ### dim dateCursor dateCursor= DateSerial(Year(dateHolder), Month(dateHolder), 1) '### If first day of the month is not Sunday (or Monday or whatever), step back to last Sunday or (Monday or whatever) of previous month ### Do while Weekday(dateCursor) <> intFirstDayofWeek dateCursor = DateAdd("d", -1, dateCursor) Loop '### Get the TOPICs from the db ### strSql = "SELECT T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.T_AUTHOR, " & _ "T.T_MESSAGE, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "T.T_EVENT_DATE, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND (T.T_EVENT_DATE > '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder),1-1)) & "') " & _ "AND (T.T_EVENT_DATE < '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder)+1,1)) & "') " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " & _ "ORDER BY T.T_EVENT_DATE Asc" dim rs set rs = Server.CreateObject("ADODB.Recordset") rs.open StrSql, My_conn Do While dateCursor < DateSerial(Year(dateHolder), Month(dateHolder)+1, 1) Response.Write "" & vbNewLine For intDays=1 to 7 Response.Write "" & vbNewLine Next Response.Write "" & vbNewLine Loop rs.close set rs = nothing Response.Write "
" & vbNewLine & _ " " & getCurrentIcon(strIconLeftArrow,strCalPrevMonth,"") & "" & vbNewLine & _ " " & MonthName(Month(dateHolder)) & " " & Year(dateHolder) & "" & vbNewLine & _ " " & getCurrentIcon(strIconRightArrow,strCalNextMonth,"") & "
" & _ "" & _ WeekDayName(dayofWeek mod 7 + 1, 1) & "
dateSerial(Year(dateHolder), Month(dateHolder), 1-1) and dateCursor < dateSerial(Year(dateHolder), Month(dateHolder)+1, 1) then Response.Write " id=""datetoday"" " Response.Write ">" & vbnewline '### Don't bother writing the date if it doesn't fall within the month ### if dateCursor > dateSerial(Year(dateHolder), Month(dateHolder), 1-1) and dateCursor < dateSerial(Year(dateHolder), Month(dateHolder)+1, 1) then rs.filter="" rs.filter="T_EVENT_DATE='" & DateToStr(dateCursor) & "'" Response.Write "

" & Day(dateCursor) & "" & vbnewline if not(rs.EOF) then Response.Write "

    " '### Loop through the recordset to find the events for the current date ### do while not(rs.EOF) TOPIC_ID = rs("TOPIC_ID") TOPIC_Subject = rs("T_SUBJECT") TOPIC_Author = rs("T_AUTHOR") TOPIC_Message = rs("T_MESSAGE") Forum_ID = rs("FORUM_ID") TOPIC_Status = rs("T_STATUS") Event_Date = StrToDate(rs("T_EVENT_DATE")) Cat_Moderation = rs("CAT_MODERATION") Forum_Moderation = rs("F_MODERATION") '########### Check for access ########### if mLev = 4 then AdminAllowed = 1 ForumChkSkipAllowed = 1 elseif mLev = 3 then if chkForumModerator(Forum_ID, chkString(strDBNTUserName,"decode")) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 1 else if lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if end if elseif lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if if strPrivateForums = "1" and ForumChkSkipAllowed <> "1" then forumAccess = ChkForumAccess(Forum_ID, MemberID, false) else forumAccess = true end if if strModeration > 0 and Cat_Moderation > 0 and Forum_Moderation > 0 and AdminAllowed = 0 then Moderation = "Y" else Moderation = "N" end if '######################################### if forumAccess and not(Moderation = "Y" and TOPIC_Status > 1 and TOPIC_Author <> MemberID) then '### Output the TOPIC to the page ### Response.Write "
  • " & TOPIC_Subject & "" end if rs.movenext loop Response.Write "
" & vbnewline end if end if dateCursor=DateAdd ("d",1,dateCursor) Response.Write "
" & vbnewline & _ "
" & vbNewLine ' ### Jump to Month Form ### Response.Write "
" & vbnewline & _ "" & strCalJumptoMonth & "" & vbnewline & _ "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ "
" & vbnewline ' ########################## Response.Write "
" '### Small Calendar for Previous Month ### Drawmonth dateAdd("m", -1, dateHolder),0,0,1 Response.Write "
" & vbNewLine '### Small Calendar for Next Month ### Drawmonth dateAdd("m", +1, dateHolder),0,0,1 Response.Write "
" & vbnewline & _ "
" & vbNewLine & _ "
" & vbNewLine End sub 'Monthlyview '####################################################### Sub Yearlyview '## '####################################################### '### Check for valid date input ### if Request.Querystring("date")<>"" then dateHolder=DateValue(CDate(Request.Querystring("date"))) else if Request.Querystring("year")<>"" then dateHolder=DateSerial(Request.Querystring("year"), 1, 1) else dateHolder=DateValue(strForumTimeAdjust) end if end if Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalDaily & "" & vbNewLine & _ " " & strCalWeekly & "" & vbNewLine & _ " " & strCalMonthly & "" & vbNewLine & _ " " & strCalYearly & "" & vbNewLine & _ " " & strCalEventsList & " " & vbNewLine & _ "
" & _ "
" & vbNewLine & _ "

" & vbNewLine & _ " " & strCalTodayIs & FormatDateTime(strForumTimeAdjust,vbLongDate) & "

" & vbNewLine '### Set dateCursor to first day of the year ### dateCursor=dateSerial(Year(dateHolder), 1,1) Response.Write "" & vbNewLine & _ "" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " for icols=1 to 3 Response.Write "" &vbNewLine next Response.Write "
" & vbNewLine & _ " " & getCurrentIcon(strIconLeftArrow,strCalPrevYear,"") & "" & vbNewLine & _ " " & vbNewLine & _ " " & Year(dateHolder) & "" & vbNewLine & _ " " & vbNewLine & _ " " & getCurrentIcon(strIconRightArrow,strCalNextYear,"") & "" & vbNewLine for irows=1 to 4 Response.Write "
" DrawMonth dateCursor, 0, 0, 0 dateCursor=dateAdd("m", 1, dateCursor) next Response.Write "
" & vbNewLine & _ "
" & vbNewLine '### Jump To Year Form ### Response.Write "
" & vbnewline & _ "" & vbNewLine & _ "" & strCalJumptoYear & "" & vbnewline & _ "" & vbNewLine & _ "" & vbNewLine & _ "
" & vbnewline & _ "
" & vbNewLine & _ "
" & vbNewLine End sub 'Yearlyview '####################################################### Sub EventsListView '## '####################################################### select case Request.Querystring("display") case "past" display="past" case else display="future" end select '### Added for paging ### dim intCurrentPage if Request("page") = "" or CInt(Request("page"))=0 then intCurrentPage = 1 else intCurrentPage = cInt(Request("page")) end if Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & strCalDaily & "" & vbNewLine & _ " " & strCalWeekly & "" & vbNewLine & _ " " & strCalMonthly & "" & vbNewLine & _ " " & strCalYearly & "" & vbNewLine & _ " " & strCalEventsList & " " & vbNewLine & _ "
" & _ "
" & vbNewLine & _ "

" & vbNewLine & _ " " & strCalTodayIs & FormatDateTime(strForumTimeAdjust,vbLongDate) & "

" & vbNewLine '### Display Past/Future Events Selectbox ### Response.Write "
" & vbNewLine & _ "" & vbNewLine & _ "" & strCalDisplay & "" & _ "" & vbNewLine & _ "
" & vbNewLine '### Events List Table ### Response.Write "" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbnewline Select Case display Case "future" strSql = "SELECT T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.T_MESSAGE, " & _ "T.T_AUTHOR, " & _ "T.T_EVENT_DATE, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "C.CAT_ID, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND (T.T_EVENT_DATE >= '" & DateToStr(DateValue(strForumTimeAdjust)) & "') " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " & _ "ORDER BY T.T_EVENT_DATE Asc" Case "past" strSql = "SELECT T.TOPIC_ID, " & _ "T.T_SUBJECT, " & _ "T.T_MESSAGE, " & _ "T.T_AUTHOR, " & _ "T.T_EVENT_DATE, " & _ "T.FORUM_ID, " & _ "T.T_STATUS, " & _ "C.CAT_ID, " & _ "C.CAT_MODERATION, " & _ "F.F_MODERATION " & _ "FROM " & strTablePrefix & "TOPICS T, " & _ strTablePrefix & "CATEGORY C, " & _ strTablePrefix & "FORUM F " & _ "WHERE T.T_ISEVENT=1 " & _ "AND (T.T_EVENT_DATE < '" & DateToStr(DateValue(strForumTimeAdjust)) & "') " & _ "AND F.FORUM_ID = T.FORUM_ID " & _ "AND C.CAT_ID = T.CAT_ID " & _ "ORDER BY T.T_EVENT_DATE Desc" End Select dim rs set rs = Server.CreateObject("ADODB.Recordset") rs.CursorLocation = adUseClient rs.PageSize = intEventsPageSize rs.open StrSql, My_conn dim intTotalPages intTotalPages = rs.PageCount '### Added for paging ### if intCurrentPage < 1 then intCurrentPage = 1 if intCurrentPage > intTotalPages then intCurrentPage = intTotalPages if intCurrentPage <> 0 then rs.AbsolutePage = intCurrentPage if rs.EOF then Select Case display Case "future" '### There are no future events ### Response.Write "" & vbNewLine Case "past" '### There are no past events ### Response.Write "" & vbNewLine End Select else do while rs.AbsolutePage = intCurrentPage and not(rs.EOF) TOPIC_ID = rs("TOPIC_ID") TOPIC_Subject = rs("T_SUBJECT") TOPIC_Message = rs("T_MESSAGE") TOPIC_Author = rs("T_AUTHOR") Event_Date = StrToDate(rs("T_EVENT_DATE")) Forum_ID = rs("FORUM_ID") TOPIC_Status = rs("T_STATUS") Cat_ID = rs("CAT_ID") Cat_Moderation = rs("CAT_MODERATION") Forum_Moderation = rs("F_MODERATION") '########### Check for access ########### if mLev = 4 then AdminAllowed = 1 ForumChkSkipAllowed = 1 elseif mLev = 3 then if chkForumModerator(Forum_ID, chkString(strDBNTUserName,"decode")) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 1 else if lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if end if elseif lcase(strNoCookies) = "1" then AdminAllowed = 1 ForumChkSkipAllowed = 0 else AdminAllowed = 0 ForumChkSkipAllowed = 0 end if if strPrivateForums = "1" and ForumChkSkipAllowed <> "1" then forumAccess = ChkForumAccess(Forum_ID, MemberID, false) else forumAccess = true end if if strModeration > 0 and Cat_Moderation > 0 and Forum_Moderation > 0 and AdminAllowed = 0 then Moderation = "Y" else Moderation = "N" end if '######################################### if forumAccess and not(Moderation = "Y" and TOPIC_Status > 1 and TOPIC_Author <> MemberID) then Response.Write "" & vbNewLine & _ "" & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbnewline & _ "" & vbnewline end if rs.movenext loop end if rs.close set rs = nothing Response.Write "" & vbNewLine & _ "
 " & strCalTitle & "" & strCalDate & " 
" & strCalNoFutureEvents & "

 

" & strCalNoPastEvents & "

 

" & getCurrentIcon(strIconEvent,"","align=""absmiddle""") & "" & TOPIC_Subject & "" & FormatDateTime(Event_Date,vbLongdate) & "" & vbnewline '### Draw Post Buttons ### if mlev =4 or lcase(strNoCookies) = "1" then if (TOPIC_Status <> 0) then Response.Write " " & getCurrentIcon(strIconFolderLocked,strCalLockTOPIC,"") & "" & vbNewLine else Response.Write " " & getCurrentIcon(strIconFolderUnlocked,strCalUnLockTOPIC,"") & "" & vbNewLine end if end if if ((TOPIC_Status > 0 and TOPIC_Author = MemberID) or mlev =4 or lcase(strNoCookies) = "1" ) then Response.Write " " & getCurrentIcon(strIconPencil,"Edit TOPIC","hspace=""0""") & "" & vbNewLine end if if (TOPIC_Author = MemberID and TOPIC_Replies=0) or mlev =4 or lcase(strNoCookies) = "1" then Response.Write " " & getCurrentIcon(strIconTrashCan,strCalDelete,"") & "" & vbNewLine end if if TOPIC_Status <= 1 then Response.Write " " & getCurrentIcon(strIconReplyTOPIC,strCalReply,"") & "" & vbNewLine end if '######################## Response.Write "
" & vbnewline '### Show Paging ### if intTotalPages > 1 then Response.Write "
" & vbnewline & _ "" & vbNewLine & _ "" & vbNewLine & _ "" & strCalJumpToPage & "" & _ "" & _ "" & vbnewline else Response.Write " " end if '################### Response.Write "
" & vbNewLine & _ "
" & vbNewLine call AddEventForm(DateValue(strForumTimeAdjust)) Response.Write " " & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine End sub 'EventsListView %>