Business Loans Return to the Home Page

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 "
" & vbNewLine & vbNewLine response.write "" & vbCrLf ' Here's where we turn each line in tempArray into the variables we write to the Calendar: Dim thisline, thisDateLn, intEndOfIndex, thisEvent, intEndOfDate, thisDate, restOfLine, intEndOfTime, thisTime, thisDesc, newfile ReDim CalEntry(35) ' for calendar style writing of data for arrayLine = 0 to Ubound(tempArray) ' Starts with 1 in manager application.. hmmmm.... thisline = tempArray(arrayLine) if thisline <> "" then intEndOfDate = Instr(thisline, "|") thisDate = mid(thisline, 1, intEndOfDate - 1) restOfLine = mid(thisline, intEndOfDate + 1, len(thisline)) if Cint(thisDate) <= maxDays then intEndOfStartTime = Instr(restOfLine, "|") thisStartTime = mid(restOfLine, 1, intEndOfStartTime - 1) restOfLine = mid(restOfLine, intEndOfStartTime + 1, len(restOfLine)) intEndOfEndTime = Instr(restOfLine, "|") thisEndTime = mid(restOfLine, 1, intEndOfEndTime - 1) restOfLine = mid(restOfLine, intEndOfEndTime + 1, len(restOfLine)) intEndOfDesc = Instr(restOfLine, "|") thisDesc = mid(restOfLine, 1, intEndOfDesc - 1) thisEventURL = mid(restOfLine, intEndOfDesc + 1, len(restOfLine)) ' here is where we convert 24 hr to 12 hr format for display only: ' START TIMES: Dim displayStartAmPm, displayStartHours, displayStartMinutes, displayStartTime if thisStartTime <> 8888 then if thisStartTime > 1145 then displayStartAmPm = "pm" else displayStartAmPm = "am" end if displayStartHours = mid(thisStartTime, 1, 2) displayStartMinutes = mid(thisStartTime, 3, 2) testDSH = displayStartHours - 12 if testDSH > 0 then displayStartHours = displayStartHours - 12 end if displayStartTime = displayStartHours & ":" & displayStartMinutes & " " & displayStartAmPm ' END TIMES: Dim displayEndAmPm, displayEndHours, displayEndMinutes, displayEndTime if thisEndTime > 1145 then displayEndAmPm = "pm" else displayEndAmPm = "am" end if displayEndHours = mid(thisEndTime, 1, 2) displayEndMinutes = mid(thisEndTime, 3, 2) testDSH = displayEndHours - 12 if testDSH > 0 then displayEndHours = displayEndHours - 12 end if displayEndTime = displayEndHours & ":" & displayEndMinutes & " " & displayEndAmPm end if ' Here is where we populate the calendar-style array, calEntry: if thisStartTime <> 8888 then calEntry(thisDate) = calEntry(thisDate) & "" & displayStartTime & "-" & displayEndTime & ":
" end if if thisEventURL <> "" then calEntry (thisDate) = calEntry(thisDate) & "" & thisDesc & "
" else calEntry (thisDate) = calEntry(thisDate) & "" & thisDesc & "
" end if end if end if Next ' Last, we plop the submit button on the end of the whole thing, and close the table and form. response.write "" response.write "" ' Figure 1st day of month for offset: whichDay = mid(diffYear,3,2) + int((mid(diffYear,3,2)) / 4) + monthCode + 1 ' 1 = first day... toChop = int(whichDay / 7) chopFrom = whichDay / 7 whichDay = (Cint((chopFrom - toChop) * 7)) - 3 ' -3 = Century Code until 2099 for comp... if diffMonth < 3 then whichDay = whichDay - leapYear ' Fudge Factor- why dates don't line up? if whichDay < 0 then whichDay = whichDay + 7 offSetCount = whichDay - 1 if offSetCount < 0 then offSetCount = offSetCount + 7 ' maxDays = 30 ' Set previously in script ' offSetCount = 0 ' From 1st day of mon's DOW calculation- is it the DOW Month Chart? 6=0; 9/12=1; 4/7=2...? -only in 2003, 2004 one off... tableBreak = 7 ' - offSetCount ? for tableCellCount = 1 to 40 dayCell = tableCellCount - offSetCount response.write "" & vbCrLf & "" & vbCrLf tableBreak = tableBreak + 7 else response.write "" end if next %>
Month of " & diffMonthName & ", " & diffYear & "
" response.write "Select a different month: " response.write " Year:
Prices indicated for each course include all sessions for that course (most are three sessions)
SUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
" if dayCell > 0 And dayCell <= maxDays then if dayCell = today And Cint(diffMonth) = Cint(month(Date)) And Cint(diffYear) = Cint(Year(Date)) then response.write "" & dayCell & "
" & calEntry(dayCell) else response.write "" & dayCell & "
" & calEntry(dayCell) end if end if if tableCellCount = tableBreak then response.write "

Click here to register for these courses, or here to return to the home page.

Return to previous page.


This Calendar Manager Application is a custom solution by Xanatos.com

© Copyright 2009 Quaboag Valley Community Development Corporation.
All rights reserved in all media.

A Xanatos Site