@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | |
| 13 | 13 | if (isset($_GET['sort'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Departure Airports from %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports from %s"), $country); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="select-item">'; |
| 24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 26 | 26 | print '<option></option>'; |
| 27 | 27 | $all_countries = $Spotter->getAllCountries(); |
| 28 | - foreach($all_countries as $all_country) |
|
| 28 | + foreach ($all_countries as $all_country) |
|
| 29 | 29 | { |
| 30 | - if($country == $all_country['country']) |
|
| 30 | + if ($country == $all_country['country']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 33 | 33 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($_GET['country'] != "NA") |
| 42 | 42 | { |
| 43 | 43 | print '<div class="info column">'; |
| 44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 45 | 45 | print '</div>'; |
| 46 | 46 | } else { |
| 47 | 47 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('country-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
| 54 | 54 | |
| 55 | 55 | $airport_airport_array = $Spotter->countAllDepartureAirportsByCountry($country); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 67 | 67 | |
| 68 | 68 | $airport_data = ''; |
| 69 | - foreach($airport_airport_array as $airport_item) |
|
| 69 | + foreach ($airport_airport_array as $airport_item) |
|
| 70 | 70 | { |
| 71 | 71 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 72 | 72 | $name = str_replace("'", "", $name); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | print '</thead>'; |
| 105 | 105 | print '<tbody>'; |
| 106 | 106 | $i = 1; |
| 107 | - foreach($airport_airport_array as $airport_item) |
|
| 107 | + foreach ($airport_airport_array as $airport_item) |
|
| 108 | 108 | { |
| 109 | 109 | print '<tr>'; |
| 110 | 110 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -11,10 +11,10 @@ discard block |
||
| 11 | 11 | $Common = new Common(); |
| 12 | 12 | |
| 13 | 13 | if (isset($_GET['download'])) { |
| 14 | - if ($_GET['download'] == "true") |
|
| 15 | - { |
|
| 14 | + if ($_GET['download'] == "true") |
|
| 15 | + { |
|
| 16 | 16 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
| 17 | - } |
|
| 17 | + } |
|
| 18 | 18 | } |
| 19 | 19 | header('Content-Type: text/javascript'); |
| 20 | 20 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | //waypoint plotting |
| 116 | - /* |
|
| 116 | + /* |
|
| 117 | 117 | $output .= '{'; |
| 118 | 118 | $output .= '"type": "Feature",'; |
| 119 | 119 | $output .= '"properties": {'; |
@@ -343,29 +343,29 @@ discard block |
||
| 343 | 343 | if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) |
| 344 | 344 | || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))) |
| 345 | 345 | || (isset($history) && $history == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
| 346 | - if ($from_archive) { |
|
| 347 | - $spotter_history_array = $SpotterArchive->getAllArchiveSpotterDataById($spotter_item['flightaware_id']); |
|
| 348 | - } else { |
|
| 349 | - $spotter_history_array = $SpotterLive->getAllLiveSpotterDataById($spotter_item['flightaware_id']); |
|
| 350 | - } |
|
| 351 | - $d = false; |
|
| 346 | + if ($from_archive) { |
|
| 347 | + $spotter_history_array = $SpotterArchive->getAllArchiveSpotterDataById($spotter_item['flightaware_id']); |
|
| 348 | + } else { |
|
| 349 | + $spotter_history_array = $SpotterLive->getAllLiveSpotterDataById($spotter_item['flightaware_id']); |
|
| 350 | + } |
|
| 351 | + $d = false; |
|
| 352 | 352 | foreach ($spotter_history_array as $key => $spotter_history) |
| 353 | 353 | { |
| 354 | - /* |
|
| 354 | + /* |
|
| 355 | 355 | if (abs($spotter_history['longitude']-$spotter_item['longitude']) > 200 || $d==true) { |
| 356 | 356 | if ($d == false) $d = true; |
| 357 | 357 | } else { |
| 358 | 358 | */ |
| 359 | 359 | $alt = round($spotter_history['altitude']/10)*10; |
| 360 | 360 | if (!isset($prev_alt) || $prev_alt != $alt) { |
| 361 | - if (isset($prev_alt)) { |
|
| 361 | + if (isset($prev_alt)) { |
|
| 362 | 362 | //$output_history .= '['.$spotter_history['longitude'].', '.$spotter_history['latitude'].','.$spotter_history['altitude'].']'; |
| 363 | 363 | $output_history .= '['.$spotter_history['longitude'].', '.$spotter_history['latitude'].']'; |
| 364 | 364 | $output_history .= ']}},'; |
| 365 | 365 | $output .= $output_history; |
| 366 | - } |
|
| 367 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 368 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 366 | + } |
|
| 367 | + if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 368 | + else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 369 | 369 | } |
| 370 | 370 | $output_history .= '['; |
| 371 | 371 | $output_history .= $spotter_history['longitude'].', '; |
@@ -373,41 +373,41 @@ discard block |
||
| 373 | 373 | //$output_history .= $spotter_history['altitude']; |
| 374 | 374 | $output_history .= '],'; |
| 375 | 375 | $prev_alt = $alt; |
| 376 | - //} |
|
| 376 | + //} |
|
| 377 | 377 | } |
| 378 | 378 | if (isset($output_history)) { |
| 379 | - $output_history = substr($output_history, 0, -1); |
|
| 380 | - $output_history .= ']}},'; |
|
| 381 | - $output .= $output_history; |
|
| 382 | - unset($prev_alt); |
|
| 383 | - unset($output_history); |
|
| 379 | + $output_history = substr($output_history, 0, -1); |
|
| 380 | + $output_history .= ']}},'; |
|
| 381 | + $output .= $output_history; |
|
| 382 | + unset($prev_alt); |
|
| 383 | + unset($output_history); |
|
| 384 | 384 | } |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | if (isset($history) && $history == $spotter_item['ident'] && isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA' && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
| 388 | - $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 389 | - if (isset($spotter_item['departure_airport_latitude'])) { |
|
| 388 | + $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 389 | + if (isset($spotter_item['departure_airport_latitude'])) { |
|
| 390 | 390 | $output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],'; |
| 391 | - } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
|
| 391 | + } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
|
| 392 | 392 | $dairport = $Spotter->getAllAirportInfo($spotter_item['departure_airport']); |
| 393 | 393 | //print_r($dairport); |
| 394 | 394 | //echo $spotter_item['departure_airport']; |
| 395 | 395 | if (isset($dairport[0]['latitude'])) { |
| 396 | - $output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],'; |
|
| 396 | + $output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],'; |
|
| 397 | 397 | } |
| 398 | - } |
|
| 399 | - if (isset($spotter_item['arrival_airport_latitude'])) { |
|
| 398 | + } |
|
| 399 | + if (isset($spotter_item['arrival_airport_latitude'])) { |
|
| 400 | 400 | $output_air .= '['.$spotter_item['arrival_airport_longitude'].','.$spotter_item['arrival_airport_latitude'].']'; |
| 401 | - } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
| 401 | + } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
| 402 | 402 | //print_r($aairport); |
| 403 | 403 | $aairport = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
| 404 | 404 | if (isset($aairport[0]['latitude'])) { |
| 405 | - $output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']'; |
|
| 405 | + $output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']'; |
|
| 406 | + } |
|
| 406 | 407 | } |
| 407 | - } |
|
| 408 | - $output_air .= ']}},'; |
|
| 409 | - $output .= $output_air; |
|
| 410 | - unset($output_air); |
|
| 408 | + $output_air .= ']}},'; |
|
| 409 | + $output .= $output_air; |
|
| 410 | + unset($output_air); |
|
| 411 | 411 | } |
| 412 | 412 | } |
| 413 | 413 | $output = substr($output, 0, -1); |
@@ -25,13 +25,13 @@ discard block |
||
| 25 | 25 | $min = false; |
| 26 | 26 | $allhistory = false; |
| 27 | 27 | $filter['source'] = array(); |
| 28 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 29 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 30 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 31 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 32 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 33 | -if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 34 | -if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 28 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 29 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 30 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 31 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs')); |
|
| 32 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 33 | +if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',', $_COOKIE['Airlines']); |
|
| 34 | +if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',', $_COOKIE['Sources']); |
|
| 35 | 35 | if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') $filter['airlinestype'] = $_COOKIE['airlinestype']; |
| 36 | 36 | |
| 37 | 37 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | if (isset($_GET['ident'])) { |
| 42 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 42 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 43 | 43 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
| 44 | 44 | if (empty($spotter_array)) { |
| 45 | 45 | $from_archive = true; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | $allhistory = true; |
| 49 | 49 | } elseif (isset($_GET['flightaware_id'])) { |
| 50 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 50 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 51 | 51 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
| 52 | 52 | if (empty($spotter_array)) { |
| 53 | 53 | $from_archive = true; |
@@ -56,37 +56,37 @@ discard block |
||
| 56 | 56 | $allhistory = true; |
| 57 | 57 | } elseif (isset($_GET['coord']) && (!isset($globalMapPopup) || $globalMapPopup || (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true'))) { |
| 58 | 58 | //if (isset($_GET['coord'])) { |
| 59 | - $coord = explode(',',$_GET['coord']); |
|
| 60 | - $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord,$filter); |
|
| 59 | + $coord = explode(',', $_GET['coord']); |
|
| 60 | + $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord, $filter); |
|
| 61 | 61 | |
| 62 | 62 | #} elseif (isset($globalMapPopup) && !$globalMapPopup) { |
| 63 | 63 | } elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed'])) { |
| 64 | 64 | $from_archive = true; |
| 65 | 65 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 66 | 66 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 67 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 68 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 69 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 70 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 71 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 72 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
| 67 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 68 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 69 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 70 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 71 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 72 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
| 73 | 73 | } elseif ($min) { |
| 74 | 74 | $spotter_array = $SpotterLive->getMinLiveSpotterData($filter); |
| 75 | 75 | # $min = true; |
| 76 | 76 | } else { |
| 77 | - $spotter_array = $SpotterLive->getLiveSpotterData('','',$filter); |
|
| 77 | + $spotter_array = $SpotterLive->getLiveSpotterData('', '', $filter); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | if (!empty($spotter_array)) { |
| 81 | 81 | if (isset($_GET['archive'])) { |
| 82 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
| 82 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
| 83 | 83 | } else { |
| 84 | 84 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 85 | 85 | } |
| 86 | 86 | if ($flightcnt == '') $flightcnt = 0; |
| 87 | 87 | } else $flightcnt = 0; |
| 88 | 88 | |
| 89 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 89 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 90 | 90 | |
| 91 | 91 | $j = 0; |
| 92 | 92 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | if (!empty($spotter_array) && is_array($spotter_array)) |
| 101 | 101 | { |
| 102 | 102 | $output .= '"features": ['; |
| 103 | - foreach($spotter_array as $spotter_item) |
|
| 103 | + foreach ($spotter_array as $spotter_item) |
|
| 104 | 104 | { |
| 105 | 105 | $j++; |
| 106 | 106 | date_default_timezone_set('UTC'); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
| 184 | 184 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 185 | 185 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 186 | - $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
|
| 186 | + $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ', '_', $spotter_item['aircraft_name'])).'",'; |
|
| 187 | 187 | } elseif (isset($spotter_item['aircraft_type'])) { |
| 188 | 188 | $output .= '"aircraft_name": "NA ('.$spotter_item['aircraft_type'].')",'; |
| 189 | 189 | } elseif (!$min) { |
@@ -250,15 +250,15 @@ discard block |
||
| 250 | 250 | if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",'; |
| 251 | 251 | else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
| 252 | 252 | |
| 253 | - if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 254 | - else $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 253 | + if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading'], $archivespeed); |
|
| 254 | + else $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading']); |
|
| 255 | 255 | //$output .= '"nextlatitude": "'.$nextcoord['latitude'].'",'; |
| 256 | 256 | //$output .= '"nextlongitude": "'.$nextcoord['longitude'].'",'; |
| 257 | 257 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 258 | 258 | |
| 259 | 259 | if (!$min) $output .= '"image": "'.$image.'",'; |
| 260 | 260 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 261 | - $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
|
| 261 | + $output .= '"image_copyright": "'.str_replace('"', "'", trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '', $spotter_item['image_copyright']))).'",'; |
|
| 262 | 262 | } |
| 263 | 263 | if (isset($spotter_item['image_source_website'])) { |
| 264 | 264 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | $output .= '"waypoints": "'.$spotter_item['waypoints'].'",'; |
| 281 | 281 | } |
| 282 | 282 | if (isset($spotter_item['acars'])) { |
| 283 | - $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
|
| 283 | + $output .= '"acars": "'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br />', $spotter_item['acars']['message'])).'",'; |
|
| 284 | 284 | } |
| 285 | 285 | // FIXME : type when not aircraft ? |
| 286 | 286 | if ($compress) $output .= '"t": "aircraft"'; |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | $output .= '"geometry": {'; |
| 290 | 290 | $output .= '"type": "Point",'; |
| 291 | 291 | $output .= '"coordinates": ['; |
| 292 | - $output .= $spotter_item['longitude'].', '; |
|
| 293 | - $output .= $spotter_item['latitude']; |
|
| 292 | + $output .= $spotter_item['longitude'].', '; |
|
| 293 | + $output .= $spotter_item['latitude']; |
|
| 294 | 294 | $output .= ']'; |
| 295 | 295 | $output .= '}'; |
| 296 | 296 | $output .= '},'; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | */ |
| 339 | 339 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id'])))) { |
| 340 | 340 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id']))) || (isset($_GET['history']) && $_GET['history'] == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
| 341 | - $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
|
| 341 | + $history = filter_input(INPUT_GET, 'history', FILTER_SANITIZE_STRING); |
|
| 342 | 342 | if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
| 343 | 343 | if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) |
| 344 | 344 | || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))) |
@@ -368,8 +368,8 @@ discard block |
||
| 368 | 368 | else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
| 369 | 369 | } |
| 370 | 370 | $output_history .= '['; |
| 371 | - $output_history .= $spotter_history['longitude'].', '; |
|
| 372 | - $output_history .= $spotter_history['latitude']; |
|
| 371 | + $output_history .= $spotter_history['longitude'].', '; |
|
| 372 | + $output_history .= $spotter_history['latitude']; |
|
| 373 | 373 | //$output_history .= $spotter_history['altitude']; |
| 374 | 374 | $output_history .= '],'; |
| 375 | 375 | $prev_alt = $alt; |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | $output = substr($output, 0, -1); |
| 414 | 414 | $output .= ']'; |
| 415 | 415 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 416 | - $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
| 416 | + $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
| 417 | 417 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
| 418 | 418 | $output .= '"fc": "'.$j.'"'; |
| 419 | 419 | } else { |
@@ -18,21 +18,40 @@ discard block |
||
| 18 | 18 | } |
| 19 | 19 | header('Content-Type: text/javascript'); |
| 20 | 20 | |
| 21 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 22 | -else $compress = $globalJsonCompress; |
|
| 21 | +if (!isset($globalJsonCompress)) { |
|
| 22 | + $compress = true; |
|
| 23 | +} else { |
|
| 24 | + $compress = $globalJsonCompress; |
|
| 25 | +} |
|
| 23 | 26 | |
| 24 | 27 | $from_archive = false; |
| 25 | 28 | $min = false; |
| 26 | 29 | $allhistory = false; |
| 27 | 30 | $filter['source'] = array(); |
| 28 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 29 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 30 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 31 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 32 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 33 | -if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 34 | -if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 35 | -if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') $filter['airlinestype'] = $_COOKIE['airlinestype']; |
|
| 31 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') { |
|
| 32 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 33 | +} |
|
| 34 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') { |
|
| 35 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 36 | +} |
|
| 37 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') { |
|
| 38 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 39 | +} |
|
| 40 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') { |
|
| 41 | + $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 42 | +} |
|
| 43 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') { |
|
| 44 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 45 | +} |
|
| 46 | +if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') { |
|
| 47 | + $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 48 | +} |
|
| 49 | +if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') { |
|
| 50 | + $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 51 | +} |
|
| 52 | +if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') { |
|
| 53 | + $filter['airlinestype'] = $_COOKIE['airlinestype']; |
|
| 54 | +} |
|
| 36 | 55 | |
| 37 | 56 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 38 | 57 | $min = true; |
@@ -83,8 +102,12 @@ discard block |
||
| 83 | 102 | } else { |
| 84 | 103 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 85 | 104 | } |
| 86 | - if ($flightcnt == '') $flightcnt = 0; |
|
| 87 | -} else $flightcnt = 0; |
|
| 105 | + if ($flightcnt == '') { |
|
| 106 | + $flightcnt = 0; |
|
| 107 | + } |
|
| 108 | + } else { |
|
| 109 | + $flightcnt = 0; |
|
| 110 | +} |
|
| 88 | 111 | |
| 89 | 112 | $sqltime = round(microtime(true)-$begintime,2); |
| 90 | 113 | |
@@ -92,8 +115,11 @@ discard block |
||
| 92 | 115 | |
| 93 | 116 | $output = '{'; |
| 94 | 117 | $output .= '"type": "FeatureCollection",'; |
| 95 | - if ($min) $output .= '"minimal": "true",'; |
|
| 96 | - else $output .= '"minimal": "false",'; |
|
| 118 | + if ($min) { |
|
| 119 | + $output .= '"minimal": "true",'; |
|
| 120 | + } else { |
|
| 121 | + $output .= '"minimal": "false",'; |
|
| 122 | + } |
|
| 97 | 123 | $output .= '"fc": "'.$flightcnt.'",'; |
| 98 | 124 | $output .= '"sqt": "'.$sqltime.'",'; |
| 99 | 125 | |
@@ -162,11 +188,16 @@ discard block |
||
| 162 | 188 | //$output .= '"fc": "'.$flightcnt.'",'; |
| 163 | 189 | //$output .= '"sqt": "'.$sqltime.'",'; |
| 164 | 190 | $output .= '"properties": {'; |
| 165 | - if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 166 | - else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 191 | + if ($compress) { |
|
| 192 | + $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 193 | + } else { |
|
| 194 | + $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 195 | + } |
|
| 167 | 196 | $output .= '"fc": "'.$flightcnt.'",'; |
| 168 | 197 | $output .= '"sqt": "'.$sqltime.'",'; |
| 169 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 198 | + if (isset($begindate)) { |
|
| 199 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 200 | + } |
|
| 170 | 201 | |
| 171 | 202 | /* |
| 172 | 203 | if ($min) $output .= '"minimal": "true",'; |
@@ -174,13 +205,21 @@ discard block |
||
| 174 | 205 | */ |
| 175 | 206 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
| 176 | 207 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 177 | - if ($compress) $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
| 178 | - else $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
| 208 | + if ($compress) { |
|
| 209 | + $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
| 210 | + } else { |
|
| 211 | + $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
| 212 | + } |
|
| 179 | 213 | } else { |
| 180 | - if ($compress) $output .= '"c": "NA",'; |
|
| 181 | - else $output .= '"callsign": "NA",'; |
|
| 214 | + if ($compress) { |
|
| 215 | + $output .= '"c": "NA",'; |
|
| 216 | + } else { |
|
| 217 | + $output .= '"callsign": "NA",'; |
|
| 218 | + } |
|
| 219 | + } |
|
| 220 | + if (isset($spotter_item['registration'])) { |
|
| 221 | + $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 182 | 222 | } |
| 183 | - if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 184 | 223 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 185 | 224 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 186 | 225 | $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
@@ -193,19 +232,29 @@ discard block |
||
| 193 | 232 | $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
| 194 | 233 | } |
| 195 | 234 | if (!isset($spotter_item['aircraft_shadow'])) { |
| 196 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
| 197 | - else { |
|
| 235 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
| 236 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 237 | + } else { |
|
| 198 | 238 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
| 199 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 200 | - else $spotter_item['aircraft_shadow'] = ''; |
|
| 239 | + if (count($aircraft_info) > 0) { |
|
| 240 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 241 | + } else { |
|
| 242 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 243 | + } |
|
| 201 | 244 | } |
| 202 | 245 | } |
| 203 | 246 | if ($spotter_item['aircraft_shadow'] == '') { |
| 204 | - if ($compress) $output .= '"as": "default.png",'; |
|
| 205 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
| 247 | + if ($compress) { |
|
| 248 | + $output .= '"as": "default.png",'; |
|
| 249 | + } else { |
|
| 250 | + $output .= '"aircraft_shadow": "default.png",'; |
|
| 251 | + } |
|
| 206 | 252 | } else { |
| 207 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 208 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 253 | + if ($compress) { |
|
| 254 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 255 | + } else { |
|
| 256 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 257 | + } |
|
| 209 | 258 | } |
| 210 | 259 | if (isset($spotter_item['airline_name'])) { |
| 211 | 260 | $output .= '"airline_name": "'.$spotter_item['airline_name'].'",'; |
@@ -213,8 +262,11 @@ discard block |
||
| 213 | 262 | $output .= '"airline_name": "NA",'; |
| 214 | 263 | } |
| 215 | 264 | if (isset($spotter_item['departure_airport'])) { |
| 216 | - if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 217 | - else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 265 | + if ($compress) { |
|
| 266 | + $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 267 | + } else { |
|
| 268 | + $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 269 | + } |
|
| 218 | 270 | } |
| 219 | 271 | if (isset($spotter_item['departure_airport_city'])) { |
| 220 | 272 | $output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",'; |
@@ -226,8 +278,11 @@ discard block |
||
| 226 | 278 | $output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",'; |
| 227 | 279 | } |
| 228 | 280 | if (isset($spotter_item['arrival_airport'])) { |
| 229 | - if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 230 | - else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 281 | + if ($compress) { |
|
| 282 | + $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 283 | + } else { |
|
| 284 | + $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 285 | + } |
|
| 231 | 286 | } |
| 232 | 287 | if (isset($spotter_item['arrival_airport_city'])) { |
| 233 | 288 | $output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",'; |
@@ -245,18 +300,29 @@ discard block |
||
| 245 | 300 | $output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",'; |
| 246 | 301 | } |
| 247 | 302 | |
| 248 | - if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 249 | - else $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 250 | - if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 251 | - else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 303 | + if ($compress) { |
|
| 304 | + $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 305 | + } else { |
|
| 306 | + $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 307 | + } |
|
| 308 | + if ($compress) { |
|
| 309 | + $output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 310 | + } else { |
|
| 311 | + $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 312 | + } |
|
| 252 | 313 | |
| 253 | - if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 254 | - else $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 314 | + if (isset($archivespeed)) { |
|
| 315 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 316 | + } else { |
|
| 317 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 318 | + } |
|
| 255 | 319 | //$output .= '"nextlatitude": "'.$nextcoord['latitude'].'",'; |
| 256 | 320 | //$output .= '"nextlongitude": "'.$nextcoord['longitude'].'",'; |
| 257 | 321 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 258 | 322 | |
| 259 | - if (!$min) $output .= '"image": "'.$image.'",'; |
|
| 323 | + if (!$min) { |
|
| 324 | + $output .= '"image": "'.$image.'",'; |
|
| 325 | + } |
|
| 260 | 326 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 261 | 327 | $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
| 262 | 328 | } |
@@ -264,8 +330,11 @@ discard block |
||
| 264 | 330 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
| 265 | 331 | } |
| 266 | 332 | if (isset($spotter_item['squawk'])) { |
| 267 | - if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 268 | - else $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 333 | + if ($compress) { |
|
| 334 | + $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 335 | + } else { |
|
| 336 | + $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 337 | + } |
|
| 269 | 338 | } |
| 270 | 339 | if (isset($spotter_item['squawk_usage'])) { |
| 271 | 340 | $output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",'; |
@@ -283,8 +352,11 @@ discard block |
||
| 283 | 352 | $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
| 284 | 353 | } |
| 285 | 354 | // FIXME : type when not aircraft ? |
| 286 | - if ($compress) $output .= '"t": "aircraft"'; |
|
| 287 | - else $output .= '"type": "aircraft"'; |
|
| 355 | + if ($compress) { |
|
| 356 | + $output .= '"t": "aircraft"'; |
|
| 357 | + } else { |
|
| 358 | + $output .= '"type": "aircraft"'; |
|
| 359 | + } |
|
| 288 | 360 | $output .= '},'; |
| 289 | 361 | $output .= '"geometry": {'; |
| 290 | 362 | $output .= '"type": "Point",'; |
@@ -339,7 +411,9 @@ discard block |
||
| 339 | 411 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id'])))) { |
| 340 | 412 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id']))) || (isset($_GET['history']) && $_GET['history'] == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
| 341 | 413 | $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
| 342 | - if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
| 414 | + if ($history == '' && isset($_COOKIE['history'])) { |
|
| 415 | + $history = $_COOKIE['history']; |
|
| 416 | + } |
|
| 343 | 417 | if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) |
| 344 | 418 | || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))) |
| 345 | 419 | || (isset($history) && $history == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
@@ -364,8 +438,11 @@ discard block |
||
| 364 | 438 | $output_history .= ']}},'; |
| 365 | 439 | $output .= $output_history; |
| 366 | 440 | } |
| 367 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 368 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 441 | + if ($compress) { |
|
| 442 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 443 | + } else { |
|
| 444 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 445 | + } |
|
| 369 | 446 | } |
| 370 | 447 | $output_history .= '['; |
| 371 | 448 | $output_history .= $spotter_history['longitude'].', '; |
@@ -414,7 +491,9 @@ discard block |
||
| 414 | 491 | $output .= ']'; |
| 415 | 492 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 416 | 493 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
| 417 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 494 | + if (isset($begindate)) { |
|
| 495 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 496 | + } |
|
| 418 | 497 | $output .= '"fc": "'.$j.'"'; |
| 419 | 498 | } else { |
| 420 | 499 | $output .= '"features": '; |
@@ -6,23 +6,23 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/aircraft'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 9 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 16 | + $title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
| 20 | 20 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 23 | - foreach($aircraft_types as $aircraft_type) |
|
| 23 | + foreach ($aircraft_types as $aircraft_type) |
|
| 24 | 24 | { |
| 25 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 25 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 26 | 26 | { |
| 27 | 27 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 28 | 28 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | include('aircraft-sub-menu.php'); |
| 49 | 49 | print '<div class="column">'; |
| 50 | 50 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 51 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 51 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 52 | 52 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAircraft($aircraft_type); |
| 53 | 53 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 54 | 54 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | var data = google.visualization.arrayToDataTable([ |
| 60 | 60 | ["'._("Country").'", "'._("# of times").'"], '; |
| 61 | 61 | $country_data = ''; |
| 62 | - foreach($airport_country_array as $airport_item) |
|
| 62 | + foreach ($airport_country_array as $airport_item) |
|
| 63 | 63 | { |
| 64 | 64 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 65 | 65 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '</thead>'; |
| 94 | 94 | print '<tbody>'; |
| 95 | 95 | $i = 1; |
| 96 | - foreach($airport_country_array as $airport_item) |
|
| 96 | + foreach ($airport_country_array as $airport_item) |
|
| 97 | 97 | { |
| 98 | 98 | print '<tr>'; |
| 99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | 6 | if (!isset($_GET['aircraft_type'])) { |
| 7 | - header('Location: '.$globalURL.'/aircraft'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/aircraft'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -6,22 +6,22 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/airline'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 15 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
| 19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
| 20 | 20 | print '<option></option>'; |
| 21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
| 22 | - foreach($airline_names as $airline_name) |
|
| 22 | + foreach ($airline_names as $airline_name) |
|
| 23 | 23 | { |
| 24 | - if($airline == $airline_name['airline_icao']) |
|
| 24 | + if ($airline == $airline_name['airline_icao']) |
|
| 25 | 25 | { |
| 26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | include('airline-sub-menu.php'); |
| 60 | 60 | print '<div class="column">'; |
| 61 | 61 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 62 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 62 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | 63 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
| 64 | 64 | if (!empty($route_array)) |
| 65 | 65 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | print '</thead>'; |
| 76 | 76 | print '<tbody>'; |
| 77 | 77 | $i = 1; |
| 78 | - foreach($route_array as $route_item) |
|
| 78 | + foreach ($route_array as $route_item) |
|
| 79 | 79 | { |
| 80 | 80 | print '<tr>'; |
| 81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airline'])) { |
| 6 | - header('Location: '.$globalURL.'/airline'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airline'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 41 | 41 | { |
| 42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 43 | - } |
|
| 44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 45 | 44 | { |
| 46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 47 | 46 | } |
@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit'])) |
|
| 10 | +if (!isset($_GET['limit'])) |
|
| 11 | 11 | { |
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | print '<div class="table column">'; |
| 35 | 35 | print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>'; |
| 36 | 36 | |
| 37 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 37 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 38 | 38 | $sql_begin = microtime(true); |
| 39 | 39 | $spotter_array = $Spotter->getLatestSpotterData($limit_start.",".$absolute_difference, $sort); |
| 40 | -$sql_time = microtime(true)-$sql_begin; |
|
| 40 | +$sql_time = microtime(true) - $sql_begin; |
|
| 41 | 41 | |
| 42 | 42 | $page_begin = microtime(true); |
| 43 | 43 | if (!empty($spotter_array)) |
@@ -55,6 +55,6 @@ discard block |
||
| 55 | 55 | print '</div>'; |
| 56 | 56 | print '</div>'; |
| 57 | 57 | } |
| 58 | -$page_time = microtime(true)-$page_begin; |
|
| 58 | +$page_time = microtime(true) - $page_begin; |
|
| 59 | 59 | require_once('footer.php'); |
| 60 | 60 | ?> |
| 61 | 61 | \ No newline at end of file |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $limit_start = 0; |
| 19 | 19 | $limit_end = 25; |
| 20 | 20 | $absolute_difference = 25; |
| 21 | -} else { |
|
| 21 | +} else { |
|
| 22 | 22 | $limit_explode = explode(",", $_GET['limit']); |
| 23 | 23 | $limit_start = $limit_explode[0]; |
| 24 | 24 | $limit_end = $limit_explode[1]; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | <?php |
| 30 | 30 | if (isset($_GET['q'])) |
| 31 | 31 | { |
| 32 | - $spotter_array = $Spotter->searchSpotterData($_GET['q'],"","","","","","","","","","","","","","","","","","0,10","",""); |
|
| 32 | + $spotter_array = $Spotter->searchSpotterData($_GET['q'], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "0,10", "", ""); |
|
| 33 | 33 | } else { |
| 34 | 34 | $spotter_array = $Spotter->getLatestSpotterData("0,10", ""); |
| 35 | 35 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | print '<div class="table-responsive">'; |
| 38 | 38 | print '<table id="table-tv">'; |
| 39 | 39 | print '<tbody>'; |
| 40 | -foreach($spotter_array as $spotter_item) |
|
| 40 | +foreach ($spotter_array as $spotter_item) |
|
| 41 | 41 | { |
| 42 | 42 | if (isset($globalTimezone)) { |
| 43 | 43 | date_default_timezone_set($globalTimezone); |
@@ -41,7 +41,9 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | if (isset($globalTimezone)) { |
| 43 | 43 | date_default_timezone_set($globalTimezone); |
| 44 | - } else date_default_timezone_set('UTC'); |
|
| 44 | + } else { |
|
| 45 | + date_default_timezone_set('UTC'); |
|
| 46 | + } |
|
| 45 | 47 | print '<tr>'; |
| 46 | 48 | if (isset($_GET['image']) && $_GET['image'] == "true") |
| 47 | 49 | { |
@@ -98,10 +100,14 @@ discard block |
||
| 98 | 100 | print '</div>'; |
| 99 | 101 | print '<div class="other2">'; |
| 100 | 102 | print '<span><i class="fa fa-arrow-up"></i> '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country']; |
| 101 | - if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') print ' ('.$spotter_item['departure_airport_time'].')'; |
|
| 103 | + if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') { |
|
| 104 | + print ' ('.$spotter_item['departure_airport_time'].')'; |
|
| 105 | + } |
|
| 102 | 106 | print '</span>'; |
| 103 | 107 | print '<span><i class="fa fa-arrow-down"></i> '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country']; |
| 104 | - if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
| 108 | + if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') { |
|
| 109 | + print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
| 110 | + } |
|
| 105 | 111 | print '</span>'; |
| 106 | 112 | print '</div>'; |
| 107 | 113 | print '<div class="other3">'; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | var data = google.visualization.arrayToDataTable([ |
| 23 | 23 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
| 24 | 24 | $callsign_data = ''; |
| 25 | -foreach($callsign_array as $callsign_item) |
|
| 25 | +foreach ($callsign_array as $callsign_item) |
|
| 26 | 26 | { |
| 27 | 27 | $callsign_data .= '[ "'.$callsign_item['callsign_icao'].' ('.$callsign_item['airline_name'].')",'.$callsign_item['callsign_icao_count'].'],'; |
| 28 | 28 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | print '</thead>'; |
| 57 | 57 | print '<tbody>'; |
| 58 | 58 | $i = 1; |
| 59 | - foreach($callsign_array as $callsign_item) |
|
| 59 | + foreach ($callsign_array as $callsign_item) |
|
| 60 | 60 | { |
| 61 | 61 | print '<tr>'; |
| 62 | 62 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | if (isset($_GET['sort'])) { |
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
| 14 | 14 | } else { |
@@ -17,16 +17,16 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | if (!empty($spotter_array)) |
| 19 | 19 | { |
| 20 | - $title = sprintf(_("Most Common Aircraft Manufacturer from %s"),$country); |
|
| 20 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %s"), $country); |
|
| 21 | 21 | require_once('header.php'); |
| 22 | 22 | print '<div class="select-item">'; |
| 23 | 23 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 24 | 24 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 25 | 25 | print '<option></option>'; |
| 26 | 26 | $all_countries = $Spotter->getAllCountries(); |
| 27 | - foreach($all_countries as $all_country) |
|
| 27 | + foreach ($all_countries as $all_country) |
|
| 28 | 28 | { |
| 29 | - if($country == $all_country['country']) |
|
| 29 | + if ($country == $all_country['country']) |
|
| 30 | 30 | { |
| 31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 32 | 32 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($_GET['country'] != "NA") |
| 42 | 42 | { |
| 43 | 43 | print '<div class="info column">'; |
| 44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 45 | 45 | print '</div>'; |
| 46 | 46 | } else { |
| 47 | 47 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('country-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>'; |
|
| 54 | 54 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByCountry($country); |
| 55 | 55 | if (!empty($manufacturers_array)) |
| 56 | 56 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | print '</thead>'; |
| 64 | 64 | print '<tbody>'; |
| 65 | 65 | $i = 1; |
| 66 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 66 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 67 | 67 | { |
| 68 | 68 | print '<tr>'; |
| 69 | 69 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -15,30 +15,30 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - if(isset($spotter_array[0]['flightaware_id'])) { |
|
| 18 | + if (isset($spotter_array[0]['flightaware_id'])) { |
|
| 19 | 19 | $flightaware_id = $spotter_array[0]['flightaware_id']; |
| 20 | 20 | } |
| 21 | - if(isset($spotter_array[0]['last_latitude']) && $spotter_array[0]['last_latitude'] != '') { |
|
| 21 | + if (isset($spotter_array[0]['last_latitude']) && $spotter_array[0]['last_latitude'] != '') { |
|
| 22 | 22 | $latitude = $spotter_array[0]['last_latitude']; |
| 23 | - } elseif(isset($spotter_array[0]['latitude'])) { |
|
| 23 | + } elseif (isset($spotter_array[0]['latitude'])) { |
|
| 24 | 24 | $latitude = $spotter_array[0]['latitude']; |
| 25 | 25 | } |
| 26 | - if(isset($spotter_array[0]['last_longitude']) && $spotter_array[0]['last_longitude'] != '') { |
|
| 26 | + if (isset($spotter_array[0]['last_longitude']) && $spotter_array[0]['last_longitude'] != '') { |
|
| 27 | 27 | $longitude = $spotter_array[0]['last_longitude']; |
| 28 | - } elseif(isset($spotter_array[0]['longitude'])) { |
|
| 28 | + } elseif (isset($spotter_array[0]['longitude'])) { |
|
| 29 | 29 | $longitude = $spotter_array[0]['longitude']; |
| 30 | 30 | } |
| 31 | 31 | $title = ''; |
| 32 | - if(isset($spotter_array[0]['ident'])) { |
|
| 32 | + if (isset($spotter_array[0]['ident'])) { |
|
| 33 | 33 | $title .= $spotter_array[0]['ident']; |
| 34 | 34 | } |
| 35 | - if(isset($spotter_array[0]['airline_name'])) { |
|
| 35 | + if (isset($spotter_array[0]['airline_name'])) { |
|
| 36 | 36 | $title .= ' - '.$spotter_array[0]['airline_name']; |
| 37 | 37 | } |
| 38 | - if(isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { |
|
| 38 | + if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { |
|
| 39 | 39 | $title .= ' - '.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')'; |
| 40 | 40 | } |
| 41 | - if(isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') { |
|
| 41 | + if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') { |
|
| 42 | 42 | $title .= ' - '.$spotter_array[0]['registration']; |
| 43 | 43 | } |
| 44 | 44 | //$facebook_meta_image = $spotter_array[0]['image']; |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | var data = google.visualization.arrayToDataTable([ |
| 64 | 64 | ["Hour","Altitude","Speed"], '; |
| 65 | 65 | $altitude_data = ''; |
| 66 | - foreach($all_data as $data) |
|
| 66 | + foreach ($all_data as $data) |
|
| 67 | 67 | { |
| 68 | - $altitude_data .= '[ "'.date("G:i",strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |
|
| 68 | + $altitude_data .= '[ "'.date("G:i", strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |
|
| 69 | 69 | } |
| 70 | 70 | $altitude_data = substr($altitude_data, 0, -1); |
| 71 | 71 | print $altitude_data.']); |
@@ -107,16 +107,16 @@ discard block |
||
| 107 | 107 | print '<a href="'.$globalURL.'/airline/'.$spotter_array[0]['airline_icao'].'">'.$spotter_array[0]['airline_name'].'</a> '; |
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | - if(isset($spotter_array[0]['ident'])) { |
|
| 110 | + if (isset($spotter_array[0]['ident'])) { |
|
| 111 | 111 | print $spotter_array[0]['ident']; |
| 112 | 112 | } |
| 113 | - if(isset($spotter_array[0]['airline_name'])) { |
|
| 113 | + if (isset($spotter_array[0]['airline_name'])) { |
|
| 114 | 114 | print ' - '.$spotter_array[0]['airline_name']; |
| 115 | 115 | } |
| 116 | - if(isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { |
|
| 116 | + if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') { |
|
| 117 | 117 | print ' - '.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')'; |
| 118 | 118 | } |
| 119 | - if(isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA') { |
|
| 119 | + if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA') { |
|
| 120 | 120 | print ' - '.$spotter_array[0]['registration']; |
| 121 | 121 | } |
| 122 | 122 | print '</h1>'; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | print '</div>'; |
| 271 | 271 | */ |
| 272 | 272 | |
| 273 | - foreach($spotter_array as $spotter_item) |
|
| 273 | + foreach ($spotter_array as $spotter_item) |
|
| 274 | 274 | { |
| 275 | 275 | print '<div class="details">'; |
| 276 | 276 | print '<h3>Flight Information</h3>'; |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') { |
| 370 | 370 | if ($spotter_item['departure_airport_time'] > 2460) { |
| 371 | 371 | print '<div class="time">'; |
| 372 | - print 'at '.date('H:m',$spotter_item['departure_airport_time']); |
|
| 372 | + print 'at '.date('H:m', $spotter_item['departure_airport_time']); |
|
| 373 | 373 | print '</div>'; |
| 374 | 374 | } else { |
| 375 | 375 | print '<div class="time">'; |
@@ -504,19 +504,19 @@ discard block |
||
| 504 | 504 | $departure_airport_info = $Spotter->getAllAirportInfo($spotter_item['departure_airport']); |
| 505 | 505 | if (isset($spotter_item['last_latitude']) && $spotter_item['last_latitude'] != '') { |
| 506 | 506 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 507 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'nm').' nm'; |
|
| 507 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'nm').' nm'; |
|
| 508 | 508 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
| 509 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'mi').' mi'; |
|
| 509 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'mi').' mi'; |
|
| 510 | 510 | } else { |
| 511 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'km').' km'; |
|
| 511 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'km').' km'; |
|
| 512 | 512 | } |
| 513 | 513 | } else { |
| 514 | 514 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 515 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'nm').' nm'; |
|
| 515 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'nm').' nm'; |
|
| 516 | 516 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
| 517 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'mi').' mi'; |
|
| 517 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'mi').' mi'; |
|
| 518 | 518 | } else { |
| 519 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'km').' km'; |
|
| 519 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'km').' km'; |
|
| 520 | 520 | } |
| 521 | 521 | } |
| 522 | 522 | print '</div>'; |
@@ -530,19 +530,19 @@ discard block |
||
| 530 | 530 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
| 531 | 531 | if (isset($spotter_item['last_latitude']) && $spotter_item['last_latitude'] != '') { |
| 532 | 532 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 533 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'nm').' nm'; |
|
| 533 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'nm').' nm'; |
|
| 534 | 534 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
| 535 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'mi').' mi'; |
|
| 535 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'mi').' mi'; |
|
| 536 | 536 | } else { |
| 537 | - print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'km').' km'; |
|
| 537 | + print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'km').' km'; |
|
| 538 | 538 | } |
| 539 | 539 | } else { |
| 540 | 540 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 541 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'nm').' nm'; |
|
| 541 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'nm').' nm'; |
|
| 542 | 542 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
| 543 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'mi').' mi'; |
|
| 543 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'mi').' mi'; |
|
| 544 | 544 | } else { |
| 545 | - print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'km').' km'; |
|
| 545 | + print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'km').' km'; |
|
| 546 | 546 | } |
| 547 | 547 | } |
| 548 | 548 | print '</div>'; |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | print '<div class="last-flights">'; |
| 562 | 562 | print '<h3>Last 5 Flights of this Aircraft ('.$spotter_array[0]['registration'].')</h3>'; |
| 563 | 563 | $hide_th_links = true; |
| 564 | - $spotter_array = $Spotter->getSpotterDataByRegistration($spotter_array[0]['registration'],"0,5", ""); |
|
| 564 | + $spotter_array = $Spotter->getSpotterDataByRegistration($spotter_array[0]['registration'], "0,5", ""); |
|
| 565 | 565 | include('table-output.php'); |
| 566 | 566 | print '<div class="more">'; |
| 567 | 567 | print '<a href="'.$globalURL.'/registration/'.$spotter_array[0]['registration'].'" class="btn btn-default btn" role="button">See all Flights»</a>'; |
@@ -51,7 +51,9 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if (isset($globalTimezone)) { |
| 53 | 53 | date_default_timezone_set($globalTimezone); |
| 54 | - } else date_default_timezone_set('UTC'); |
|
| 54 | + } else { |
|
| 55 | + date_default_timezone_set('UTC'); |
|
| 56 | + } |
|
| 55 | 57 | |
| 56 | 58 | //date_default_timezone_set('UTC'); |
| 57 | 59 | if (is_array($all_data) && count($all_data) > 0) { |
@@ -300,9 +302,13 @@ discard block |
||
| 300 | 302 | print '<div>'; |
| 301 | 303 | if (isset($spotter_item['pilot_id']) && $spotter_item['pilot_id'] != "") |
| 302 | 304 | { |
| 303 | - if ($spotter_item['format_source'] == 'whazzup') print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 304 | - elseif ($spotter_item['format_source'] == 'vatsimtxt') print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 305 | - else print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 305 | + if ($spotter_item['format_source'] == 'whazzup') { |
|
| 306 | + print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 307 | + } elseif ($spotter_item['format_source'] == 'vatsimtxt') { |
|
| 308 | + print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 309 | + } else { |
|
| 310 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 311 | + } |
|
| 306 | 312 | } else { |
| 307 | 313 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != "") |
| 308 | 314 | { |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | function drawChart6() { |
| 90 | 90 | var data = google.visualization.arrayToDataTable([ |
| 91 | 91 | ["Hour","'._("Altitude").'","'._("Speed").'"], '; |
| 92 | - $altitude_data = ''; |
|
| 92 | + $altitude_data = ''; |
|
| 93 | 93 | foreach($all_data as $data) |
| 94 | 94 | { |
| 95 | 95 | $altitude_data .= '[ "'.date("G:i",strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |