@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | |
20 | 20 | if (!isset($filter_name)) $filter_name = ''; |
21 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
21 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
22 | 22 | if ($airline_icao == '' && isset($globalFilter)) { |
23 | 23 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
24 | 24 | } |
@@ -33,19 +33,19 @@ discard block |
||
33 | 33 | </div> |
34 | 34 | <p>'._("Below is a chart that plots the busiest month during the <strong>last year</strong>.").'</p>'; |
35 | 35 | |
36 | -if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
36 | +if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
37 | 37 | elseif ($type == 'marine') $date_array = $Marine->countAllMonthsLastYear(true); |
38 | 38 | elseif ($type == 'tracker') $date_array = $Tracker->countAllMonthsLastYear(true); |
39 | 39 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
40 | 40 | $year_data = ''; |
41 | 41 | $year_cnt = ''; |
42 | -foreach($date_array as $year_item) |
|
42 | +foreach ($date_array as $year_item) |
|
43 | 43 | { |
44 | 44 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
45 | 45 | $year_cnt .= $year_item['date_count'].','; |
46 | 46 | } |
47 | 47 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
48 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
48 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
49 | 49 | print 'c3.generate({ |
50 | 50 | bindto: "#chart", |
51 | 51 | data: { x: "x", |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | print '</thead>'; |
69 | 69 | print '<tbody>'; |
70 | 70 | $i = 1; |
71 | - foreach($date_array as $date_item) |
|
71 | + foreach ($date_array as $date_item) |
|
72 | 72 | { |
73 | 73 | print '<tr>'; |
74 | 74 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | if (!isset($filter_name)) $filter_name = ''; |
20 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
20 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
21 | 21 | if ($airline_icao == '' && isset($globalFilter)) { |
22 | 22 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
23 | 23 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | </div> |
34 | 34 | <p>'._("Below is a chart that plots the busiest day during the <strong>last 7 days</strong>.").'</p>'; |
35 | 35 | |
36 | -if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
36 | +if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
37 | 37 | elseif ($type == 'marine') $date_array = $Marine->countAllDatesLast7Days(); |
38 | 38 | elseif ($type == 'tracker') $date_array = $Tracker->countAllDatesLast7Days(); |
39 | 39 | if (count($date_array) == 0) { |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
43 | 43 | $date_data = ''; |
44 | 44 | $date_cnt = ''; |
45 | -foreach($date_array as $date_item) |
|
45 | +foreach ($date_array as $date_item) |
|
46 | 46 | { |
47 | 47 | $date_data .= '"'.$date_item['date_name'].'",'; |
48 | 48 | $date_cnt .= $date_item['date_count'].','; |
49 | 49 | } |
50 | 50 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
51 | -$date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
51 | +$date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
52 | 52 | print 'c3.generate({ |
53 | 53 | bindto: "#chart", |
54 | 54 | data: { x: "x", |
@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | print '</script>'; |
58 | 58 | } |
59 | 59 | if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) { |
60 | - print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>'; |
|
60 | + print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>'; |
|
61 | 61 | } else { |
62 | 62 | print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>'; |
63 | 63 | } |
64 | -if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao,$filter_name); |
|
64 | +if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao, $filter_name); |
|
65 | 65 | elseif ($type == 'marine') $date_array = $Marine->countAllDates(); |
66 | 66 | elseif ($type == 'tracker') $date_array = $Tracker->countAllDates(); |
67 | 67 | if (!empty($date_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($date_array as $date_item) |
|
78 | + foreach ($date_array as $date_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($airline_icao == '' && isset($globalFilter)) { |
11 | 11 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
12 | 12 | } |
13 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
14 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
14 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
15 | 15 | |
16 | 16 | require_once('header.php'); |
17 | 17 | |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | </div> |
24 | 24 | <p>'._("Below are the <strong>Top 10</strong> most common aircraft types.").'</p>'; |
25 | 25 | |
26 | -$aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
26 | +$aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
27 | 27 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
28 | 28 | $aircraft_data = ''; |
29 | -foreach($aircraft_array as $aircraft_item) |
|
29 | +foreach ($aircraft_array as $aircraft_item) |
|
30 | 30 | { |
31 | 31 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
32 | 32 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | print '</thead>'; |
53 | 53 | print '<tbody>'; |
54 | 54 | $i = 1; |
55 | - foreach($aircraft_array as $aircraft_item) |
|
55 | + foreach ($aircraft_array as $aircraft_item) |
|
56 | 56 | { |
57 | 57 | print '<tr>'; |
58 | 58 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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>'; |
@@ -9,16 +9,16 @@ discard block |
||
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING); |
|
14 | -$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING); |
|
14 | +$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING); |
|
15 | 15 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
16 | 16 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
17 | 17 | } else $spotter_array = array(); |
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
21 | + $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="info column">'; |
24 | 24 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | include('route-sub-menu.php'); |
30 | 30 | print '<div class="column">'; |
31 | 31 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
32 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
32 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
33 | 33 | |
34 | 34 | $hour_array = $Spotter->countAllHoursByRoute($departure_airport, $arrival_airport); |
35 | 35 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $hour_data = ''; |
40 | 40 | $hour_cnt = ''; |
41 | 41 | $last = 0; |
42 | - foreach($hour_array as $hour_item) |
|
42 | + foreach ($hour_array as $hour_item) |
|
43 | 43 | { |
44 | - while($last != $hour_item['hour_name']) { |
|
44 | + while ($last != $hour_item['hour_name']) { |
|
45 | 45 | $hour_data .= '"'.$last.':00",'; |
46 | 46 | $hour_cnt .= '0,'; |
47 | 47 | $last++; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $hour_cnt .= $hour_item['hour_count'].','; |
52 | 52 | } |
53 | 53 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
54 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
54 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
55 | 55 | print 'c3.generate({ |
56 | 56 | bindto: "#chartHour", |
57 | 57 | data: { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | print '</thead>'; |
77 | 77 | print '<tbody>'; |
78 | 78 | $i = 1; |
79 | - foreach($hour_array as $hour_item) |
|
79 | + foreach ($hour_array as $hour_item) |
|
80 | 80 | { |
81 | 81 | print '<tr>'; |
82 | 82 | print '<td>'.$hour_item['hour_name'].':00</td>'; |