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

 

Individual Results 2007

Place

Name

No.

Wave

Swim

Pl

Bike

Pl

Run

Pl

Time

1 Keith Murray 151 10 3:47 1 31:50 7 19:38 7 55:15
2 Matt Mallet 127 10 5:47 38 31:12 2 18:39 2 55:36
3 Craig Tynan 196 7 6:14 74 29:52 1 19:38 6 55:44
4 Arthur Boyko 264 2 4:01 3 31:31 5 21:32 17 57:04
5 Chuck Racey 326 9 5:19 27 32:25 9 20:13 10 57:56
6 Greg Fullman 34 4 6:11 66 34:22 21 17:53 1 58:25
7 Barbara Sessa 297 1 6:09 64 31:29 4 21:09 13 58:46
8 Daniel Valente 55 5 5:10 25 32:54 12 20:48 12 58:51
9 Ty Remington 139 10 5:54 43 33:39 16 19:26 3 58:58
10 George Zibell 285 2 6:47 130 31:13 3 21:45 19 59:44
11 Christopher Mancuso 73 6 5:35 33 34:28 22 19:48 8 59:51
12 Bob Connelly 343 9 4:57 14 32:44 10 22:40 34 1:00:20
13 Scott Suba 307 2 4:51 12 35:02 25 20:35 11 1:00:27
14 Dale Rothenberger 369 3 4:37 7 32:57 13 23:00 39 1:00:33
15 Jeffrey Eades 152 10 6:23 82 35:26 29 19:31 5 1:01:19
16 Scott Schaffer 248 2 6:59 150 32:46 11 22:06 23 1:01:50
17 Bridget Sherratt 195 8 4:23 5 34:31 23 23:04 42 1:01:57
18 George Stopyak Iii 185 7 6:36 106 35:27 30 20:05 9 1:02:07
19 George Baird 373 3 6:03 54 34:03 18 22:15 26 1:02:20
20 Tim Spillane 300 2 8:00 224 32:09 8 22:23 29 1:02:31
21 Chris Bowcutt 136 10 5:33 31 34:11 19 23:04 41 1:02:46
22 Toby Ring 23 4 5:55 44 35:53 34 21:20 14 1:03:07
23 Orlando Rivera 42 5 5:44 36 38:26 75 19:27 4 1:03:36
24 Alton Ostrander, Jr. 288 2 5:35 34 33:08 14 24:59 84 1:03:42
25 Philip Tyler 261 2 6:43 122 31:47 6 25:17 91 1:03:47
26 Philip Sherratt 153 10 4:43 10 35:08 26 24:10 65 1:04:00
27 Hamish Kerr 160 10 6:47 129 35:22 27 21:55 20 1:04:02
28 Brad Stratton 103 6 8:28 258 33:30 15 22:06 24 1:04:03
29 Edward Hampston 235 7 4:37 8 38:02 61 21:33 18 1:04:11
30 Samuel Briggs 135 10 6:14 72 35:43 33 22:18 27 1:04:14
31 Jeremy Mattas 439 4 5:00 20 34:53 24 24:27 70 1:04:19
32 Marc Grossman 161 10 6:27 86 34:15 20 23:49 55 1:04:30
33 Bob Yates 147 10 5:56 45 33:54 17 24:52 81 1:04:41
34 Mary Kogelmann 257 1 6:19 78 35:40 32 22:56 37 1:04:54
35 Kenneth Klapp 395 3 7:30 187 35:24 28 22:03 22 1:04:57
36 Robert Gilchrist 69 6 6:22 81 36:11 38 22:34 31 1:05:06
37 George Burke 266 2 6:38 110 37:01 47 22:01 21 1:05:40
38 John Felio 167 7 6:28 91 35:32 31 23:50 56 1:05:50
39 Tracey Delaney 283 1 6:27 88 37:38 53 22:20 28 1:06:25
40 Michael Moore 104 6 6:01 49 36:47 45 23:41 51 1:06:27
41 Julie Burke 225 8 6:28 89 36:41 43 23:24 48 1:06:32
42 Tom Schardt 371 3 4:58 16 36:06 37 25:34 96 1:06:36
43 Kate Rose Bobseine 63 6 6:25 84 38:48 86 21:29 16 1:06:40
44 James O'Shea 350 9 5:07 23 36:56 46 24:47 77 1:06:49
45 Chris Fron 15 4 4:52 13 38:02 60 24:02 58 1:06:56
46 Andrew Gorczyca 38 5 5:54 42 38:16 67 23:08 43 1:07:16
47 John Nittinger 200 7 5:44 37 38:12 64 23:24 49 1:07:19
48 John Senkewich 33 4 4:26 6 39:12 93 23:44 53 1:07:20
49 Matthew Dunn 70 6 6:07 60 38:17 68 23:16 45 1:07:39
50 Anthony Stefanelli J 273 2 7:00 152 37:33 51 23:11 44 1:07:43
51 Dan Bernstein 381 3 6:41 118 38:17 69 22:55 36 1:07:53
52 Katie Roden 83 6 5:22 28 39:38 102 22:56 38 1:07:55
53 Jennifer Brown 118 10 4:59 18 39:02 91 24:09 63 1:08:10
54 Frank Bender 392 3 6:40 114 36:22 41 25:14 89 1:08:14
55 Sara Guile 78 6 6:06 58 39:43 104 22:35 32 1:08:23
56 Christopher Evasn 92 6 6:30 93 38:21 71 23:41 52 1:08:31
57 Daniel Cowles 138 10 6:01 51 38:16 66 24:17 67 1:08:32
58 Beth Whitney 95 6 6:55 142 36:30 42 25:12 88 1:08:36
59 Peter Nelson Jr 215 7 6:35 101 37:45 54 24:21 68 1:08:39
60 Douglas Tucker 377 3 6:14 73 36:19 40 26:16 118 1:08:48
61 Christine Honig 210 8 4:47 11 36:44 44 27:46 156 1:09:16
62 James Danoff-Burg 267 2 7:13 174 36:06 36 26:10 114 1:09:28
63 James Poole 391 3 4:57 15 38:38 82 26:02 108 1:09:36
64 Joel Rosenberg 240 7 6:46 128 38:23 72 24:51 80 1:09:59
65 Tara McCarthy 74 6 6:09 63 38:25 74 25:27 93 1:10:00
66 Alison Van Dyke 323 9 7:49 212 36:18 39 25:58 105 1:10:03
67 Michael Panetta 220 7 5:06 22 38:56 89 26:04 110 1:10:05
68 Marla Bureau 112 10 7:40 202 37:34 52 24:54 82 1:10:06
69 Gregory Peda 289 2 7:02 154 38:11 63 24:57 83 1:10:09
70 Janie Cregan 341 9 6:40 116 37:08 48 26:24 122 1:10:12
71 John Spence 308 2 6:32 95 37:46 56 25:57 104 1:10:14
72 Rachel Giso 117 10 6:13 68 39:15 94 25:01 86 1:10:28
73 Jonathan Quinn 102 6 5:59 48 38:28 76 26:14 115 1:10:40
74 Andre Kiyanitsa 39 5 7:13 172 38:45 85 24:49 78 1:10:46
75 Thomas Gorczyca 364 3 6:36 105 38:38 83 25:47 98 1:11:01
76 Chris Greklek 233 7 6:53 138 38:09 62 26:00 107 1:11:01
77 John McManus 172 7 7:51 217 38:23 73 24:51 79 1:11:04
78 John Mounteer 384 3 7:41 204 37:48 57 25:48 99 1:11:16
79 Scott Adelmann 109 6 6:36 108 37:45 55 26:59 135 1:11:19
80 Larry Lewis 385 3 6:45 126 40:00 108 24:35 72 1:11:20
81 Ron Montesi 249 2 5:37 35 38:35 79 27:11 139 1:11:22
82 Kelly Tynan 158 10 6:44 125 40:31 118 24:09 64 1:11:24
83 Patrick Sommo 234 7 5:51 41 39:24 98 26:14 116 1:11:28
84 Kevin King 351 9 6:35 103 38:30 78 26:31 124 1:11:34
85 Jennifer Prior 77 6 6:59 149 40:42 123 23:58 57 1:11:37
86 Frances Vincent 318 9 5:35 32 41:26 134 24:38 75 1:11:38
87 Heather Schoonmaker 40 5 6:40 115 42:42 162 22:38 33 1:11:59
88 Patrick Pastecki 100 6 8:14 241 38:14 65 25:33 95 1:12:01
89 Kaaren Caron 275 1 7:39 200 40:35 120 23:48 54 1:12:01
90 John Paduano 344 9 6:43 123 41:17 132 24:15 66 1:12:14
91 Maureen Sara 335 9 6:20 79 41:22 133 24:37 73 1:12:17
92 Jenny Stahl 208 8 5:57 46 39:05 92 27:16 144 1:12:18
93 Christina Jackson 332 9 6:11 65 39:58 107 26:15 117 1:12:23
94 Richard Stufflebeam 286 2 7:12 170 39:16 95 25:58 106 1:12:25
95 Shannon Sara 21 4 4:17 4 41:00 126 27:10 138 1:12:26
96 Matthew McMorris 145 10 7:08 163 36:00 35 29:21 194 1:12:28
97 Elizabeth Brown 116 10 5:47 39 39:35 101 27:14 141 1:12:35
98 Thomas Orcutt 159 10 5:04 21 37:29 50 30:11 214 1:12:43
99 Matthew Landy 251 2 6:49 134 39:51 106 26:09 113 1:12:48
100 Robert Piccirillo 291 2 7:11 169 38:18 70 27:31 150 1:13:00
101 Brendan Dunfee 149 10 8:25 252 40:31 117 24:06 62 1:13:01
102 Keith Buff 137 10 7:13 175 40:27 116 25:28 94 1:13:06
103 Brendan Lill 56 5 6:33 98 43:28 174 23:23 47 1:13:23
104 Mike Griffiths 81 6 5:07 24 41:15 131 27:12 140 1:13:34
105 Sandy Mancuso-Lopez 354 9 6:36 107 37:23 49 29:35 202 1:13:34
106 Allison Sutton 115 10 6:24 83 44:46 195 22:28 30 1:13:37
107 Holly Klein 132 10 7:21 179 40:10 113 26:21 120 1:13:51
108 Earl Redding 110 6 8:23 250 43:31 177 22:09 25 1:14:02
109 Licia Royka 299 1 7:50 213 40:03 112 26:21 121 1:14:13
110 Daniel McCrea 242 7 7:07 160 42:07 147 25:02 87 1:14:15
111 Andrea Ambs 294 1 7:25 182 40:01 110 26:55 132 1:14:21
112 Kent Theobald 317 2 7:39 201 42:01 146 24:46 76 1:14:25
113 Liz Szewczak 45 5 6:35 102 40:36 121 27:15 142 1:14:25
114 Carrie Barown 86 6 6:11 67 44:19 188 24:03 60 1:14:32
115 Timothy Burns 252 2 8:16 244 44:56 198 21:25 15 1:14:36
116 Melissa Kalvestrand 97 6 5:00 19 40:02 111 29:39 204 1:14:40
117 Abigail Atkins 206 8 6:13 69 39:21 96 29:15 192 1:14:48
118 Dan Behuniak 236 7 7:05 158 43:40 179 24:05 61 1:14:49
119 Teresa Warner 274 1 9:57 299 38:36 80 26:19 119 1:14:51
120 Michele McColgan 227 8 6:04 57 37:51 58 31:03 229 1:14:58
121 Dean Dematteo 345 9 10:18 308 37:53 59 26:49 130 1:14:58
122 Elisabeth Tischler 182 8 6:35 104 41:33 140 26:55 133 1:15:03
123 Dan Dunn 175 7 6:38 111 40:59 125 27:28 149 1:15:04
124 Tal Rappleyea 303 2 7:13 171 38:29 77 29:31 199 1:15:11
125 Kim Scott 203 8 7:07 161 42:15 150 25:50 100 1:15:11
126 Robert Perry 363 3 7:37 194 39:24 99 28:17 170 1:15:16
127 Stacey Brown 93 6 6:33 97 39:22 97 29:23 195 1:15:17
128 Chris Busch 337 9 5:27 30 44:17 187 25:45 97 1:15:28
129 Peter Oxenholm 250 2 6:46 127 41:05 127 27:44 154 1:15:33
130 Lisa Ruud 155 10 7:35 191 38:57 90 29:10 188 1:15:42
131 Margaret Phillips 386 3 5:58 47 38:49 87 31:04 230 1:15:49
132 John Perry 327 9 8:08 234 40:21 114 27:22 148 1:15:50
133 Raul Haro 305 2 6:19 77 45:03 203 24:29 71 1:15:50
134 Ageo Frizzera 397 3 7:20 178 41:30 137 27:18 145 1:16:08
135 Mineke Etienne 114 10 6:52 135 39:24 100 30:01 212 1:16:16
136 Samantha Legere 25 4 4:59 17 45:31 212 25:54 102 1:16:23
137 Gregory Masiello 292 2 8:02 227 38:40 84 29:46 206 1:16:27
138 Eileen Dunn 68 6 6:02 52 41:12 129 29:14 190 1:16:27
139 Christopher Bowers 219 7 6:56 145 41:47 142 27:45 155 1:16:27
140 Andrew Scott 123 10 7:07 162 41:56 144 27:39 153 1:16:41
141 Daniel Reynolds 89 6 6:15 75 42:09 148 28:20 171 1:16:44
142 Mary Chew 322 9 5:47 40 43:15 171 27:55 161 1:16:57
143 David Bureau 302 2 8:04 229 38:37 81 30:30 218 1:17:10
144 Faye Reynolds 156 10 6:13 70 42:44 163 28:21 172 1:17:17
145 Adam Ostaszewski 71 6 12:07 327 40:00 109 25:15 90 1:17:22
146 Christopher Jennings 91 6 7:08 165 40:50 124 29:26 197 1:17:23
147 Rebecca Martell 191 8 8:25 253 39:47 105 29:13 189 1:17:24
148 Steven Swoap 237 7 5:24 29 41:05 128 30:57 224 1:17:25
149 Melinda Person 111 10 6:34 99 40:25 115 30:35 221 1:17:33
150 Denise Thorn 298 1 7:04 157 42:51 164 27:47 157 1:17:41
151 Molly Howland 20 4 3:54 2 46:57 236 26:52 131 1:17:42
152 Philip De Rita 52 5 5:15 26 45:22 210 27:09 137 1:17:45
153 Christian Engle 241 7 6:04 56 40:33 119 31:12 233 1:17:48
154 Dianna Bopp 399