@@ -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 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
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>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | if (!isset($filter_name)) $filter_name = ''; |
26 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
26 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
27 | 27 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
28 | 28 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
29 | 29 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
33 | 33 | if (isset($airline_info[0]['name'])) { |
34 | 34 | $airline_name = $airline_info[0]['name']; |
35 | - } elseif (strpos($airline_icao,'alliance_') !== FALSE) { |
|
35 | + } elseif (strpos($airline_icao, 'alliance_') !== FALSE) { |
|
36 | 36 | $alliance_name = $airline_icao; |
37 | 37 | } |
38 | 38 | } |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | $title = _("Statistics"); |
43 | 43 | } |
44 | 44 | |
45 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
46 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
45 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
46 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
47 | 47 | |
48 | 48 | require_once('header.php'); |
49 | 49 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | date_default_timezone_set('UTC'); |
75 | 75 | $lastupdate = strtotime($last_update[0]['value']); |
76 | 76 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
77 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
77 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | ?> |
@@ -86,31 +86,31 @@ discard block |
||
86 | 86 | <?php |
87 | 87 | if ($type == 'aircraft') { |
88 | 88 | ?> |
89 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
90 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
91 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
92 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
89 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
90 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
91 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
92 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
93 | 93 | <?php |
94 | 94 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
95 | 95 | ?> |
96 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
97 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
96 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
97 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
98 | 98 | <?php |
99 | 99 | } |
100 | 100 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
101 | 101 | ?> |
102 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
103 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
102 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
103 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
104 | 104 | <?php |
105 | 105 | } |
106 | 106 | ?> |
107 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircraft types"); ?></span> |
|
108 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
107 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircraft types"); ?></span> |
|
108 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
109 | 109 | <?php |
110 | 110 | if ($airline_icao == '') { |
111 | 111 | ?> |
112 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
113 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
112 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
113 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
114 | 114 | <?php |
115 | 115 | } |
116 | 116 | ?> |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | if (!(isset($globalVA) && $globalVA) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS) && !(isset($globalVAM) && $globalVAM)) { |
119 | 119 | if ($airline_icao == '' || $airline_icao == 'all') { |
120 | 120 | ?> |
121 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
122 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
121 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
122 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
123 | 123 | <?php |
124 | 124 | } |
125 | 125 | } |
@@ -127,35 +127,35 @@ discard block |
||
127 | 127 | <?php |
128 | 128 | } elseif ($type == 'marine') { |
129 | 129 | ?> |
130 | - <span><span class="badge"><?php print number_format($Stats->countOverallMarine($filter_name,$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
131 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
130 | + <span><span class="badge"><?php print number_format($Stats->countOverallMarine($filter_name, $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
131 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
132 | 132 | <?php |
133 | 133 | if (isset($globalVM) && $globalVM) { |
134 | 134 | ?> |
135 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes($filter_name,$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
136 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
137 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineRaces($filter_name,$year,$month)); ?></span> <?php echo _("Races"); ?></span> |
|
138 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
139 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineCaptains($filter_name,$year,$month)); ?></span> <?php echo _("Captains"); ?></span> |
|
140 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
135 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes($filter_name, $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
136 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
137 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineRaces($filter_name, $year, $month)); ?></span> <?php echo _("Races"); ?></span> |
|
138 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
139 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineCaptains($filter_name, $year, $month)); ?></span> <?php echo _("Captains"); ?></span> |
|
140 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
141 | 141 | <?php |
142 | 142 | } else { |
143 | 143 | ?> |
144 | - <span><span class="badge"><?php print number_format($Stats->countOverallMarineTypes($filter_name,$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
145 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
144 | + <span><span class="badge"><?php print number_format($Stats->countOverallMarineTypes($filter_name, $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
145 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
146 | 146 | <?php |
147 | 147 | } |
148 | 148 | } elseif ($type == 'tracker') { |
149 | 149 | ?> |
150 | - <span><span class="badge"><?php print number_format($Stats->countOverallTracker($filter_name,$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
151 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
152 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
153 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
150 | + <span><span class="badge"><?php print number_format($Stats->countOverallTracker($filter_name, $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
151 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
152 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
153 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
154 | 154 | <?php |
155 | 155 | } |
156 | 156 | ?> |
157 | 157 | </p> |
158 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
158 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
159 | 159 | <div class="specific-stats"> |
160 | 160 | <?php |
161 | 161 | if ($type == 'aircraft') { |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | <div class="col-md-6"> |
165 | 165 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
166 | 166 | <?php |
167 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
167 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
168 | 168 | if (count($aircraft_array) == 0) { |
169 | 169 | print _("No data available"); |
170 | 170 | } else { |
171 | 171 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
172 | 172 | $aircraft_data = ''; |
173 | - foreach($aircraft_array as $aircraft_item) { |
|
173 | + foreach ($aircraft_array as $aircraft_item) { |
|
174 | 174 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
175 | 175 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
176 | 176 | } |
@@ -199,16 +199,16 @@ discard block |
||
199 | 199 | ?> |
200 | 200 | </div> |
201 | 201 | </div> |
202 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
202 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
203 | 203 | <?php |
204 | 204 | if ($airline_icao == '' || $airline_icao == 'all') { |
205 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
205 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
206 | 206 | if (count($airline_array) > 0) { |
207 | 207 | print '<div class="col-md-6">'; |
208 | 208 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
209 | 209 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
210 | 210 | $airline_data = ''; |
211 | - foreach($airline_array as $airline_item) { |
|
211 | + foreach ($airline_array as $airline_item) { |
|
212 | 212 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
213 | 213 | } |
214 | 214 | $airline_data = substr($airline_data, 0, -1); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | ?> |
235 | 235 | </div> |
236 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
236 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
237 | 237 | <?php |
238 | 238 | } |
239 | 239 | } |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | <div class="col-md-6"> |
246 | 246 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
247 | 247 | <?php |
248 | - $marine_array = $Stats->countAllMarineTypes(true,$filter_name,$year,$month); |
|
248 | + $marine_array = $Stats->countAllMarineTypes(true, $filter_name, $year, $month); |
|
249 | 249 | if (count($marine_array) == 0) print _("No data available"); |
250 | 250 | else { |
251 | 251 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
252 | 252 | $marine_data = ''; |
253 | - foreach($marine_array as $marine_item) { |
|
253 | + foreach ($marine_array as $marine_item) { |
|
254 | 254 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
255 | 255 | } |
256 | 256 | $marine_data = substr($marine_data, 0, -1); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | ?> |
280 | 280 | </div> |
281 | 281 | </div> |
282 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
282 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
283 | 283 | <!-- </div>--> |
284 | 284 | <?php |
285 | 285 | if (isset($globalVM) && $globalVM) { |
@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | <div class="col-md-6"> |
288 | 288 | <h2><?php echo _("Top 10 Races Number of Participants"); ?></h2> |
289 | 289 | <?php |
290 | - $marine_array = $Marine->countAllCaptainsByRaces(true,$filter_name,$year,$month); |
|
290 | + $marine_array = $Marine->countAllCaptainsByRaces(true, $filter_name, $year, $month); |
|
291 | 291 | if (count($marine_array) == 0) print _("No data available"); |
292 | 292 | else { |
293 | 293 | print '<div id="chart991" class="chart" width="100%"></div><script>'; |
294 | 294 | $marine_data = ''; |
295 | - foreach($marine_array as $marine_item) { |
|
295 | + foreach ($marine_array as $marine_item) { |
|
296 | 296 | $marine_data .= '["'.$marine_item['marine_race_name'].'",'.$marine_item['marine_captain_count'].'],'; |
297 | 297 | } |
298 | 298 | $marine_data = substr($marine_data, 0, -1); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | ?> |
323 | 323 | </div> |
324 | 324 | </div> |
325 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
325 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
326 | 326 | </div> |
327 | 327 | <div class="row column"> |
328 | 328 | |
@@ -335,12 +335,12 @@ discard block |
||
335 | 335 | <div class="col-md-6"> |
336 | 336 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
337 | 337 | <?php |
338 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
338 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month); |
|
339 | 339 | if (count($tracker_array) == 0) print _("No data available"); |
340 | 340 | else { |
341 | 341 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
342 | 342 | $tracker_data = ''; |
343 | - foreach($tracker_array as $tracker_item) { |
|
343 | + foreach ($tracker_array as $tracker_item) { |
|
344 | 344 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
345 | 345 | } |
346 | 346 | $tracker_data = substr($tracker_data, 0, -1); |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | ?> |
371 | 371 | </div> |
372 | 372 | </div> |
373 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
373 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
374 | 374 | <!-- </div>--> |
375 | 375 | <?php |
376 | 376 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | else { |
386 | 386 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
387 | 387 | $owner_data = ''; |
388 | - foreach($owner_array as $owner_item) { |
|
388 | + foreach ($owner_array as $owner_item) { |
|
389 | 389 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
390 | 390 | } |
391 | 391 | $owner_data = substr($owner_data, 0, -1); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | </div> |
406 | 406 | --> |
407 | 407 | </div> |
408 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
408 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
409 | 409 | <div class="col-md-6"> |
410 | 410 | <h2><?php echo _("Top 10 Most Common Countries Owners"); ?></h2> |
411 | 411 | <?php |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | else { |
415 | 415 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
416 | 416 | $owner_data = ''; |
417 | - foreach($countries_array as $owner_item) { |
|
417 | + foreach ($countries_array as $owner_item) { |
|
418 | 418 | $owner_data .= '["'.$owner_item['country_name'].'",'.$owner_item['country_count'].'],'; |
419 | 419 | } |
420 | 420 | $owner_data = substr($owner_data, 0, -1); |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | --> |
436 | 436 | </div> |
437 | 437 | |
438 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
438 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
439 | 439 | ² </div> |
440 | 440 | <div class="row column"> |
441 | 441 | <div class="col-md-6"> |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | else { |
447 | 447 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
448 | 448 | $launch_site_data = ''; |
449 | - foreach($launch_site_array as $launch_site_item) { |
|
449 | + foreach ($launch_site_array as $launch_site_item) { |
|
450 | 450 | $launch_site_data .= '["'.$launch_site_item['launch_site'].'",'.$launch_site_item['launch_site_count'].'],'; |
451 | 451 | } |
452 | 452 | $launch_site_data = substr($launch_site_data, 0, -1); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | ?> |
474 | 474 | <div class="row column"> |
475 | 475 | <?php |
476 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
476 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
477 | 477 | //if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
478 | 478 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
479 | 479 | if (empty($flightover_array)) { |
@@ -484,12 +484,12 @@ discard block |
||
484 | 484 | ?> |
485 | 485 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
486 | 486 | <?php |
487 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
487 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
488 | 488 | if (count($pilot_array) == 0) print _("No data available"); |
489 | 489 | else { |
490 | 490 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
491 | 491 | $pilot_data = ''; |
492 | - foreach($pilot_array as $pilot_item) { |
|
492 | + foreach ($pilot_array as $pilot_item) { |
|
493 | 493 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
494 | 494 | } |
495 | 495 | $pilot_data = substr($pilot_data, 0, -1); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | ?> |
511 | 511 | </div> |
512 | 512 | |
513 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
513 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
514 | 514 | <?php |
515 | 515 | } |
516 | 516 | // else { |
@@ -519,12 +519,12 @@ discard block |
||
519 | 519 | <div class="col-md-6"> |
520 | 520 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
521 | 521 | <?php |
522 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
522 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
523 | 523 | if (count($owner_array) == 0) print _("No data available"); |
524 | 524 | else { |
525 | 525 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
526 | 526 | $owner_data = ''; |
527 | - foreach($owner_array as $owner_item) { |
|
527 | + foreach ($owner_array as $owner_item) { |
|
528 | 528 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
529 | 529 | } |
530 | 530 | $owner_data = substr($owner_data, 0, -1); |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | </div> |
544 | 544 | </div> |
545 | 545 | |
546 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
546 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
547 | 547 | <?php |
548 | 548 | } |
549 | 549 | if (!empty($flightover_array)) { |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
558 | 558 | print 'var series = ['; |
559 | 559 | $flightover_data = ''; |
560 | - foreach($flightover_array as $flightover_item) { |
|
560 | + foreach ($flightover_array as $flightover_item) { |
|
561 | 561 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
562 | 562 | } |
563 | 563 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -602,12 +602,12 @@ discard block |
||
602 | 602 | } |
603 | 603 | ?> |
604 | 604 | </div> |
605 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
605 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
606 | 606 | </div> |
607 | 607 | <?php |
608 | 608 | } |
609 | 609 | if ($type == 'marine') { |
610 | - $flightover_array = $Stats->countAllMarineOverCountries(true,$filter_name,$year,$month); |
|
610 | + $flightover_array = $Stats->countAllMarineOverCountries(true, $filter_name, $year, $month); |
|
611 | 611 | ?> |
612 | 612 | <!-- <div class="row column">--> |
613 | 613 | <div class="col-md-6"> |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
619 | 619 | print 'var series = ['; |
620 | 620 | $flightover_data = ''; |
621 | - foreach($flightover_array as $flightover_item) { |
|
621 | + foreach ($flightover_array as $flightover_item) { |
|
622 | 622 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
623 | 623 | } |
624 | 624 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | <div class="more"> |
659 | 659 | <a href="<?php print $globalURL; ?>/marine/statistics/country" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
660 | 660 | </div> |
661 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
661 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
662 | 662 | </div> |
663 | 663 | </div> |
664 | 664 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
677 | 677 | print 'var series = ['; |
678 | 678 | $flightover_data = ''; |
679 | - foreach($flightover_array as $flightover_item) { |
|
679 | + foreach ($flightover_array as $flightover_item) { |
|
680 | 680 | $flightover_data .= '[ "'.$flightover_item['tracker_country_iso3'].'",'.$flightover_item['tracker_count'].'],'; |
681 | 681 | } |
682 | 682 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -726,14 +726,14 @@ discard block |
||
726 | 726 | <div class="row column"> |
727 | 727 | <div class="col-md-6"> |
728 | 728 | <?php |
729 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
729 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
730 | 730 | if (count($airport_airport_array) > 0) { |
731 | 731 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
732 | 732 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
733 | 733 | print "\n"; |
734 | 734 | print 'var series = ['; |
735 | 735 | $airport_data = ''; |
736 | - foreach($airport_airport_array as $airport_item) { |
|
736 | + foreach ($airport_airport_array as $airport_item) { |
|
737 | 737 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
738 | 738 | } |
739 | 739 | $airport_data = substr($airport_data, 0, -1); |
@@ -783,18 +783,18 @@ discard block |
||
783 | 783 | } |
784 | 784 | ?> |
785 | 785 | </div> |
786 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
786 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
787 | 787 | |
788 | 788 | <div class="col-md-6"> |
789 | 789 | <?php |
790 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
790 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
791 | 791 | if (count($airport_airport_array2) > 0) { |
792 | 792 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
793 | 793 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
794 | 794 | print "\n"; |
795 | 795 | print 'var series = ['; |
796 | 796 | $airport_data = ''; |
797 | - foreach($airport_airport_array2 as $airport_item) |
|
797 | + foreach ($airport_airport_array2 as $airport_item) |
|
798 | 798 | { |
799 | 799 | if (isset($airport_item['airport_arrival_longitude']) && isset($airport_item['airport_arrival_latitude'])) { |
800 | 800 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | ?> |
849 | 849 | </div> |
850 | 850 | </div> |
851 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
851 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
852 | 852 | <?php |
853 | 853 | } |
854 | 854 | if ($type == 'aircraft') { |
@@ -860,18 +860,18 @@ discard block |
||
860 | 860 | <div class="col-md-6"> |
861 | 861 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
862 | 862 | <?php |
863 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
863 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
864 | 864 | if (count($year_array) == 0) print _("No data available"); |
865 | 865 | else { |
866 | 866 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
867 | 867 | $year_data = ''; |
868 | 868 | $year_cnt = ''; |
869 | - foreach($year_array as $year_item) { |
|
869 | + foreach ($year_array as $year_item) { |
|
870 | 870 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
871 | 871 | $year_cnt .= $year_item['date_count'].','; |
872 | 872 | } |
873 | 873 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
874 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
874 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
875 | 875 | print 'c3.generate({ |
876 | 876 | bindto: "#chart8", |
877 | 877 | data: { x: "x", |
@@ -884,22 +884,22 @@ discard block |
||
884 | 884 | <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
885 | 885 | </div> |
886 | 886 | </div> |
887 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
887 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
888 | 888 | <div class="col-md-6"> |
889 | 889 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
890 | 890 | <?php |
891 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
891 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
892 | 892 | if (count($month_array) == 0) print _("No data available"); |
893 | 893 | else { |
894 | 894 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
895 | 895 | $month_data = ''; |
896 | 896 | $month_cnt = ''; |
897 | - foreach($month_array as $month_item) { |
|
897 | + foreach ($month_array as $month_item) { |
|
898 | 898 | $month_data .= '"'.$month_item['date_name'].'",'; |
899 | 899 | $month_cnt .= $month_item['date_count'].','; |
900 | 900 | } |
901 | 901 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
902 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
902 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
903 | 903 | print 'c3.generate({ |
904 | 904 | bindto: "#chart9", |
905 | 905 | data: { x: "x", |
@@ -912,23 +912,23 @@ discard block |
||
912 | 912 | <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
913 | 913 | </div> |
914 | 914 | </div> |
915 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
915 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
916 | 916 | |
917 | 917 | <div class="col-md-6"> |
918 | 918 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
919 | 919 | <?php |
920 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
920 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
921 | 921 | if (empty($date_array)) print _("No data available"); |
922 | 922 | else { |
923 | 923 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
924 | 924 | $date_data = ''; |
925 | 925 | $date_cnt = ''; |
926 | - foreach($date_array as $date_item) { |
|
926 | + foreach ($date_array as $date_item) { |
|
927 | 927 | $date_data .= '"'.$date_item['date_name'].'",'; |
928 | 928 | $date_cnt .= $date_item['date_count'].','; |
929 | 929 | } |
930 | 930 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
931 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
931 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
932 | 932 | print 'c3.generate({ |
933 | 933 | bindto: "#chart5", |
934 | 934 | data: { x: "x", |
@@ -941,22 +941,22 @@ discard block |
||
941 | 941 | <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
942 | 942 | </div> |
943 | 943 | </div> |
944 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
944 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
945 | 945 | <div class="col-md-6"> |
946 | 946 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
947 | 947 | <?php |
948 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
948 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
949 | 949 | if (empty($hour_array)) print _("No data available"); |
950 | 950 | else { |
951 | 951 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
952 | 952 | $hour_data = ''; |
953 | 953 | $hour_cnt = ''; |
954 | - foreach($hour_array as $hour_item) { |
|
954 | + foreach ($hour_array as $hour_item) { |
|
955 | 955 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
956 | 956 | $hour_cnt .= $hour_item['hour_count'].','; |
957 | 957 | } |
958 | 958 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
959 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
959 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
960 | 960 | print 'c3.generate({ |
961 | 961 | bindto: "#chart6", |
962 | 962 | data: { |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
970 | 970 | </div> |
971 | 971 | </div> |
972 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
972 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
973 | 973 | </div> |
974 | 974 | <?php |
975 | 975 | } |
@@ -985,18 +985,18 @@ discard block |
||
985 | 985 | <div class="col-md-6"> |
986 | 986 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
987 | 987 | <?php |
988 | - $year_array = $Stats->countAllMarineMonthsLastYear(true,$filter_name); |
|
988 | + $year_array = $Stats->countAllMarineMonthsLastYear(true, $filter_name); |
|
989 | 989 | if (count($year_array) == 0) print _("No data available"); |
990 | 990 | else { |
991 | 991 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
992 | 992 | $year_data = ''; |
993 | 993 | $year_cnt = ''; |
994 | - foreach($year_array as $year_item) { |
|
994 | + foreach ($year_array as $year_item) { |
|
995 | 995 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
996 | 996 | $year_cnt .= $year_item['date_count'].','; |
997 | 997 | } |
998 | 998 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
999 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
999 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
1000 | 1000 | print 'c3.generate({ |
1001 | 1001 | bindto: "#chart8", |
1002 | 1002 | data: { x: "x", |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | </div> |
1011 | 1011 | </div> |
1012 | 1012 | |
1013 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1013 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1014 | 1014 | <div class="col-md-6"> |
1015 | 1015 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1016 | 1016 | <?php |
@@ -1020,12 +1020,12 @@ discard block |
||
1020 | 1020 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1021 | 1021 | $month_data = ''; |
1022 | 1022 | $month_cnt = ''; |
1023 | - foreach($month_array as $month_item) { |
|
1023 | + foreach ($month_array as $month_item) { |
|
1024 | 1024 | $month_data .= '"'.$month_item['date_name'].'",'; |
1025 | 1025 | $month_cnt .= $month_item['date_count'].','; |
1026 | 1026 | } |
1027 | 1027 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
1028 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
1028 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
1029 | 1029 | print 'c3.generate({ |
1030 | 1030 | bindto: "#chart9", |
1031 | 1031 | data: { x: "x", |
@@ -1038,7 +1038,7 @@ discard block |
||
1038 | 1038 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1039 | 1039 | </div> |
1040 | 1040 | </div> |
1041 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1041 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1042 | 1042 | |
1043 | 1043 | <div class="col-md-6"> |
1044 | 1044 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1049,12 +1049,12 @@ discard block |
||
1049 | 1049 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1050 | 1050 | $date_data = ''; |
1051 | 1051 | $date_cnt = ''; |
1052 | - foreach($date_array as $date_item) { |
|
1052 | + foreach ($date_array as $date_item) { |
|
1053 | 1053 | $date_data .= '"'.$date_item['date_name'].'",'; |
1054 | 1054 | $date_cnt .= $date_item['date_count'].','; |
1055 | 1055 | } |
1056 | 1056 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
1057 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
1057 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
1058 | 1058 | print 'c3.generate({ |
1059 | 1059 | bindto: "#chart5", |
1060 | 1060 | data: { x: "x", |
@@ -1067,22 +1067,22 @@ discard block |
||
1067 | 1067 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1068 | 1068 | </div> |
1069 | 1069 | </div> |
1070 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1070 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1071 | 1071 | <div class="col-md-6"> |
1072 | 1072 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1073 | 1073 | <?php |
1074 | - $hour_array = $Stats->countAllMarineHours('hour',true,$filter_name); |
|
1074 | + $hour_array = $Stats->countAllMarineHours('hour', true, $filter_name); |
|
1075 | 1075 | if (empty($hour_array)) print _("No data available"); |
1076 | 1076 | else { |
1077 | 1077 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1078 | 1078 | $hour_data = ''; |
1079 | 1079 | $hour_cnt = ''; |
1080 | - foreach($hour_array as $hour_item) { |
|
1080 | + foreach ($hour_array as $hour_item) { |
|
1081 | 1081 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
1082 | 1082 | $hour_cnt .= $hour_item['hour_count'].','; |
1083 | 1083 | } |
1084 | 1084 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
1085 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
1085 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
1086 | 1086 | print 'c3.generate({ |
1087 | 1087 | bindto: "#chart6", |
1088 | 1088 | data: { |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1096 | 1096 | </div> |
1097 | 1097 | </div> |
1098 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1098 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1099 | 1099 | </div> |
1100 | 1100 | <?php |
1101 | 1101 | } |
@@ -1117,12 +1117,12 @@ discard block |
||
1117 | 1117 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
1118 | 1118 | $year_data = ''; |
1119 | 1119 | $year_cnt = ''; |
1120 | - foreach($year_array as $year_item) { |
|
1120 | + foreach ($year_array as $year_item) { |
|
1121 | 1121 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
1122 | 1122 | $year_cnt .= $year_item['date_count'].','; |
1123 | 1123 | } |
1124 | 1124 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1125 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
1125 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
1126 | 1126 | print 'c3.generate({ |
1127 | 1127 | bindto: "#chart8", |
1128 | 1128 | data: { x: "x", |
@@ -1136,7 +1136,7 @@ discard block |
||
1136 | 1136 | </div> |
1137 | 1137 | </div> |
1138 | 1138 | |
1139 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1139 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1140 | 1140 | <div class="col-md-6"> |
1141 | 1141 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1142 | 1142 | <?php |
@@ -1146,12 +1146,12 @@ discard block |
||
1146 | 1146 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1147 | 1147 | $month_data = ''; |
1148 | 1148 | $month_cnt = ''; |
1149 | - foreach($month_array as $month_item) { |
|
1149 | + foreach ($month_array as $month_item) { |
|
1150 | 1150 | $month_data .= '"'.$month_item['date_name'].'",'; |
1151 | 1151 | $month_cnt .= $month_item['date_count'].','; |
1152 | 1152 | } |
1153 | 1153 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
1154 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
1154 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
1155 | 1155 | print 'c3.generate({ |
1156 | 1156 | bindto: "#chart9", |
1157 | 1157 | data: { x: "x", |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1165 | 1165 | </div> |
1166 | 1166 | </div> |
1167 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1167 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1168 | 1168 | |
1169 | 1169 | <div class="col-md-6"> |
1170 | 1170 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1175,12 +1175,12 @@ discard block |
||
1175 | 1175 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1176 | 1176 | $date_data = ''; |
1177 | 1177 | $date_cnt = ''; |
1178 | - foreach($date_array as $date_item) { |
|
1178 | + foreach ($date_array as $date_item) { |
|
1179 | 1179 | $date_data .= '"'.$date_item['date_name'].'",'; |
1180 | 1180 | $date_cnt .= $date_item['date_count'].','; |
1181 | 1181 | } |
1182 | 1182 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
1183 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
1183 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
1184 | 1184 | print 'c3.generate({ |
1185 | 1185 | bindto: "#chart5", |
1186 | 1186 | data: { x: "x", |
@@ -1193,22 +1193,22 @@ discard block |
||
1193 | 1193 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1194 | 1194 | </div> |
1195 | 1195 | </div> |
1196 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1196 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1197 | 1197 | <div class="col-md-6"> |
1198 | 1198 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1199 | 1199 | <?php |
1200 | - $hour_array = $Stats->countAllTrackerHours('hour',true); |
|
1200 | + $hour_array = $Stats->countAllTrackerHours('hour', true); |
|
1201 | 1201 | if (empty($hour_array)) print _("No data available"); |
1202 | 1202 | else { |
1203 | 1203 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1204 | 1204 | $hour_data = ''; |
1205 | 1205 | $hour_cnt = ''; |
1206 | - foreach($hour_array as $hour_item) { |
|
1206 | + foreach ($hour_array as $hour_item) { |
|
1207 | 1207 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
1208 | 1208 | $hour_cnt .= $hour_item['hour_count'].','; |
1209 | 1209 | } |
1210 | 1210 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
1211 | - $hour_cnt = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
1211 | + $hour_cnt = "['trackers',".substr($hour_cnt, 0, -1)."]"; |
|
1212 | 1212 | print 'c3.generate({ |
1213 | 1213 | bindto: "#chart6", |
1214 | 1214 | data: { |
@@ -1221,7 +1221,7 @@ discard block |
||
1221 | 1221 | <a href="<?php print $globalURL; ?>/tracker/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1222 | 1222 | </div> |
1223 | 1223 | </div> |
1224 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1224 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1225 | 1225 | </div> |
1226 | 1226 | <?php |
1227 | 1227 | } |
@@ -1243,12 +1243,12 @@ discard block |
||
1243 | 1243 | print '<div id="chart21" class="chart" width="100%"></div><script>'; |
1244 | 1244 | $year_data = ''; |
1245 | 1245 | $year_cnt = ''; |
1246 | - foreach($year_array as $year_item) { |
|
1246 | + foreach ($year_array as $year_item) { |
|
1247 | 1247 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
1248 | 1248 | $year_cnt .= $year_item['date_count'].','; |
1249 | 1249 | } |
1250 | 1250 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1251 | - $year_cnt = "['satellite',".substr($year_cnt,0,-1)."]"; |
|
1251 | + $year_cnt = "['satellite',".substr($year_cnt, 0, -1)."]"; |
|
1252 | 1252 | print 'c3.generate({ |
1253 | 1253 | bindto: "#chart21", |
1254 | 1254 | data: { x: "x", |
@@ -1264,7 +1264,7 @@ discard block |
||
1264 | 1264 | --> |
1265 | 1265 | </div> |
1266 | 1266 | |
1267 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1267 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1268 | 1268 | <div class="col-md-6"> |
1269 | 1269 | <h2><?php echo _("Busiest Launch Years of the last 10 Years"); ?></h2> |
1270 | 1270 | <?php |
@@ -1274,12 +1274,12 @@ discard block |
||
1274 | 1274 | print '<div id="chart22" class="chart" width="100%"></div><script>'; |
1275 | 1275 | $year_data = ''; |
1276 | 1276 | $year_cnt = ''; |
1277 | - foreach($year_array as $year_item) { |
|
1277 | + foreach ($year_array as $year_item) { |
|
1278 | 1278 | $year_data .= '"'.$year_item['year_name'].'-01-01'.'",'; |
1279 | 1279 | $year_cnt .= $year_item['date_count'].','; |
1280 | 1280 | } |
1281 | 1281 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1282 | - $year_cnt = "['satellite',".substr($year_cnt,0,-1)."]"; |
|
1282 | + $year_cnt = "['satellite',".substr($year_cnt, 0, -1)."]"; |
|
1283 | 1283 | print 'c3.generate({ |
1284 | 1284 | bindto: "#chart22", |
1285 | 1285 | data: { x: "x", |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | --> |
1296 | 1296 | </div> |
1297 | 1297 | |
1298 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1298 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1299 | 1299 | </div> |
1300 | 1300 | <?php |
1301 | 1301 | } |
@@ -1317,12 +1317,12 @@ discard block |
||
1317 | 1317 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
1318 | 1318 | $year_data = ''; |
1319 | 1319 | $year_cnt = ''; |
1320 | - foreach($year_array as $year_item) { |
|
1320 | + foreach ($year_array as $year_item) { |
|
1321 | 1321 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
1322 | 1322 | $year_cnt .= $year_item['count'].','; |
1323 | 1323 | } |
1324 | 1324 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1325 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1325 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1326 | 1326 | print 'c3.generate({ |
1327 | 1327 | bindto: "#chart32", |
1328 | 1328 | data: { x: "x", |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1336 | 1336 | </div> |
1337 | 1337 | </div> |
1338 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1338 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1339 | 1339 | |
1340 | 1340 | <div class="row column"> |
1341 | 1341 | <div class="col-md-6"> |
@@ -1347,12 +1347,12 @@ discard block |
||
1347 | 1347 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
1348 | 1348 | $year_data = ''; |
1349 | 1349 | $year_cnt = ''; |
1350 | - foreach($year_array as $year_item) { |
|
1350 | + foreach ($year_array as $year_item) { |
|
1351 | 1351 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
1352 | 1352 | $year_cnt .= $year_item['count'].','; |
1353 | 1353 | } |
1354 | 1354 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1355 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1355 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1356 | 1356 | print 'c3.generate({ |
1357 | 1357 | bindto: "#chart33", |
1358 | 1358 | data: { x: "x", |
@@ -1365,7 +1365,7 @@ discard block |
||
1365 | 1365 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1366 | 1366 | </div> |
1367 | 1367 | </div> |
1368 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1368 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1369 | 1369 | <br/> |
1370 | 1370 | <?php |
1371 | 1371 | } |
@@ -1379,19 +1379,19 @@ discard block |
||
1379 | 1379 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
1380 | 1380 | if ($year == '' && $month == '') { |
1381 | 1381 | if ($type == 'aircraft') { |
1382 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
1382 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
1383 | 1383 | } elseif ($type == 'marine') { |
1384 | - $polar = $Stats->getStatsSource('polar_marine',date('Y'),date('m'),date('d')); |
|
1384 | + $polar = $Stats->getStatsSource('polar_marine', date('Y'), date('m'), date('d')); |
|
1385 | 1385 | } elseif ($type == 'tracker') { |
1386 | - $polar = $Stats->getStatsSource('polar_tracker',date('Y'),date('m'),date('d')); |
|
1386 | + $polar = $Stats->getStatsSource('polar_tracker', date('Y'), date('m'), date('d')); |
|
1387 | 1387 | } |
1388 | 1388 | } else { |
1389 | 1389 | if ($type == 'aircraft') { |
1390 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
1390 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
1391 | 1391 | } elseif ($type == 'marine') { |
1392 | - $polar = $Stats->getStatsSource('polar_marine',$year,$month); |
|
1392 | + $polar = $Stats->getStatsSource('polar_marine', $year, $month); |
|
1393 | 1393 | } elseif ($type == 'tracker') { |
1394 | - $polar = $Stats->getStatsSource('polar_tracker',$year,$month); |
|
1394 | + $polar = $Stats->getStatsSource('polar_tracker', $year, $month); |
|
1395 | 1395 | } |
1396 | 1396 | } |
1397 | 1397 | if (!empty($polar)) { |
@@ -1400,7 +1400,7 @@ discard block |
||
1400 | 1400 | unset($polar_data); |
1401 | 1401 | $Spotter = new Spotter(); |
1402 | 1402 | $data = json_decode($eachpolar['source_data']); |
1403 | - foreach($data as $value => $key) { |
|
1403 | + foreach ($data as $value => $key) { |
|
1404 | 1404 | $direction = $Spotter->parseDirection(($value*22.5)); |
1405 | 1405 | $distance = $key; |
1406 | 1406 | $unit = 'km'; |
@@ -1420,7 +1420,7 @@ discard block |
||
1420 | 1420 | ?> |
1421 | 1421 | <div class="col-md-6"> |
1422 | 1422 | <h4><?php print $eachpolar['source_name']; ?></h4> |
1423 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1423 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1424 | 1424 | <script> |
1425 | 1425 | (function() { |
1426 | 1426 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | color: color, |
1445 | 1445 | unit: '<?php echo $unit; ?>' |
1446 | 1446 | }; |
1447 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1447 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1448 | 1448 | })(); |
1449 | 1449 | </script> |
1450 | 1450 | </div> |
@@ -1459,19 +1459,19 @@ discard block |
||
1459 | 1459 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
1460 | 1460 | if ($year == '' && $month == '') { |
1461 | 1461 | if ($type == 'aircraft') { |
1462 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
1462 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
1463 | 1463 | } elseif ($type == 'marine') { |
1464 | - $msg = $Stats->getStatsSource('msg_marine',date('Y'),date('m'),date('d')); |
|
1464 | + $msg = $Stats->getStatsSource('msg_marine', date('Y'), date('m'), date('d')); |
|
1465 | 1465 | } elseif ($type == 'tracker') { |
1466 | - $msg = $Stats->getStatsSource('msg_tracker',date('Y'),date('m'),date('d')); |
|
1466 | + $msg = $Stats->getStatsSource('msg_tracker', date('Y'), date('m'), date('d')); |
|
1467 | 1467 | } |
1468 | 1468 | } else { |
1469 | 1469 | if ($type == 'aircraft') { |
1470 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
1470 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
1471 | 1471 | } elseif ($type == 'marine') { |
1472 | - $msg = $Stats->getStatsSource('msg_marine',$year,$month); |
|
1472 | + $msg = $Stats->getStatsSource('msg_marine', $year, $month); |
|
1473 | 1473 | } elseif ($type == 'tracker') { |
1474 | - $msg = $Stats->getStatsSource('msg_tracker',$year,$month); |
|
1474 | + $msg = $Stats->getStatsSource('msg_tracker', $year, $month); |
|
1475 | 1475 | } |
1476 | 1476 | } |
1477 | 1477 | if (!empty($msg)) { |
@@ -1479,13 +1479,13 @@ discard block |
||
1479 | 1479 | foreach ($msg as $eachmsg) { |
1480 | 1480 | //$eachmsg = $msg[0]; |
1481 | 1481 | $data = $eachmsg['source_data']; |
1482 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
1482 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
1483 | 1483 | else $max = 500; |
1484 | 1484 | ?> |
1485 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1485 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1486 | 1486 | <script> |
1487 | 1487 | var g = new JustGage({ |
1488 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
1488 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
1489 | 1489 | value: <?php echo $data; ?>, |
1490 | 1490 | min: 0, |
1491 | 1491 | max: <?php print $max; ?>, |
@@ -1507,19 +1507,19 @@ discard block |
||
1507 | 1507 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
1508 | 1508 | if ($year == '' && $month == '') { |
1509 | 1509 | if ($type == 'aircraft') { |
1510 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
1510 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
1511 | 1511 | } elseif ($type == 'marine') { |
1512 | - $hist = $Stats->getStatsSource('hist_marine',date('Y'),date('m'),date('d')); |
|
1512 | + $hist = $Stats->getStatsSource('hist_marine', date('Y'), date('m'), date('d')); |
|
1513 | 1513 | } elseif ($type == 'tracker') { |
1514 | - $hist = $Stats->getStatsSource('hist_tracker',date('Y'),date('m'),date('d')); |
|
1514 | + $hist = $Stats->getStatsSource('hist_tracker', date('Y'), date('m'), date('d')); |
|
1515 | 1515 | } |
1516 | 1516 | } else { |
1517 | 1517 | if ($type == 'aircraft') { |
1518 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
1518 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
1519 | 1519 | } elseif ($type == 'marine') { |
1520 | - $hist = $Stats->getStatsSource('hist_marine',$year,$month); |
|
1520 | + $hist = $Stats->getStatsSource('hist_marine', $year, $month); |
|
1521 | 1521 | } elseif ($type == 'tracker') { |
1522 | - $hist = $Stats->getStatsSource('hist_tracker',$year,$month); |
|
1522 | + $hist = $Stats->getStatsSource('hist_tracker', $year, $month); |
|
1523 | 1523 | } |
1524 | 1524 | } |
1525 | 1525 | foreach ($hist as $hists) { |
@@ -1529,7 +1529,7 @@ discard block |
||
1529 | 1529 | $source = $hists['source_name']; |
1530 | 1530 | $hist_array = json_decode($hists['source_data']); |
1531 | 1531 | $unit = 'km'; |
1532 | - foreach($hist_array as $distance => $nb) { |
|
1532 | + foreach ($hist_array as $distance => $nb) { |
|
1533 | 1533 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1534 | 1534 | $distance = round($distance*0.539957); |
1535 | 1535 | $unit = 'nm'; |
@@ -1549,18 +1549,18 @@ discard block |
||
1549 | 1549 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
1550 | 1550 | ?> |
1551 | 1551 | <div class="col-md-6"> |
1552 | - <h2><?php echo sprintf(_("Distance for %s"),$source); ?></h2> |
|
1552 | + <h2><?php echo sprintf(_("Distance for %s"), $source); ?></h2> |
|
1553 | 1553 | <?php |
1554 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1554 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1555 | 1555 | print 'c3.generate({ |
1556 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
1556 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
1557 | 1557 | data: { x: "x", |
1558 | 1558 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
1559 | 1559 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
1560 | 1560 | print '</script>'; |
1561 | 1561 | ?> |
1562 | 1562 | </div> |
1563 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1563 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1564 | 1564 | <?php |
1565 | 1565 | } |
1566 | 1566 | ?> |
@@ -26,24 +26,24 @@ discard block |
||
26 | 26 | $sql_date = ''; |
27 | 27 | if (isset($_GET['start_date'])) { |
28 | 28 | //for the date manipulation into the query |
29 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
29 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
30 | 30 | if (strtotime($_GET['start_date']) !== false && strtotime($_GET['end_date']) !== false) { |
31 | 31 | //$start_date = $_GET['start_date']." 00:00:00"; |
32 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
32 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
33 | 33 | //$end_date = $_GET['end_date']." 00:00:00"; |
34 | - $end_date = date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
|
34 | + $end_date = date("Y-m-d", strtotime($_GET['end_date']))." 00:00:00"; |
|
35 | 35 | $sql_date = $start_date.",".$end_date; |
36 | 36 | } |
37 | - } else if($_GET['start_date'] != ""){ |
|
37 | + } else if ($_GET['start_date'] != "") { |
|
38 | 38 | if (strtotime($_GET['start_date']) !== false) { |
39 | 39 | //$start_date = $_GET['start_date']." 00:00:00"; |
40 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
40 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
41 | 41 | $sql_date = $start_date; |
42 | 42 | } |
43 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
43 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
44 | 44 | if (strtotime($_GET['end_date']) !== false) { |
45 | 45 | //$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
46 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
|
46 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d", strtotime($_GET['end_date']))." 00:00:00"; |
|
47 | 47 | $sql_date = $end_date; |
48 | 48 | } |
49 | 49 | } else $sql_date = ''; |
@@ -51,21 +51,21 @@ discard block |
||
51 | 51 | |
52 | 52 | if (isset($_GET['highest_altitude'])) { |
53 | 53 | //for altitude manipulation |
54 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
55 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
56 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
54 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
55 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
56 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
57 | 57 | $sql_altitude = $start_altitude.",".$end_altitude; |
58 | - } else if($_GET['highest_altitude'] != ""){ |
|
59 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
58 | + } else if ($_GET['highest_altitude'] != "") { |
|
59 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
60 | 60 | $sql_altitude = $end_altitude; |
61 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
62 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
61 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
62 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
63 | 63 | $sql_altitude = $start_altitude; |
64 | 64 | } else $sql_altitude = ''; |
65 | 65 | } else $sql_altitude = ''; |
66 | 66 | |
67 | 67 | //calculuation for the pagination |
68 | -if(!isset($_GET['limit'])) |
|
68 | +if (!isset($_GET['limit'])) |
|
69 | 69 | { |
70 | 70 | if (!isset($_GET['number_results'])) |
71 | 71 | { |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | $limit_end = 25; |
74 | 74 | $absolute_difference = 25; |
75 | 75 | } else { |
76 | - if ($_GET['number_results'] > 1000){ |
|
76 | + if ($_GET['number_results'] > 1000) { |
|
77 | 77 | $_GET['number_results'] = 1000; |
78 | 78 | } |
79 | 79 | $limit_start = 0; |
80 | - $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
81 | - $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
80 | + $limit_end = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
81 | + $absolute_difference = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
82 | 82 | } |
83 | -} else { |
|
83 | +} else { |
|
84 | 84 | $limit_explode = explode(",", $_GET['limit']); |
85 | - $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
|
86 | - $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
|
85 | + $limit_start = filter_var($limit_explode[0], FILTER_SANITIZE_NUMBER_INT); |
|
86 | + $limit_end = filter_var($limit_explode[1], FILTER_SANITIZE_NUMBER_INT); |
|
87 | 87 | } |
88 | 88 | $absolute_difference = abs($limit_start - $limit_end); |
89 | 89 | $limit_next = $limit_end + $absolute_difference; |
@@ -116,35 +116,35 @@ discard block |
||
116 | 116 | ((isset($_GET['origlat']) && $_GET['origlat'] != '') && |
117 | 117 | (isset($_GET['origlon']) && $_GET['origlon'] != '') && |
118 | 118 | (isset($_GET['dist']) && $_GET['dist'] != '')) |
119 | - ){ |
|
120 | - $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
|
121 | - $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
|
122 | - $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
|
123 | - $manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING); |
|
124 | - $highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING); |
|
125 | - $airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING); |
|
126 | - $airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING); |
|
127 | - $airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING); |
|
128 | - $airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING); |
|
129 | - $airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING); |
|
130 | - $callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING); |
|
131 | - $owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING); |
|
132 | - $pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING); |
|
133 | - $pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING); |
|
134 | - $mmsi = filter_input(INPUT_GET, 'mmsi',FILTER_SANITIZE_NUMBER_INT); |
|
135 | - $imo = filter_input(INPUT_GET, 'imo',FILTER_SANITIZE_NUMBER_INT); |
|
136 | - $captain_id = filter_input(INPUT_GET, 'captain_id',FILTER_SANITIZE_NUMBER_INT); |
|
137 | - $race_id = filter_input(INPUT_GET, 'race_id',FILTER_SANITIZE_NUMBER_INT); |
|
138 | - $captain_name = filter_input(INPUT_GET, 'captain_name',FILTER_SANITIZE_STRING); |
|
139 | - $race_name = filter_input(INPUT_GET, 'race_name',FILTER_SANITIZE_STRING); |
|
140 | - $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING); |
|
141 | - $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
142 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
143 | - $archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT); |
|
144 | - $origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
145 | - $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
146 | - $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
|
147 | - $number_results = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
119 | + ) { |
|
120 | + $q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
121 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
122 | + $aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
123 | + $manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
124 | + $highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
125 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
126 | + $airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
127 | + $airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
128 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
129 | + $airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
130 | + $callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
131 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
132 | + $pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
133 | + $pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
134 | + $mmsi = filter_input(INPUT_GET, 'mmsi', FILTER_SANITIZE_NUMBER_INT); |
|
135 | + $imo = filter_input(INPUT_GET, 'imo', FILTER_SANITIZE_NUMBER_INT); |
|
136 | + $captain_id = filter_input(INPUT_GET, 'captain_id', FILTER_SANITIZE_NUMBER_INT); |
|
137 | + $race_id = filter_input(INPUT_GET, 'race_id', FILTER_SANITIZE_NUMBER_INT); |
|
138 | + $captain_name = filter_input(INPUT_GET, 'captain_name', FILTER_SANITIZE_STRING); |
|
139 | + $race_name = filter_input(INPUT_GET, 'race_name', FILTER_SANITIZE_STRING); |
|
140 | + $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
141 | + $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
142 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
143 | + $archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT); |
|
144 | + $origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
145 | + $origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
146 | + $dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT); |
|
147 | + $number_results = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
148 | 148 | if ($dist != '') { |
149 | 149 | if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
150 | 150 | elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
@@ -153,15 +153,15 @@ discard block |
||
153 | 153 | if ($archive == 1) { |
154 | 154 | if ($type == 'aircraft') { |
155 | 155 | $SpotterArchive = new SpotterArchive(); |
156 | - $spotter_array = $SpotterArchive->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
156 | + $spotter_array = $SpotterArchive->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
157 | 157 | } |
158 | 158 | } else { |
159 | 159 | if ($type == 'aircraft') { |
160 | - $spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
160 | + $spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
161 | 161 | } elseif ($type == 'tracker') { |
162 | - $spotter_array = $Tracker->searchTrackerData($q,$callsign,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
162 | + $spotter_array = $Tracker->searchTrackerData($q, $callsign, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
163 | 163 | } elseif ($type == 'marine') { |
164 | - $spotter_array = $Marine->searchMarineData($q,$callsign,$mmsi,$imo,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist,$captain_id,$captain_name,$race_id,$race_name); |
|
164 | + $spotter_array = $Marine->searchMarineData($q, $callsign, $mmsi, $imo, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist, $captain_id, $captain_name, $race_id, $race_name); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
@@ -197,12 +197,12 @@ discard block |
||
197 | 197 | //remove 3D=true parameter |
198 | 198 | $no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']); |
199 | 199 | $kmlURL = str_replace("http://", "kml://", $globalURL); |
200 | - if (!isset($_GET['3D'])){ |
|
200 | + if (!isset($_GET['3D'])) { |
|
201 | 201 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>'; |
202 | 202 | } else { |
203 | 203 | print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>'; |
204 | 204 | } |
205 | - if (isset($_GET['3D'])){ |
|
205 | + if (isset($_GET['3D'])) { |
|
206 | 206 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>'; |
207 | 207 | } else { |
208 | 208 | print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>'; |
@@ -223,36 +223,36 @@ discard block |
||
223 | 223 | print '<div class="column">'; |
224 | 224 | print '<div class="info">'; |
225 | 225 | print '<h1>'._("Search Results for").' '; |
226 | - if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$q.'</span> '; } |
|
227 | - if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
228 | - if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
229 | - if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
|
230 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
231 | - if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
|
232 | - if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
233 | - if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
234 | - if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$airport.'</span> '; } |
|
235 | - if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
236 | - if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
237 | - if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$owner.'</span> '; } |
|
238 | - if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
239 | - if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
240 | - if (isset($_GET['captain_id']) && $_GET['captain_id'] != ""){ print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
241 | - if (isset($_GET['captain_name']) && $_GET['captain_name'] != ""){ print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
242 | - if (isset($_GET['race_id']) && $_GET['race_id'] != ""){ print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
243 | - if (isset($_GET['race_name']) && $_GET['race_name'] != ""){ print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
244 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
245 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
246 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
247 | - if (isset($_GET['mmsi']) && $_GET['mmsi'] != ""){ print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
248 | - if (isset($_GET['imo']) && $_GET['imo'] != ""){ print _("IMO:").' <span>'.$imo.'</span> '; } |
|
249 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
250 | - if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
251 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
252 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
253 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
254 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
255 | - if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
226 | + if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$q.'</span> '; } |
|
227 | + if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
228 | + if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
229 | + if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$registration.'</span> '; } |
|
230 | + if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
231 | + if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$airline.'</span> '; } |
|
232 | + if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
233 | + if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
234 | + if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$airport.'</span> '; } |
|
235 | + if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
236 | + if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
237 | + if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$owner.'</span> '; } |
|
238 | + if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
239 | + if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
240 | + if (isset($_GET['captain_id']) && $_GET['captain_id'] != "") { print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
241 | + if (isset($_GET['captain_name']) && $_GET['captain_name'] != "") { print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
242 | + if (isset($_GET['race_id']) && $_GET['race_id'] != "") { print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
243 | + if (isset($_GET['race_name']) && $_GET['race_name'] != "") { print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
244 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
245 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
246 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
247 | + if (isset($_GET['mmsi']) && $_GET['mmsi'] != "") { print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
248 | + if (isset($_GET['imo']) && $_GET['imo'] != "") { print _("IMO:").' <span>'.$imo.'</span> '; } |
|
249 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
250 | + if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
251 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
252 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
253 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
254 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
255 | + if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
256 | 256 | print '</h1>'; |
257 | 257 | print '</div>'; |
258 | 258 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | </select> |
387 | 387 | </div> |
388 | 388 | </div> |
389 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
389 | + <script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
390 | 390 | <div class="form-group"> |
391 | 391 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
392 | 392 | <div class="col-sm-10"> |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | </select> |
396 | 396 | </div> |
397 | 397 | </div> |
398 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
398 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
399 | 399 | <div class="form-group"> |
400 | 400 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
401 | 401 | <div class="col-sm-10"> |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | </div> |
419 | 419 | </div> |
420 | 420 | <?php |
421 | - }else { |
|
421 | + } else { |
|
422 | 422 | ?> |
423 | 423 | <div class="form-group"> |
424 | 424 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
@@ -431,8 +431,8 @@ discard block |
||
431 | 431 | ?> |
432 | 432 | <div class="form-group"> |
433 | 433 | <div class="col-sm-offset-2 col-sm-10"> |
434 | - <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
435 | - <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
434 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
435 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
436 | 436 | </div> |
437 | 437 | </div> |
438 | 438 | </fieldset> |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | </select> |
447 | 447 | </div> |
448 | 448 | </div> |
449 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
449 | + <script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $airline; ?>');</script> |
|
450 | 450 | <div class="form-group"> |
451 | 451 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
452 | 452 | <div class="col-sm-10"> |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | </select> |
456 | 456 | </div> |
457 | 457 | </div> |
458 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
458 | + <script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
459 | 459 | <div class="form-group"> |
460 | 460 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
461 | 461 | <div class="col-sm-10"> |
@@ -464,10 +464,10 @@ discard block |
||
464 | 464 | </div> |
465 | 465 | <div class="form-group"> |
466 | 466 | <div class="col-sm-offset-2 col-sm-10"> |
467 | - <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
468 | - <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
469 | - <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
470 | - <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
467 | + <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all") { print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
468 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger") { print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
469 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "cargo") { print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
470 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "military") { print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
471 | 471 | </div> |
472 | 472 | </div> |
473 | 473 | </fieldset> |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | </select> |
482 | 482 | </div> |
483 | 483 | </div> |
484 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
484 | + <script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
485 | 485 | <div class="form-group"> |
486 | 486 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
487 | 487 | <div class="col-sm-10"> |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | </select> |
491 | 491 | </div> |
492 | 492 | </div> |
493 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
493 | + <script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
494 | 494 | </fieldset> |
495 | 495 | <fieldset> |
496 | 496 | <legend><?php echo _("Route"); ?></legend> |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | </select> |
503 | 503 | </div> |
504 | 504 | </div> |
505 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
505 | + <script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
506 | 506 | <div class="form-group"> |
507 | 507 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
508 | 508 | <div class="col-sm-10"> |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | </select> |
512 | 512 | </div> |
513 | 513 | </div> |
514 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
514 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
515 | 515 | </fieldset> |
516 | 516 | <fieldset> |
517 | 517 | <legend>Altitude</legend> |
@@ -522,9 +522,9 @@ discard block |
||
522 | 522 | <option></option> |
523 | 523 | <?php |
524 | 524 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
525 | -foreach($altitude_array as $altitude) |
|
525 | +foreach ($altitude_array as $altitude) |
|
526 | 526 | { |
527 | - if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
527 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
528 | 528 | { |
529 | 529 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
530 | 530 | } else { |
@@ -542,9 +542,9 @@ discard block |
||
542 | 542 | <option></option> |
543 | 543 | <?php |
544 | 544 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
545 | - foreach($altitude_array as $altitude) |
|
545 | + foreach ($altitude_array as $altitude) |
|
546 | 546 | { |
547 | - if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
547 | + if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
548 | 548 | { |
549 | 549 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
550 | 550 | } else { |
@@ -706,10 +706,10 @@ discard block |
||
706 | 706 | <div class="col-sm-10"> |
707 | 707 | <select class="form-control" name="number_results"> |
708 | 708 | <?php |
709 | -$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
710 | -foreach($number_results_array as $number) |
|
709 | +$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
710 | +foreach ($number_results_array as $number) |
|
711 | 711 | { |
712 | - if(isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
712 | + if (isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
713 | 713 | { |
714 | 714 | print '<option value="'.$number.'" selected="selected">'.$number.'</option>'; |
715 | 715 | } else { |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | <fieldset> |
729 | 729 | <div class="form-group"> |
730 | 730 | <div class="col-sm-offset-2 col-sm-10"> |
731 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
731 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
732 | 732 | <p class="help-block">Disabled in demo</p> |
733 | 733 | </div> |
734 | 734 | </div> |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | <fieldset> |
740 | 740 | <div class="form-group"> |
741 | 741 | <div class="col-sm-offset-2 col-sm-10"> |
742 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
742 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
743 | 743 | </div> |
744 | 744 | </div> |
745 | 745 | </fieldset> |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Top 10 Races Number of Participants"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
10 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
9 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
10 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
11 | 11 | $type = 'marine'; |
12 | 12 | require_once('header.php'); |
13 | 13 | include('statistics-sub-menu.php'); |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | </div> |
19 | 19 | <p>'._("Below are the <strong>Top 10</strong> races with the most number of participants.").'</p>'; |
20 | 20 | |
21 | -$race_array = $Marine->countAllCaptainsByRaces(true,$filter_name,$year,$month); |
|
21 | +$race_array = $Marine->countAllCaptainsByRaces(true, $filter_name, $year, $month); |
|
22 | 22 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
23 | 23 | $pilot_data = ''; |
24 | -foreach($race_array as $race_item) |
|
24 | +foreach ($race_array as $race_item) |
|
25 | 25 | { |
26 | 26 | $race_data .= '["'.$race_item['marine_race_name'].' ('.$race_item['marine_race_id'].')",'.$race_item['marine_captain_count'].'],'; |
27 | 27 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | print '</thead>'; |
47 | 47 | print '<tbody>'; |
48 | 48 | $i = 1; |
49 | - foreach($race_array as $race_item) |
|
49 | + foreach ($race_array as $race_item) |
|
50 | 50 | { |
51 | 51 | print '<tr>'; |
52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | |
14 | 14 | $from_archive = false; |
15 | 15 | if (isset($_GET['ident'])) { |
16 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
16 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
17 | 17 | if (isset($_GET['currenttime'])) { |
18 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
18 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
19 | 19 | $currenttime = round($currenttime/1000); |
20 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident,$currenttime); |
|
20 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident, $currenttime); |
|
21 | 21 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
22 | 22 | $from_archive = true; |
23 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident,$currenttime); |
|
23 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident, $currenttime); |
|
24 | 24 | } |
25 | 25 | } else { |
26 | 26 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | } |
32 | 32 | } |
33 | 33 | if (isset($_GET['flightaware_id'])) { |
34 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
34 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
35 | 35 | if (isset($_GET['currenttime'])) { |
36 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
36 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
37 | 37 | $currenttime = round($currenttime/1000); |
38 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id,$currenttime); |
|
38 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id, $currenttime); |
|
39 | 39 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
40 | 40 | $from_archive = true; |
41 | 41 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
42 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id,$currenttime); |
|
42 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id, $currenttime); |
|
43 | 43 | } |
44 | 44 | } else { |
45 | 45 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
@@ -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 | /* else { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
87 | 87 | if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
88 | 88 | if ($spotter_item['departure_airport_time'] > 2460) { |
89 | - print '<br /><span class="time">'.date('H:m',$spotter_item['departure_airport_time']).'</span>'; |
|
89 | + print '<br /><span class="time">'.date('H:m', $spotter_item['departure_airport_time']).'</span>'; |
|
90 | 90 | } else { |
91 | 91 | print '<br /><span class="time">'.$spotter_item['departure_airport_time'].'</span>'; |
92 | 92 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | print '<span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport'].'</a></span>'.$spotter_item['arrival_airport_city'].' '.$spotter_item['arrival_airport_country']; |
96 | 96 | if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
97 | 97 | if ($spotter_item['arrival_airport_time'] > 2460) { |
98 | - print '<br /><span class="time">'.date('H:m',$spotter_item['arrival_airport_time']).'</span>'; |
|
98 | + print '<br /><span class="time">'.date('H:m', $spotter_item['arrival_airport_time']).'</span>'; |
|
99 | 99 | } else { |
100 | 100 | print '<br /><span class="time">'.$spotter_item['arrival_airport_time'].'</span>'; |
101 | 101 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | print '<span>'._("Aircraft").'</span>'; |
115 | 115 | if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
116 | 116 | if (isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_manufacturer']) && $spotter_item['aircraft_manufacturer'] != 'N/A' && isset($spotter_item['aircraft_name']) && $spotter_item['aircraft_name'] != 'N/A') { |
117 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
117 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
118 | 118 | if (count($aircraft_names) == 1) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
119 | 119 | else print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
120 | 120 | } elseif (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | print '<div id="altitude"><span>'._("Altitude").'</span>'; |
126 | 126 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
127 | 127 | try { |
128 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
129 | - } catch(Exception $e) { |
|
128 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
129 | + } catch (Exception $e) { |
|
130 | 130 | // If catched not exist |
131 | 131 | } |
132 | 132 | } |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | print '</div>'; |
158 | 158 | print '<div id="coordinates"><span>'._("Coordinates").'</span>'; |
159 | 159 | if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
160 | - $latitude = $Common->convertDMS($spotter_item['latitude'],'latitude'); |
|
160 | + $latitude = $Common->convertDMS($spotter_item['latitude'], 'latitude'); |
|
161 | 161 | print '<span class="latitude">'.$latitude['deg'].'° '.$latitude['min']."′ ".$latitude['sec'].'" '.$latitude['NSEW'].'</span>, '; |
162 | - $longitude = $Common->convertDMS($spotter_item['longitude'],'longitude'); |
|
162 | + $longitude = $Common->convertDMS($spotter_item['longitude'], 'longitude'); |
|
163 | 163 | print '<span class="longitude">'.$longitude['deg'].'° '.$longitude['min']."′ ".$longitude['sec'].'" '.$longitude['NSEW'].'</span>'; |
164 | 164 | } elseif ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
165 | - $latitude = $Common->convertDM($spotter_item['latitude'],'latitude'); |
|
166 | - print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'],3)."′".$latitude['NSEW'].'</span>, '; |
|
167 | - $longitude = $Common->convertDM($spotter_item['longitude'],'longitude'); |
|
168 | - print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'],3)."′".$longitude['NSEW'].'</span>'; |
|
165 | + $latitude = $Common->convertDM($spotter_item['latitude'], 'latitude'); |
|
166 | + print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'], 3)."′".$latitude['NSEW'].'</span>, '; |
|
167 | + $longitude = $Common->convertDM($spotter_item['longitude'], 'longitude'); |
|
168 | + print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'], 3)."′".$longitude['NSEW'].'</span>'; |
|
169 | 169 | } else { |
170 | 170 | print '<span class="latitude">'.$spotter_item['latitude'].'</span>, '; |
171 | 171 | print '<span class="longitude">'.$spotter_item['longitude'].'</span>'; |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | if (isset($globalCam) && $globalCam) { |
191 | 191 | require_once(dirname(__FILE__).'/require/class.Common.php'); |
192 | 192 | $Common = new Common(); |
193 | - $azimuth = round($Common->azimuth($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'])); |
|
194 | - $distance = $Common->distance($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'],'m'); |
|
195 | - $plunge = round($Common->plunge($globalCenterAltitude,$spotter_item['real_altitude'],$distance)); |
|
193 | + $azimuth = round($Common->azimuth($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'])); |
|
194 | + $distance = $Common->distance($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'], 'm'); |
|
195 | + $plunge = round($Common->plunge($globalCenterAltitude, $spotter_item['real_altitude'], $distance)); |
|
196 | 196 | print '<div id="camcoordinates"><span>'._("Cam Coordinates").'</span>'; |
197 | 197 | print 'azimuth: '.$azimuth; |
198 | 198 | print ' / '; |
@@ -202,16 +202,16 @@ discard block |
||
202 | 202 | print '</div>'; |
203 | 203 | //echo $Common->getData('http://127.0.0.1/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
204 | 204 | //echo $Common->getData('file://'.dirname(__FILE__).'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
205 | - echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
|
205 | + echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge, 'get', '', '', '', '', '', '', false, true); |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | print '<div id="heading"><span>'._("Heading").'</span><span class="heading">'.$spotter_item['heading'].'</span>°</div>'; |
209 | 209 | if (isset($spotter_item['verticalrate']) && $spotter_item['verticalrate'] != '') { |
210 | 210 | print '<div id="verticalrate"><span>'._("Vertical rate").'</span>'; |
211 | 211 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
212 | - print $spotter_item['verticalrate']. ' ft/min'; |
|
212 | + print $spotter_item['verticalrate'].' ft/min'; |
|
213 | 213 | } else { |
214 | - print round($spotter_item['verticalrate']*0.3048). ' m/min'; |
|
214 | + print round($spotter_item['verticalrate']*0.3048).' m/min'; |
|
215 | 215 | } |
216 | 216 | print '</div>'; |
217 | 217 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | print '</div>'; |
247 | 247 | if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
248 | 248 | if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
249 | - if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
249 | + if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br/>', $spotter_item['acars']['message'])).'</div>'; |
|
250 | 250 | if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
251 | 251 | print '</div>'; |
252 | 252 | } |
@@ -11,15 +11,15 @@ discard block |
||
11 | 11 | |
12 | 12 | $from_archive = false; |
13 | 13 | if (isset($_GET['ident'])) { |
14 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
14 | + $ident = 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 = $MarineLive->getDateLiveMarineDataByIdent($ident,$currenttime); |
|
18 | + $spotter_array = $MarineLive->getDateLiveMarineDataByIdent($ident, $currenttime); |
|
19 | 19 | |
20 | 20 | if (empty($spotter_array)) { |
21 | 21 | $from_archive = true; |
22 | - $spotter_array = $MarineArchive->getDateArchiveMarineDataByIdent($ident,$currenttime); |
|
22 | + $spotter_array = $MarineArchive->getDateArchiveMarineDataByIdent($ident, $currenttime); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | } else { |
@@ -33,16 +33,16 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | if (isset($_GET['fammarine_id'])) { |
36 | - $fammarine_id = filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING); |
|
36 | + $fammarine_id = filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING); |
|
37 | 37 | if (isset($_GET['currenttime'])) { |
38 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
38 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
39 | 39 | $currenttime = round($currenttime/1000); |
40 | - $spotter_array = $MarineLive->getDateLiveMarineDataById($fammarine_id,$currenttime); |
|
40 | + $spotter_array = $MarineLive->getDateLiveMarineDataById($fammarine_id, $currenttime); |
|
41 | 41 | |
42 | 42 | if (empty($spotter_array)) { |
43 | 43 | $from_archive = true; |
44 | 44 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
45 | - $spotter_array = $MarineArchive->getDateArchiveMarineDataById($fammarine_id,$currenttime); |
|
45 | + $spotter_array = $MarineArchive->getDateArchiveMarineDataById($fammarine_id, $currenttime); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | } else { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
65 | 65 | { |
66 | 66 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
67 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
67 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
68 | 68 | } else $image = $spotter_item['image_thumbnail']; |
69 | 69 | |
70 | 70 | } |
@@ -94,24 +94,24 @@ discard block |
||
94 | 94 | */ |
95 | 95 | print '<div><span>'._("Speed").'</span>'; |
96 | 96 | if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
97 | - print round($spotter_item['ground_speed']*0.621371,2).' mph'; |
|
97 | + print round($spotter_item['ground_speed']*0.621371, 2).' mph'; |
|
98 | 98 | } elseif ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
99 | - print round($spotter_item['ground_speed']*0.539957,2).' knots'; |
|
99 | + print round($spotter_item['ground_speed']*0.539957, 2).' knots'; |
|
100 | 100 | } else { |
101 | 101 | print $spotter_item['ground_speed'].' km/h'; |
102 | 102 | } |
103 | 103 | print '</div>'; |
104 | 104 | print '<div><span>'._("Coordinates").'</span>'; |
105 | 105 | if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
106 | - $latitude = $Common->convertDMS($spotter_item['latitude'],'latitude'); |
|
106 | + $latitude = $Common->convertDMS($spotter_item['latitude'], 'latitude'); |
|
107 | 107 | print '<span class="latitude">'.$latitude['deg'].'° '.$latitude['min']."′ ".$latitude['sec'].'" '.$latitude['NSEW'].'</span>, '; |
108 | - $longitude = $Common->convertDMS($spotter_item['longitude'],'longitude'); |
|
108 | + $longitude = $Common->convertDMS($spotter_item['longitude'], 'longitude'); |
|
109 | 109 | print '<span class="longitude">'.$longitude['deg'].'° '.$longitude['min']."′ ".$longitude['sec'].'" '.$longitude['NSEW'].'</span>'; |
110 | 110 | } elseif ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
111 | - $latitude = $Common->convertDM($spotter_item['latitude'],'latitude'); |
|
112 | - print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'],3)."′ ".$latitude['NSEW'].'</span>, '; |
|
113 | - $longitude = $Common->convertDM($spotter_item['longitude'],'longitude'); |
|
114 | - print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'],3)."′ ".$longitude['NSEW'].'</span>'; |
|
111 | + $latitude = $Common->convertDM($spotter_item['latitude'], 'latitude'); |
|
112 | + print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'], 3)."′ ".$latitude['NSEW'].'</span>, '; |
|
113 | + $longitude = $Common->convertDM($spotter_item['longitude'], 'longitude'); |
|
114 | + print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'], 3)."′ ".$longitude['NSEW'].'</span>'; |
|
115 | 115 | } else { |
116 | 116 | print '<span class="latitude">'.$spotter_item['latitude'].'</span>, '; |
117 | 117 | print '<span class="longitude">'.$spotter_item['longitude'].'</span>'; |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | |
14 | 14 | $from_archive = false; |
15 | 15 | if (isset($_GET['ident'])) { |
16 | - $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
16 | + $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
17 | 17 | if (isset($_GET['currenttime'])) { |
18 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
18 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
19 | 19 | $currenttime = round($currenttime/1000); |
20 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident,$currenttime); |
|
20 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident, $currenttime); |
|
21 | 21 | if (empty($spotter_array)) { |
22 | 22 | $from_archive = true; |
23 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident,$currenttime); |
|
23 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident, $currenttime); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } else { |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | if (isset($_GET['famtrackid'])) { |
35 | - $famtrackid = urldecode(filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING)); |
|
35 | + $famtrackid = urldecode(filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING)); |
|
36 | 36 | if (isset($_GET['currenttime'])) { |
37 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
37 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
38 | 38 | $currenttime = round($currenttime/1000); |
39 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid,$currenttime); |
|
39 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid, $currenttime); |
|
40 | 40 | |
41 | 41 | if (empty($spotter_array)) { |
42 | 42 | $from_archive = true; |
43 | 43 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
44 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid,$currenttime); |
|
44 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid, $currenttime); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | } else { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
62 | 62 | { |
63 | 63 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
64 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
64 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
65 | 65 | } else $image = $spotter_item['image_thumbnail']; |
66 | 66 | |
67 | 67 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | print '<div><span>'._("Altitude").'</span>'; |
82 | 82 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
83 | 83 | try { |
84 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
85 | - } catch(Exception $e) { |
|
84 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
85 | + } catch (Exception $e) { |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | print '<span class="altitude">'; |
@@ -117,15 +117,15 @@ discard block |
||
117 | 117 | print '</div>'; |
118 | 118 | print '<div><span>'._("Coordinates").'</span>'; |
119 | 119 | if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
120 | - $latitude = $Common->convertDMS($spotter_item['latitude'],'latitude'); |
|
120 | + $latitude = $Common->convertDMS($spotter_item['latitude'], 'latitude'); |
|
121 | 121 | print '<span class="latitude">'.$latitude['deg'].'° '.$latitude['min']."′ ".$latitude['sec'].'" '.$latitude['NSEW'].'</span>, '; |
122 | - $longitude = $Common->convertDMS($spotter_item['longitude'],'longitude'); |
|
122 | + $longitude = $Common->convertDMS($spotter_item['longitude'], 'longitude'); |
|
123 | 123 | print '<span class="longitude">'.$longitude['deg'].'° '.$longitude['min']."′ ".$longitude['sec'].'" '.$longitude['NSEW'].'</span>'; |
124 | 124 | } elseif ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
125 | - $latitude = $Common->convertDM($spotter_item['latitude'],'latitude'); |
|
126 | - print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'],3)."′ ".$latitude['NSEW'].'</span>, '; |
|
127 | - $longitude = $Common->convertDM($spotter_item['longitude'],'longitude'); |
|
128 | - print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'],3)."′ ".$longitude['NSEW'].'</span>'; |
|
125 | + $latitude = $Common->convertDM($spotter_item['latitude'], 'latitude'); |
|
126 | + print '<span class="latitude">'.$latitude['deg'].'° '.round($latitude['min'], 3)."′ ".$latitude['NSEW'].'</span>, '; |
|
127 | + $longitude = $Common->convertDM($spotter_item['longitude'], 'longitude'); |
|
128 | + print '<span class="longitude">'.$longitude['deg'].'° '.round($longitude['min'], 3)."′ ".$longitude['NSEW'].'</span>'; |
|
129 | 129 | } else { |
130 | 130 | print '<span class="latitude">'.$spotter_item['latitude'].'</span>, '; |
131 | 131 | print '<span class="longitude">'.$spotter_item['longitude'].'</span>'; |
@@ -11,47 +11,47 @@ discard block |
||
11 | 11 | $spotter_array = array(); |
12 | 12 | if (isset($_GET['coord'])) |
13 | 13 | { |
14 | - $coords = explode(',',$_GET['coord']); |
|
14 | + $coords = explode(',', $_GET['coord']); |
|
15 | 15 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
16 | 16 | || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
17 | 17 | //$spotter_array = $Source->getAllLocationInfo(); |
18 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs',$coords)); |
|
18 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs', $coords)); |
|
19 | 19 | } |
20 | 20 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
21 | 21 | || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
22 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx',$coords)); |
|
22 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx', $coords)); |
|
23 | 23 | } |
24 | 24 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
25 | 25 | || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
26 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning',$coords)); |
|
26 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning', $coords)); |
|
27 | 27 | } |
28 | 28 | if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') |
29 | 29 | || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
30 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',$coords,true)); |
|
30 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('fires', $coords, true)); |
|
31 | 31 | } |
32 | 32 | if (!isset($globalDemo)) { |
33 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('')); |
|
33 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('')); |
|
34 | 34 | } |
35 | 35 | } else { |
36 | 36 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
37 | 37 | || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
38 | 38 | //$spotter_array = $Source->getAllLocationInfo(); |
39 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs')); |
|
39 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs')); |
|
40 | 40 | } |
41 | 41 | if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') |
42 | 42 | || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
43 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx')); |
|
43 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx')); |
|
44 | 44 | } |
45 | 45 | if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') |
46 | 46 | || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
47 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning')); |
|
47 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning')); |
|
48 | 48 | } |
49 | 49 | if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') |
50 | 50 | || (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
51 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',array(),true)); |
|
51 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('fires', array(), true)); |
|
52 | 52 | } |
53 | 53 | if (!isset($globalDemo)) { |
54 | - $spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('')); |
|
54 | + $spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('')); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $output = '{"type": "FeatureCollection","features": ['; |
60 | 60 | if (!empty($spotter_array) && count($spotter_array) > 0) |
61 | 61 | { |
62 | - foreach($spotter_array as $spotter_item) |
|
62 | + foreach ($spotter_array as $spotter_item) |
|
63 | 63 | { |
64 | 64 | date_default_timezone_set('UTC'); |
65 | 65 | $output .= '{"type": "Feature",'; |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | $output .= '"icon": "'.$globalURL.'/images/'.$spotter_item['logo'].'",'; |
79 | 79 | $output .= '"type": "'.$spotter_item['type'].'",'; |
80 | 80 | if ($spotter_item['type'] == 'wx') { |
81 | - $weather = json_decode($spotter_item['description'],true); |
|
82 | - if (isset($weather['temp'])) $output.= '"temp": "'.$weather['temp'].'",'; |
|
81 | + $weather = json_decode($spotter_item['description'], true); |
|
82 | + if (isset($weather['temp'])) $output .= '"temp": "'.$weather['temp'].'",'; |
|
83 | 83 | } |
84 | 84 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
85 | 85 | $output .= '},'; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $output .= '}'; |
90 | 90 | $output .= '},'; |
91 | 91 | } |
92 | - $output = substr($output, 0, -1); |
|
92 | + $output = substr($output, 0, -1); |
|
93 | 93 | } |
94 | 94 | $output .= ']}'; |
95 | 95 | print $output; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <button type="button" class="close">×</button> |
10 | 10 | <?php |
11 | 11 | |
12 | -$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING); |
|
12 | +$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING); |
|
13 | 13 | $sat = urldecode($sat); |
14 | 14 | //$info = $Satellite->get_info(str_replace(' ','-',$sat)); |
15 | 15 | //print_r($info); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $aircraft_name = 'INTEGRAL'; |
49 | 49 | // $ground_speed = 14970; |
50 | 50 | $launch_date = '17 October 2002'; |
51 | -} elseif (strpos($sat,'IRIDIUM') !== false) { |
|
51 | +} elseif (strpos($sat, 'IRIDIUM') !== false) { |
|
52 | 52 | $image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg'; |
53 | 53 | $image_copyright = 'Cliff'; |
54 | 54 | $ident = 'Iridium satellite constellation'; |
@@ -56,23 +56,23 @@ discard block |
||
56 | 56 | $aircraft_name = $sat; |
57 | 57 | // $ground_speed = 14970; |
58 | 58 | // $launch_date = '29 september 2011'; |
59 | -} elseif (strpos($sat,'ORBCOMM') !== false) { |
|
59 | +} elseif (strpos($sat, 'ORBCOMM') !== false) { |
|
60 | 60 | $ident = 'Orbcomm'; |
61 | 61 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)'; |
62 | 62 | $aircraft_name = $sat; |
63 | -} elseif (strpos($sat,'GLOBALSTAR') !== false) { |
|
63 | +} elseif (strpos($sat, 'GLOBALSTAR') !== false) { |
|
64 | 64 | $ident = 'Globalstar'; |
65 | 65 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar'; |
66 | 66 | $aircraft_name = $sat; |
67 | - $satname = str_replace(array('[+]','[-]'),'',$sat); |
|
68 | -} elseif (strpos($sat,'OSCAR 7') !== false) { |
|
67 | + $satname = str_replace(array('[+]', '[-]'), '', $sat); |
|
68 | +} elseif (strpos($sat, 'OSCAR 7') !== false) { |
|
69 | 69 | $image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg'; |
70 | 70 | $image_copyright = 'Amsat.org'; |
71 | 71 | $ident = 'AMSAT-OSCAR 7'; |
72 | 72 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7'; |
73 | 73 | $aircraft_name = $sat; |
74 | 74 | $launch_date = '15 November 1974'; |
75 | -} elseif (strpos($sat,'santaclaus') !== false) { |
|
75 | +} elseif (strpos($sat, 'santaclaus') !== false) { |
|
76 | 76 | $image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg'; |
77 | 77 | $image_copyright = 'Jonathan G Meath'; |
78 | 78 | $ident = 'Santa Claus'; |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | // $launch_date = '15 November 1974'; |
82 | 82 | } else { |
83 | 83 | $ident = $sat; |
84 | - if (strpos($sat,'(')) $satname = $sat; |
|
85 | - else $satname = str_replace(array(' '),'-',$sat); |
|
84 | + if (strpos($sat, '(')) $satname = $sat; |
|
85 | + else $satname = str_replace(array(' '), '-', $sat); |
|
86 | 86 | } |
87 | 87 | if (!isset($satname)) $satname = $sat; |
88 | 88 | if ($satname != 'santaclaus') { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | print '<div><span>'._("Orbit").'</span>'.$info['orbit'].'</div>'; |
157 | 157 | } |
158 | 158 | if ($info['launch_date'] != '') { |
159 | - print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d',strtotime($info['launch_date'])).'</div>'; |
|
159 | + print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d', strtotime($info['launch_date'])).'</div>'; |
|
160 | 160 | } |
161 | 161 | if ($info['launch_site'] != '') { |
162 | 162 | print '<div><span>'._("Launch Site").'</span>'.$info['launch_site'].'</div>'; |