BRANCHESPROGRAMS AND SERVICESMEMBERSHIP
Capital District YMCA Home  
Search | Find Your Nearest YMCA | CDYMCA Special Events | About CDYMCA | Reach Out for Youth link
<% If InStr(LCase(Request.QueryString), "cast(") > 0 OR InStr(LCase(Request.QueryString), "exec(") > 0 Then 'Dim strEmailBody1 ' strEmailBody1 = strEmailBody1 + "Possible Issue With QueryString: " & Request.ServerVariables("SERVER_NAME") & vbCrLf ' strEmailBody1 = strEmailBody1 + "FROM IP: " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf ' strEmailBody1 = strEmailBody1 + "From Page: " & Request.ServerVariables("SCRIPT_NAME") & vbCrLf ' strEmailBody1 = strEmailBody1 + "At: " & Now() & vbCrLf 'Dim obj1 ' Set obj1 = Server.CreateObject("CDO.Message") ' obj1.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server ' obj1.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'Type of authentication, NONE, Basic (Base64 encoded), NTLM ' obj1.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate ") = 0 'Server port (typically 25) ' obj1.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Use SSL for the connection (False or True) ' obj1.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl ") = False 'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server) ' obj1.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' obj1.Configuration.Fields.Update ' With obj1 ' .From = "sysmon@noc.lpmedia.net" ' .To = "nocalerts@lpmedia.net;nocalerts@light-power.com;lpsysmon@att.blackberry.net" ' .Subject = "Possible Issue With : " & Request.ServerVariables("SERVER_NAME") ' .TextBody = strEmailBody1 ' .Send ' End With Response.End End If If Request.ServerVariables("REQUEST_METHOD") = "Post" Then 'Dim strEmailBody2 'Dim item for each item in request.form If InStr(LCase(request.form(item)), "cast(") > 0 OR InStr(LCase(request.form(item)), "exec(") > 0 Then ' strEmailBody2 = strEmailBody2 + "Possible Issue With Form Fields: " & Request.ServerVariables("SERVER_NAME") & vbCrLf ' strEmailBody2 = strEmailBody2 + "FROM IP: " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf ' strEmailBody2 = strEmailBody2 + "From Page: " & Request.ServerVariables("SCRIPT_NAME") & vbCrLf ' strEmailBody2 = strEmailBody2 + "At: " & Now() & vbCrLf 'Dim obj2 ' Set obj2 = Server.CreateObject("CDO.Message") ' obj2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server ' obj2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'Type of authentication, NONE, Basic (Base64 encoded), NTLM ' obj2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate ") = 0 'Server port (typically 25) ' obj2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Use SSL for the connection (False or True) ' obj2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl ") = False 'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server) ' obj2.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' obj2.Configuration.Fields.Update ' With obj2 ' .From = "sysmon@noc.lpmedia.net" ' .To = "nocalerts@lpmedia.net;nocalerts@light-power.com;lpsysmon@att.blackberry.net" ' .Subject = "Possible Issue With : " & Request.ServerVariables("SERVER_NAME") ' .TextBody = strEmailBody2 ' .Send ' End With Response.End End If next End If Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth) Dim dTemp dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth) GetWeekdayMonthStartsOn = WeekDay(dTemp) End Function Function GetDaysInMonth(iMonth, iYear) Dim dTemp dTemp = DateAdd("d", -1, DateSerial(iYear, iMonth + 1, 1)) GetDaysInMonth = Day(dTemp) End Function Function GetDayofWeek(strDate, iWkday) Dim dTemp, iWkDayTemp, iLoopCtr, iWkDayCtr, i iWkDayTemp = iWkDay iWkDayCtr = GetWeekdayMonthStartsOn(strDate) iLoopCtr = 1 for i = 1 to 7 If CInt(iWkDayTemp) = CInt(iWkDayCtr) Then GetDayofWeek = iLoopCtr Exit Function End If If iWkDayCtr = 7 Then iWkDayCtr = 1 Else iWkDayCtr = iWkDayCtr + 1 End If iLoopCtr = iLoopCtr + 1 Next GetDayofWeek = iWkDayCtr End Function Function getMatrixInfo() 'On Error Resume Next Dim oADO, oRecordset, oRecordset1, oRecordset2, oRecordset3, strSQL, strSQL1, strSQL2, strSQL3, bool_ADO, bool_REC, bool_REC1, bool_REC2, bool_REC3 Dim arrayMatrix, arrayBranchAbbrev, arrayActivity, arrayProgram bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec bool_REC1 = getRecordset(oRecordset1) bool_REC2 = getRecordset(oRecordset2) bool_REC3 = getRecordset(oRecordset3) getMatrixInfo = false if ( (bool_ADO = true) and (bool_REC = true) and (bool_REC1 = true) and (bool_REC2 = true) and (bool_REC3 = true) ) then ' test to see if we can use the connection objects strSQL = SQL_MATRIX strSQL1 = SQL_MATRIX_ACTIVITIES strSQL2 = SQL_BRANCH_ABBREV strSQL3 = SQL_MATRIX_PROGRAM oADO.Open db_strConn ' open connection to db oRecordset.Open strSQL, oADO ' open recordset using SQL statement oRecordset1.Open strSQL1, oADO ' open recordset using SQL statement oRecordset2.Open strSQL2, oADO oRecordset3.Open strSQL3, oADO ' If the recordset has at least one row, no problem If Not oRecordset.EOF Then arrayMatrix = oRecordset.GetRows Session("matrix") = arrayMatrix ' Otherwise the array is the empty set Else Session("matrix") = Null End If If Not oRecordset1.EOF Then arrayActivity = oRecordset1.GetRows Session("activity") = arrayActivity ' Otherwise the array is the empty set Else Session("activity") = Null End If If Not oRecordset2.EOF Then arrayBranchAbbrev = oRecordset2.GetRows Session("abbrev") = arrayBranchAbbrev ' Otherwise the array is the empty set Else Session("abbrev") = Null End If If Not oRecordset3.EOF Then arrayProgram = oRecordset3.GetRows Session("program") = arrayProgram 'Otherwise the array is the empty set Else Session("program") = Null End If end if If Err Then getMatrixInfo = False SetError "getMatrixInfo", Err.number, Err.description Session(cChangeInfoError) = "getMatrix" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getMatrixInfo = True End Function Function getBranchActivities() 'On Error Resume Next Dim oADO, oRecordset, oRecordset1, oRecordset2, oRecordset3, strSQL, strSQL1, strSQL2, strSQL3, bool_ADO, bool_REC, bool_REC1, bool_REC2, bool_REC3 Dim arrayBranchActivities, arrayBranch, arrayActivity, iBranch, arrayNotSelected bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec bool_REC1 = getRecordset(oRecordset1) bool_REC2 = getRecordset(oRecordset2) bool_REC3 = getRecordset(oRecordset3) getBranchActivities = false if ( (bool_ADO = true) and (bool_REC = true) and (bool_REC1 = true) and (bool_REC2 = true) ) then ' test to see if we can use the connection objects iBranch = Request.QueryString("Id") strSQL = sqlBranch oADO.Open db_strConn ' open connection to db if not isEmpty(iBranch) and iBranch <> 0 then strSQL1 = sqlMatrixActivities & iBranch & sqlMatrixActivities1 strSQL2 = sqlBranchActivities & iBranch & sqlBranchActivities1 oRecordset1.Open strSQL1, oADO oRecordset2.Open strSQL2, oADO If Not oRecordset2.EOF Then arrayBranchActivities = oRecordset2.GetRows Session("branchActivities") = arrayBranchActivities arrayNotSelected = oRecordset1.GetRows Session("notselected") = arrayNotSelected 'Otherwise the array is the empty set Else arrayActivity = oRecordset1.GetRows Session("activity") = arrayActivity Session("branchActivities") = Null End If else strSQL1 = sqlActivity oRecordset1.Open strSQL1, oADO arrayActivity = oRecordset1.GetRows Session("activity") = arrayActivity Session("branchActivities") = Null end if oRecordset.Open strSQL, oADO ' If the recordset has at least one row, no problem If Not oRecordset.EOF Then arrayBranch = oRecordset.GetRows Session("branch") = arrayBranch ' Otherwise the array is the empty set Else Session("branch") = Null End If end if If Err Then getBranchActivities = False SetError "getBranchActivities", Err.number, Err.description Session(cChangeInfoError) = "getBranchActivities" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getBranchActivities = True End Function Function addMatrixInfo() ' Take care of errors 'On Error Resume Next addMatrixInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, objLookup, blnError, iLengthActivity, iLengthActivityID, idColumn2, dataColumn2 Dim arrayActivityID, arrayActivity, i, arrItems blnError = False iLengthActivityID = Len(Request.Form("DataColumn2")) iLengthActivity = Len(Request.Form("TextColumn2")) if iLengthActivityID <> "" and iLengthActivity <> 0 then idColumn2 = Left(Request.Form("DataColumn2"), iLengthActivityID-1) dataColumn2 = Left(Request.Form("TextColumn2"), iLengthActivity-1) arrayActivityId = split(Trim(idColumn2), ",") arrayActivity = split(Trim(dataColumn2), ",") end if ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addMatrixInfo", Err.number, Err.Description Exit Function End If If deleteMatrixInfo() Then If Not IsArray(arrayActivity) or Not IsArray(arrayActivityID) Then blnError = True Else ' Create the dictionary to hash the values we get Set objLookup = CreateObject("Scripting.Dictionary") For i = 0 To UBound(arrayActivity) objLookup.Add arrayActivity(i), arrayActivityID(i) Next ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addMatrixInfo", Err.number, Err.Description Exit Function End If 'Try to retrieve the proper recordset data objRecordset.CursorLocation = adUseClient objRecordset.Open db_MATRIX, objDBConnection, adOpenDynamic, adLockPessimistic, adCmdTable for i = 0 to objLookup.Count - 1 ' Add a row objRecordset.AddNew ' Then set the fields objRecordset(db_MATRIX_branchid) = Trim( Request.Form("Branch") ) objRecordset(db_MATRIX_activityid) = objLookup.Item(arrayActivity(i)) objRecordset.Update 'response.write "Items " & objLookup.Item(arrayActivity(i)) & "
" next End If ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "addMatrixInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If End If ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "addMatrixInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. addMatrixInfo = True End Function Function deleteMatrixInfo() ' Take care of error handling 'On Error Resume Next deleteMatrixInfo = False ' Dim the variables we'll need. Dim strConstraint, intID ' Check to make sure an ID was passed If Request.Form("branch") = "" Then Exit Function intID = Request.Form("branch") ' Construct the constraint strConstraint = db_MATRIX_branchid & " = " & intID ' Then try to delete the proper row. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_MATRIX, strConstraint ) Then Exit Function ' If all this worked, assume success. deleteMatrixInfo = True End Function ' ############################################################################################################################# ' ## Function : getITNInfo() ' ## Date : 7/6/2000 ' ## Author : Chris McCarty ' ## Purpose : Sets the info in the ITN database to session variables ' ############################################################################################################################# Function getITNInfo() 'On Error Resume Next Dim oADO, oRecordset, strSQL, bool_ADO, bool_REC, arrayITN bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec getITNInfo = false if ((bool_ADO = true) and (bool_REC = true)) then ' test to see if we can use the connection objects strSQL = sqlITN & "order by " & db_ITN_sDate & " desc" oADO.Open db_strConn ' open connection to db oRecordset.Open strSQL, oADO ' open recordset using SQL statement ' If the recordset has at least one row, no problem If Not oRecordSet.EOF Then arrayITN = oRecordSet.GetRows Session("itn") = arrayITN ' Otherwise the array is the empty set Else Session("itn") = Null End If end if If Err Then getITNInfo = False SetError "getYOCInfo", Err.number, Err.description Session(cChangeInfoError) = "getYOC" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getITNInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: deleteITNInfo ' Params: None ' Expects: Request.Form collection to contain an "id" entry. This is the id to be deleted ' Returns: True if the delete was successful. False if not. ' Effects: Deletes the story with the specified id from the ITN table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function deleteITNInfo() ' Take care of error handling 'On Error Resume Next deleteITNInfo = False ' Dim the variables we'll need. Dim strConstraint, intID ' Check to make sure an ID was passed If Request.Form("id") = "" Then Exit Function intID = Request.Form("id") ' Construct the constraint strConstraint = db_ITN_id & " = '" & intID & "'" ' Then try to delete the proper row. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_ITN, strConstraint ) Then Exit Function ' If all this worked, assume success. deleteITNInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: addITNInfo ' Params: None ' Expects: A Request object that results from a form of method "post" and enctype "multipart/form-data". ' This form must have fields "title", "subtitle", "story", "month", "day", "year", "photo" (a file), and "photo_changed" ' Also a variable, strdNum (the user's district number) is assumed to have been set in the calling page. ' Returns: True if the story is succesfully added. False if not. ' Effects: Inserts the inputted story into the ITN table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function addITNInfo() ' Take care of errors 'On Error Resume Next addITNInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup, blnPhotoChanged, strImgDirectory, strPhotoFilename, dtmDate Dim strUser strUser = Session(USER) ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Look to see if the photo was changed strImgDirectory = Server.MapPath(NEWS_DIR) & "/" & cImages If objLookup("photo_changed").strData_ = "YES" And Not objLookup("photo").blnIsNull_ Then blnPhotoChanged = True Else blnPhotoChanged = False End If ' Construct the date from the 3 parts dtmDate = CDate( objLookup("month").strData_ & "/" & objLookup("day").strData_ & "/" & objLookup("year").strData_ ) ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addITNInfo", Err.number, Err.Description Exit Function End If ' Try to retrieve the proper recordset data objRecordset.CursorLocation = adUseClient objRecordset.Open db_ITN, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdTable ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "addITNInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Add a row objRecordset.AddNew ' Then set the fields objRecordset(db_ITN_sTitle) = Trim( objLookup("title").strData_ ) objRecordset(db_ITN_sSubtitle) = Trim( objLookup("subtitle").strData_ ) objRecordset(db_ITN_sStory) = Trim( objLookup("story").strData_ ) objRecordset(db_ITN_sDate) = dtmDate objRecordset("InputBy") = strUser objRecordset("InputDate") = Now() objRecordset.Update ' We only have write the image if the images were updated If blnPhotoChanged Then ' First create the name for the new image strPhotoFilename = ITN_PHOTO_NAME & objRecordset(db_ITN_id) & "." & getFilenameExtension( objLookup("photo").strFilename_ ) ' Then update the field in the database objRecordset(db_ITN_sPhoto) = strPhotoFilename ' Then try to write the file. If the write fails we have to exit the function unsuccessfully. If Not writeFile( strImgDirectory, strPhotoFilename, objLookup("photo").strData_ ) Then Exit Function Else objRecordset(db_ITN_sPhoto) = NO_PHOTO End If ' Finally update the database objRecordset.Update ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "addITNInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. addITNInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: modifyITNInfo ' Params: None ' Expects: A Request object that results from a form of method "post" and enctype "multipart/form-data". ' This form must have fields "title", "subtitle", "story", "month", "day", "year", "photo" (a file), and "photo_changed" ' Also, unlike the add method, a field "id" is expected to determine which record is to be modified. ' A variable arrayITN is expected to have been defined in the calling page and should contain the entire ' contents of the ITN table in a 2D array. ' Returns: True if the story is succesfully added. False if not. ' Effects: Modifies the appropriate story in the ITN table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function modifyITNInfo() ' Take care of errors 'On Error Resume Next modifyITNInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup, blnPhotoChanged, strImgDirectory, strPhotoFilename, strOldPhotoFilename Dim intNumRows, i, intRowWithID, intID, dtmDate Dim arrayITN Dim strUser strUser = Session(USER) arrayITN = Session("itn") ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Deal with the image situation strImgDirectory = Server.MapPath(NEWS_DIR) & "/" & cImages If objLookup("photo_changed").strData_ = "YES" And Not objLookup("photo").blnIsNull_ Then blnPhotoChanged = True Else blnPhotoChanged = False End If ' Construct the date from the 3 parts dtmDate = CDate( objLookup("month").strData_ & "/" & objLookup("day").strData_ & "/" & objLookup("year").strData_ ) ' Determine which row of the Session array contains the relavent entry intID = objLookup("id").strData_ intNumRows = UBound(arrayITN,2) ' Count the number of rows For i = 0 To intNumRows If CInt(intID) = CInt( arrayITN(ITN_ID_INDEX,i) ) Then intRowWithID = i Exit For End If Next ' Check to see if anything has actually been changed. If it has, we have to try and connect to the ' database. Otherwise, we don't have to do anything. That's easy. If arrayITN(ITN_TITLE_INDEX, intRowWithID) <> Trim( objLookup("title").strData_ ) _ Or arrayITN(ITN_SUBTITLE_INDEX, intRowWithID) <> Trim( objLookup("subtitle").strData_ ) _ Or arrayITN(ITN_STORY_INDEX, intRowWithID) <> Trim( objLookup("story").strData_ ) _ Or CDate( arrayITN(ITN_DATE_INDEX, intRowWithID) ) <> dtmDate _ Or blnPhotoChanged _ Or objLookup("photo_usage_changed").strData_ = "YES" Then ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "modifyITNInfo", Err.number, Err.Description Exit Function End If ' With that successful, construct the SQL statement and retrieve the desired row into the recordset strSQL = SQL_ITN_INFO & objLookup("id").strData_ ' And try to retrieve the proper recordset data objRecordset.Open strSQL, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdText ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "modifyITNInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Make sure we have actual returned a row If objRecordset.EOF Then Exit Function ' Update the name and bio fields objRecordset(db_ITN_sTitle) = Trim( objLookup("title").strData_ ) objRecordset(db_ITN_sSubtitle) = Trim( objLookup("subtitle").strData_ ) objRecordset(db_ITN_sStory) = Trim( objLookup("story").strData_ ) objRecordset(db_ITN_sDate) = dtmDate objRecordset("ModifiedBy") = strUser objRecordset("ModifiedDate") = Now() ' We only have to update each image field if the images were updated If blnPhotoChanged Then ' We have to then check to see if the user really wants the image If objLookup("photo_use").strData_ = "YES" Then ' First create the filename for the new file strPhotoFilename = ITN_PHOTO_NAME & objRecordset(db_ITN_id) & "." & getFilenameExtension( objLookup("photo").strFilename_ ) ' Then decide if we need to delete the old file, that is do the old and new files have different names? ' If they do, the new one will simply overwrite the old one. Otherwise we have to specifically delete the old one strOldPhotoFilename = objRecordset(db_ITN_sPhoto) If Trim( strPhotoFilename ) <> Trim ( strOldPhotoFilename ) And Trim( strOldPhotoFilename ) <> NO_PHOTO Then queueForDelete( strImgDirectory & strOldPhotoFilename ) End If ' First update the field in the database objRecordset(db_ITN_sPhoto) = strPhotoFilename ' Make sure this photo is not going to get deleted removeFromDeleteQueue( strImgDirectory & strPhotoFilename ) ' Then try to write the file. If the write fails we have to exit the function unsuccessfully. If Not writeFile( strImgDirectory, strPhotoFilename, objLookup("photo").strData_ ) Then Exit Function End If End If ' Then write to the database if the image is not to be used If objLookup("photo_use").strData_ = "NO" And Trim( objRecordset(db_ITN_sPhoto) ) <> NO_PHOTO Then ' First delete the old image file queueForDelete( strImgDirectory & objRecordset(db_ITN_sPhoto) ) ' Then set the field objRecordset(db_ITN_sPhoto) = NO_PHOTO End If ' Finally update the database objRecordset.Update End If ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "modifyITNInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. modifyITNInfo = True End Function Function getBranchInfo() 'On Error Resume Next Dim oADO, oRecordset, strSQL, bool_ADO, bool_REC, arrayBranch bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec getBranchInfo = false if ((bool_ADO = true) and (bool_REC = true)) then ' test to see if we can use the connection objects strSQL = sqlBranch oADO.Open db_strConn ' open connection to db oRecordset.Open strSQL, oADO ' open recordset using SQL statement ' If the recordset has at least one row, no problem If Not oRecordSet.EOF Then arrayBranch = oRecordSet.GetRows Session("branch") = arrayBranch ' Otherwise the array is the empty set Else Session("branch") = Null End If end if If Err Then getBranchInfo = False SetError "getBranchInfo", Err.number, Err.description Session(cChangeInfoError) = "getBranch" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getBranchInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: addBranchInfo ' Params: None ' Returns: True if the branch is succesfully added. False if not. ' Effects: Inserts the inputted branch into the Branches table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function addBranchInfo() ' Take care of errors 'On Error Resume Next addBranchInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addBranchInfo", Err.number, Err.Description Exit Function End If ' Try to retrieve the proper recordset data objRecordset.CursorLocation = adUseClient objRecordset.Open db_BRANCH, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdTable ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "addBranchInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Add a row objRecordset.AddNew ' Then set the fields objRecordset(db_BRANCH_Name) = Trim( objLookup("BName").strData_ ) objRecordset(db_BRANCH_Phone) = Trim( objLookup("BPhone").strData_ ) objRecordset(db_BRANCH_Abbrev) = Trim( objLookup("BAbbrev").strData_ ) objRecordset.Update ' Finally update the database objRecordset.Update ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "addBranchInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. addBranchInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: modifyBranchInfo ' Params: None ' Returns: True if the branch is succesfully updated. False if not. ' Effects: Modifies the appropriate branch in the Branches table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function modifyBranchInfo() ' Take care of errors 'On Error Resume Next modifyBranchInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup Dim intNumRows, i, intRowWithID, intID Dim arrayBranch arrayBranch = Session("branch") ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Determine which row of the Session array contains the relavent entry intID = objLookup("id").strData_ intNumRows = UBound(arrayBranch,2) ' Count the number of rows For i = 0 To intNumRows If CInt(intID) = CInt( arrayBranch(BRANCH_ID_INDEX,i) ) Then intRowWithID = i Exit For End If Next ' Check to see if anything has actually been changed. If it has, we have to try and connect to the ' database. Otherwise, we don't have to do anything. That's easy. If arrayBranch(BRANCH_NAME_INDEX, intRowWithID) <> Trim( objLookup("BName").strData_ ) _ Or arrayBranch(BRANCH_PHONE_INDEX, intRowWithID) <> Trim( objLookup("BPhone").strData_ ) _ Or arrayBranch(BRANCH_ABBREV_INDEX, intRowWithID) <> Trim( objLookup("BAbbrev").strData_ ) _ Then ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "modifyBranchInfo", Err.number, Err.Description Exit Function End If ' With that successful, construct the SQL statement and retrieve the desired row into the recordset strSQL = SQL_BRANCH_INFO & objLookup("id").strData_ ' And try to retrieve the proper recordset data objRecordset.Open strSQL, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdText ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "modifyBranchInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Make sure we have actual returned a row If objRecordset.EOF Then Exit Function ' Update the branch fields objRecordset(db_BRANCH_Name) = Trim( objLookup("BName").strData_ ) objRecordset(db_BRANCH_Phone) = Trim( objLookup("BPhone").strData_ ) objRecordset(db_BRANCH_Abbrev) = Trim( objLookup("BAbbrev").strData_ ) ' Finally update the database objRecordset.Update End If ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "modifyBranchInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. modifyBranchInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: deleteBranchInfo ' Params: None ' Expects: Request.Form collection to contain an "id" entry. This is the id to be deleted ' Returns: True if the delete was successful. False if not. ' Effects: Deletes the branch with the specified id from the Branches table and also the Matrix Table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function deleteBranchInfo() ' Take care of error handling 'On Error Resume Next deleteBranchInfo = False ' Dim the variables we'll need. Dim strBranchConstraint, strMatrixConstraint, intID ' Check to make sure an ID was passed If Request.Form("id") = "" Then Exit Function intID = Request.Form("id") ' Construct the constraint strBranchConstraint = db_BRANCH_id & " = '" & intID & "'" strMatrixConstraint = db_MATRIX_branchid & " = '" & intID & "'" ' Then try to delete the proper row from the branches table. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_BRANCH, strBranchConstraint ) Then Exit Function 'Then try to delete the proper rows from the matrix table. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_MATRIX, strMatrixConstraint ) Then Exit Function ' If all this worked, assume success. deleteBranchInfo = True End Function Function getActivityInfo() 'On Error Resume Next Dim oADO, oRecordset, oRecordset1, strSQL, strSQL1, bool_ADO, bool_REC, bool_REC1, arrayActivity, arrayProgram bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec bool_REC1 = getRecordset(oRecordset1) getActivityInfo = false if ((bool_ADO = true) and (bool_REC = true) and (bool_REC1 = true)) then ' test to see if we can use the connection objects strSQL = sqlActivity strSQL1 = sqlActProgram oADO.Open db_strConn ' open connection to db oRecordset.Open strSQL, oADO ' open recordset using SQL statement oRecordset1.Open strSQL1, oADO ' If the recordset has at least one row, no problem If Not oRecordSet.EOF Then arrayActivity = oRecordSet.GetRows Session("activity") = arrayActivity ' Otherwise the array is the empty set Else Session("activity") = Null End If If Not oRecordSet1.EOF Then arrayProgram = oRecordSet1.GetRows Session("program") = arrayProgram ' Otherwise the array is the empty set Else Session("program") = Null End If end if If Err Then getActivityInfo = False SetError "getActivityInfo", Err.number, Err.description Session(cChangeInfoError) = "getActivity" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getActivityInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: addActivityInfo ' Params: None ' Returns: True if the activity is succesfully added. False if not. ' Effects: Inserts the inputted activity into the activity table. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function addActivityInfo() ' Take care of errors 'On Error Resume Next addActivityInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addActivityInfo", Err.number, Err.Description Exit Function End If ' Try to retrieve the proper recordset data objRecordset.CursorLocation = adUseClient objRecordset.Open db_ACTIVITY, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdTable ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "addActivityInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Add a row objRecordset.AddNew ' Then set the fields objRecordset(db_ACTIVITY_Name) = Trim( objLookup("AName").strData_ ) objRecordset(db_ACTIVITY_ProgramID) = Trim( objLookup("AProgramId").strData_ ) objRecordset.Update ' Finally update the database objRecordset.Update ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "addActivityInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. addActivityInfo = True End Function Function modifyActivityInfo() ' Take care of errors 'On Error Resume Next modifyActivityInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup Dim intNumRows, i, intRowWithID, intID Dim arrayActivity arrayActivity = Session("activity") ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Determine which row of the Session array contains the relavent entry intID = objLookup("id").strData_ intNumRows = UBound(arrayActivity,2) ' Count the number of rows For i = 0 To intNumRows If CInt(intID) = CInt( arrayActivity(ACTIVITY_ID_INDEX,i) ) Then intRowWithID = i Exit For End If Next ' Check to see if anything has actually been changed. If it has, we have to try and connect to the ' database. Otherwise, we don't have to do anything. That's easy. If arrayActivity(ACTIVITY_NAME_INDEX, intRowWithID) <> Trim( objLookup("AName").strData_ ) _ Or arrayActivity(ACTIVITY_PROGRAMID_INDEX, intRowWithID) <> Trim( objLookup("AProgramId").strData_ ) Then ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "modifyActivityInfo", Err.number, Err.Description Exit Function End If ' With that successful, construct the SQL statement and retrieve the desired row into the recordset strSQL = SQL_ACTIVITY_INFO & objLookup("id").strData_ ' And try to retrieve the proper recordset data objRecordset.Open strSQL, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdText ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "modifyActivityInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Make sure we have actual returned a row If objRecordset.EOF Then Exit Function ' Update the branch fields objRecordset(db_ACTIVITY_Name) = Trim( objLookup("AName").strData_ ) objRecordset(db_ACTIVITY_ProgramID) = Trim( objLookup("AProgramId").strData_ ) ' Finally update the database objRecordset.Update End If ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "modifyActivityInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. modifyActivityInfo = True End Function Function deleteActivityInfo() ' Take care of error handling 'On Error Resume Next deleteActivityInfo = False ' Dim the variables we'll need. Dim strConstraint, intID ' Check to make sure an ID was passed If Request.Form("id") = "" Then Exit Function intID = Request.Form("id") ' Construct the constraint strConstraint = db_ACTIVITY_id & " = '" & intID & "'" ' Then try to delete the proper row from the activity table. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_ACTIVITY, strConstraint ) Then Exit Function ' If all this worked, assume success. deleteActivityInfo = True End Function Function getProgramInfo() 'On Error Resume Next Dim oADO, oRecordset, strSQL, bool_ADO, bool_REC, arrayProgram bool_ADO = getADO(oAdo) ' get connection object bool_REC = getRecordset(oRecordset) ' get connection objec getProgramInfo = false if ((bool_ADO = true) and (bool_REC = true)) then ' test to see if we can use the connection objects strSQL = sqlActProgram oADO.Open db_strConn ' open connection to db oRecordset.Open strSQL, oADO ' open recordset using SQL statement ' If the recordset has at least one row, no problem If Not oRecordSet.EOF Then arrayProgram = oRecordSet.GetRows Session("program") = arrayProgram ' Otherwise the array is the empty set Else Session("program") = Null End If end if If Err Then getProgramInfo = False SetError "getProgramInfo", Err.number, Err.description Session(cChangeInfoError) = "getProgram" & Err.number & " " & Err.Description & " " Exit Function End If ' If we get here, we're true getProgramInfo = True End Function Function addProgramInfo() ' Take care of errors 'On Error Resume Next addProgramInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "addProgramInfo", Err.number, Err.Description Exit Function End If ' Try to retrieve the proper recordset data objRecordset.CursorLocation = adUseClient objRecordset.Open db_PROGRAM, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdTable ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "addProgramInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Add a row objRecordset.AddNew ' Then set the fields objRecordset(db_PROGRAM_Name) = Trim( objLookup("PName").strData_ ) objRecordset.Update ' Finally update the database objRecordset.Update ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "addProgramInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. addProgramInfo = True End Function Function modifyProgramInfo() ' Take care of errors 'On Error Resume Next modifyProgramInfo = False ' Declare some variables to use Dim objDBConnection, objRecordset, strSQL, objLookup Dim intNumRows, i, intRowWithID, intID Dim arrayProgram arrayProgram = Session("program") ' Parse the http header. This is expected to be from a form of enctype multipart form/data ' If this doesn't succeed, we have no choice but to exit the write function If Not parseHeader( objLookup ) Then Exit Function ' Determine which row of the Session array contains the relavent entry intID = objLookup("id").strData_ intNumRows = UBound(arrayProgram,2) ' Count the number of rows For i = 0 To intNumRows If CInt(intID) = CInt( arrayProgram(PROGRAM_ID_INDEX,i) ) Then intRowWithID = i Exit For End If Next ' Check to see if anything has actually been changed. If it has, we have to try and connect to the ' database. Otherwise, we don't have to do anything. That's easy. If arrayProgram(PROGRAM_NAME_INDEX, intRowWithID) <> Trim( objLookup("PName").strData_ ) Then ' Create the ADO and Recordset objects... if either screws up, exit the function If Not ( GetADO( objDBConnection ) And GetRecordSet( objRecordset ) ) Then Exit Function ' Then try to connect to the database objDBConnection.Open db_strConn ' Check for errors on with this connection attempt If Err.Number Then If Not HaveError() Then SetError "modifyProgramInfo", Err.number, Err.Description Exit Function End If ' With that successful, construct the SQL statement and retrieve the desired row into the recordset strSQL = SQL_PROGRAM_INFO & objLookup("id").strData_ ' And try to retrieve the proper recordset data objRecordset.Open strSQL, objDBConnection, adOpenDynamic, adLockOptimistic, adCmdText ' Again check for errors after attempting to interact with the database If Err.Number Then If Not HaveError() Then SetError "modifyProgramInfo", Err.number, Err.Description objDBConnection.Close ' Close the (presumably) open database connection Exit Function End If ' Make sure we have actual returned a row If objRecordset.EOF Then Exit Function ' Update the branch fields objRecordset(db_PROGRAM_Name) = Trim( objLookup("PName").strData_ ) ' Finally update the database objRecordset.Update End If ' Close our connections objRecordset.Close objDBConnection.Close ' Destroy everything we new'd Set objRecordset = Nothing Set objDBConnection = Nothing Set objLookup = Nothing ' Check for errors once more If Err.Number Then If Not HaveError() Then SetError "modifyProgramInfo", Err.number, Err.Description Exit Function End If ' And finally return true if all that succeeded. modifyProgramInfo = True End Function Function deleteProgramInfo() ' Take care of error handling 'On Error Resume Next deleteProgramInfo = False ' Dim the variables we'll need. Dim strProgramConstraint, strActivityConstraint, intID ' Check to make sure an ID was passed If Request.Form("id") = "" Then Exit Function intID = Request.Form("id") ' Construct the constraint strActivityConstraint = db_ACTIVITY_Programid & " = '" & intID & "'" strProgramConstraint = db_PROGRAM_id & " = '" & intID & "'" ' Then try to delete the proper row from the branches table. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_PROGRAM, strProgramConstraint ) Then Exit Function 'Then try to delete the proper rows from the matrix table. If the delete is unsuccessful, exit the function returning false. If Not deleteRows( db_strConn, db_ACTIVITY, strActivityConstraint ) Then Exit Function ' If all this worked, assume success. deleteProgramInfo = True End Function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: queueForDelete ' Params: A filename to delete. This should be the full path name including the file. ' Returns: None ' Effects: Adds the file to the array of files to be deleted when the current session ends. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub queueForDelete( strFilename ) ' First set a variable to use Dim i, strDeletionArray, intNumFiles, strNewArray(), strExpandedArray(), blnFileAlreadyInQueue ' Check to see if we have to new the array If IsEmpty( Session(DELETION_QUEUE) ) Then ReDim strNewArray(DELETION_QUEUE_MAX_SIZE) Session(DELETION_QUEUE) = strNewArray Session(DELETION_QUEUE_SIZE) = 0 End If ' Set our array of items to be deleted and the num items strDeletionArray = Session(DELETION_QUEUE) intNumFiles = Session(DELETION_QUEUE_SIZE) ' Set other variables blnFileAlreadyInQueue = False ' Then check to see if the file needs to be inserted For i = 0 To intNumFiles - 1 If Trim( strDeletionArray(i) ) = Trim( strFilename ) Then blnFileAlreadyInQueue = True Exit For End If Next ' If the file is not already there then insert If Not blnFileAlreadyInQueue Then ' Check to see if the array has to be expanded If intNumFiles > UBound(strDeletionArray) Then ReDim strExpandedArray( intNumFiles * 2 ) For i = 0 To UBound(strDeletionArray) strExpandedArray(i) = strDeletionArray(i) Next strDeletionArray = strExpandedArray End If intNumFiles = intNumFiles + 1 strDeletionArray(intNumFiles - 1) = Trim( strFilename ) ' Then set the session variables to their new values Session(DELETION_QUEUE) = strDeletionArray Session(DELETION_QUEUE_SIZE) = intNumFiles End If End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: deleteQueuedFiles ' Params: None ' Returns: True if successful. False if not. ' Effects: Attempts to delete files that have been placed in the deletion queue ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function deleteQueuedFiles() ' First decide if any files need to be deleted. Does the deletion queue exist? If Not IsEmpty( Session(DELETION_QUEUE) ) Then ' First create an array that is exactly the right size ReDim strFilesArray(Session(DELETION_QUEUE_SIZE) - 1) ' Then populate the array Dim i For i = 0 To Session(DELETION_QUEUE_SIZE) - 1 strFilesArray(i) = Session(DELETION_QUEUE)(i) Next deleteQueuedFiles = deleteFile( strFilesArray ) Else deleteQueuedFiles = True End If End Function '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: removeFromDeleteQueue ' Params: A filename to remove from the deletion queue ' Returns: None ' Effects: If the filename is in the deletion queue, remove it. Otherwise do nothing. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub removeFromDeleteQueue( strFilename ) ' Initially just check to make sure that the deletion queue has even been created If Not IsEmpty( Session(DELETION_QUEUE) ) Then ' Set up some variables to use Dim blnIsMember, strResizedFileArray(), intIndex, intNewArrayIndex ' First we have to decide if the file is in the queue already blnIsMember = False For intIndex = 0 To Session(DELETION_QUEUE_SIZE) - 1 If Trim( Session(DELETION_QUEUE)(intIndex) ) = Trim( strFilename ) Then blnIsMember = True Next ' If it is in the queue, we make an array with one fewer indices and then populate it If blnIsMember Then intNewArrayIndex = 0 ReDim strResizedFileArray(Session(DELETION_QUEUE_SIZE) - 2) For intIndex = 0 To Session(DELETION_QUEUE_SIZE) - 1 If Trim( Session(DELETION_QUEUE)(intIndex) ) <> Trim( strFilename ) Then strResizedFileArray(intNewArrayIndex) = Trim( strFilename ) intNewArrayIndex = intNewArrayIndex + 1 End If Next Session(DELETION_QUEUE_SIZE) = Session(DELETION_QUEUE_SIZE) - 1 Session(DELETION_QUEUE) = strResizedFileArray End If End If End Sub Function getBranchPage() Dim strFullPath, strFileNameOnly, id strFullPath = Request.ServerVariables("PATH_INFO") strFileNameOnly = Mid(strFullPath, InstrRev(strFullPath, "/")+1, Len(strFullPath)) id = Request.QueryString("id") if strFileNameOnly = "albany.asp" or id = 1 then getBranchPage = 1 elseif strFileNameOnly = "empire_st_plaza.asp" or id = 5 then getBranchPage = 5 elseif strFileNameOnly = "guilderland.asp" or id = 9 then getBranchPage = 9 elseif strFileNameOnly = "schenectady.asp" or id = 4 then getBranchPage = 4 elseif strFileNameOnly = "troy.asp" or id = 8 then getBranchPage = 8 elseif strFileNameOnly = "parkside.asp" or id = 3 then getBranchPage = 3 elseif strFileNameOnly = "southern_saratoga.asp" or id = 7 then getBranchPage = 7 elseif strFileNameOnly = "chingachgook.asp" or id = 2 then getBranchPage = 2 elseif strFileNameOnly = "east_greenbush.asp" or id = 16 then getBranchPage = 16 elseif strFileNameOnly = "bethlehem.asp" or id = 2 then getBranchPage = 17 else getBranchPage = 0 end if End Function %>





Pine Bush Triathlon Home
Registration & Schedule
About the Race
Travel Directions
The Dream Team to Beat
Sponsors & Hosts
Volunteers
Race Results
Photo Gallery
Contact Us

 

Age Group Order - Female/Male Results 2007

**All Females followed by all Males

FEMALE AGE GROUP: 10 - 14

1 Julia Slyer 11 Averill Park NY 1:27:53
2 Marisa Piccirillo 12 Schenectady NY 1:52:15

 

FEMALE AGE GROUP: 15 - 19

1 Shannon Sara 16 Queensbury NY 1:12:26
2 Samantha Legere 17 Niskayuna NY 1:16:23
3 Molly Howland 16 Delmar NY 1:17:42
4 Casey Doak 16 Albany NY 1:18:51
5 Carolyn Herkenham 16 Ballston Lake NY 1:20:08
6 Mairin O'Connor 17 Scotia NY 1:28:23
7 Nicole Izzo 19 Schenectady NY 1:29:26
8 Courteny Hammond 19 Green Island NY 1:30:39
9 Annie Herkenham 17 Slingerlands NY 1:32:22
10 Claire Breedlove 19 New York NY 1:33:24

 

FEMALE AGE GROUP: 20 - 24

1 Heather Schoonmaker 21 Schenectady NY 1:11:59
2 Liz Szewczak 22 Enfield CT 1:14:25
3 Nicole Gordon 23 Troy NY 1:19:55
4 Carrie Mendolia 24 Guilderland NY 1:24:47
5 Molly Conway 20 East Chatham NY 1:25:33
6 Eileen Bosso 24 East Greenbush NY 1:26:55
7 Katherine Rutledge 24 Albany NY 1:32:39
8 Katherine Dunn 24 Eaton NY 1:39:47
9 Vanessa Cook 20 Schenectady NY 1:45:44

 

FEMALE AGE GROUP: 25 - 29

1 Kate Rose Bobseine 25 Fredonia NY 1:06:40
2 Katie Roden 27 Albany NY 1:07:55
3 Sara Guile 26 Schenectady NY 1:08:23
4 Beth Whitney 28 Albany NY 1:08:36
5 Tara McCarthy 26 Albany NY 1:10:00
6 Jennifer Prior 26 Saratoga Springs NY 1:11:37
7 Carrie Barown 27 Albany NY 1:14:32
8 Melissa Kalvestrand 28 Ballston Spa NY 1:14:40
9 Stacey Brown 28 Scotia NY 1:15:17
10 Eileen Dunn 25 Somerville MA 1:16:27
11 Ann Watts 29 Peru NY 1:21:33
12 Elizbeth Beals 25 Niverville NY 1:23:49
13 Sanning Pingitore 28 Fonda NY 1:24:00
14 Sarah Nolan 29 Latham NY 1:28:41
15 Sara Peloquin 26 Latham NY 1:28:41
16 Adrienne Monzet 28 Highland NY 1:29:50
17 Rossi Maldonado 28 Albany NY 1:35:48
18 Shannon Toomey 27 Troy NY 1:36:33
19 Joanna Harps 25 Esperance NY 1:38:24

 

FEMALE AGE GROUP: 30 - 34

1 Jennifer Brown 30 Slingerlands NY 1:08:10
2 Marla Bureau 30 Saratoga Springs NY 1:10:06
3 Rachel Giso 30 East Nassau NY 1:10:28
4 Kelly Tynan 34 Schenectady NY 1:11:24
5 Elizabeth Brown 30 West Babylon NY 1:12:35
6 Allison Sutton 30 Colonie NY 1:13:37
7 Holly Klein 31 Albany NY 1:13:51
8 Lisa Ruud 34 Delmar NY 1:15:42
9 Mineke Etienne 30 Scotia NY 1:16:16
10 Faye Reynolds 34 Greenfield Center NY 1:17:17
11 Melinda Person 30 Albany NY 1:17:33
12 Jacqueline Neal 31 Albany NY 1:19:43
13 Jennifer Bashant 34 Guilderland NY 1:20:36
14 Renee Pabst 32 Esopus NY 1:22:56
15 Marie Hicks 30 Ballston Spa NY 1:29:13
16 Janelle Fayette 31 Albany NY 1:29:32
17 Cindy Sanlorenzo 30 Delamr NY 1:30:10
18 Amy Bullock 33 Galway NY 1:30:23
19 Mari Magoon 34 Rensselaer NY 1:31:24
20 Jennifer Thompson 31 Troy NY 1:32:43
21 Erika Lewis 32 Albany NY 1:40:25

 

FEMALE AGE GROUP: 35 - 39

1 Bridget Sherratt 37 Fanwood NJ 1:01:57
2 Julie Burke 39 Troy NY 1:06:32
3 Christine Honig 38 Poughkeepsie NY 1:09:16
4 Jenny Stahl 38 Clifton Park NY 1:12:18
5 Abigail Atkins 38 Troy NY 1:14:48
6 Michele McColgan 39 Loudonville NY 1:14:58
7 Elisabeth Tischler 36 Monroe NY 1:15:03
8 Kim Scott 38 Malta NY 1:15:11
9 Rebecca Martell 37 Delmar NY 1:17:24
10 Tara Krinksy 38 West Babylon NY 1:21:36
11 Loriann Kondracki 37 Waterford NY 1:22:37
12 Shannon Clyde 37 Delmar NY 1:23:30
13 Rachel Knaggs 35 Troy NY 1:24:03
14 Tracey Meek 38 Glenmont NY 1:24:37
15 Shelly Amato 35 Mechanicville NY 1:24:39
16 Margaret Jones 36 Delmar NY 1:25:27
17 Francine Fredette 38 Glenmont NY 1:26:02
18 Kimberly Waters 36 Middle Grove NY 1:26:02
19 Victoria Malossi 38 Melrose NY 1:27:21
20 Cynthia Burton 35 Schoharie NY 1:27:53
21 Patricia Ivey 36 Lambertville NJ 1:28:03
22 Sarah Gould 37 Slingerlands NY 1:28:53
23 Kecia Hayes 39 Schoharie NY 1:29:41
24 Jacqueline Holmes 37 Altamont NY 1:29:54
25 Rebecca Phillips 39 Schenectady NY 1:31:37
26 Kristin Williams 39 Schoharie NY 1:36:36
27 Lara Kaye 38 Albany NY 1:39:13
28 Luba Ostashevsky 35 Forest Hills NY 1:39:29
29 Jane Higham 36 Delmar NY 1:39:40
30 Laura Empie 38 Delmar NY 1:39:58
31 Jennifer Santiago 36 Rensselaer NY 1:44:12
32 Lisa Jordan 39 Rotterdam NY 1:47:25

 

FEMALE AGE GROUP: 40 - 44

1 Barbara Sessa 43 Slate Hill NY 58:46
2 Mary Kogelmann 41 Slingerlands NY 1:04:54
3 Tracey Delaney 42 Lake Luzerne NY 1:06:25
4 Kaaren Caron 42 Schenectady NY 1:12:01
5 Licia Royka 43 Slingerlands NY 1:14:13
6 Andrea Ambs 43 Delmar NY 1:14:21
7 Teresa Warner 42 Ghent NY 1:14:51
8 Denise Thorn 43 Loudonville NY 1:17:41
9 Carrie O'Loughlin 44 Durham NY 1:19:18
10 Laura Vankuren 44 Middleburgh NY 1:20:20
11 Marie Krohn 40 Schoharie NY 1:20:45
12 Nancy Dearstyne 43 Delmar NY 1:22:48
13 Eileen Gower 41 Selkirk NY 1:24:29
14 Marcia Casimo 42 Albany NY 1:24:56
15 Joanne Cunningham 42 Delmar NY 1:26:59
16 Mary Amodeo 42 Delmar NY 1:27:01
17 Annette Mazzarello 40 Delmar NY 1:30:51
18 Rebecca Thomas 42 Springfield VT 1:31:24
19 Nancy Troha 44 Kenvil NJ 1:31:41
20 Sandra Crall 42 Clifton Park NY 1:32:25
21 Rhonda Makoske 41 Stottville NY 1:33:49
22 Kim Campbell 41 Albany NY 1:34:49
23 Marnie Gilman 40 Saratoga Springs NY 1:37:18
24 Mary Russell 40 Feura Bush NY 1:42:40
25 Michele O'Connor 41 Albany NY 1:46:58
26 Andie Newman 43 Troy NY 1:47:56
27 Sue Disy 42 Delanson NY 1:50:06
28 Eileen Geagan 42 Troy NY 1:53:40
29 Melinda Whisenhunt 40 Niskayuna NY 2:01:03

 

FEMALE AGE GROUP: 45 - 49

1 Alison Van Dyke 45 Ballston Spa NY 1:10:03
2 Janie Cregan 47 Endicott NY 1:10:12
3 Frances Vincent 45 Slingerlands NY 1:11:38
4 Maureen Sara 46 Queensbury NY 1:12:17
5 Christina Jackson 46 Chicago IL 1:12:23
6 Sandy Mancuso-Lopez 49 Kingston NY 1:13:34
7 Mary Chew 45 Schenectady NY 1:16:57
8 Terry Troha 46 Averill Park NY 1:18:42
9 Mary Hannon 49 Saratoga Springs NY 1:21:58
10 Kathryn Perry 46 Niskayuna NY 1:22:50
11 Kathy Walsh 49 Glenmont NY 1:32:14
12 Laurie Nagelsmith 46 Duanesburg NY 1:32:59
13 Elizabeth Chauvot 45 Berne NY 1:33:40
14 Vidtoria Dow 46 Selkirk NY 1:38:44
15 Joanne Schneider 48 Albany NY 1:42:34
16 Lisa Grossman 46 Hudson NY 1:49:07
17 Nancy Lee Dunn 45 Diamond Point NY 1:54:28
18 Kelly McIntyre 45 Monroe NY 1:57:41
19 Mary Jane Zanelli 46 Albany NY 2:03:56

 

FEMALE AGE GROUP: 50 - 54

1 Margaret Phillips 54 East Schodack NY 1:15:49
2 Karen Casper 50 Ballston Lake NY 1:18:19
3 Debra Savarese 53 Copiague NY 1:19:50
4 Kerry Dewitt 52 Delmar NY 1:20:07
5 Pamela Hibbs 52 Averill Park NY 1:21:16
6 Patty Paduano 50 Stillwater NY 1:21:36

7

Claire Nolan 50 Albany NY 1:22:22

8

Sue Colgan-Borror 53 Pound Ridge NY 1:23:09

9

Barbara O'Donnell 50 Averill Park NY 1:30:27

10

Ann Capobianco 54 Albany NY 1:31:20
11 Lynne Jackson 53 Albany NY 1:52:22

 

FEMALE AGE GROUP: 55 - 99

1 Dianna Bopp 58 Schenectady NY 1:17:50
2 Beth Becker 55 Alnany NY 1:25:50
3 Peggy Ostrander 70 Averill Park NY 1:46:16
4