<?php if ($_GET['id'] == "") { header('Location: /'); } require 'require/class.Connection.php'; require 'require/class.Spotter.php'; require 'require/class.SpotterArchive.php'; $Spotter = new Spotter(); $SpotterArchive = new SpotterArchive(); $spotter_array = $Spotter->getSpotterDataByID($_GET['id']); if (!empty($spotter_array)) { if (isset($spotter_array[0]['flightaware_id'])) { $flightaware_id = $spotter_array[0]['flightaware_id']; } if (isset($spotter_array[0]['latitude'])) { $latitude = $spotter_array[0]['latitude']; } if (isset($spotter_array[0]['longitude'])) { $longitude = $spotter_array[0]['longitude']; } $title = ''; if (isset($spotter_array[0]['ident'])) { $title .= $spotter_array[0]['ident']; } if (isset($spotter_array[0]['airline_name'])) { $title .= ' - ' . $spotter_array[0]['airline_name']; } if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { $title .= ' - ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ')'; }
<?php if ($_GET['id'] == "") { header('Location: /'); } require 'require/class.Connection.php'; require 'require/class.Spotter.php'; require 'require/class.SpotterArchive.php'; $spotter_array = Spotter::getSpotterDataByID($_GET['id']); if (!empty($spotter_array)) { if (isset($spotter_array[0]['flightaware_id'])) { $flightaware_id = $spotter_array[0]['flightaware_id']; } if (isset($spotter_array[0]['latitude'])) { $latitude = $spotter_array[0]['latitude']; } if (isset($spotter_array[0]['longitude'])) { $longitude = $spotter_array[0]['longitude']; } $title = ''; if (isset($spotter_array[0]['ident'])) { $title .= $spotter_array[0]['ident']; } if (isset($spotter_array[0]['airline_name'])) { $title .= ' - ' . $spotter_array[0]['airline_name']; } if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { $title .= ' - ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ')'; } if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') { $title .= ' - ' . $spotter_array[0]['registration'];