| @@ 11-18 (lines=8) @@ | ||
| 8 | $SpotterArchive = new SpotterArchive(); |
|
| 9 | ||
| 10 | $from_archive = false; |
|
| 11 | if (isset($_GET['ident'])) { |
|
| 12 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 13 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
|
| 14 | if (empty($spotter_array)) { |
|
| 15 | $from_archive = true; |
|
| 16 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataByIdent($ident); |
|
| 17 | } |
|
| 18 | } |
|
| 19 | if (isset($_GET['flightaware_id'])) { |
|
| 20 | $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 21 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
|
| @@ 19-26 (lines=8) @@ | ||
| 16 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataByIdent($ident); |
|
| 17 | } |
|
| 18 | } |
|
| 19 | if (isset($_GET['flightaware_id'])) { |
|
| 20 | $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 21 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
|
| 22 | if (empty($spotter_array)) { |
|
| 23 | $from_archive = true; |
|
| 24 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ?> |
|
| 28 | <div class="alldetails"> |
|
| 29 | <button type="button" class="close">×</button> |
|
| @@ 36-45 (lines=10) @@ | ||
| 33 | print '>'._("Military").'</option></select>'; |
|
| 34 | print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>'; |
|
| 35 | ||
| 36 | if (isset($_POST['airline_type'])) |
|
| 37 | { |
|
| 38 | $airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING); |
|
| 39 | $airline_names = $Spotter->getAllAirlineNames($airline_type); |
|
| 40 | } else { |
|
| 41 | $Stats = new Stats(); |
|
| 42 | //$airline_names = $Spotter->getAllAirlineNames(); |
|
| 43 | $airline_names = $Stats->getAllAirlineNames(); |
|
| 44 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 45 | } |
|
| 46 | $previous = null; |
|
| 47 | print '<div class="alphabet-legend">'; |
|
| 48 | foreach($airline_names as $value) |
|
| @@ 49-57 (lines=9) @@ | ||
| 46 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataByIdent($ident); |
|
| 47 | } |
|
| 48 | $allhistory = true; |
|
| 49 | } elseif (isset($_GET['flightaware_id'])) { |
|
| 50 | $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 51 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
|
| 52 | if (empty($spotter_array)) { |
|
| 53 | $from_archive = true; |
|
| 54 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
|
| 55 | } |
|
| 56 | $allhistory = true; |
|
| 57 | } elseif (isset($_GET['coord']) && (!isset($globalMapPopup) || $globalMapPopup || (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true'))) { |
|
| 58 | //if (isset($_GET['coord'])) { |
|
| 59 | $coord = explode(',',$_GET['coord']); |
|
| 60 | $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord,$filter); |
|