// *** Insert Record: construct a sql insert statement and execute it MM_editAction = CGI.SCRIPT_NAME; If (CGI.QUERY_StrING NEQ "") MM_editAction = MM_editAction & "?" & CGI.QUERY_StrING; If (IsDefined("MM_insert")) { MM_datasource = "dunce"; MM_username = ""; MM_password = ""; MM_tableName = "foo_Class"; MM_fields = "Classtitle,Classtitle,',none,'',ClassDescription,ClassDescription,',none,''"; MM_redirectPage = "EditClass.txt"; // create the insert sql statement MM_tableValues=""; MM_dbValues=""; MM_fieldsArray = ListToArray(MM_fields,","); For (i=1; i+4 LE ArrayLen(MM_fieldsArray); i=i+5) { FormVal = IIf(IsDefined(MM_fieldsArray[i]),"FORM." & MM_fieldsArray[i],DE("")); Delim = IIf(MM_fieldsArray[i+2] NEQ "none","MM_fieldsArray[i+2]",DE("")); AltVal = IIf(MM_fieldsArray[i+3] NEQ "none","MM_fieldsArray[i+3]",DE("")); EmptyVal = IIf(MM_fieldsArray[i+4] NEQ "none","MM_fieldsArray[i+4]",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_fieldsArray[i+1]; MM_dbValues = MM_dbValues & FormVal; } MM_insertStr = "insert into " & MM_tableName & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"; // 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; } // *** 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_Class"; MM_tableCol = "ClassEye"; MM_recordId = "" & MM_recordId & ""; MM_redirectPage = "EditClass.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_insertStr)# #PreserveSingleQuotes(MM_deleteStr)# SELECT ProgramEye, ProgramName, ProgramLink, ProgramDescription, ProgramAdminEye, ProgramDirectory, UploadedFileName FROM foo_Program WHERE ProgramEye = #ViewProgram__MMColParam# SELECT EmployeeEye, FirstName, LastName, Email FROM dbo.tble_Employee WHERE EmployeeEye = '#ViewProgram.ProgramAdminEye#' SELECT foo_Calendar.CalendarEye, foo_Calendar.OfficeEye, foo_Calendar.Calendar_Date, foo_Calendar.Calendar_Time, foo_Calendar.Calendar_Notes, foo_Calendar.RoomEye, foo_Calendar.ClassEye, foo_Calendar.ProgramEye, foo_Calendar.InstructorEye, foo_Calendar.ContactEye, foo_Calendar.CreateLink, 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_Calendar.ProgramEye = #CalendarView__MMColParam# AND 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 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); Education :: View Program :: #ViewProgram.ProgramName#
#ViewProgram.ProgramName#
Program Admin: #ViewEmployee.FirstName# #ViewEmployee.LastName#

Back to the Education Page
# ParagraphFormat(ViewProgram.ProgramDescription) #

Calendar of Events
Office Sign Up Time View Class Program Instructor
#CalendarView.OfficeEye# #LSDateFormat(CalendarView.Calendar_Date, 'MM/DD/YY')# #LSDateFormat(CalendarView.Calendar_Date, 'MM/DD/YY')# #LSTimeFormat(CalendarView.Calendar_Time)# #CalendarView.Classtitle# #CalendarView.ProgramLink# #CalendarView.FirstName# #CalendarView.LastName#