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 2008

Place Name No. Wave Swim Pl Bike Pl Run Pl Time
1 Todd Shatynski 152 10 4:34 7 29:22 1 18:21 1 52:16
2 Ty Remington 149 10 5:43 48 30:58 3 19:06 2 55:46
3 Craig Tynan 244 7 5:42 47 30:19 2 19:51 5 55:52
4 Arthur Boyko 306 2 4:05 3 31:34 5 21:30 13 57:08
5 Chuck Racey 364 9 5:06 22 32:15 8 20:14 7 57:34
6 Steve Seabury 268 7 5:24 36 31:03 4 22:26 28 58:51
7 Marc Grossman 186 7 5:52 59 32:47 9 21:57 20 1:00:35
8 Matthew Voisin 129 10 5:03 20 35:01 16 20:57 10 1:00:59
9 Vincent Green 156 10 6:04 78 35:31 26 19:46 4 1:01:20
10 Kevin Sheridan 63 5 4:04 2 35:38 27 22:06 23 1:01:47
11 Jay Tyler 317 2 6:00 73 32:02 6 24:08 55 1:02:08
12 Alison Heaphy 302 1 5:27 39 35:09 17 21:52 19 1:02:27
13 Heidi Underwood 239 8 5:51 58 35:13 18 21:37 14 1:02:41
14 James O'Shea 386 9 4:56 15 35:28 23 22:34 30 1:02:57
15 Edward Hampston 285 2 4:30 6 36:57 44 21:48 17 1:03:14
16 Anthony Pharo 297 2 6:01 76 32:14 7 25:00 74 1:03:14
17 Derrick Raeder 130 10 6:11 91 33:10 10 24:01 53 1:03:21
18 Jonathan Moeller 137 10 5:26 37 35:29 25 22:59 40 1:03:53
19 Hamish Kerr 191 7 5:21 33 36:06 35 22:29 29 1:03:55
20 Ed Oldrich 183 7 6:42 138 33:40 13 23:39 47 1:04:00
21 Matthew Donzella 134 10 5:53 60 36:04 34 22:04 21 1:04:01
22 John Slyer 337 2 5:55 65 35:46 29 22:39 33 1:04:19
23 Hugh Dunseath 450 3 5:44 50 34:41 15 23:55 50 1:04:19
24 Steve Nash 329 2 5:56 66 35:23 20 23:03 41 1:04:21
25 Scott Strickler 104 6 4:26 5 37:07 50 22:59 39 1:04:31
26 Steven Caron 64 5 5:54 63 34:26 14 24:17 61 1:04:36
27 Christopher Evans 108 6 6:22 106 35:21 19 22:54 38 1:04:37
28 Andrew Gorczyca 62 5 5:59 71 35:23 21 23:25 44 1:04:47
29 Todd Weiss 121 6 5:59 69 37:50 61 21:02 11 1:04:50
30 Douglas Hough 300 2 7:39 229 37:46 58 19:27 3 1:04:52
31 Kenneth Klapp 436 3 7:21 204 36:01 33 21:40 15 1:05:02
32 Sabrina Krouse 106 6 6:29 114 36:54 43 21:45 16 1:05:07
33 David Sikule 34 4 6:24 108 36:24 39 22:53 37 1:05:41
34 Thomas Gorczyca 411 3 6:08 85 35:47 30 23:49 48 1:05:43
35 Joseph Yanazzo 269 7 7:02 170 33:39 12 25:09 79 1:05:49
36 Louis Serafini 27 4 8:55 317 37:01 49 19:59 6 1:05:54
37 Tracey Delaney 333 1 6:25 109 37:27 53 22:35 31 1:06:26
38 Kim Seabury 303 1 5:48 54 38:32 74 22:14 25 1:06:33
39 Alton Ostrander, Jr. 336 2 5:22 34 33:17 11 28:01 178 1:06:39
40 Christopher Hogan 324 2 5:16 29 38:17 67 23:15 43 1:06:47
41 Chris Busch 370 9 5:15 28 37:00 48 24:35 64 1:06:49
42 Samuel Briggs 157 10 5:45 51 36:58 46 24:14 58 1:06:55
43 Douglas Tucker 415 3 6:16 94 35:50 31 24:59 73 1:07:04
44 Isabelle Dickens 142 10 5:54 62 39:12 87 22:05 22 1:07:09
45 Matthew Twinam 162 10 6:26 111 35:27 22 25:20 89 1:07:12
46 Jordan Tuboly 23 4 6:57 159 38:12 66 22:08 24 1:07:16
47 Steve Cummings 332 2 8:23 288 38:41 77 20:18 8 1:07:20
48 Tom Schardt 410 3 4:57 16 36:23 38 26:06 114 1:07:25
49 Kurt Bedore 334 2 6:55 155 35:28 24 25:09 81 1:07:30
50 Chris Fron 25 4 4:58 18 37:36 56 25:05 76 1:07:39
51 Kristen Hislop 325 1 5:39 44 37:33 54 24:41 66 1:07:53
52 James Poole 429 3 4:49 11 38:00 63 25:26 94 1:08:14
53 Tyler Welsh 45 4 8:06 267 39:28 96 20:45 9 1:08:18
54 Michele Kennedy 109 6 6:22 103 39:19 90 22:43 34 1:08:23
55 Ryan Murphy 173 10 6:37 127 37:34 55 24:16 59 1:08:26
56 Christopher Mazura 131 10 6:41 134 37:25 52 24:41 65 1:08:45
57 Lisa Slevin 223 8 5:50 56 36:53 42 26:29 125 1:09:11
58 Hilary Greene 238 8 8:07 269 38:09 64 23:05 42 1:09:20
59 Adam Hagues 331 2 5:26 38 39:21 91 24:34 63 1:09:20
60 Alison Van Dyke 365 9 6:56 158 35:55 32 26:47 131 1:09:37
61 Stephen Rehfuss 389 9 4:39 8 37:47 59 27:14 151 1:09:39
62 Andrew Scott 138 10 6:39 131 37:44 57 25:18 87 1:09:40
63 Allison Moeller 155 10 7:03 174 38:31 72 24:12 57 1:09:45
64 Frank Bender 430 3 6:41 136 37:57 62 25:14 86 1:09:52
65 John Lapalme 366 9 7:47 239 36:57 45 25:11 82 1:09:54
66 Paul Crittenden 351 9 6:06 82 37:50 60 26:11 117 1:10:06
67 Nichole Donzella 127 10 5:19 31 40:21 111 24:27 62 1:10:06
68 Ron Montesi 293 2 5:24 35 38:51 81 25:57 108 1:10:11
69 Jennifer Kendrick 163 10 6:57 161 36:18 37 27:01 141 1:10:15
70 Glenn Sanders 95 6 6:10 90 40:03 106 24:10 56 1:10:23
71 Kimberly Sikule 60 5 7:17 202 39:17 89 24:06 54 1:10:39
72 Christine Honig 270 8 4:46 10 38:25 69 27:43 164 1:10:53
73 Susan Curro 93 6 6:19 98 42:03 158 22:35 32 1:10:57
74 Mike Griffiths 103 6 5:11 24 40:24 114 25:25 92 1:10:59
75 John Felio 198 7 6:37 126 36:34 40 27:50 171 1:10:59
76 John Mounteer 419 3 7:00 166 38:54 82 25:07 77 1:11:00
77 Johanna Ohm 31 4 6:40 133 42:41 172 21:51 18 1:11:11
78 Jamie Masson 243 8 5:58 68 39:09 84 26:20 121 1:11:26
79 James Masula 124 10 5:31 41 39:54 103 26:27 124 1:11:51
80 Heather Schoonmaker 70 5 6:32 117 43:04 182 22:17 26 1:11:51
81 Patrick Sommo 290 2 5:37 43 39:25 94 27:00 140 1:12:01
82 Jennifer Yanazzo 189 8 7:03 173 36:39 41 28:32 192 1:12:13
83 Shannon Sara 20 4 4:00 1 41:14 137 27:06 148 1:12:19
84 Christina Jackson 372 9 6:19 97 39:50 101 26:19 120 1:12:27
85 Dan Dunn 203 7 6:33 119 40:04 109 25:55 107 1:12:32
86 Ian Desacia 164 10 7:06 181 41:12 136 24:16 60 1:12:32
87 Mark Elkovitch 174 10 5:35 42 42:05 159 24:54 69 1:12:34
88 Kent Theobald 354 9 7:17 201 40:22 112 24:57 71 1:12:35
89 Thomas Orcutt 182 7 5:06 23 38:48 80 28:41 199 1:12:35
90 Gregory Baxter 126 10 7:00 165 40:43 124 24:57 70 1:12:38
91 Jonathan Bright 241 7 9:34 343 40:55 128 22:23 27 1:12:50
92 Nathan Graber 61 5 6:35 123 41:20 141 24:58 72 1:12:51
93 Heather Leggieri 217 8 8:29 293 38:42 78 25:43 101 1:12:53
94 Frank Scott 201 7 7:39 230 42:30 169 22:47 36 1:12:55
95 John Paduano 381 9 6:38 129 41:16 138 25:09 80 1:13:02
96 David Dibelius 445 3 6:17 96 38:27 70 28:34 195 1:13:17
97 Philip Bordwell 170 10 7:28 213 39:51 102 26:07 115 1:13:25
98 Marty Curro 315 2 7:17 199 38:12 65 28:01 180 1:13:29
100 Michele McColgan 281 1 6:06 83 38:28 71 28:57 207 1:13:30
99 Christian Engle 288 2 5:49 55 38:33 75 29:09 215 1:13:30
101 Jeff Baker 276 2 5:51 57 40:48 126 26:53 135 1:13:31
102 Timothy Burns 294 2 8:13 276 41:47 152 23:37 46 1:13:36
103 Kirsten Elling 361 9 6:59 164 39:23 92 27:16 152 1:13:37
104 Jennifer Masula 141 10 6:59 163 39:23 93 27:20 154 1:13:41
105 Patrick Pastecki 116 6 7:44 235 40:00 104 26:16 119 1:14:00
106 Philip De Rita 83 5 4:58 17 41:58 156 27:05 147 1:14:00
107 Peter Schmitz-Morfe 21 4 5:04 21 46:11 251 22:47 35 1:14:01
108 David Fraterrigo 185 7 6:40 132 41:44 150 25:38 100 1:14:01
109 Ryan Kramer 66 5 6:06 81 41:23 143 26:42 129 1:14:10
110 John Perry 363 9 7:48 241 38:41 76 27:47 169 1:14:15
111 Alex Gaylord 59 5 7:16 197 39:06 83 27:55 173 1:14:16
112 Scott Adelmann 135 10 6:52 152 38:19 68 29:08 214 1:14:18
113 Wendy Burke 219 8 5:41 46 43:34 191 25:08 78 1:14:21
114 Zoe Edmunds 33 4 6:54 154 40:35 120 26:56 138 1:14:24
115 Douglas Kabat 446 3 6:47 147 40:36 121 27:05 146 1:14:27
116 Domenic Gabriella 39 4 4:43 9 48:25 289 21:22 12 1:14:28
117 Patrick Hard 373 9 6:21 102 39:44 100 28:30 189 1:14:34
118 Hilary Ferrone 313 1 7:40 231 40:56 131 26:00 112 1:14:35
119 David Geracitano 120 6 7:50 247 40:22 113 26:26 123 1:14:37
120 Hannah Barry 209 8 6:53 153 40:55 129 26:56 137 1:14:44
121 Katie Phelps 101 6 4:50 12 44:42 219 25:18 88 1:14:49
122 Lisa Ruud 188 8 7:01 169 37:20 51 30:33 247 1:14:53
123 Todd Lewis 225 7 6:36 125 36:59 47 31:22 267 1:14:55
124 John Bevilacqua 369 9 6:50 151 39:31 97 28:36 197 1:14:56
125 Daniel Fariello 148 10 8:22 287 42:44 173 23:56 51 1:15:01
126 Carolyn Herkenham 28 4 6:35 124 43:44 196 24:46 67 1:15:04
127 J. Patrick Ryan 187 7 4:54 13 42:19 166 28:00 177 1:15:12
128 Kevin Whitehead 312 2 9:21 333 41:06 134 24:47 68 1:15:13
129 Geoff Kent 180 7 7:04 177 39:41 99 28:31 191 1:15:15
130 Larry Lewis 422 3 7:24 209 42:40 170 25:13 85 1:15:17
131 Mark McRoberts 284 2 5:31 40 40:25 116 29:22 223 1:15:18
132 J Follain 132 10 7:05 179 39:28 95 28:46 204 1:15:18
133 Graham Knox 278 2 6:50 150 40:56 130 27:34 159 1:15:19
134 Hillary Buyea 168 10 7:08 183 40:27 117 27:47 170 1:15:22
135 Margaret Phillips 424 3 6:00 74 39:14 88 30:10 235 1:15:23
136 Suzanne Mayer 82 5 6:01 77 40:57 132 28:32 194 1:15:29
137 Wade Coton 275 2 6:42 137 42:13 163 26:38 127 1:15:32
138 Robert Perry 406 3 7:54 252 40:04 108 27:35 160 1:15:33
139 Loriann Kondracki 237 8 7:24 210 42:08 160 26:02 113 1:15:33
140 Meghan Hotaling 262 8 6:31 116 41:25 144 27:43 166 1:15:38
141 Tal Rappleyea 339 2 6:38 128 38:31 73 30:31 244 1:15:40
142 Karen Cusato 291 1 7:58 260 40:46 125 27:00 139 1:15:43
143 Frank Pambianchi 271 7 6:55 157 36:08 36 32:47 296 1:15:49
144 Abigail Atkins 255 8 6:32 118 38:42 79 30:37 251 1:15:49
145 David Desmonie 166 10 6:19 99 40:43 123 28:58 208 1:15:59
146 Anne Battaglia 353 9 6:34 121 41:38 148 27:59 175 1:16:10
147 Derek Lewis 200 7 9:07 323 43:11 185 23:58 52 1:16:15
148 Robert Jones 16 4 6:33 120 42:51 175 26:54 136 1:16:17
149 James McRee 349 9 7:04 176 40:34 119 28:41 200 1:16:18
150 Eileen Hughes 319 1 5:43 49 39:10 85 31:35 270 1:16:26
151 Geoffrey Bizan 78 5 10:15 358 41:03 133 25:13 84 1:16:30
152 Brian Baxter 128 10 7:16 198 44:14 211 25:00 75 1:16:30
153 Daniel Wright 416 3 8:21 286 39:10 86 29:03 211 1:16:33
154 Kevin Maloy 408 3 8:35 302 41:44 151 26:35 126 1:16:53
155 Philip Fraterrigo 263 7 6:08 86 44:50 224 25:59 110 1:16:57
156 Ronald Smith 240 7 8:01 263 43:37 192 25:24 91 1:17:00
157 Kurt Pfaffenbach 236 7 7:22 205 41:41 149 28:01 179 1:17:02
158 Kurt Swan 194 7 6:46 144 40:01 105 30:18 240 1:17:04
159 Scott A Ferguson 390 9 6:26 112 40:27 118 30:22 241 1:17:15
160 Michael Bentley 79 5 7:24 211 41:52 153 28:12 184 1:17:27
161 Mary Chew 368 9 5:39 45 42:13 164 29:36 229 1:17:28
162 Dale Neimeyer 256 7 7:59 261 40:12 110 29:22 224 1:17:33
163 Teresa Warner 327 1 12:22 372 39:36 98 25:37 99 1:17:34
164 Steven Swoap 286 2 5:14 26 42:18 165 30:16 238 1:17:47
165 Jeffrey Andritz 98 6 7:52 250 41:16 139 28:41 198 1:17:49
166 John Price 144 10 6:09 89 45:19 234