![]() To change the month displayed, simply select the month (and year) you wish to view and hit the button. To view course descriptions for any listed course, click the link on the calendar for that course. PLEASE NOTE! REGISTRATION CUTOFF: Classes start the first full week of the month unless otherwise indicated. Registration closes the last Monday of every month. Registrations received after this cutoff are NOT guaranteed a seat in the class, but may be accepted if space is available. If you wish to register after the cutoff, please call after registering to confirm availability. Each class has a minimum of two students and a maximum of four. If you need a class and cannot find it on our schedule please contact us about the possibility of arranging something for you. **Download a printed copy of our latest Computer Training Schedule.** Click here to register for any of these courses, or here to return to the home page. To return to the previous page, simply close this browser window (click the "X" in the far upper right of this window). <% ' The Xanatos Calendar Manager Application and all subcomponents are Copyright 2004 David Xanatos ' and Xanatos Enterprises. No part of this application may be reproduced or distributed without the ' express written consent of David Xanatos. This copyright will be strictly enforced. Xanatos ' is a Registered Trademark with the U.S. Patent and Trademark Office, in International Class 42. ' ' Revision 1.0 Completed June 20, 2003. Adds, Deletes, Sorts, Event Span, Day-of-week calculated, links to ' pages it sees in /classes directory, creates the new page if directed to do so, displays info in ' Calendar format as well as list, allows for no-time entries, highlights current day on Public Viewer. ' Several bugs related to single-digit eventDates fixed. ' ' LeapYear determination needs to be set dynamically. ' First, we set up variables to handle incoming data for new entries or deletes: Dim diffMonth, diffYear, startHour, startMins, stAmPm, endHour, endMins, etAmPm, eventIndexNum, eventDate, eventDesc diffMonth = Request.Form("diffMonth") diffYear = Request.Form("diffYear") ' Checks to see if month selected equals current month, and if not, selects that month's datafile: ' First, make sure app doesn't bomb out if no diffMonth/Year present (on initial entry, for example) if diffMonth = "" then diffMonth = month(Date) end if if diffYear = "" then diffYear = Year(Date) end if today = day(Date) whichToOpen = Year(Date) & MonthName (month(Date)) & "data.txt" diffMonthName = MonthName(diffMonth) changeMonthTo = "caldata/" & diffYear & diffMonthName & "data.txt" whichToOpen = changeMonthTo ' For troubleshooting: ' response.write "Application opened with " & whichToOpen & " at " & Now & " Server Local Time " & vbNewLine ' Routine to determine maximum Days in a given month- for proper writing to newfile on eventSpan function. ' Simultaneously, we set the Month Code for the Day-of-Week calculation that occurs on data display. if diffYear = 2004 then leapYear = 1 ' Temporarily set until I get a routine written to dynamically generate leapYear value. elseif diffYear <> 2004 then leapYear = 0 end if if diffMonth = 1 then maxDays = 31 monthCode = 3 elseif diffMonth = 2 then if leapYear = 1 then maxDays = 29 monthCode = 6 else maxDays = 28 monthCode = 6 end if elseif diffMonth = 3 then maxDays = 31 monthCode = 6 elseif diffMonth = 4 then maxDays = 30 monthCode = 2 elseif diffMonth = 5 then maxDays = 31 monthCode =4 elseif diffMonth = 6 then maxDays = 30 monthCode = 0 elseif diffMonth = 7 then maxDays = 31 monthCode = 2 elseif diffMonth = 8 then maxDays = 31 monthCode = 5 elseif diffMonth = 9 then maxDays = 30 monthCode = 1 elseif diffMonth = 10 then maxDays = 31 monthCode = 3 elseif diffMonth = 11 then maxDays = 30 monthCode = 6 elseif diffMonth = 12 then maxDays = 31 monthCode = 1 end if ' Next, we'll open the existing datafile (if it exists, else we'll create it!) and read it into an array: whichFN=server.mappath(whichToOpen) Dim fs Set fs = server.CreateObject("Scripting.FileSystemObject") If fs.FileExists(whichFN) Then Set thisFile = fs.OpenTextFile(whichFN, 1, False) counter = 0 ReDim tempArray(0) ' Sorting Array... do while not thisfile.AtEndOfStream thisline = thisfile.readline intEndOfIndex = Instr(thisline, "|") thisEvent = mid(thisline, 1, intEndOfIndex - 1) restOfLine = mid(thisline, intEndOfIndex + 1, len(thisline)) tempArray(counter) = restOfLine Redim Preserve tempArray(Ubound(tempArray) + 1) counter = counter+1 loop thisfile.close else response.write "No data available for selected date." ReDim tempArray(0) ' Array- will be blank, but must exist. end if Set filetemp=nothing Set fs=nothing ' All that's left now is to redisplay the interface, using the new, sorted, deleted data in the Array: response.write " Click here to register for these courses, or here to return to the home page. This Calendar Manager Application is a custom solution by Xanatos.com © Copyright 2009 Quaboag Valley Community Development Corporation. |