<% Dim objRS, sig Dim mode, alwayssig,oriMsgIcon,i Dim calName Dim objCalendar,isGroupManager,canAddEvent,isCalendarModerator,canReadCalendar,canAddRecurring,canDiscussEvent Dim uploadSize,calDate Dim timeoffset:timeoffset = Application(dbName&"timeoffset") Dim calendarID Dim eventID:eventID = request.querystring("eventID")&"" Dim types, strSQLGetSig, allData calDate = SQLMediumDate(DateAdd("h",timeoffset+memTimeOffset,request.querystring("calDate"))) if len(eventID)<>0 then types = "edit" else types = "add" end if If types="edit" then set objRS = server.createobject("adodb.recordset") with objRS .CacheSize = 1 .open "spGetEditEvent("&eventID&")", datastore, , , adcmdStoredProc 'adCmdText If not (.EOF or .BOF) then allData = .getrows End if .close end with set objRS=nothing Dim mem,dateinserted,withsig,upfile,allowSignUp,allowDiscussion,discussionMsgID,edit,subject,body Dim EventStartDate,EventStartTime,EventEndDate,EventEndTime,RecurrenceType,PeriodicCode,PeriodicAmount,MonthlyCode Dim MonthlyOrdinal,MonthlyDay,AnniversaryDate Dim isUploadAllowed:isUploadAllowed = false if isArray(allData) then CalendarID = allData (0,0) mem = allData (1,0) dateinserted = allData (2,0) alwaysSig = allData (3,0) oriMsgIcon = allData (4,0) upfile = allData (5,0) allowSignUp = allData (6,0) allowDiscussion = allData (7,0) discussionMsgID = allData (8,0) edit = allData (9,0) subject = allData (10,0) body = allData (11,0) EventStartDate = allData (12,0) EventStartTime = allData (13,0) EventEndDate = allData (14,0) EventEndTime = allData (15,0) RecurrenceType = allData (16,0) PeriodicCode = allData (17,0) PeriodicAmount = allData (18,0) MonthlyCode = allData (19,0) MonthlyOrdinal = allData (20,0) MonthlyDay = allData (21,0) AnniversaryDate = allData (22,0) strSQLGetSig = "spPostOrReply("& mem &", 0)" EventStartDate = SQLMediumDate(DateAdd("h",timeoffset+memTimeOffset,EventStartDate)) EventEndDate = SQLMediumDate(DateAdd("h",timeoffset+memTimeOffset,EventEndDate)) else CalendarID = -25 end if else calendarID = request.querystring("calendarID") strSQLGetSig = "spPostOrReply("& MemID &", 0)" end if Set objCalendar = new calClass With objCalendar .calendarID = calendarID .mem = memID .eventID = eventID .getPermission canReadCalendar = .canReadCalendar canAddRecurring = .canAddRecurring canAddEvent = .canAddEvent canDiscussEvent = .canDiscussEvent mode = .isCalendarModerator uploadSize = .uploadSize uploadFormat = .uploadFormat calName = .calName end with Set objCalendar = nothing if types = "edit" then if not(mem&"" = memID or mode) then canAddEvent = false end if if canAddEvent then set objRS = server.createobject("adodb.recordset") objRS.open dbOwnerPrefix&strSQLGetSig, datastore, , ,adCmdStoredProc if not (objRS.state = adStateClosed) then sig = objRS(0).value if types = "add" then alwaysSig = objRS(1).value objRS.close else canAddEvent = false end if set objRS = nothing if types="add" then if uploadSize<>0 and len(uploadFormat)<>0 then isUploadAllowed = true elseif types="edit" then if uploadSize<>0 and len(uploadFormat)<>0 and mem&"" = memID then isUploadAllowed = true end if end if %> <%= Application(dbName&"forumtitle") %> <%= NoScript() %> <%= OutputCSS() %> <%= Application(dbName&"bodyoption") %> style="margin:0px 0px 0px 0px">
<% if canAddEvent then %> <% else %> <% end if %>
<%= calAddEventTitle & calName %>
valign="top" class="c2"><%= tmName %> <%=( memLogin ) %>   <% if not isGuest then %> > <%= signatureDesc %> <% end if %>
class="c2" valign="top"> <%= calEventNameDesc%> >
<% call pgdMsgIcons %>
class="c2">

<%= calEventDesc %>

<% call pgdSmiley() %>
> <% call pgdCodes()%>
<%=pgdBodyArea(SQLout(body),10)%>
class="c2"><%= uploadFieldDesc %> > <% If types="add" then %> <% if isUploadAllowed then %> <%= uploadLinkDesc %>    <%= embedPicDesc %> <% Else %> <%= replace(RightViolationMessage,"
","") %> <% end if %> <% Elseif types="edit" then %> <%= iff(upfile<>"" and (mode or mem&"" = memID),""&upfile&"  "&deleteUploadedFile,"none") %> <% if isUploadAllowed then %>   <%= uploadAnotherFileDesc %> <%= embedPicDesc %> <% End If %> <% End If %>
><%= calAddStart %> > - -    : <%= calEventAllDay %>
><%= calAddEnd %> > - -    : <%= calEventAllTime %>
><%= calEvenTypeDesc %> > > <%= calEventTypeOneTime %> <% if canAddRecurring then %>
> <%= calEventTypePeriodic %> " onfocus="changeSelection(1)">
> <%= calEventTypeMonthlyLogicalStart %> <%= calEventTypeMonthlyLogicalEnd %>
> <%= calEventTypeMonthlyActualStart %> <%= replace(calEventTypeMonthlyActualEnd,"%input%","") %>
> <%= calEventTypeAnniversary %> - <% End If %>
class="c2"><%= postExtraDesc %> > >Allow Signup? <% if canDiscussEvent then %> | >Enable Discussion? <% End If %>
colspan="2" align="center" class="subhead"><%= RightViolationMessage %>

<% if canAddEvent then %> <% If types="edit" then %> <% End If %> ')" name="previewbutton" tabindex="0" class="buttons"> <% end if %>

<% call pgdResize(450,"body") %>