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 2006

Place

Name

Age

Sex

Wave

Swim

Pl

Bike

Pl

Run

Pl

Time

1 Paul Gaffuri 26 M 1 4:18 4 30:41 1 19:27 5 54:25
2 Joseph Skufca 39 M 2 5:15 23 31:01 2 21:53 19 58:08
3 Steve Seabury 37 M 2 5:03 18 31:14 3 22:13 23 58:28
4 Robert Irwin 33 M 3 5:37 40 34:50 23 18:11 1 58:37
5 Craig Tynan 36 M 2 6:22 113 32:33 5 19:44 6 58:37
6 David Hettrich 41 M 10 5:32 36 34:14 14 18:57 3 58:41
7 Arthur Boyko 40 M 10 4:06 2 32:37 6 22:34 32 59:16
8 David Fiore 30 M 3 6:33 128 33:37 12 19:17 4 59:27
9 Topher Robinson 29 M 1 4:56 14 32:45 7 21:55 20 59:36
10 Michael Foley 21 M 6 5:20 28 35:53 37 18:28 2 59:40
11 Greg Fullman 18 M 6 6:16 102 34:17 15 20:00 9 1:00:32
12 George Zibell 42 M 10 6:59 172 31:30 4 22:27 30 1:00:56
13 Kirsten McCay-Smith 33 F 3 4:42 8 33:58 13 22:52 37 1:01:30
14 Dale Rothenberger 49 M 5 4:50 12 33:18 10 23:36 47 1:01:42
15 Andrew Rizzi 25 M 1 6:06 80 33:23 11 22:23 28 1:01:50
16 Tim Durkin 19 M 6 6:20 111 35:57 39 20:11 11 1:02:28
17 Brent Watson 25 M 1 5:36 39 34:39 21 22:18 25 1:02:32
18 Robert Etien 32 M 3 6:11 88 36:14 43 20:10 10 1:02:33
20 Alison Heaphy 39 F 4 5:09 21 36:22 48 21:16 14 1:02:46
19 Scott Schaffer 39 M 2 6:40 139 32:58 8 23:09 43 1:02:46
21 Matthew Lindemann 37 M 2 6:18 105 34:19 16 22:12 22 1:02:47
22 Bob Connelly 46 M 5 6:04 75 33:04 9 23:42 50 1:02:49
23 Russell Lydon 38 M 2 6:10 86 35:12 29 21:47 17 1:03:08
24 Jason Santarcangelo 29 M 1 5:22 31 35:19 30 22:44 34 1:03:24
25 Thomas Dame 46 M 5 8:08 277 34:34 19 20:50 13 1:03:32
26 Emily Kindlon 25 F 8 5:54 56 35:30 33 22:15 24 1:03:38
27 Philip Sherratt 32 M 3 4:47 11 35:29 32 23:54 55 1:04:09
28 Joseph Sullivan 27 M 1 7:07 187 37:18 70 19:53 8 1:04:17
29 Mary Kogelmann 40 F 10 6:07 81 34:57 25 23:32 46 1:04:36
30 Bridget Sherratt 36 F 4 4:17 3 35:32 34 24:51 75 1:04:39
31 Thomas Gorczyca 50 M 9 6:11 90 34:49 22 23:43 51 1:04:42
33 Mara O'Neill 39 F 4 5:24 33 34:51 24 24:59 76 1:05:13
32 Jim Hollister 40 M 10 6:14 95 35:56 38 23:03 40 1:05:13
34 Mackenzie Oglesby 15 M 6 6:05 76 36:45 55 22:26 29 1:05:15
35 Todd Mesick 39 M 2 5:59 64 39:26 104 19:52 7 1:05:16

Place

Name

Age

Sex

Wave

Swim

Pl

Bike

Pl

Run

Pl

Time

36 Michael Goodman 29 M 1 5:41 43 36:04 40 23:38 49 1:05:23
37 Marcus Ritter 31 M 3 4:28 5 37:17 69 23:51 53 1:05:35
38 Steve Nash 41 M 10 6:02 73 35:06 28 24:37 68 1:05:45
39 George Burke 40 M 10 6:15 100 36:45 54 22:47 35 1:05:47
40 Rand Harper 38 M 2 5:22 32 36:46 56 23:57 56 1:06:04
41 Pat Grasso 16 M 6 5:00 16 36:45 53 24:22 62 1:06:06
42 Tim Spillane 42 M 10 8:31 295 34:39 20 23:00 39 1:06:08
43 Tracey Delaney 41 F 10 6:08 82 37:13 68 22:54 38 1:06:14
44 Sabrina Krouse 26 F 8 6:17 103 36:56 62 23:10 44 1:06:22
45 Giovanni Possumato 42 M 10 7:02 177 36:46 57 22:42 33 1:06:28
46 Dennis Ball 38 M 2 5:41 42 36:21 47 24:29 65 1:06:30
47 Kim Seabury 39 F 4 5:48 50 39:01 96 21:52 18 1:06:39
48 Andrew Gorczyca 19 M 6 5:27 35 34:59 26 26:28 125 1:06:53
49 Daniel Rausch 34 M 3 6:02 71 38:04 75 22:51 36 1:06:56
50 Matt Barendse 29 M 1 7:01 174 39:12 102 20:48 12 1:06:59
51 Tom Schardt 50 M 9 4:58 15 36:43 51 25:30 88 1:07:10
52 Miles Killar 21 M 6 6:16 101 39:19 103 21:40 15 1:07:14
53 Josh Matot 26 M 1 6:00 66 38:12 82 23:07 42 1:07:19
54 Kurt Bedore 41 M 10 6:11 89 35:01 27 26:20 121 1:07:31
55 Julie Burke 38 F 4 6:19 106 36:39 50 24:39 69 1:07:36
56 Chris Busch 45 M 5 5:05 20 37:13 67 25:25 86 1:07:42
57 Nikos Bentenitis 34 M 3 5:57 62 37:01 64 24:51 74 1:07:48
58 Bob Yates 31 M 3 6:01 67 36:17 46 25:47 99 1:08:04
59 Edward Hampston 38 M 2 4:35 6 41:39 145 21:56 21 1:08:09
60 Bob Frank 39 M 2 7:58 261 34:27 18 26:03 111 1:08:27
61 Brent Petrencsik 36 M 2 8:06 274 34:25 17 26:02 110 1:08:31
62 Janie Cregan 46 F 5 6:28 121 35:50 36 26:16 118 1:08:34
63 Alexander Workman 30 M 3 5:55 60 37:01 63 25:40 92 1:08:35
64 Christine Honig 37 F 4 4:38 7 37:12 66 26:50 136 1:08:38
65 Bill Kuchinski 48 M 5 5:16 24 39:06 99 24:20 61 1:08:42
66 Philip Tyler, Jr 40 M 10 6:50 159 35:20 31 26:47 134 1:08:56
67 Keith Murray 32 M 3 4:02 1 42:46 181 22:20 27 1:09:07
68 Dale Owen 26 M 1 7:18 211 39:01 95 23:03 41 1:09:21
69 Dan Bernstein 52 M 9 6:19 107 38:50 92 24:13 59 1:09:22
70 Douglas Tucker 51 M 9 6:14 93 35:49 35 27:22 150 1:09:24

 

Place

Name

Age

Sex

Wave

Swim

Pl

Bike

Pl

Run

Pl

Time

106 Christine Jenkins 26 F 8 6:37 135 40:15 121 25:47 100 1:12:38
107 John Houghton 27 M 1 7:48 245 41:14 140 23:52 54 1:12:53
108 Brett Fialkoff 39 M 2 6:37 136 37:30 71 28:51 210 1:12:57
109 Meghan Hotaling 37 F 4 6:13 92 39:58 116 26:50 135 1:13:00
110 Melinda Person 29 F 8 6:34 129 38:06 76 28:42 206 1:13:21
111 Christopher Zeitler 20 M 6 6:46 151 40:49 133 25:56 106 1:13:30
112 Jeff Damour 25 M 1 9:21 324 36:08 41 28:02 179 1:13:31
113 Maryann Reilly-Johns 38 F 4 5:54 57 43:35 206 24:10 58 1:13:38
115 Jon Mapstone 38 M 2 8:09 279 38:29 85 27:05 142 1:13:42
114 Tara McCarthy 25 F 8 6:10 85 41:41 147 25:52 102 1:13:42
116 Samantha Karle 27 F 8 6:05 78 37:34 72 30:14 247 1:13:53
117 Daniel Dunn 34 M 3 6:36 131 39:53 113 27:26 157 1:13:54
118 Robert Piccirillo 41 M 10 7:09 191 38:42 90 28:09 183 1:13:59
119 Jeff Deweese 39 M 2 5:44 47 39:06 98 29:23 223 1:14:13
120 Stephen Werthner 37 M 2 8:25 290 39:52 111 25:57 108 1:14:14
121 Kelly Tynan 33 F 3 6:53 165 42:00 160 25:23 84 1:14:15
122 Shauna Hull 25 F 8 6:36 133 43:32 205 24:20 60 1:14:28
123 Joe Desmonie 35 M 2 6:43 146 39:34 108 28:13 185 1:14:29
124 Kean Bouplon 29 M 1 9:59 339 38:51 93 25:41 93 1:14:30
125 Pablo Pomykala 46 M 5 6:03 74 39:44 109 28:51 211 1:14:38
126 Jane Klein 47 F 5 7:51 250 43:12 194 23:38 48 1:14:40
127 William Haggett 54 M 9 6:25 117 38:38 87 29:41 233 1:14:43
128 Elizabeth Brown 29 F 8 5:51 55 40:45 130 28:10 184 1:14:46
129 Frank Scott 34 M 3 7:38 237 41:58 157 25:14 82 1:14:50
131 Nikki O'Meara 28 F 8 6:24 116 41:09 139 27:22 151 1:14:55
130 Pat Sommo 38 M 2 5:38 41 43:13 195 26:04 113 1:14:55
132 Allison Sylvetsky 19 F 6 7:11 197 46:09 246 21:44 16 1:15:03
133 Dan Laux 28 M 1 7:02 179 42:30 171 25:33 90 1:15:04
134 Heather Field 43 F 10 6:58 169 41:18 141 26:58 140 1:15:14
135 Colleen Grossner 28 F 8 7:48 243 41:33 144 26:00 109 1:15:19
136 Sara Laux 27 F 8 7:11 195 42:47 183 25:24 85