@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $ATC = new ATC(); |
6 | 6 | |
7 | 7 | if (isset($_GET['atcid'])) { |
8 | - $atcid = filter_input(INPUT_GET,'atcid',FILTER_SANITIZE_NUMBER_INT); |
|
9 | - $atcident = filter_input(INPUT_GET,'atcident',FILTER_SANITIZE_STRING); |
|
8 | + $atcid = filter_input(INPUT_GET, 'atcid', FILTER_SANITIZE_NUMBER_INT); |
|
9 | + $atcident = filter_input(INPUT_GET, 'atcident', FILTER_SANITIZE_STRING); |
|
10 | 10 | $atc_data = $ATC->getById($atcid); |
11 | 11 | if (!isset($atc_data[0])) $atc_data = $ATC->getByIdent($atcident); |
12 | 12 | ?> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | print '</div>'; |
39 | 39 | |
40 | 40 | //print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
41 | -print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],3).', '.round($spotter_item['longitude'],3).'</div>'; |
|
41 | +print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'], 3).', '.round($spotter_item['longitude'], 3).'</div>'; |
|
42 | 42 | if ($spotter_item['atc_range'] > 0) { |
43 | 43 | print '<div><span>'._("Range").'</span>'; |
44 | 44 | print $spotter_item['atc_range']; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $globalLongitudeMin = '1.0'; //the minimum longitude (east) |
43 | 43 | |
44 | 44 | $globalCenterLatitude = '46.38'; //the latitude center of your coverage area |
45 | -$globalCenterLongitude = '5.29';//the longitude center of your coverage area |
|
45 | +$globalCenterLongitude = '5.29'; //the longitude center of your coverage area |
|
46 | 46 | |
47 | 47 | $globalLiveZoom = '9'; //default zoom on Live Map |
48 | 48 | $globalAirportZoom = '7'; //default zoom to begin to display airports icons |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $globalACARS = FALSE; |
152 | 152 | $globalACARSHost = '0.0.0.0'; // Local IP to listen |
153 | 153 | $globalACARSPort = '9999'; |
154 | -$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive |
|
154 | +$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive |
|
155 | 155 | $globalACARSArchiveKeepMonths = '0'; |
156 | 156 | |
157 | 157 | //APRS configuration (for glidernet) |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | //Check by aircraft ICAO if image is not found by registration |
249 | 249 | $globalAircraftImageCheckICAO = TRUE; |
250 | 250 | //Sources for Aircraft image |
251 | -$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); |
|
251 | +$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources'); |
|
252 | 252 | // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) |
253 | 253 | // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true); |
254 | 254 | // ************************ |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | //Retrieve Image from externals sources |
258 | 258 | $globalMarineImageFetch = TRUE; |
259 | 259 | //Sources for Marine image |
260 | -$globalMarineImageSources = array('wikimedia','flickr','deviantart','bing','customsources'); |
|
260 | +$globalMarineImageSources = array('wikimedia', 'flickr', 'deviantart', 'bing', 'customsources'); |
|
261 | 261 | // Custom source configuration {mmsi} will be replaced by vessel mmsi, {name} by it's name (exif get copyright from exif data for each pic) |
262 | 262 | // example of config : $globalMarineImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{name}.jpg','original' => 'http://myurl/original/{name}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true); |
263 | 263 | // ************************ |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) |
266 | 266 | $globalSchedulesFetch = TRUE; |
267 | 267 | //Sources for airline schedule if not official airline site |
268 | -$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
268 | +$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
269 | 269 | |
270 | 270 | //Retrieve translation from external sources (set to FALSE for IVAO) |
271 | 271 | $globalTranslationFetch = TRUE; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
10 | 10 | require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
11 | 11 | require_once(dirname(__FILE__).'/../require/class.Common.php'); |
12 | -$Common=new Common(); |
|
12 | +$Common = new Common(); |
|
13 | 13 | $authorize = false; |
14 | 14 | $params = array(); |
15 | 15 | $userip = $Common->getUserIP(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $authorize = true; |
21 | 21 | break; |
22 | 22 | } |
23 | - if ($userip != '' && isset($cb['host']) && in_array($userip,explode(',',$cb['host']))) { |
|
23 | + if ($userip != '' && isset($cb['host']) && in_array($userip, explode(',', $cb['host']))) { |
|
24 | 24 | $params = $globalSources[$key]; |
25 | 25 | $authorize = true; |
26 | 26 | break; |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | |
47 | 47 | if (isset($globalServer) && $globalServer) { |
48 | 48 | if ($globalDebug) echo "Using Server Mode\n"; |
49 | - $SI=new SpotterServer(); |
|
50 | -} else $SI=new SpotterImport($Connection->db); |
|
49 | + $SI = new SpotterServer(); |
|
50 | +} else $SI = new SpotterImport($Connection->db); |
|
51 | 51 | if (isset($globalTracker) && $globalTracker) $TI = new TrackerImport($Connection->db); |
52 | 52 | if (isset($globalMarine) && $globalMarine) { |
53 | 53 | $AIS = new AIS(); |
54 | 54 | $MI = new MarineImport($Connection->db); |
55 | 55 | } |
56 | -$Source=new Source($Connection->db); |
|
56 | +$Source = new Source($Connection->db); |
|
57 | 57 | date_default_timezone_set('UTC'); |
58 | 58 | |
59 | 59 | $buffer = ''; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $data['altitude'] = round($buffer['altitude']*3.28084); |
67 | 67 | $data['speed'] = $buffer['speed']; |
68 | 68 | //$data['heading'] = $buffer['cap']; // Only N/S/E/W |
69 | - $data['datetime'] = date('Y-m-d H:i:s',$buffer['timestamp']); |
|
69 | + $data['datetime'] = date('Y-m-d H:i:s', $buffer['timestamp']); |
|
70 | 70 | $data['comment'] = ''; |
71 | 71 | if (isset($buffer['battery']) && $buffer['battery'] != '') $data['comment'] .= 'Battery: '.$buffer['battery'].'% '; |
72 | 72 | //if (isset($buffer['snr']) && $buffer['snr'] != '') $data['comment'] .= 'SNR: '.$buffer['snr'].' '; |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | |
13 | 13 | $page_url = $globalURL.'/tools-geoid'; |
14 | 14 | |
15 | -$latitude = filter_input(INPUT_POST,'latitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
16 | -$longitude = filter_input(INPUT_POST,'longitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
17 | -$altitude = filter_input(INPUT_POST,'altitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
15 | +$latitude = filter_input(INPUT_POST, 'latitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
16 | +$longitude = filter_input(INPUT_POST, 'longitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
17 | +$altitude = filter_input(INPUT_POST, 'altitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
18 | 18 | |
19 | 19 | print '<div class="info column">'; |
20 | 20 | print '<h1>'._("Geoid Height Calculator").'</h1>'; |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | |
52 | 52 | if ($latitude != '' && $longitude != '') { |
53 | 53 | $globalDebug = FALSE; |
54 | - $geoid = $GeoidHeight->get($latitude,$longitude); |
|
54 | + $geoid = $GeoidHeight->get($latitude, $longitude); |
|
55 | 55 | print '<div class="row">'; |
56 | 56 | print '<div class="col-md-3 col-md-offset-5">'; |
57 | 57 | print '<div class="col-sm-6"><b>Geoid</b></div>'; |
58 | 58 | print '<div class="col-sm-6">'.$geoid.'</div>'; |
59 | 59 | if ($altitude != '') { |
60 | 60 | print '<div class="col-sm-6"><b>AMSL Elevation</b></div>'; |
61 | - print '<div class="col-sm-6">'.round($altitude-$geoid,3).'</div>'; |
|
61 | + print '<div class="col-sm-6">'.round($altitude - $geoid, 3).'</div>'; |
|
62 | 62 | } |
63 | 63 | print '<div class="col-sm-6"><b>Earth Gravity Model</b></div>'; |
64 | 64 | if (isset($globalGeoidSource) && $globalGeoidSource != '') $geoidsource = $globalGeoidSource; |
@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort=filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else $spotter_array = array(); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"), $registration); |
|
16 | 16 | |
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | include('registration-sub-menu.php'); |
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
28 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
28 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
29 | 29 | $airport_airport_array = $Spotter->countAllArrivalAirportsByRegistration($registration); |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
31 | 31 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | print '<script>'; |
35 | 35 | print 'var series = ['; |
36 | 36 | $airport_data = ''; |
37 | - foreach($airport_airport_array as $airport_item) |
|
37 | + foreach ($airport_airport_array as $airport_item) |
|
38 | 38 | { |
39 | 39 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
40 | 40 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | print '</thead>'; |
89 | 89 | print '<tbody>'; |
90 | 90 | $i = 1; |
91 | - foreach($airport_airport_array as $airport_item) |
|
91 | + foreach ($airport_airport_array as $airport_item) |
|
92 | 92 | { |
93 | 93 | print '<tr>'; |
94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | |
12 | 12 | $from_archive = false; |
13 | 13 | if (isset($_GET['ident'])) { |
14 | - $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
14 | + $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
15 | 15 | if (isset($_GET['currenttime'])) { |
16 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
16 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
17 | 17 | $currenttime = round($currenttime/1000); |
18 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident,$currenttime); |
|
18 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident, $currenttime); |
|
19 | 19 | if (empty($spotter_array)) { |
20 | 20 | $from_archive = true; |
21 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident,$currenttime); |
|
21 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident, $currenttime); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } else { |
@@ -30,16 +30,16 @@ discard block |
||
30 | 30 | } |
31 | 31 | } |
32 | 32 | if (isset($_GET['famtrackid'])) { |
33 | - $famtrackid = urldecode(filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING)); |
|
33 | + $famtrackid = urldecode(filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING)); |
|
34 | 34 | if (isset($_GET['currenttime'])) { |
35 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
35 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
36 | 36 | $currenttime = round($currenttime/1000); |
37 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid,$currenttime); |
|
37 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid, $currenttime); |
|
38 | 38 | |
39 | 39 | if (empty($spotter_array)) { |
40 | 40 | $from_archive = true; |
41 | 41 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
42 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid,$currenttime); |
|
42 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid, $currenttime); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
60 | 60 | { |
61 | 61 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
62 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
62 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
63 | 63 | } else $image = $spotter_item['image_thumbnail']; |
64 | 64 | |
65 | 65 | } |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | print '<div><span>'._("Altitude").'</span>'; |
80 | 80 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
81 | 81 | try { |
82 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
83 | - } catch(Exception $e) { |
|
82 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
83 | + } catch (Exception $e) { |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAirport($airport); |
62 | 62 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '<script>'; |
67 | 67 | print 'var series = ['; |
68 | 68 | $airport_data = ''; |
69 | - foreach($airport_airport_array as $airport_item) |
|
69 | + foreach ($airport_airport_array as $airport_item) |
|
70 | 70 | { |
71 | 71 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
72 | 72 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | print '</thead>'; |
122 | 122 | print '<tbody>'; |
123 | 123 | $i = 1; |
124 | - foreach($airport_airport_array as $airport_item) |
|
124 | + foreach ($airport_airport_array as $airport_item) |
|
125 | 125 | { |
126 | 126 | print '<tr>'; |
127 | 127 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Airlines").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | |
62 | 62 | $airline_array = $Spotter->countAllAirlinesByAirport($airport); |
63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
64 | 64 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3pie.min.js"></script>'; |
65 | 65 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
66 | 66 | $airline_data = ''; |
67 | - foreach($airline_array as $airline_item) |
|
67 | + foreach ($airline_array as $airline_item) |
|
68 | 68 | { |
69 | 69 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
70 | 70 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | print '</thead>'; |
92 | 92 | print '<tbody>'; |
93 | 93 | $i = 1; |
94 | - foreach($airline_array as $airline_item) |
|
94 | + foreach ($airline_array as $airline_item) |
|
95 | 95 | { |
96 | 96 | print '<tr>'; |
97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | include('airport-sub-menu.php'); |
57 | 57 | print '<div class="column">'; |
58 | 58 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
59 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
59 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
60 | 60 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirport($airport); |
61 | 61 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
62 | 62 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | print '<script>'; |
66 | 66 | print 'var series = ['; |
67 | 67 | $airport_data = ''; |
68 | - foreach($airport_airport_array as $airport_item) |
|
68 | + foreach ($airport_airport_array as $airport_item) |
|
69 | 69 | { |
70 | 70 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
71 | 71 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | print '</thead>'; |
121 | 121 | print '<tbody>'; |
122 | 122 | $i = 1; |
123 | - foreach($airport_airport_array as $airport_item) |
|
123 | + foreach ($airport_airport_array as $airport_item) |
|
124 | 124 | { |
125 | 125 | print '<tr>'; |
126 | 126 | print '<td><strong>'.$i.'</strong></td>'; |