@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $globalLongitudeMin = '1.0'; //the minimum longitude (east) |
40 | 40 | |
41 | 41 | $globalCenterLatitude = '46.38'; //the latitude center of your coverage area |
42 | -$globalCenterLongitude = '5.29';//the longitude center of your coverage area |
|
42 | +$globalCenterLongitude = '5.29'; //the longitude center of your coverage area |
|
43 | 43 | |
44 | 44 | $globalLiveZoom = '9'; //default zoom on Live Map |
45 | 45 | $globalAirportZoom = '7'; //default zoom to begin to display airports icons |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $globalACARS = FALSE; |
141 | 141 | $globalACARSHost = '0.0.0.0'; // Local IP to listen |
142 | 142 | $globalACARSPort = '9999'; |
143 | -$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive |
|
143 | +$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive |
|
144 | 144 | $globalACARSArchiveKeepMonths = '0'; |
145 | 145 | |
146 | 146 | //APRS configuration (for glidernet) |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | //Retrieve Image from externals sources |
230 | 230 | $globalAircraftImageFetch = TRUE; |
231 | 231 | //Sources for Aircraft image |
232 | -$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); |
|
232 | +$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources'); |
|
233 | 233 | // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) |
234 | 234 | // 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', 'exif' => true); |
235 | 235 | // ************************ |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) |
238 | 238 | $globalSchedulesFetch = TRUE; |
239 | 239 | //Sources for airline schedule if not official airline site |
240 | -$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
240 | +$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
241 | 241 | |
242 | 242 | //Retrieve translation from external sources (set to FALSE for IVAO) |
243 | 243 | $globalTranslationFetch = TRUE; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | try { |
20 | 20 | $sth = $this->db->prepare($query); |
21 | 21 | $sth->execute(array(':name' => $name)); |
22 | - } catch(PDOException $e) { |
|
22 | + } catch (PDOException $e) { |
|
23 | 23 | echo $e->getMessage(); |
24 | 24 | } |
25 | 25 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | try { |
32 | 32 | $sth = $this->db->prepare($query); |
33 | 33 | $sth->execute(); |
34 | - } catch(PDOException $e) { |
|
34 | + } catch (PDOException $e) { |
|
35 | 35 | echo $e->getMessage(); |
36 | 36 | } |
37 | 37 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | try { |
44 | 44 | $sth = $this->db->prepare($query); |
45 | 45 | $sth->execute(); |
46 | - } catch(PDOException $e) { |
|
46 | + } catch (PDOException $e) { |
|
47 | 47 | echo $e->getMessage(); |
48 | 48 | } |
49 | 49 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | try { |
56 | 56 | $sth = $this->db->prepare($query); |
57 | 57 | $sth->execute(array(':type' => $type)); |
58 | - } catch(PDOException $e) { |
|
58 | + } catch (PDOException $e) { |
|
59 | 59 | echo $e->getMessage(); |
60 | 60 | } |
61 | 61 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -63,27 +63,27 @@ discard block |
||
63 | 63 | else return array(); |
64 | 64 | } |
65 | 65 | |
66 | - public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
66 | + public function position_all($timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
67 | 67 | $all_sat = $this->get_tle_names(); |
68 | 68 | $result = array(); |
69 | 69 | foreach ($all_sat as $sat) { |
70 | - $position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second); |
|
71 | - $result = array_merge($position,$result); |
|
70 | + $position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second); |
|
71 | + $result = array_merge($position, $result); |
|
72 | 72 | } |
73 | 73 | return $result; |
74 | 74 | } |
75 | 75 | |
76 | - public function position_all_type($type,$timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
76 | + public function position_all_type($type, $timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
77 | 77 | $all_sat = $this->get_tle_names_type($type); |
78 | 78 | $result = array(); |
79 | 79 | foreach ($all_sat as $sat) { |
80 | - $position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second); |
|
81 | - $result = array_merge($position,$result); |
|
80 | + $position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second); |
|
81 | + $result = array_merge($position, $result); |
|
82 | 82 | } |
83 | 83 | return $result; |
84 | 84 | } |
85 | 85 | |
86 | - public function position($name,$timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
86 | + public function position($name, $timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
87 | 87 | $qth = new Predict_QTH(); |
88 | 88 | $qth->lat = floatval(37.790252); |
89 | 89 | $qth->lon = floatval(-122.419968); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $tle_file = $this->get_tle($name); |
92 | 92 | //print_r($tle_file); |
93 | 93 | $type = $tle_file['tle_type']; |
94 | - $tle = new Predict_TLE($tle_file['tle_name'],$tle_file['tle_tle1'],$tle_file['tle_tle2']); |
|
94 | + $tle = new Predict_TLE($tle_file['tle_name'], $tle_file['tle_tle1'], $tle_file['tle_tle2']); |
|
95 | 95 | $sat = new Predict_Sat($tle); |
96 | 96 | $predict = new Predict(); |
97 | 97 | //if ($timestamp == '') $now = Predict_Time::get_current_daynum(); |
@@ -99,16 +99,16 @@ discard block |
||
99 | 99 | if ($timestamp_end == '') { |
100 | 100 | $now = Predict_Time::unix2daynum($timestamp_begin); |
101 | 101 | //echo $now; |
102 | - $predict->predict_calc($sat,$qth,$now); |
|
103 | - return array('name' => $name, 'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp_begin,'type' => $type); |
|
102 | + $predict->predict_calc($sat, $qth, $now); |
|
103 | + return array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp_begin, 'type' => $type); |
|
104 | 104 | } else { |
105 | 105 | $result = array(); |
106 | - for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp=$timestamp+$second) { |
|
106 | + for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp = $timestamp + $second) { |
|
107 | 107 | //echo $timestamp."\n"; |
108 | 108 | $now = Predict_Time::unix2daynum($timestamp); |
109 | 109 | //echo $now; |
110 | - $predict->predict_calc($sat,$qth,$now); |
|
111 | - $result[] = array('name' => $name,'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp,'type' => $type); |
|
110 | + $predict->predict_calc($sat, $qth, $now); |
|
111 | + $result[] = array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp, 'type' => $type); |
|
112 | 112 | } |
113 | 113 | return $result; |
114 | 114 | } |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | if (isset($_POST['airport'])) |
8 | 8 | { |
9 | 9 | header('Location: '.$globalURL.'/airport/'.$_POST['airport']); |
10 | -} else if (isset($_GET['airport'])){ |
|
10 | +} else if (isset($_GET['airport'])) { |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //calculuation for the pagination |
13 | - if($_GET['limit'] == "") |
|
13 | + if ($_GET['limit'] == "") |
|
14 | 14 | { |
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]; |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
31 | 31 | |
32 | - $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
32 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | 34 | $page_url = $globalURL.'/airport/'.$airport; |
35 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport); |
37 | 37 | |
38 | 38 | if (!empty($airport_array)) |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | $airport_names = $Spotter->getAllAirportNames(); |
52 | 52 | } |
53 | 53 | ksort($airport_names); |
54 | - foreach($airport_names as $airport_name) |
|
54 | + foreach ($airport_names as $airport_name) |
|
55 | 55 | { |
56 | - if($airport == $airport_name['airport_icao']) |
|
56 | + if ($airport == $airport_name['airport_icao']) |
|
57 | 57 | { |
58 | 58 | 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>'; |
59 | 59 | } else { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | print '<div class="table column">'; |
87 | 87 | if ($airport_array[0]['iata'] != "NA") |
88 | 88 | { |
89 | - print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>'; |
|
89 | + print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>'; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | include('table-output.php'); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; |
109 | 109 | } |
110 | 110 | } else { |
111 | - $Spotter= new Spotter(); |
|
111 | + $Spotter = new Spotter(); |
|
112 | 112 | $Stats = new Stats(); |
113 | 113 | $title = _("Airports"); |
114 | 114 | require_once('header.php'); |
@@ -121,11 +121,11 @@ discard block |
||
121 | 121 | ksort($airport_names); |
122 | 122 | $previous = null; |
123 | 123 | print '<div class="alphabet-legend">'; |
124 | - foreach($airport_names as $value) { |
|
124 | + foreach ($airport_names as $value) { |
|
125 | 125 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
126 | - if($previous !== $firstLetter) |
|
126 | + if ($previous !== $firstLetter) |
|
127 | 127 | { |
128 | - if ($previous !== null){ |
|
128 | + if ($previous !== null) { |
|
129 | 129 | print ' | '; |
130 | 130 | } |
131 | 131 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -134,13 +134,13 @@ discard block |
||
134 | 134 | } |
135 | 135 | print '</div>'; |
136 | 136 | $previous = null; |
137 | - foreach($airport_names as $value) { |
|
137 | + foreach ($airport_names as $value) { |
|
138 | 138 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
139 | 139 | if ($firstLetter != "") |
140 | 140 | { |
141 | - if($previous !== $firstLetter) |
|
141 | + if ($previous !== $firstLetter) |
|
142 | 142 | { |
143 | - if ($previous !== null){ |
|
143 | + if ($previous !== null) { |
|
144 | 144 | print '</div>'; |
145 | 145 | } |
146 | 146 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
17 | + $title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
25 | 25 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
26 | - foreach($airline_names as $airline_name) |
|
26 | + foreach ($airline_names as $airline_name) |
|
27 | 27 | { |
28 | - if($airline == $airline_name['airline_icao']) |
|
28 | + if ($airline == $airline_name['airline_icao']) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
31 | 31 | } else { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | include('airline-sub-menu.php'); |
64 | 64 | print '<div class="column">'; |
65 | 65 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
66 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
66 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
67 | 67 | $hour_array = $Spotter->countAllHoursByAirline($airline); |
68 | 68 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
69 | 69 | print '<div id="chartHour" class="chart" width="100%"></div> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | var data = google.visualization.arrayToDataTable([ |
75 | 75 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
76 | 76 | $hour_data = ''; |
77 | - foreach($hour_array as $hour_item) |
|
77 | + foreach ($hour_array as $hour_item) |
|
78 | 78 | { |
79 | 79 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
80 | 80 | } |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Aircraft from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Aircraft from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | |
49 | 49 | $aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer); |
50 | 50 | if (!empty($aircraft_array)) |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | print '</thead>'; |
60 | 60 | print '<tbody>'; |
61 | 61 | $i = 1; |
62 | - foreach($aircraft_array as $aircraft_item) |
|
62 | + foreach ($aircraft_array as $aircraft_item) |
|
63 | 63 | { |
64 | 64 | print '<tr>'; |
65 | 65 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | 12 | |
13 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
13 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Time of Day from %s"),$manufacturer); |
|
18 | + $title = sprintf(_("Most Common Time of Day from %s"), $manufacturer); |
|
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
21 | 21 | print '<form action="'.$globalURL.'/manufacturer" method="post">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | |
49 | 49 | $hour_array = $Spotter->countAllHoursByManufacturer($manufacturer); |
50 | 50 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | var data = google.visualization.arrayToDataTable([ |
57 | 57 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
58 | 58 | $hour_data = ''; |
59 | - foreach($hour_array as $hour_item) |
|
59 | + foreach ($hour_array as $hour_item) |
|
60 | 60 | { |
61 | 61 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
62 | 62 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $Common = new Common(); |
13 | 13 | $settings_filename = '../require/settings.php'; |
14 | 14 | $content = file_get_contents($settings_filename); |
15 | - $fh = fopen($settings_filename,'w'); |
|
15 | + $fh = fopen($settings_filename, 'w'); |
|
16 | 16 | foreach ($settings as $settingname => $value) { |
17 | 17 | if ($value == 'TRUE' || $value == 'FALSE') { |
18 | 18 | $pattern = '/\R\$'.$settingname." = ".'(TRUE|FALSE)'."/"; |
@@ -79,21 +79,21 @@ discard block |
||
79 | 79 | $replace = "\n".'\$'.$settingname." = '".$value."'"; |
80 | 80 | } |
81 | 81 | $rep_cnt = 0; |
82 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
82 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
83 | 83 | |
84 | 84 | /// If setting was a string and is now an array |
85 | 85 | if ($rep_cnt === 0 && is_array($value)) { |
86 | 86 | $pattern = '/\R\$'.$settingname." = '".'(.*)'."'/"; |
87 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
87 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | // If setting is not in settings.php (for update) |
91 | 91 | if ($rep_cnt === 0) { |
92 | - $content = preg_replace('/\?>/',$replace.";\n?>",$content,1,$rep_cnt); |
|
92 | + $content = preg_replace('/\?>/', $replace.";\n?>", $content, 1, $rep_cnt); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | } |
96 | - fwrite($fh,$content); |
|
96 | + fwrite($fh, $content); |
|
97 | 97 | fclose($fh); |
98 | 98 | } |
99 | 99 | |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | $Common = new Common(); |
106 | 106 | $settings_filename = '../require/settings.php'; |
107 | 107 | $content = file_get_contents($settings_filename); |
108 | - $fh = fopen($settings_filename,'w'); |
|
108 | + $fh = fopen($settings_filename, 'w'); |
|
109 | 109 | foreach ($settings as $settingname) { |
110 | 110 | $pattern = '/\R\$'.$settingname." = /"; |
111 | 111 | $replace = '//$'.$settingname." = "; |
112 | - $content = preg_replace($pattern,$replace,$content); |
|
112 | + $content = preg_replace($pattern, $replace, $content); |
|
113 | 113 | } |
114 | - fwrite($fh,$content); |
|
114 | + fwrite($fh, $content); |
|
115 | 115 | fclose($fh); |
116 | 116 | } |
117 | 117 | } |
@@ -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 Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | 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>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($aircraft_array as $aircraft_item) |
|
78 | + foreach ($aircraft_array as $aircraft_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($airline == $airline_name['airline_icao']) |
|
27 | + if ($airline == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Routes").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
67 | 67 | if (!empty($route_array)) |
68 | 68 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($route_array as $route_item) |
|
81 | + foreach ($route_array as $route_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |