<% dsn="DBQ=" & Server.Mappath("admin/blizzcal.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open dsn Set RSBODY = Server.CreateObject("ADODB.Recordset") SQLBODY = "SELECT * from Settings" RSBODY.Open SQLBODY, Conn, 1, 3 %> <%=RSBODY("Page_Title")%> <%If RSBODY("Date_Rollover") Then%> <%End If%> " text="<%=RSBODY("Font_Color")%>" link="<%=RSBODY("Link_Color")%>" vlink="<%=RSBODY("Visited_Link_Color")%>" alink="<%=RSBODY("Active_Link_Color")%>" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" ONLOAD="preloadImages();"> <%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 %> <%If RSBODY("Upcoming_Events") = True Then%> <%End If%>
<%Set RSMONTHNAME = Server.CreateObject("ADODB.Recordset") SQLMONTHNAME = "SELECT * from MonthName" RSMONTHNAME.Open SQLMONTHNAME, Conn, 1, 3%> <%RSMONTHNAME.close set RSMONTHNAME = nothing%>
<%=RSMONTHNAME(lastMonth)%> <%=RSMONTHNAME(thisMonth)%> <%=thisYear%> <%=RSMONTHNAME(nextMonth)%>
<%Set RSWEEKDAYNAME = Server.CreateObject("ADODB.Recordset") SQLWEEKDAYNAME = "SELECT * from WeekDayName" RSWEEKDAYNAME.Open SQLWEEKDAYNAME, Conn, 1, 3%> <%i = 1 Do while i <= 7%> <%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 %> <%dayCounter = dayCounter + 1 End If weekDayCounter = weekDayCounter + 1 Loop weekCounter = weekCounter + 1 If weekDayCounter > 7 Then weekDayCounter = 1 End If%> <%Loop%>
<%=RSWEEKDAYNAME(i)%>
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('default.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%>
Upcoming Events
<%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%>
<%Else%>

 

<%Set RSMONTHNAME = Server.CreateObject("ADODB.Recordset") SQLMONTHNAME = "SELECT * from MonthName" RSMONTHNAME.Open SQLMONTHNAME, Conn, 1, 3%> <%RSMONTHNAME.close set RSMONTHNAME = nothing%>
<%=RSMONTHNAME(Month(request("date")))%> <%=Day(request("date"))%>, <%=Year(request("date"))%>
<%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 isNull(RSDATE("Location")) Then %> <%End If If NOT isNull(RSDATE("Description")) AND RSDATE("Description") <> "" Then %> <%End If RSDATE.movenext Loop%>
<%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")%>
">Location <%=RSDATE("Location")%>
">Description <%=RSDATE("Description")%>
<%Else%>There are currently no events scheduled for this day.<%End If RSDATE.close set RSDATE = nothing %>

"> Close Window

<%End If%> <%If request("date") = "" OR NOT RSBODY("Popup") Then%> <%=RSBODY("Footer")%> <%End If%> <% Conn.close set Conn = nothing %>