|
|
![]() |
Search
| Find
Your Nearest YMCA | CDYMCA
Special Events | About CDYMCA |
|
| <%
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 %>
|
Age Group Order - Female/Male Results 2007**All Females followed by all Males
FEMALE AGE GROUP: 10 - 14 1 Julia Slyer 10 1:33:39
2 Shannen Browne 14 1:47:28
3 Marisa Piccirillo 11 1:50:12
1 Johanna Ohm 15 1:11:39
2 Allison Sylvetsky 19 1:15:03
3 Zoe Edmunds 15 1:15:28
4 Rosara Milstein 19 1:17:28
5 Erica Lepkowski 18 1:18:03
6 Laura Doak 17 1:27:43
7 Elle Van Cott 16 1:29:59
8 Annie Herkenham 16 1:35:46
9 Tara Green 19 1:35:48
1 Valerie Polletta 24 1:15:41
2 Liz Szewczak 21 1:18:14
3 Emily Carroll 21 1:19:09
4 Eileen Dunn 24 1:20:08
5 Crystal Piper 23 1:20:57
6 Karen Martin 24 1:21:07
7 Casey Atkins 24 1:22:17
8 Nicole Gordon 22 1:23:15
9 Elizabeth Beals 24 1:25:08
10 Meghan Ochal 23 1:26:34
11 Rebecca Kruger 23 1:30:36
12 Liz Elliott 24 1:31:18
1 Emily Kindlon 25 1:03:38
2 Sabrina Krouse 26 1:06:22
3 Kristen Kelley 28 1:11:48
4 Christine Jenkins 26 1:12:38
5 Melinda Person 29 1:13:21
6 Tara McCarthy 25 1:13:42
7 Samantha Karle 27 1:13:53
8 Shauna Hull 25 1:14:28
9 Elizabeth Brown 29 1:14:46
10 Nikki O'Meara 28 1:14:55
11 Colleen Grossner 28 1:15:19
12 Sara Laux 27 1:15:21
13 Stacey Brown 27 1:15:22
14 Jessica Mitchell 28 1:15:25
15 Judith Wines 29 1:15:32
16 Caitlin Foley 26 1:16:02
17 Melissa Richards 26 1:16:24
18 Katie Petersen 26 1:17:39
19 Andreya Krieves 25 1:21:31
20 Sara Rudy 28 1:21:51
21 Brandee Plante 29 1:21:56
22 Marla Bureau 29 1:22:41
23 Adrienne Monzet 27 1:25:34
24 Kelly McHale 27 1:28:42
25 Kelly Davey 28 1:36:47
26 Katherine Berry 25 1:46:33
27 Wendy Patterson 26 1:47:57
1 Kirsten McCay-Smith 33 1:01:30
2 Jennifer Yanazzo 33 1:11:19
3 Cheryl Clark 34 1:11:53
4 Kelly Tynan 33 1:14:15
5 Samara Anderson 32 1:16:03
6 Brenna Doty 31 1:16:54
7 Kristen Labatt-Simon 33 1:16:57
8 Hillary Buyea 32 1:17:28
9 Colleen Lougen 30 1:21:04
10 Melissa Stankovich 30 1:21:51
11 Jodi Plante 32 1:26:26
12 Alison Conaway 31 1:26:53
13 Cynthia Burton 34 1:29:25
14 Mari McAulliffe 30 1:31:39
15 Sarah Iacobacci 34 1:33:17
16 Andrea Tobin 32 1:37:50
17 Michelle Bourque 32 1:42:04
18 Laura Sweet 34 1:44:31
19 Katherine Schofield 30 1:48:43
1 Alison Heaphy 39 1:02:46
2 Bridget Sherratt 36 1:04:39
3 Mara O'Neill 39 1:05:13
4 Kim Seabury 39 1:06:39
5 Julie Burke 38 1:07:36
6 Christine Honig 37 1:08:38
7 Meghan Hotaling 37 1:13:00
8 Maryann Reilly-Johns 38 1:13:38
9 Jennifer Stahl 37 1:16:08
10 Tammie Jones 37 1:16:22
11 Silvia Marpicati 38 1:17:30
12 Cheryl Fowler 39 1:17:35
13 Elisabeth Tischler 35 1:18:56
14 Abigail Atkins 37 1:19:01
15 Kim Scott 37 1:19:13
16 Deana Endieveri 36 1:19:35
17 Kathy Slyer 36 1:21:57
18 Marie Krohn 39 1:23:48
19 Tara Krinksy 37 1:23:50
20 Jennifer Logan 39 1:24:08
21 Michele McColgan 38 1:24:14
22 Chris Malone 39 1:24:28
23 Jacqueline Slavik 39 1:25:01
24 Rebecca Martell 36 1:25:23
25 Cynthia Gerdes 36 1:27:22
26 Margaret Jones 35 1:27:24
27 Wendy Burke 35 1:27:58
28 Jennifer Amstutz 38 1:28:32
29 Lori Staples 38 1:32:26
30 Janice Slavik 37 1:32:37
31 Kristin Williams 38 1:33:35
32 Heidi Gray 35 1:35:46
33 Melinda Whisenhunt 39 1:36:27
34 Jeanna Cornetti 38 1:38:10
35 Jackie Weisberger 37 1:39:23
36 Nadya Lawson 38 1:42:11
37 Bridget Simpson 38 1:45:50
38 Kalyn Fleck 36 1:46:24
39 Nancy Logel 36 1:55:13
1 Mary Kogelmann 40 1:04:36
2 Tracey Delaney 41 1:06:14
3 Alison Van Dyke 44 1:09:57
4 Heather Field 43 1:15:14
5 Teresa Warner 41 1:16:09
6 Andrea Ambs 42 1:18:02
7 Mary Chew 44 1:19:35
8 Dodie Davidson 42 1:21:08
9 Marsha Ball 40 1:21:47
10 Diane Litynski 44 1:22:07
11 Eileen Gower 40 1:27:21
12 Kim Campbell 40 1:30:44
13 Elizabeth Pratico 42 1:31:58
14 Jill Burwell 42 1:33:59
15 Kelly McIntyre 44 1:59:19
1 Janie Cregan 46 1:08:34
2 Sandy Mancuso-Lopez 48 1:12:29
3 Jane Klein 47 1:14:40
4 Susan Hoffman 49 1:18:08
5 Kathryn Perry 46 1:19:19
6 Christina Jackso 45 1:21:10
7 Claire Nolan 49 1:21:16
8 Terry Troha 45 1:21:21
9 Dorothy Baum 47 1:28:39
10 Barbara O'Donnell 49 1:32:10
11 Lois Green 47 1:38:49
12 Maureen Guthrie 47 1:39:47
13 Mary Jane Zanelli 45 2:14:20
1 Margaret Phillips 53 1:17:49
2 Elizabeth Carroll-Jo 51 1:22:02
3 Donna Lustenhouwer 52 1:25:39
4 Sue Colgan-Borror 52 1:27:06
5 Pam Hibbs 51 1:27:28
6 Janice Verrastro 51 1:30:25
7 Lynne Jackson 52 2:02:01
1 Linda Peavy 55 1:22:09
2 Marge Rajczewski 65 1:22:39
3 Natalie Drahzal 55 1:34:41
4 Joanne Skerritt 60 1:44:11
5 Martha Zibro 62 1:53:59
6 Peggy Ostrander 69 2:06:31
MALE AGE GROUP: 10 - 14 1 Stephen Maxwell 14 1:25:36
2 Kevin Maxwell 14 1:26:03
1 Greg Fullman 18 1:00:32
2 Tim Durkin 19 1:02:28
3 Mackenzie Oglesby 15 1:05:15
4 Pat Grasso 16 1:06:06
5 Andrew Gorczyca 19 1:06:53
6 Giancarlo Vissat 15 1:09:59
7 David Sikule 15 1:11:33
8 Kyle Roche 15 1:12:27
9 Hugh Kelley 15 1:15:52
10 Michael Zeitler 16 1:18:19
11 Mark Gorczyca 17 1:19:59
12 Dave Herkenham 18 1:30:05
13 Jeff Arnold 19 2:08:08
1 Michael Foley 21 59:40
2 Miles Killar 21 1:07:14
3 Daniel Valente 22 1:10:57
4 Christopher Zeitler 20 1:13:30
5 Zachary Kelly 20 1:18:13
6 Tyler Silvestro 22 1:22:06
7 Theodore Gialanella 23 1:24:51
8 Matthew Thorne 24 1:26:39
9 Eddie Ayala 23 1:30:44
10 Matthew Boyd 22 1:42:41
1 Paul Gaffuri 26 54:25
2 Topher Robinson 29 59:36
3 Andrew Rizzi 25 1:01:50
4 Brent Watson 25 1:02:32
5 Jason Santarcangelo 29 1:03:24
6 Joseph Sullivan 27 1:04:17
7 Michael Goodman 29 1:05:23
8 Matt Barendse 29 1:06:59
9 Josh Matot 26 1:07:19
10 Dale Owen 26 1:09:21
11 Thomas Sheraw 29 1:10:02
12 Henry Atkins 27 1:11:20
13 Jonathan Moeller 28 1:11:41
14 Christopher Evans 26 1:12:15
15 John Houghton 27 1:12:53
16 Jeff Damour 25 1:13:31
17 Kean Bouplon 29 1:14:30
18 Dan Laux 28 1:15:04
19 Scott Adelmann 28 1:15:51
20 Michael Krieves 26 1:17:22
21 Jason Hall 25 1:17:30
22 Brian Baxter 28 1:17:52
23 Aaron Bubb 26 1:18:47
24 John Brayer 26 1:20:11
25 Steve Wolfort 29 1:21:48
26 Paul Gordon 29 1:21:53
27 David Geracitano 27 1:22:26
28 Robert Murray 28 1:23:26
29 Troy Becker 25 1:25:50
30 Troy Becker 25 1:25:57
31 Jamie Silvestro 26 1:30:40
32 George Janda Iii 27 1:34:31
33 Gabriel Leo 26 1:35:31
1 Robert Irwin 33 58:37
2 David Fiore 30 59:27
3 Robert Etien 32 1:02:33
4 Philip Sherratt 32 1:04:09
5 Marcus Ritter 31 1:05:35
6 Daniel Rausch 34 1:06:56
7 Nikos Bentenitis 34 1:07:48
8 Bob Yates 31 1:08:04
9 Alexander Workman 30 1:08:35
10 Keith Murray 32 1:09:07
11 Kyle Johnson 32 1:09:43
12 David Martin 32 1:11:38
13 Kevin Borden 34 1:11:43
14 John McManus 34 1:12:17
15 Daniel Dunn 34 1:13:54
16 Frank Scott 34 1:14:50
17 Keith Buff 30 1:17:29
18 Samuel Briggs 30 1:17:44
19 Jeremy Hanson 33 1:18:27
20 Ralph Mangino Jr 33 1:18:48
21 Drew Spitzer 32 1:19:23
22 Chris Bowcutt 30 1:19:33
23 Michael Grossner 31 1:21:27
24 Chuck Tobin 32 1:22:23
25 Joe McAulliffe 33 1:22:59
26 David Gilson 31 1:24:27
27 David Desmonie 32 1:24:44
28 Kurt Swan 34 1:33:17
29 Andrew Whitney 34 1:41:15
1 Joseph Skufca 39 58:08
2 Steve Seabury 37 58:28
3 Craig Tynan 36 58:37
4 Scott Schaffer 39 1:02:46
5 Matthew Lindemann 37 1:02:47
6 Russell Lydon 38 1:03:08
7 Todd Mesick 39 1:05:16
8 Rand Harper 38 1:06:04
9 Dennis Ball 38 1:06:30
10 Edward Hampston 38 1:08:09
11 Bob Frank 39 1:08:27
12 Brent Petrencsik 36 1:08:31
13 Adam Hagues 36 1:09:45
14 Chris Greklek 38 1:10:32
15 Robert Gray 36 1:10:59
16 Todd McKee 37 1:11:37
17 Michael Panetta 37 1:11:58
18 Joseph Yanazzo 37 1:12:11
19 Brett Fialkoff 39 1:12:57
20 Jon Mapstone 38 1:13:42
21 Jeff Deweese 39 1:14:13
22 Stephen Werthner 37 1:14:14
23 Joe Desmonie 35 1:14:29
24 Pat Sommo 38 1:14:55
25 Dan Behuniak 38 1:17:11
26 Matthew Landy 39 1:18:13
27 Steven Swoap 38 1:18:16
28 Denis Boyce 35 1:19:02
29 Todd Lewis 35 1:19:30
30 Jeffrey Hogan 37 1:19:31
31 Todd Rowe 38 1:19:32
32 Christopher Bowers 37 1:19:47
33 Joel Rosenberg 38 1:21:28
34 Timothy Burns 39 1:22:01
35 Andrew Fleck 36 1:23:13
36 Marcelo Del Puerto 38 1:23:28
37 Thomas Buckley 36 1:24:03
38 George Penn 37 1:24:09
39 Salvatore Santaniell 35 1:26:27
40 Michael Stahl 37 1:26:31
41 Michael Kassal 35 1:26:52
42 Tom Piraino 39 1:28:03
43 Bill Harlow 38 1:39:31
44 Joe Cavazos 35 1:42:59
45 Marc Bourque 35 1:45:10
46 Robert Sneeden 36 1:55:56
47 Bradley Sherman 38 2:01:09
1 David Hettrich 41 58:41
2 Arthur Boyko 40 59:16
3 George Zibell 42 1:00:56
4 Jim Hollister 40 1:05:13
5 Steve Nash 41 1:05:45
6 George Burke 40 1:05:47
7 Tim Spillane 42 1:06:08
8 Giovanni Possumato 42 1:06:28
9 Kurt Bedore 41 1:07:31
10 Philip Tyler, Jr 40 1:08:56
11 Martin Curro 40 1:10:14
12 John Spence 42 1:11:04
13 Richard Stufflebeam 41 1:11:17
14 Kevin Creagan 41 1:12:24
15 Robert Piccirillo 41 1:13:59
16 Daniel Sepello 41 1:16:01
17 Michael Collins 42 1:16:48
18 Jeff Ogle 43 1:17:22
19 John Perry 44 1:18:00
20 Raul Haro 42 1:19:40
21 James Sepello 43 1:19:48
22 Brian Mulvey 42 1:20:29
23 Dennis Milkiewicz 43 1:21:28
24 Michael Kenneally 40 1:24:00
25 Paul Hagan 44 1:24:12
26 Dan Liebert 44 1:27:25
27 M. Daniel Bach 44 1:28:10
28 Gilford Martino 44 1:28:14
29 E.j. Seney 40 1:33:22
30 Tom Cook 41 1:38:22
31 Kevin Browne 42 1:38:27
32 Lucky Palmer 42 1:42:16
1 Dale Rothenberger 49 1:01:42
2 Bob Connelly 46 1:02:49
3 Thomas Dame 46 1:03:32
4 Chris Busch 45 1:07:42
5 Bill Kuchinski 48 1:08:42
6 Doug Wagner 47 1:11:46
7 Kevin King 47 1:11:56
8 Rich Seefeldt 46 1:12:29
9 Pablo Pomykala 46 1:14:38
10 Mark Wojcik 45 1:18:15
11 Joe Cook 46 1:19:10
12 James O'Shea 47 1:19:34
13 Robert Kelley 46 1:20:13
14 John Sheehy 48 1:22:50
15 Joe Herkenham 48 1:23:17
16 Michael Goldstoff 45 1:24:31
17 David Galdun 46 1:27:55
18 Tom Delamater 45 1:33:24
19 Gary Keegan 48 1:34:01
20 Richard Whitebread 47 1:38:15
21 Fran Healy 45 1:39:12
1 Thomas Gorczyca 50 1:04:42
2 Tom Schardt 50 1:07:10
3 Dan Bernstein 52 1:09:22
4 Douglas Tucker 51 1:09:24
5 John Mounteer 52 1:09:40
6 Francis Endryck 53 1:10:57
7 William Haggett 54 1:14:43
8 Steve Mastaitis 52 1:19:11
9 Donald Savino 50 1:28:58
1 James Poole 55 1:10:18
2 Frank Bender 55 1:11:04
3 David Dibelius 59 1:15:43
4 Ageo Frizzera 56 1:16:13
5 Steven Keller 56 1:16:54
6 Martin Helmer 66 1:18:46
7 Douglas Kabat 60 1:20:55
8 Fred Zeitler 62 1:25:19
9 William Kelly 56 1:27:38
10 James Rudge 55 1:29:20
11 Richard Golden 71 1:29:27
12 Al Browne 76 1:42:07
13 Richard Pinder 63 1:42:53
14 Ron Schubin 57 1:43:36
Back to Results |
|
|