<%If request("date") = "" OR NOT RSBODY("Popup") Then%>
<%=RSBODY("Header")%>
<%End If
Weekday_Font = RSBODY("Weekday_Font")
Weekday_Font_Size = RSBODY("Weekday_Font_Size")
Weekday_Font_Color = RSBODY("Weekday_Font_Color")
Weekday_Background_Color = RSBODY("Weekday_Background_Color")
Date_Font = RSBODY("Date_Font")
Date_Font_Size = RSBODY("Date_Font_Size")
Date_Font_Color = RSBODY("Date_Font_Color")
Date_Background_Color = RSBODY("Date_Background_Color")
Date_Rollover_Color = RSBODY("Date_Rollover_Color")
Today_Background_Color = RSBODY("Today_Background_Color")
Event_Font = RSBODY("Event_Font")
Event_Font_Size = RSBODY("Event_Font_Size")
Event_Font_Color = RSBODY("Event_Font_Color")
Cell_Width = RSBODY("Cell_Width")
Cell_Height = RSBODY("Cell_Height")
Cell_Background_Color = RSBODY("Cell_Background_Color")
Border_Size = RSBODY("Border_Size")
Border_Color = RSBODY("Border_Color")
TableWidth = Cell_Width * 7 + Border_Size * 8
If request("date") = "" Then
thisMonth = request("month")
thisYear = request("year")
If thisMonth = "" Then
thisMonth = Month(Date)
End If
If thisYear = "" Then
thisYear = Year(Date)
End If
lastMonth = thisMonth - 1
lastYear = thisYear
nextMonth = thisMonth + 1
nextYear = thisYear
If lastMonth < 1 Then
lastMonth = 12
lastYear = lastYear - 1
End If
If nextMonth >12 Then
nextMonth = 1
nextYear = nextYear + 1
End If
firstWeekDay = Weekday(CDate(thisMonth & "/1/" & thisYear))
leapTestNumbers = thisyear / 4
leapTest = leapTestNumbers - Round(leapTestNumbers)
If thisMonth = 2 Then
If leapTest <> 0 Then
maxDays = 28
Else
maxDays = 29
End If
ElseIf (thisMonth = 4 OR thisMonth = 6 OR thisMonth = 9 OR thisMonth = 11) Then
maxDays = 30
Else
maxDays = 31
End If
dayCounter = 1
weekDayCounter = 1
weekCounter = 1
%>
<%Set RSMONTHNAME = Server.CreateObject("ADODB.Recordset")
SQLMONTHNAME = "SELECT * from MonthName"
RSMONTHNAME.Open SQLMONTHNAME, Conn, 1, 3%>
| <%=RSMONTHNAME(lastMonth)%> |
<%=RSMONTHNAME(thisMonth)%> <%=thisYear%> |
<%=RSMONTHNAME(nextMonth)%> |
<%RSMONTHNAME.close
set RSMONTHNAME = nothing%>
|
<%Set RSWEEKDAYNAME = Server.CreateObject("ADODB.Recordset")
SQLWEEKDAYNAME = "SELECT * from WeekDayName"
RSWEEKDAYNAME.Open SQLWEEKDAYNAME, Conn, 1, 3%>
<%i = 1
Do while i <= 7%>
| <%=RSWEEKDAYNAME(i)%> |
<%i = i + 1
Loop%>
<%RSWEEKDAYNAME.close
set RSWEEKDAYNAME = nothing
Do while maxDays >= dayCounter%>
<%Do while weekDayCounter <= 7%>
<%If (weekCounter = 1 AND weekDayCounter < firstWeekDay) OR dayCounter > maxDays Then%>
 |
<%Else
dateSelect = thisMonth & "/" & dayCounter & "/" & thisYear
%>
onMouseOver="mOvr(this,'<%=Date_Rollover_Color%>'); dispMsg('<%=dateSelect%>'); return true;" onMouseOut="mOut(this,'<%If thisMonth = Month(Now) AND dayCounter = Day(Now) AND thisYear = Year(Now) Then%><%=Today_Background_Color%><%Else%><%=Date_Background_Color%><%End If%>'); dispMsg(' '); return true;" onClick="mClk(this);"<%End If%>>#" onClick="window.open('default2.asp?date=<%=dateSelect%>','datewin','width=450,height=250,scrollbars');<%Else%>default.asp?date=<%=dateSelect%><%End If%>"><%=dayCounter%>
<%Set RSDATE = Server.CreateObject("ADODB.Recordset")
SQLDATE = "SELECT * FROM Events WHERE (Month(Date) = Month('"&dateSelect&"')) AND (Year(Date) = Year('"&dateSelect&"')) AND (Day(Date) = Day('"&dateSelect&"'))"
RSDATE.Open SQLDATE, Conn, 1, 3
Do while NOT RSDATE.EOF%>
<%If RSBODY("Event_Display") Then%>
<%=RSDATE("Category")%>
<%Else%>
<%=RSDATE("Event_Name")%>
<% End If
RSDATE.movenext
Loop
RSDATE.close
set RSDATE = nothing%>
|
<%dayCounter = dayCounter + 1
End If
weekDayCounter = weekDayCounter + 1
Loop
weekCounter = weekCounter + 1
If weekDayCounter > 7 Then
weekDayCounter = 1
End If%>
<%Loop%>
|
|
<%If RSBODY("Upcoming_Events") = True Then%>
<%Set RS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM Events ORDER BY Date"
RS.Open SQL, Conn, 1, 3
i = 1
Do while NOT RS.EOF
If i <= CInt(RSBODY("Upcoming_Events_Number")) AND datediff("D",now(),RS("Date")) >= 0 Then%>
/<%=Day(RS("Date"))%>/<%=Year(RS("Date"))%>"><%=MonthName(Month(RS("Date")))%> <%=Day(RS("Date"))%>, <%=Year(RS("Date"))%> <%=RS("Event_Name")%>
<%i = i + 1
End If
RS.movenext
Loop
RS.close
set RS = nothing%>
|
<%End If%>
<%Else%>
<%Set RSMONTHNAME = Server.CreateObject("ADODB.Recordset")
SQLMONTHNAME = "SELECT * from MonthName"
RSMONTHNAME.Open SQLMONTHNAME, Conn, 1, 3%>
| <%=RSMONTHNAME(Month(request("date")))%> <%=Day(request("date"))%>, <%=Year(request("date"))%> |
<%RSMONTHNAME.close
set RSMONTHNAME = nothing%>
<%Set RSDATE = Server.CreateObject("ADODB.Recordset")
SQLDATE = "SELECT * FROM Events WHERE (Month(Date) = Month('"&request("date")&"')) AND (Year(Date) = Year('"&request("date")&"')) AND (Day(Date) = Day('"&request("date")&"')) ORDER BY Date"
RSDATE.Open SQLDATE, Conn, 1, 3
If NOT RSDATE.BOF AND NOT RSDATE.EOF Then%>
<%Do while NOT RSDATE.EOF
rsdate2 = RSDATE("Date")
%>
|
<%If NOT Hour(rsdate2) = 0 Then%>
<%If Hour(rsdate2) > 12 Then%>
<%=Hour(rsdate2) - 12%>
<%Else%>
<%=Hour(rsdate2)%>
<%End If%>
:
<%If Minute(rsdate2) < 10 Then%>
0<%=Minute(rsdate2)%>
<%Else%>
<%=Minute(rsdate2)%>
<%End If%>
<%If Hour(rsdate2) > 11 Then%>
PM
<%Else%>
AM
<%End If%>
<%End If%>
<%=RSDATE("Event_Name")%> |
<%
If NOT isNull(RSDATE("Location")) Then
%>
 |
Location |
<%=RSDATE("Location")%> |
<%End If
If NOT isNull(RSDATE("Description")) AND RSDATE("Description") <> "" Then
%>
 |
Description |
<%=RSDATE("Description")%> |
<%End If
RSDATE.movenext
Loop%>
<%Else%>
There are currently no events scheduled for this day.
<%End If
RSDATE.close
set RSDATE = nothing
%>
|
|
|
|
<%End If%>
<%If request("date") = "" OR NOT RSBODY("Popup") Then%>
<%=RSBODY("Footer")%>
<%End If%> |
|
|