// *** Edit Operations: declare variables // set the form action variable MM_editAction = CGI.SCRIPT_NAME; If (CGI.QUERY_STRING NEQ "") { MM_editAction = MM_editAction & "?" & CGI.QUERY_STRING; } // boolean to abort record edit MM_abortEdit = false; // query string to execute MM_editQuery = ""; // *** Insert Record: set variables If (IsDefined("MM_insert")) { MM_editdatasource = #MM_edu_DSN#; MM_editUserName = #MM_edu_USERNAME#; MM_editPassword = #MM_edu_PASSWORD#; MM_editTable = "foo_Calendar"; MM_editRedirectUrl = "Calendar_Insert.txt"; MM_fieldsStr = "Calendar_Date|value|Calendar_Time|value|Calendar_Duration|value|Class_Size|value|Calendar_Notes|value|ClassEye|value|ProgramEye|value|InstructorEye|value|OfficeEye|value|ContactEye|value|RoomEye|value|CreateLink|value"; MM_columnsStr = "Calendar_Date|',none,NULL|Calendar_Time|',none,NULL|Calendar_Duration|none,none,NULL|Class_Size|none,none,NULL|Calendar_Notes|',none,''|ClassEye|none,none,NULL|ProgramEye|none,none,NULL|InstructorEye|none,none,NULL|OfficeEye|',none,''|ContactEye|none,none,NULL|RoomEye|none,none,NULL|CreateLink|none,1,0"; // create the MM_fields and MM_columns arrays MM_fields = ListToArray(MM_fieldsStr,"|"); MM_columns = ListToArray(MM_columnsStr,"|"); // set the form values For (i=1; i+1 LE ArrayLen(MM_fields); i=i+2) { MM_fields[i+1] = IIf(IsDefined(MM_fields[i]),"FORM." & MM_fields[i],DE("")); } // append the query string to the redirect URL If (MM_editRedirectUrl NEQ "" AND CGI.QUERY_STRING NEQ "") { If (Find("?", MM_editRedirectUrl) EQ 0) { MM_editRedirectUrl = MM_editRedirectUrl & "?" & CGI.QUERY_STRING; } Else { MM_editRedirectUrl = MM_editRedirectUrl & "&" & CGI.QUERY_STRING; } } } // *** Delete Record: construct a sql delete statement and execute it MM_editAction = CGI.SCRIPT_NAME; If (CGI.QUERY_STRING NEQ "") MM_editAction = MM_editAction & "?" & CGI.QUERY_STRING; If (IsDefined("MM_delete") AND IsDefined("MM_recordId")) { MM_datasource = "dunce"; MM_username = ""; MM_password = ""; MM_tableName = "foo_Calendar"; MM_tableCol = "CalendarEye"; MM_recordId = "" & MM_recordId & ""; MM_redirectPage = "Calendar_Insert.txt"; // create the delete sql statement MM_deleteStr = "delete from " & MM_tableName & " where " & MM_tableCol & " = " & MM_recordId; // build the redirect URL If (MM_redirectPage eq "") MM_redirectPage = CGI.SCRIPT_NAME; If (Find("?", MM_redirectPage) EQ 0 AND CGI.QUERY_STRING NEQ "") MM_redirectPage = MM_redirectPage & "?" & CGI.QUERY_STRING; } #PreserveSingleQuotes(MM_deleteStr)# // *** Insert Record: construct a sql insert statement If (IsDefined("MM_insert")) { // create the insert sql statement MM_tableValues=""; MM_dbValues=""; For (i=1; i+1 LE ArrayLen(MM_fields); i=i+2) { FormVal = MM_fields[i+1]; MM_typesArray = ListToArray(MM_columns[i+1],","); Delim = IIf(MM_typesArray[1] NEQ "none","MM_typesArray[1]",DE("")); AltVal = IIf(MM_typesArray[2] NEQ "none","MM_typesArray[2]",DE("")); EmptyVal = IIf(MM_typesArray[3] NEQ "none","MM_typesArray[3]",DE("")); If (FormVal EQ "") { FormVal = EmptyVal; } Else { If (AltVal NEQ "") { FormVal = AltVal; } Else If (Delim EQ "'") { // escape quotes FormVal = "'" & Replace(FormVal,"'","''","ALL") & "'"; } Else { FormVal = Delim & FormVal & Delim; } } If (i GT 1) { MM_tableValues = MM_tableValues & ","; MM_dbValues = MM_dbValues & ","; } MM_tableValues = MM_tableValues & MM_columns[i]; MM_dbValues = MM_dbValues & FormVal; } MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"; } #PreserveSingleQuotes(MM_editQuery)# #PreserveSingleQuotes(MM_deleteStr)# SELECT ClassEye, Classtitle FROM foo_Class ORDER BY Classtitle ASC SELECT ProgramEye, ProgramLink FROM foo_Program ORDER BY ProgramLink ASC SELECT RoomEye, RoomName FROM foo_Room ORDER BY RoomName ASC SELECT foo_Instructor.InstructorEye, foo_Instructor.FirstName, foo_Instructor.LastName FROM foo_Instructor ORDER BY LastName ASC SELECT EmployeeEye, FirstName, LastName FROM tble_Employee ORDER BY LastName ASC SELECT * FROM foo_Calendar ORDER BY CalendarEye ASC SELECT tble_Office.OfficeEye, tble_Office.City FROM tble_Office ORDER BY tble_Office.City SELECT tble_Employee.EmployeeEye, tble_Employee.StudioEye, RTRIM(tble_Employee.LastName) + ' ' + RTRIM(tble_Employee.FirstName) AS Emp_Name FROM tble_Employee ORDER BY tble_Employee.LastName; SELECT tble_Office.OfficeEye, tble_Office.City, tble_Studio.StudioEye, tble_Studio.OfficeEye, tble_Studio.StudioName, tble_Employee.EmployeeEye, tble_Employee.StudioEye, RTRIM(tble_Employee.LastName) + ' ' + RTRIM(tble_Employee.FirstName) AS Emp_Name FROM tble_Office, tble_Studio, tble_Employee WHERE tble_Office.OfficeEye = tble_Studio.OfficeEye AND tble_Studio.StudioEye = tble_Employee.StudioEye ORDER BY tble_Office.City, tble_Studio.StudioName, tble_Employee.LastName; SELECT foo_Calendar.CalendarEye, foo_Calendar.Calendar_Date, foo_Calendar.Calendar_Time, foo_Calendar.Calendar_Notes, foo_Calendar.OfficeEye, foo_Calendar.RoomEye, foo_Calendar.ClassEye, foo_Calendar.ProgramEye, foo_Calendar.InstructorEye, foo_Calendar.ContactEye, foo_Calendar.CreateLink, foo_Calendar.CreateEmail, foo_Class.ClassEye, foo_Class.Classtitle, foo_Instructor.InstructorEye, foo_Instructor.FirstName, foo_Instructor.LastName, foo_Program.ProgramEye, foo_Program.ProgramLink, foo_Room.RoomEye, foo_Room.RoomName FROM foo_Calendar, foo_Class, foo_Instructor, foo_Program, foo_Room WHERE foo_Class.ClassEye = foo_Calendar.ClassEye AND foo_Instructor.InstructorEye = foo_Calendar.InstructorEye AND foo_Program.ProgramEye = foo_Calendar.ProgramEye AND foo_Room.RoomEye = foo_Calendar.RoomEye ORDER BY Calendar_Date ASC, Calendar_Time ASC SELECT tble_Office.OfficeEye, tble_Office.City, tble_Office.COMPANY_NAME FROM tble_Office WHERE tble_Office.OfficeEye = '#CalendarView.OfficeEye#' MM_paramName = ""; // *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters // create the list of parameters which should not be maintained MM_removeList = "&index="; If (MM_paramName NEQ "") MM_removeList = MM_removeList & "&" & MM_paramName & "="; MM_keepURL=""; MM_keepForm=""; MM_keepBoth=""; MM_keepNone=""; // add the existing URL parameters to the MM_keepURL string MM_params=ListToArray(CGI.QUERY_STRING,"&"); For (i=1; i LTE ArrayLen(MM_params); i=i+1) { If (FindNoCase("&" & GetToken(MM_params[i],1,"=") & "=",MM_removeList) Is 0) MM_keepURL = MM_keepURL & "&" & MM_params[i]; } // add the existing Form variables to the MM_keepForm string If (IsDefined("FORM.FieldNames")) { MM_params=ListToArray(FORM.FieldNames,","); For (i=1; i LTE ArrayLen(MM_params); i=i+1) { If (FindNoCase("&" & MM_params[i] & "=",MM_removeList) Is 0) MM_keepForm = MM_keepForm & "&" & LCase(MM_params[i]) & "=" & URLEncodedFormat(Evaluate("FORM." & MM_params[i])); } } // create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm; If (MM_keepURL NEQ "") MM_keepURL = RemoveChars(MM_keepURL,1,1); If (MM_keepForm NEQ "") MM_keepForm = RemoveChars(MM_keepForm,1,1); If (MM_keepBoth NEQ "") MM_keepBoth = RemoveChars(MM_keepBoth,1,1); Calendar Insert Admin Page

Go to education page

Add Calendar Entry
If the instructor for the class is not in the instructor drop down, first add the instructor, by following the Add/Edit Instructor!
Date :
Time :
Duration : Length of class in Hours. 1, 2, 3.
# of Slots: The number of students who can attend the class, after number full, signs ups will be tenative.
Notes :
Class Name : Add/Edit/Delete Class
Program : Add/Edit/Delete Program
Instructor : Add/Edit/Delete Instructor
   
Office :
Contact:
Contact will be the sender of announcement.
Room : Conatact Volker Mueller to add a room
  You need to reserve the room in outlook before you submit this form!
Create Link Now : Adding a check here enables the signup form.
Calendar of Events
Sign Up Available Office Date Time Title Program Instructor
CHECKED> #CalendarView.OfficeEye# #LEFT(rs_Office.COMPANY_NAME, 3)# #LSDateFormat(CalendarView.Calendar_Date, 'DDDD, MM/DD/YY')# #LSTimeFormat(CalendarView.Calendar_Time)# #CalendarView.Classtitle# #CalendarView.ProgramLink# #CalendarView.FirstName# #CalendarView.LastName#