<%@LANGUAGE="VBSCRIPT"%> <% 'date conversion function to ensure date format is correct Function MediumDate (str) Dim aDay Dim aMonth Dim aYear aDay = Day(str) aMonth = Monthname(Month(str),True) aYear = Year(str) MediumDate = aDay & "-" & aMonth & "-" & aYear End Function %> <% Dim rsEvents Dim rsEvents_numRows Set rsEvents = Server.CreateObject("ADODB.Recordset") rsEvents.ActiveConnection = MM_newseasons_STRING rsEvents.Source = "SELECT * FROM calendar" rsEvents.CursorType = 0 rsEvents.CursorLocation = 2 rsEvents.LockType = 1 rsEvents.Open() rsEvents_numRows = 0 %> <% Dim rsAllRecords__MMColParam rsAllRecords__MMColParam = "01/01/2006" If (date() <> "") Then rsAllRecords__MMColParam = date() End If %> <% Dim rsAllRecords Dim rsAllRecords_numRows Set rsAllRecords = Server.CreateObject("ADODB.Recordset") rsAllRecords.ActiveConnection = MM_newseasons_STRING rsAllRecords.Source = "SELECT * FROM calendar WHERE actualDate >= #" & MediumDate(rsAllRecords__MMColParam) &"# ORDER BY actualDate ASC" rsAllRecords.CursorType = 0 rsAllRecords.CursorLocation = 2 rsAllRecords.LockType = 1 rsAllRecords.Open() rsAllRecords_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsAllRecords_numRows = rsAllRecords_numRows + Repeat1__numRows %> <% Function EventsCalendar If Request("EventDate") <> "" Then EventDate = DateValue(Request("EventDate")) Else EventDate = date() End if CurrentMonth = Month(EventDate) CurrentMonthName = MonthName(CurrentMonth) CurrentYear = Year(EventDate) FirstDayDate = DateSerial(CurrentYear, CurrentMonth, 1) FirstDay = WeekDay(FirstDayDate, 0) CurrentDay = FirstDayDate Dim tmpHTML tmpHTML="" tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) & "" & Chr(10) & "" Response.Write(tmpHTML) For DayLoop = 1 to 7 Response.Write("" & Chr(10)) Next Response.Write("" & Chr(10) & "") If FirstDay <> 1 Then Response.Write("" & Chr(10)) End if DayCounter = FirstDay CorrectMonth = True Do While CorrectMonth = True isEvent = FALSE rsEvents.filter = 0 Dim iCheck Dim chkStr chkStr = (rsEvents.Fields.Item("eventDate").Name) iCheck = CurrentDay rsEvents.filter = chkStr & "=" & (iCheck) If not(rsEvents.EOF) Then isEvent = TRUE If CurrentDay = EventDate Then Response.Write("" & Chr(10)) Else Response.Write(Day(CurrentDay) & "" & Chr(10)) End If DayCounter = DayCounter + 1 If DayCounter > 7 Then DayCounter = 1 Response.Write("" & Chr(10)) Response.Write(" CurrentMonth Then Response.Write(" class=""lastweek""") End If Response.Write(">" & Chr(10)) End if CurrentDay = DateAdd("d", 1, CurrentDay) If Month(CurrentDay) <> CurrentMonth then CorrectMonth = False End if Loop IF DayCounter <> 1 Then Response.Write("") Else Response.Write("") End if Response.Write("" & Chr(10) & "
" & Chr(10) tmpHTML = tmpHTML & "<" & CurrentMonthName & ">" tmpHTML = tmpHTML & "<" & CurrentYear & ">" tmpHTML = tmpHTML & "
" & WeekDayName(Dayloop, True, 0) & "
 ") Else Response.Write("") End if If isEvent = TRUE Then Response.Write("" & Day(CurrentDay)& "") If Not rsEvents.BOF Then rsEvents.MoveFirst 'Do Until rsEvents.EOF 'If (rsEvents.Fields.Item("EventDate").Value) = CurrentDay Then 'Response.Write("

" & (rsEvents.Fields.Item("EventName").Value) & "

") 'End If 'rsEvents.MoveNext 'Loop End If Response.Write("
  
" & Chr(10)) End Function %> Welcome to New Seasons - News & Events

Events Calendar

<% Call EventsCalendar %>

Calendar Administration

PAST EVENT ARTICLES

NEWSLETTER SIGNUP

Enter your email address:

 

 

All Event Details

Here is a list of all current and future events. Click an event for more details.

<% If Not rsAllRecords.EOF Or Not rsAllRecords.BOF Then %> <% Dim RecordCounter RecordCounter = 0 %> <% While ((Repeat1__numRows <> 0) AND (NOT rsAllRecords.EOF)) %> "> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsAllRecords.MoveNext() Wend %>
Event Name: Date: Time:
&EventDate=<%=(rsAllRecords.Fields.Item("eventDate").Value)%>"><%=(rsAllRecords.Fields.Item("eventName").Value)%> <%=fncFmtDate((rsAllRecords.Fields.Item("eventDate").Value), "%d/%m/%y")%> <%=(rsAllRecords.Fields.Item("eventTime").Value)%>
<% End If ' end Not rsAllRecords.EOF Or NOT rsAllRecords.BOF %> <% If rsAllRecords.EOF And rsAllRecords.BOF Then %>

There are no events at present

<% End If ' end rsAllRecords.EOF And rsAllRecords.BOF %>

<% rsEvents.Close() Set rsEvents = Nothing %> <% rsAllRecords.Close() Set rsAllRecords = Nothing %>