"; if (($begin_pos > 0)&&($end_pos > 0)&&($end_pos > $begin_pos)){ $Airport_ID=substr($Airport, ($begin_pos+1), ($end_pos-$begin_pos)-1); //echo "Airport_ID=$Airport_ID
"; $Airport=""; } //echo "Airport=$Airport
"; //echo "Airport_ID=$Airport_ID
"; //echo "State=$State
"; //echo "FAARegion=$FAARegion
"; //echo "From_Date=$From_Date
"; //echo "To_Date=$To_Date
"; //echo "species_id=$species_id
"; /*echo "preg_match( $Airport_ID)=".preg_match('/^[0-9a-zA-Z\*]*$/', $Airport_ID); echo "
preg_match( $FAARegion)=".preg_match('/^[a-zA-Z]*$/', $FAARegion); echo "
preg_match( $State)=".preg_match('/^[a-zA-Z]*$/', $State); echo "
preg_match( $From_Date)=".preg_match('/^[0-9]*$/', $From_Date); echo "
preg_match( $To_Date)=".preg_match('/^[0-9]*$/', $To_Date); echo "
preg_match( $species_id)=".preg_match('/^[0-9a-zA-Z]*$/', $species_id); echo "
preg_match( $operator)=".preg_match('/^[a-zA-Z]*$/', $operator); */ //check for invalid/spam entries //later Airport name is checked against entries in text file if( (! preg_match('/^[0-9a-zA-Z\*]*$/', $Airport_ID)) || (! preg_match('/^[a-zA-Z]*$/', $State)) || (! preg_match('/^[a-zA-Z\&]*$/',$FAARegion)) || (! preg_match('/^[0-9]*$/', $From_Date)) || (! preg_match('/^[0-9]*$/', $To_Date))|| (! preg_match('/^[1a-zA-Z ]*$/',$operator)) || (! preg_match('/^[0-9a-zA-Z]*$/',$species_id))) { die('

Invalid information provided.






'); } if(strlen($To_Date) == 8){ $To_Month=substr($To_Date,4,2); $To_Day=substr($To_Date,6,2); $To_Year=substr($To_Date, 0, 4); } if (strlen($From_Date)==8){ $From_Month=substr($From_Date,4,2); $From_Day=substr($From_Date,6,2); $From_Year=substr($From_Date, 0, 4); } if(isset($Airport) && (strlen($Airport) > 0)) { //Airport name just exactly match an entry from the airport table $fp = fopen("tblAirport.txt", "r"); $error = 1; while (!feof($fp) && (strlen($Airport) > 0)) { $temp = fgets($fp,100); $array = explode("\t", $temp); if($array[0] == "KWLI") { continue; } // Does not display phoney airport KWLI $arpName=trim($array[1]); //print "comparing ${Airport}** with $arpName**".strcmp($Airport, $arpName)."
"; if(strcmp($Airport, $arpName)==0){ $error=0; break; } } fclose($fp); //special case to allow David\'s Airport if (($error)&& !(strcmp($Airport, 'DAVID\\\\\\\'S ARPT')==0)){ die('

Invalid airport information provided.






'); } } function replace_digits($string) { $len = strlen($string); for($i=0; $i < $len; $i++) { if(is_numeric($string[$i])) {$string[$i] = "x"; } } return $string; } $db = prod_connect(); if (!$db) { echo "Error: Could not connect to database. Please try again later."; exit; } //build the query string if ($Airport){ $query="select * from reports where airport='$Airport' "; } else if ($Airport_ID){ $query="select * from reports where airport_id='$Airport_ID'"; } else if ($State){ $query="select * from reports where state='$State'"; } else if ($FAARegion){ if('P' == $FAARegion){ $FAARegion='P&N'; //special case & doesn't work well with URL passing } $query="select * from reports where faaregion='$FAARegion'"; } if($from_date){ $query="$query and incident_date >= $from_date "; } if ($to_date){ $query="$query and incident_date <= $to_date"; } if($operator){ $query="$query and operator ='$operator'"; } if($species_id){ $query="$query and species_id='$species_id'"; $querySpecies="select name from birdlookup where species_id='$species_id'"; $result2=mysql_query($querySpecies); $row=mysql_fetch_array($result2); $Species_Name=stripslashes($row["name"]); //echo "query=$querySpecies result2=$result2 row=$row Species_Name=$Species_Name
"; } if($aircraft){ $query="$query and aircraft='$aircraft'"; } $query="$query order by incident_date desc"; //echo "
Query -$query
"; function fixdate($incident_date) { $temp = substr($incident_date, 4, 2 ) . "/" . substr($incident_date, 6, 2) . "/" . substr($incident_date, 0, 4); return $temp; } ?> $From_Month"; $From_Day = "$From_Day"; $From_Year = "$From_Year";} if($To_Month == "Select") { $To_Month = "Latest"; $To_Day = "Date"; $To_Year = "";} else { $To_Month = "$To_Month"; $To_Day = "$To_Day"; $To_Year = "$To_Year";} $query = StripSlashes($query); $result = mysql_query($query) or die(mysql_error()); $num_returns = mysql_num_rows($result); $nr_damaged = 0; $nr_fatalites = 0; for ($i=0; $i <$num_returns; $i++) { $row = mysql_fetch_array($result); $damage = stripslashes($row["damage"]); if($damage == "S" || $damage == "D" || $damage == "A" || $damage == "B" || $damage == "C") { $nr_damaged += 1; //echo "damage=$damage nr_damaged=$nr_damaged
"; } $fatalities = stripslashes($row["nr_fatalities"]); if($fatalities > 0) { $nr_fatalities += $fatalities; } } $len=strlen($nr_damaged); if(!is_numeric($nr_damaged)) { $nr_damaged = 0; } if(!is_numeric($nr_fatalities)) { $nr_fatalities = 0; } $temp1 = $nr_damaged; $nr_damaged = number_format($nr_damaged); $nr_fatalities = number_format($nr_fatalities); $result = mysql_query($query) or die(mysql_error()); //get back to top of results list; $num_returns = mysql_num_rows($result); mysql_close($db); ?>  

Search FAA Wildlife Strike Database

"; echo "

Selected Search Criteria:
From: $From_Month-$From_Day-$From_Year   To: $To_Month-$To_Day-$To_Year"; if($Airport) { echo "
Airport: $Airport  "; } if($operator){ echo "Operator: $operator   "; } if($Aircraft){ echo "Aircraft Manufacturer: $Aircraft"; } if($Airport_ID ) { echo "
Airport ID: $Airport_ID  "; } /* if ($Aircraft){ // echo "Aircraft Manufacturer: $Aircraft"; } if(strlen($Airport_ID) == 7) { echo "
Airport: $Airport  "; } if ($Operator){ echo "Operator: $Operator   "; } if($Aircraft){ echo "Aircraft Manufacturer: $Aircraft";; } */ if($State){ echo "
State: $State"; } if($FAARegion){ echo "FAA Region: $FAARegion"; } if($species_id){ echo "
Species: $Species_Name"; } if($Descr){ echo "
Word/Phrase in Remarks: $Descr"; } /*echo "

Hits Ordered By: $Order Ordering: $Ordering"; */ $num_results = mysql_num_rows($result); $returns = $num_results; if ($returns > $Hits && $Hits != "All") { $returns--; } echo "

Number of Strike Reports Found: $num_returns"; echo "

Number of Strikes with Substantial Damage(Codes S, D, A, B or C)*: $nr_damaged"; ?>

" . stripslashes($row["incident_date"] . ""); $incident_date_link = " " . $incident_date . " "; $airport = stripslashes($row["airport"]); if ($airport == "") { $airport = "(NONE PROVIDED)" ; } else { $airport = stripslashes($row["airport"]) . " (" . stripslashes($row["airport_id"]) . ")"; } $state = stripslashes($row["state"]); if ($state == "") { $state = " " ; } $faaregion = stripslashes($row["faaregion"]); if ($faaregion == "") { $faaregion = " " ; } $operator = stripslashes($row["operator"]); if ($operator == "") { $operator = "(NONE)" ; } $atype = stripslashes($row["atype"]); if ($atype == "") { $atype = "(NONE)"; } $damage = stripslashes($row["damage"]); if ($damage == "") { $damage = " "; } $species = strtoupper(stripslashes($row["species"])); if ($species == "") { $species = "(NONE)"; } $indicated_damage = $row["indicated_damage"]; if($indicated_damage == "Yes") { echo ""; } else { echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $species = str_replace(",", ", ", $species); echo ""; if($num_results !=0) { $data = $row["find_nr"] . "\t"; $data = $data . $row["opid"] . "\t"; $data = $data . $row["operator"] . "\t"; $data = $data . $row["atype"] . "\t"; $data = $data . $row["ama"] . "\t"; $data = $data . $row["amo"] . "\t"; $data = $data . $row["ema"] . "\t"; $data = $data . $row["emo"] . "\t"; $data = $data . $row["reg"] . "\t"; $data = $data . $row["flt"] . "\t"; $data = $data . $row["remains_collected"] . "\t"; $data = $data . $row["remains_sent"] . "\t"; // $data = $data . $row["incident_date"] . "\t"; $data = $data . $incident_date1 . "\t"; $data = $data . $row["time_of_day"] . "\t"; $data = $data . $row["time"] . "\t"; $data = $data . $row["airport_id"] . "\t"; $data = $data . $row["airport"] . "\t"; $data = $data . $row["state"] . "\t"; $data = $data . $row["faaregion"] . "\t"; $data = $data . $row["enroute"] . "\t"; $runway = str_replace("/", "\\", $row["runway"]); // rw/rw is read by EXCEL as a date $data = $data . $runway. "\t"; $data = $data . $row["location"] . "\t"; $data = $data . $row["height"] . "\t"; $data = $data . $row["speed"] . "\t"; $data = $data . $row["phase_of_flight"] . "\t"; $data = $data . $row["damage"] . "\t"; $data = $data . $row["str_rad"] . "\t"; $data = $data . $row["dam_rad"] . "\t"; $data = $data . $row["str_windshld"] . "\t"; $data = $data . $row["dam_windshld"] . "\t"; $data = $data . $row["str_nose"] . "\t"; $data = $data . $row["dam_nose"] . "\t"; $data = $data . $row["str_eng1"] . "\t"; $data = $data . $row["dam_eng1"] . "\t"; $data = $data . $row["str_eng2"] . "\t"; $data = $data . $row["dam_eng2"] . "\t"; $data = $data . $row["str_eng3"] . "\t"; $data = $data . $row["dam_eng3"] . "\t"; $data = $data . $row["str_eng4"] . "\t"; $data = $data . $row["dam_eng4"] . "\t"; $data = $data . $row["ingested"] . "\t"; $data = $data . $row["str_prop"] . "\t"; $data = $data . $row["dam_prop"] . "\t"; $data = $data . $row["str_wing_rot"] . "\t"; $data = $data . $row["dam_wing_rot"] . "\t"; $data = $data . $row["str_fuse"] . "\t"; $data = $data . $row["dam_fuse"] . "\t"; $data = $data . $row["str_lg"] . "\t"; $data = $data . $row["dam_lg"] . "\t"; $data = $data . $row["str_tail"] . "\t"; $data = $data . $row["dam_tail"] . "\t"; $data = $data . $row["str_lghts"] . "\t"; $data = $data . $row["dam_lghts"] . "\t"; $data = $data . $row["str_other"] . "\t"; $data = $data . $row["dam_other"] . "\t"; $data = $data . $row["other_specify"] . "\t"; $data = $data . $row["effect"] . "\t"; $data = $data . $row["effect_other"] . "\t"; $data = $data . $row["sky"] . "\t"; $data = $data . $row["precip"] . "\t"; $temp = substr($row["species_id"],0,1); // acccomodate numeric of 1st letter if($temp == 1 || $temp == 2) { $apos = "'";} else { $apos = ""; } $data = $data . $apos . $row["species_id"] . "\t"; $data = $data . $row["species"] . "\t"; $temp = $row["birds_seen"]; if($temp != "") { $temp = str_replace("-", " to ", $temp); } $data = $data . $temp . "\t"; $temp = $row["birds_struck"]; if($temp != "") { $temp = str_replace("-", " to ", $temp); } $data = $data . $temp . "\t"; $data = $data . $row["size"] . "\t"; $data = $data . $row["warned"] . "\t"; $temp = $row["comments"]; $temp = replace_digits($temp); $data = $data . $temp . "\t"; $temp = $row["descr"]; // $temp = replace_digits($temp); $data = $data . $temp . "\t"; $data = $data . $row["aos"] . "\t"; $data = $data . $row["cost_repairs"] . "\t"; $data = $data . $row["cost_other"] . "\t"; $nr_injuries = $row["nr_injuries"]; if($nr_injuries == 0) { $nr_injuries = ""; } $data = $data . $nr_injuries . "\t"; // $data = $data . $row["nr_injuries"] . "\t"; $nr_fatalities = $row["nr_fatalities"]; if($nr_fatalities == 0) { $nr_fatalities = ""; } $data = $data . $nr_fatalities . "\t"; // $data = $data . $row["nr_fatalities"] . "\t"; $data = $data . $row["reported_name"] . "\t"; $data = $data . $row["reported_title"] . "\t"; $indate = $row["reported_date"]; if($indate == 0) { $indate = ""; } else { $indate = fixdate($indate); } $data = $data . $indate . "\t"; // $data = $data . $row["reported_date"] . "\t"; $data = $data . $row["source"] . "\t"; $data = $data . $row["person"] . "\t"; $indate = $row["lupdate"]; if($indate == 0) { $indate = ""; } else { $indate = fixdate($indate); } $data = $data . $indate . "\t"; // $data = $data . $row["lupdate"] . "\t"; fwrite($fp, $data . "\n"); } } if($num_results !=0) { $From_Month = trim(StripSlashes($HTTP_POST_VARS["From_Month"])); $From_Day = trim(StripSlashes($HTTP_POST_VARS["From_Day"])); $From_Year = trim(StripSlashes($HTTP_POST_VARS["From_Year"])); $To_Month = trim(StripSlashes($HTTP_POST_VARS["To_Month"])); $To_Day = trim(StripSlashes($HTTP_POST_VARS["To_Day"])); $To_Year = trim(StripSlashes($HTTP_POST_VARS["To_Year"])); if($From_Month == "Select") { $From_Month = "Earliest"; $From_Day = "Date"; $From_Year = "";} if($To_Month == "Select") { $To_Month = "Latest"; $To_Day = "Date"; $To_Year = "";} /* $Airport = StripSlashes($HTTP_POST_VARS["Airport"]); if($Airport == "Select") { $Airport = "All"; } */ $Airport = StripSlashes($HTTP_POST_VARS["Airport"]); $temp = explode("::", $Airport); $Airport= $temp[0]; if($Airport == "Select") { $Airport = "All"; } $State = StripSlashes($HTTP_POST_VARS["State"]); if($State == "Select") { $State = "All"; } $FAARegion = StripSlashes($HTTP_POST_VARS["FAARegion"]); if($FAARegion == "Select") { $FAARegion = "All"; } $Airport_ID = StripSlashes($HTTP_POST_VARS["Airport_ID"]); if($Airport_ID == "Select") { $Airport_ID = "All"; } $Operator = StripSlashes($HTTP_POST_VARS["Operator"]); if($Operator == "Select") { $Operator = "All"; } // $Operator = strtolower($Operator); // $Operator = ucwords($Operator); $Aircraft = StripSlashes($HTTP_POST_VARS["Aircraft"]); if($Aircraft == "Select") { $Aircraft = "All"; } $Species_Name = StripSlashes($HTTP_POST_VARS["Species_Name"]); if($Species_Name == "Select") { $Species_Name = "All"; } // $Species_Name = strtolower($Species_Name); // $Species_Name = ucwords($Species_Name); $Descr = StripSlashes($HTTP_POST_VARS["Descr"]); if($Descr == "") { $Descr = "None"; } $From_Month = strtolower($From_Month); $From_Month = ucwords($From_Month); $To_Month = strtolower($To_Month); $To_Month = ucwords($To_Month); } if($num_results == 0) { echo ""; } ?>
Click Incident Date to View Individual Strike Report (Bolded Date Indicates Reported Damage on Form 5200-7)"; } ?>
Incident Date
Airport
State
FAA
Region
Operator
Aircraft
Damage
Code*
Species**
" . $incident_date_link . "
" . $incident_date_link . "
 " . $airport . "
" . $state . "
" . $faaregion . "
 " . $operator . "
" . $atype . "
" . $damage . "
 " . $species . "
No Reports Found.
 
* Damage Codes (Civilian) - N (None), M (Minor), M? (Damage, but extent unknown), S (Substantial) and D (Destroyed).
  Damage Codes (Military) - Class A (≥ $2,000,000), Class B (≥ $500,000 and < $2,000,000), Class C (≥$50,000 and < $500,000),   Class D (≥ $20,000 and < $50,000), Class E (< $20,000).

See Memorandum of Agreement (Glossary) for exact definitions of damage codes."; echo "

** Species - For additional information on various bird species, please see $survey_desc"; echo ""; echo "

Download Data File which contains all of the above Strike Reports suitable for importing into EXCEL (or other spreadsheet program). File format is tab-delimited with field names being the first record.
";} ?>

 

Return To
Search FAA Wildlife Strike Database