SCHEDULE              

<% dim Event_Date(100), Event_Time(100), Event_Duration(100), Event_Location(100), Event_Title(100) dim Event_Attendance(100), Event_Information(100), Event_Comments(100) '// Create excel application object Set objApp = Server.CreateObject("Excel.Application") '// Open the workbook (.xls) file Set objBook = objApp.Workbooks.Open("e:\web\sscalendar2.xls") '// Select the sheet Set objSheet = objBook.Sheets.Item(1) irow=2 %>
Past Events:

<% Current_Heading = 0 Current_Heading2 = 0 aPastMonth = Month(date) - 1 aYear = year(date) if aPastMonth = 0 then aPastMonth = 12 end if do while len(objsheet.Cells(irow,1).value) > 0 aEvent_Date = objSheet.Cells(irow, 1).Value if year(aEvent_Date) = aYear then if Month(aEvent_Date) >= aPastMonth then aEvent_Time = objSheet.Cells(irow, 2).Value aEvent_Duration = objSheet.Cells(irow, 3).Value aEvent_Location = objSheet.Cells(irow, 4).Value aEvent_Title = objSheet.Cells(irow, 5).Value aEvent_Attendance = objSheet.Cells(irow, 6).Value aEvent_Information = objSheet.Cells(irow, 7).Value aEvent_Comments = objSheet.Cells(irow, 8).Value aEvent_Class = objSheet.Cells(irow, 9).Value ' if aEvent_Class <> "class" and aEvent_Class <> "private" then if aEvent_Date = Date then if Current_Heading2 = 0 then %> Today's Events:

<% Current_Heading2 = 1 end if end if if aEvent_Date > Date then if Current_Heading = 0 then %> Upcoming Events:

<% Current_Heading = 1 end if end if %> <% response.write WeekdayName(Weekday(aEvent_Date)) & " " & MonthName(Month(aEvent_Date)) & " " & Day(aEvent_Date) & ", " & Year(aEvent_Date) %>
<% response.write aEvent_Title %>
Time : <% response.write aEvent_Time %> - Duration : <% response.write aEvent_Duration %>
Location : <% response.write aEvent_Location %>
<% response.write aEvent_Attendance %>
<% if len(trim(aEvent_Information)) > 0 then %> Information : <% response.write aEvent_Information %>
<% end if %>
<% ' end if end if end if irow = irow +1 loop mrow=2 Current_Heading = 0 %> <% total_events = mrow - 1 '******************** Current Month ***************************** irow=2 i = 1 j = 1 cnt = 0 c_today = date c_year = year(c_today) c_month = month(c_today) c_day = day(c_today) m_weekday = weekday(c_month & "/01/" & c_year) c_lastday = 31 if not(isdate(c_month & "/31/" & c_year)) then c_lastday = 30 end if if not(isdate(c_month & "/30/" & c_year)) then c_lastday = 29 end if if not(isdate(c_month & "/29/" & c_year)) then c_lastday = 28 end if done = false %>
<% response.write "" & MonthName(c_month) & " " & c_year & "" %> <% do while i <= 6 and not(done) %> <% do while j <= 7 %> <% j = j + 1 loop j = 1 %> <% i = i + 1 loop %>
Sun Mon Tues Wed Thur Fri Sat
<% if m_weekday = j and i = 1 then cnt = 1 end if if cnt = 0 then response.write ("
") else mcolor = "black" mrow = 2 trow = 0 do while mrow < total_events if c_day = cnt then mcolor = "red" end if if (cnt = day(Event_Date(mrow))) and (c_month = month(Event_Date(mrow))) and (c_year = year(Event_Date(mrow))) then mcolor = "blue" trow = mrow end if mrow = mrow +1 loop if trow <> 0 then response.write "" & (rtrim(ltrim(cstr(cnt)))) & "
" else response.write "" & (rtrim(ltrim(cstr(cnt))) & "
") end if cnt = cnt + 1 if cnt > c_lastday then cnt = 0 done = true end if end if %>
<% '******************************* End Current Month Code ***************************** %>

<% '******************** Next Month ***************************** irow=2 i = 1 j = 1 cnt = 0 a_today = date a_year = year(a_today) a_month = month(a_today) + 1 if a_month = 13 then a_month = 1 a_year = a_year + 1 end if a_day = day(a_today) m_weekday = weekday(a_month & "/01/" & a_year) a_lastday = 31 if not(isdate(a_month & "/31/" & a_year)) then a_lastday = 30 end if if not(isdate(a_month & "/30/" & a_year)) then a_lastday = 29 end if if not(isdate(a_month & "/29/" & a_year)) then a_lastday = 28 end if done = false %>
<% response.write "" & MonthName(a_month) & " " & a_year & "" %> <% do while i <= 6 and not(done) %> <% do while j <= 7 %> <% j = j + 1 loop j = 1 %> <% i = i + 1 loop '******************************* End Next Month Code ***************************** '// Close the workbook and save changes objBook.Close True '// Exit excel (important! especially when running on server!!!) objApp.Quit %>
Sun Mon Tues Wed Thur Fri Sat
<% if m_weekday = j and i = 1 then cnt = 1 end if if cnt = 0 then response.write ("
") else mcolor = "black" mrow = 2 do while mrow < total_events ' if (cnt = day(Event_Date(mrow))) and (a_month = month(Event_Date(mrow))) then if (cnt = day(Event_Date(mrow))) and (a_month = month(Event_Date(mrow))) and (a_year = year(Event_Date(mrow))) then mcolor = "blue" trow = mrow end if mrow = mrow +1 loop if mcolor = "blue" then response.write "" & (rtrim(ltrim(cstr(cnt)))) & "
" else response.write "" & (rtrim(ltrim(cstr(cnt))) & "
") end if cnt = cnt + 1 if cnt > c_lastday then cnt = 0 done = true end if end if %>

The dates in blue are scheduled events. Hover on them for more information.
The date in red is today's date.


Please email Susan for additional information.



Benefits    Presenter    Philosophy    Classes    Schedule    Research    Testimonials    World Wide Web    Contact    Home