<% Dim calName, calendarID calendarID = request.querystring("calendarID")&"" Dim timeoffset:timeoffset = Application(dbName&"timeoffset") Dim calDate calDate = request.querystring("calDate")&"" calDate = iff(isDate(calDate), SQLMediumDateOnly(calDate), SQLNowDateOnly()) calDate = iff(year(calDate)>9998,SQLNowDateOnly(),calDate) calDate = iff(year(calDate)<1753,SQLNowDateOnly(),calDate) Dim eventID eventID = request.querystring("eventID")&"" calendarID = iff(len(calendarID)=0 and len(eventID) = 0 , "a", calendarID) 'if len(eventID) <> 0 and isNumeric(eventID) and len(calendarID) = 0 then 'read events from user calendars ' calendarID = -1000 'else ' calendarID = iff(len(calendarID), calendarID, "a") 'end if Dim types types = request.querystring("types")&"" Dim i, breakhack breakhack = 1 ' get a list of calendars Dim allCal, iCal, objRS, allSignUps if not breakhack then set objRS = server.createobject("adodb.recordset") with objRS .CacheSize = 150 .open dbownerprefix&"spGetCalendarLists ("&"0"&")", datastore, , , adcmdStoredProc 'adCmdText If not (.EOF or .BOF) then allCal = .getrows End if Set objRS = .nextRecordset If not (objRS.EOF or objRS.BOF) then allSignUps = objRS.getrows End if objRS.close end with if objRS.state <> adStateClosed then objRS.close set objRS=nothing end if Dim key,language Dim objCalendar,canAddEvent,isCalendarModerator,canReadCalendar,canAddRecurring,canDiscussEvent Dim uploadSize,canDeleteEvent,canSubscribeCalendar,isSubscribed Set objCalendar = new calClass With objCalendar .calDate = calDate .calendarID = calendarID .eventID = eventID .mem = memID .getPermission canReadCalendar = .canReadCalendar canAddRecurring = .canAddRecurring canAddEvent = .canAddEvent canDeleteEvent = .canDeleteEvent canSubscribeCalendar = .canSubscribeCalendar canDiscussEvent = .canDiscussEvent isCalendarModerator = .isCalendarModerator uploadSize = .uploadSize uploadFormat = .uploadFormat calName = .calName isSubscribed = .isSubscribed calendarID = .calendarID %> <%= Application(dbName&"forumtitle") %> <%= OutputCSS() %> > <% call headerHTML() %>
<%= allForumDesc %> >> <%= ""&calDesc &" >> "&calName&" >> "& iff(types="viewday",""&calMonthView&" >> "&SQLdate(calDate, -100, false),SQLdate(calDate, -100, false))%>
<% if isArray(allCal) then for iCal = 0 to ubound(allCal,2) %> <% next end if %>
<%= calDesc %>
> <%= HTMLEncode(defAnnounceDesc) %>
> <%= HTMLEncode(""&allCal(1,iCal)) %> <%= iff (allCal(2,iCal) = 1," ","") %> <%= iff (allCal(3,iCal) = 1," ","") %>

<% if not isGuest then %>
<% if isArray(allSignUps) then for iCal = 0 to ubound(allSignUps,2) %> <% next end if %>
<%= calSignupsList %>
>
<%= HTMLEncode(""&allSignUps(0,iCal)) %> <%= calRemoveSignup %>

<% End If %>
<% if types = "viewday" then .generateDailyCalendar elseif len(eventID)<>0 then .generateEvent else .generateMonthlyCalendar end if end with Set objCalendar = nothing %>
<%= defCurrentTime&SQLDate(SQLNowDate,timeoffset,true) %>

<% If types="viewday" or len(eventID)<>0 then %> <%= profDay %> <% End If %> <%= profMonth %> <%= profYear %>

<% if not isGuest then %> <% if canAddEvent and not (calendarID="a" or calendarID="b") then %>   <% End If %> <% if canSubscribeCalendar and not (calendarID="a" or calendarID="b") and types <> "viewday" and len(eventID)= 0 then %> &calendarID=<%= calendarID %>')">  <% End If %> <% if types = "viewday" or len(eventID)<>0 then %>   <% End If %> <% if len(eventID)<>0 then %>   <% End If %> <% if not (calendarID="a" or calendarID="b") then %> <% End If %> <% End If %>


<% call footerHTML() %>