@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airport_names = $tats->getAllAirportNames(); |
25 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
25 | + if (empty($airport_names)) { |
|
26 | + $airport_names = $Spotter->getAllAirportNames(); |
|
27 | + } |
|
26 | 28 | ksort($airport_names); |
27 | 29 | foreach($airport_names as $airport_name) |
28 | 30 | { |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $aircraft_types = $Stats->getAllAircraftTypes(); |
25 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
25 | + if (empty($aircraft_types)) { |
|
26 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
27 | + } |
|
26 | 28 | foreach($aircraft_types as $aircraft_type) |
27 | 29 | { |
28 | 30 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airport_names = $tats->getAllAirportNames(); |
25 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
25 | + if (empty($airport_names)) { |
|
26 | + $airport_names = $Spotter->getAllAirportNames(); |
|
27 | + } |
|
26 | 28 | ksort($airport_names); |
27 | 29 | foreach($airport_names as $airport_name) |
28 | 30 | { |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airport_names = $tats->getAllAirportNames(); |
25 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
25 | + if (empty($airport_names)) { |
|
26 | + $airport_names = $Spotter->getAllAirportNames(); |
|
27 | + } |
|
26 | 28 | ksort($airport_names); |
27 | 29 | foreach($airport_names as $airport_name) |
28 | 30 | { |
@@ -5,7 +5,9 @@ discard block |
||
5 | 5 | $Stats = new Stats(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Departure Airport by Country"); |
7 | 7 | |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 12 | if ($airline_icao == 'all') { |
11 | 13 | unset($_COOKIE['stats_airline_icao']); |
@@ -14,8 +16,10 @@ discard block |
||
14 | 16 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
15 | 17 | $airline_icao = $_COOKIE['stats_airline_icao']; |
16 | 18 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
17 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
18 | -} |
|
19 | + if (isset($globalFilter['airline'])) { |
|
20 | + $airline_icao = $globalFilter['airline'][0]; |
|
21 | + } |
|
22 | + } |
|
19 | 23 | setcookie('stats_airline_icao',$airline_icao); |
20 | 24 | |
21 | 25 | require_once('header.php'); |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
24 | + if (empty($airline_names)) { |
|
25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
26 | + } |
|
25 | 27 | foreach($airline_names as $airline_name) |
26 | 28 | { |
27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
44 | 46 | { |
45 | 47 | 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" />'; |
46 | - } |
|
47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | 49 | { |
49 | 50 | 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" />'; |
50 | 51 | } |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airport_names = $tats->getAllAirportNames(); |
25 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
25 | + if (empty($airport_names)) { |
|
26 | + $airport_names = $Spotter->getAllAirportNames(); |
|
27 | + } |
|
26 | 28 | ksort($airport_names); |
27 | 29 | foreach($airport_names as $airport_name) |
28 | 30 | { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -45,7 +45,9 @@ discard block |
||
45 | 45 | $METAR = new METAR(); |
46 | 46 | $metar_info = $METAR->getMETAR($airport_icao); |
47 | 47 | //print_r($metar_info); |
48 | - if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
48 | + if (isset($metar_info[0]['metar'])) { |
|
49 | + $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
50 | + } |
|
49 | 51 | //print_r($metar_parse); |
50 | 52 | } |
51 | 53 | |
@@ -59,7 +61,9 @@ discard block |
||
59 | 61 | print '<option></option>'; |
60 | 62 | $Stats = new Stats(); |
61 | 63 | $airport_names = $Stats->getAllAirportNames(); |
62 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
64 | + if (empty($airport_names)) { |
|
65 | + $airport_names = $Spotter->getAllAirportNames(); |
|
66 | + } |
|
63 | 67 | ksort($airport_names); |
64 | 68 | foreach($airport_names as $airport_name) |
65 | 69 | { |
@@ -100,7 +104,9 @@ discard block |
||
100 | 104 | $all_data = $Stats->getLast7DaysAirports($airport_icao); |
101 | 105 | if (isset($globalTimezone)) { |
102 | 106 | date_default_timezone_set($globalTimezone); |
103 | - } else date_default_timezone_set('UTC'); |
|
107 | + } else { |
|
108 | + date_default_timezone_set('UTC'); |
|
109 | + } |
|
104 | 110 | if (count($all_data) > 0) { |
105 | 111 | print '<div id="chart6" class="chart" width="100%"></div> |
106 | 112 | <script> |