@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | if (!isset($filter_name)) $filter_name = ''; |
22 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
22 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
23 | 23 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
24 | 24 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
25 | 25 | } |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $title = _("Statistics"); |
35 | 35 | } |
36 | 36 | |
37 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
38 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
37 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
38 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
39 | 39 | |
40 | 40 | require_once('header.php'); |
41 | 41 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | date_default_timezone_set('UTC'); |
63 | 63 | $lastupdate = strtotime($last_update[0]['value']); |
64 | 64 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
65 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
65 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | ?> |
@@ -74,31 +74,31 @@ discard block |
||
74 | 74 | <?php |
75 | 75 | if ($type == 'aircraft') { |
76 | 76 | ?> |
77 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
78 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
79 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
80 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
77 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
78 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
79 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
80 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
81 | 81 | <?php |
82 | 82 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
83 | 83 | ?> |
84 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
85 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
84 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
85 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
86 | 86 | <?php |
87 | 87 | } |
88 | 88 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
89 | 89 | ?> |
90 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
91 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
90 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
91 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
92 | 92 | <?php |
93 | 93 | } |
94 | 94 | ?> |
95 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
96 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
95 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
96 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
97 | 97 | <?php |
98 | 98 | if ($airline_icao == '') { |
99 | 99 | ?> |
100 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
101 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
100 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
101 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
102 | 102 | <?php |
103 | 103 | } |
104 | 104 | ?> |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | if (!(isset($globalVA) && $globalVA) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS) && !(isset($globalVAM) && $globalVAM)) { |
107 | 107 | if ($airline_icao == '' || $airline_icao == 'all') { |
108 | 108 | ?> |
109 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
110 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
109 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
110 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
111 | 111 | <?php |
112 | 112 | } |
113 | 113 | } |
@@ -115,22 +115,22 @@ discard block |
||
115 | 115 | <?php |
116 | 116 | } elseif ($type == 'marine') { |
117 | 117 | ?> |
118 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(),$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
119 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
120 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
121 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
118 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(), $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
119 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
120 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
121 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
122 | 122 | <?php |
123 | 123 | } elseif ($type == 'tracker') { |
124 | 124 | ?> |
125 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(),$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
126 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
127 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
128 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
125 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(), $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
126 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
127 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
128 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
129 | 129 | <?php |
130 | 130 | } |
131 | 131 | ?> |
132 | 132 | </p> |
133 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
133 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
134 | 134 | <div class="specific-stats"> |
135 | 135 | <?php |
136 | 136 | if ($type == 'aircraft') { |
@@ -139,12 +139,12 @@ discard block |
||
139 | 139 | <div class="col-md-6"> |
140 | 140 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
141 | 141 | <?php |
142 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
142 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
143 | 143 | if (count($aircraft_array) == 0) print _("No data available"); |
144 | 144 | else { |
145 | 145 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
146 | 146 | $aircraft_data = ''; |
147 | - foreach($aircraft_array as $aircraft_item) |
|
147 | + foreach ($aircraft_array as $aircraft_item) |
|
148 | 148 | { |
149 | 149 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
150 | 150 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
@@ -174,17 +174,17 @@ discard block |
||
174 | 174 | ?> |
175 | 175 | </div> |
176 | 176 | </div> |
177 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
177 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
178 | 178 | <?php |
179 | 179 | // echo $airline_icao; |
180 | 180 | if ($airline_icao == '' || $airline_icao == 'all') { |
181 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
181 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
182 | 182 | if (count($airline_array) > 0) { |
183 | 183 | print '<div class="col-md-6">'; |
184 | 184 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
185 | 185 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
186 | 186 | $airline_data = ''; |
187 | - foreach($airline_array as $airline_item) |
|
187 | + foreach ($airline_array as $airline_item) |
|
188 | 188 | { |
189 | 189 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
190 | 190 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | ?> |
212 | 212 | </div> |
213 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
213 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
214 | 214 | <?php |
215 | 215 | } |
216 | 216 | ?> |
@@ -224,12 +224,12 @@ discard block |
||
224 | 224 | <div class="col-md-6"> |
225 | 225 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
226 | 226 | <?php |
227 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
227 | + $marine_array = $Marine->countAllMarineTypes(true, 0, '', array(), $year, $month); |
|
228 | 228 | if (count($marine_array) == 0) print _("No data available"); |
229 | 229 | else { |
230 | 230 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
231 | 231 | $marine_data = ''; |
232 | - foreach($marine_array as $marine_item) |
|
232 | + foreach ($marine_array as $marine_item) |
|
233 | 233 | { |
234 | 234 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
235 | 235 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | ?> |
261 | 261 | </div> |
262 | 262 | </div> |
263 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
263 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
264 | 264 | <!-- </div>--> |
265 | 265 | <?php |
266 | 266 | } |
@@ -272,12 +272,12 @@ discard block |
||
272 | 272 | <div class="col-md-6"> |
273 | 273 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
274 | 274 | <?php |
275 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
275 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month); |
|
276 | 276 | if (count($tracker_array) == 0) print _("No data available"); |
277 | 277 | else { |
278 | 278 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
279 | 279 | $tracker_data = ''; |
280 | - foreach($tracker_array as $tracker_item) |
|
280 | + foreach ($tracker_array as $tracker_item) |
|
281 | 281 | { |
282 | 282 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
283 | 283 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | ?> |
309 | 309 | </div> |
310 | 310 | </div> |
311 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
311 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
312 | 312 | <!-- </div>--> |
313 | 313 | <?php |
314 | 314 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | ?> |
319 | 319 | <div class="row column"> |
320 | 320 | <?php |
321 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
321 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
322 | 322 | //if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
323 | 323 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
324 | 324 | if (empty($flightover_array)) { |
@@ -329,12 +329,12 @@ discard block |
||
329 | 329 | ?> |
330 | 330 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
331 | 331 | <?php |
332 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
332 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
333 | 333 | if (count($pilot_array) == 0) print _("No data available"); |
334 | 334 | else { |
335 | 335 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
336 | 336 | $pilot_data = ''; |
337 | - foreach($pilot_array as $pilot_item) |
|
337 | + foreach ($pilot_array as $pilot_item) |
|
338 | 338 | { |
339 | 339 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
340 | 340 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | ?> |
357 | 357 | </div> |
358 | 358 | |
359 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
359 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
360 | 360 | <?php |
361 | 361 | } |
362 | 362 | // else { |
@@ -365,12 +365,12 @@ discard block |
||
365 | 365 | <div class="col-md-6"> |
366 | 366 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
367 | 367 | <?php |
368 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
368 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
369 | 369 | if (count($owner_array) == 0) print _("No data available"); |
370 | 370 | else { |
371 | 371 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
372 | 372 | $owner_data = ''; |
373 | - foreach($owner_array as $owner_item) |
|
373 | + foreach ($owner_array as $owner_item) |
|
374 | 374 | { |
375 | 375 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
376 | 376 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | </div> |
391 | 391 | </div> |
392 | 392 | |
393 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
393 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
394 | 394 | <?php |
395 | 395 | } |
396 | 396 | if (!empty($flightover_array)) { |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
405 | 405 | print 'var series = ['; |
406 | 406 | $flightover_data = ''; |
407 | - foreach($flightover_array as $flightover_item) |
|
407 | + foreach ($flightover_array as $flightover_item) |
|
408 | 408 | { |
409 | 409 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
410 | 410 | } |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | ?> |
452 | 452 | </div> |
453 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
453 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
454 | 454 | |
455 | 455 | |
456 | 456 | </div> |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
471 | 471 | print 'var series = ['; |
472 | 472 | $flightover_data = ''; |
473 | - foreach($flightover_array as $flightover_item) |
|
473 | + foreach ($flightover_array as $flightover_item) |
|
474 | 474 | { |
475 | 475 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
476 | 476 | } |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
531 | 531 | print 'var series = ['; |
532 | 532 | $flightover_data = ''; |
533 | - foreach($flightover_array as $flightover_item) |
|
533 | + foreach ($flightover_array as $flightover_item) |
|
534 | 534 | { |
535 | 535 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
536 | 536 | } |
@@ -583,14 +583,14 @@ discard block |
||
583 | 583 | <div class="row column"> |
584 | 584 | <div class="col-md-6"> |
585 | 585 | <?php |
586 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
586 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
587 | 587 | if (count($airport_airport_array) > 0) { |
588 | 588 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
589 | 589 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
590 | 590 | print "\n"; |
591 | 591 | print 'var series = ['; |
592 | 592 | $airport_data = ''; |
593 | - foreach($airport_airport_array as $airport_item) |
|
593 | + foreach ($airport_airport_array as $airport_item) |
|
594 | 594 | { |
595 | 595 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
596 | 596 | } |
@@ -641,18 +641,18 @@ discard block |
||
641 | 641 | } |
642 | 642 | ?> |
643 | 643 | </div> |
644 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
644 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
645 | 645 | |
646 | 646 | <div class="col-md-6"> |
647 | 647 | <?php |
648 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
648 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
649 | 649 | if (count($airport_airport_array2) > 0) { |
650 | 650 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
651 | 651 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
652 | 652 | print "\n"; |
653 | 653 | print 'var series = ['; |
654 | 654 | $airport_data = ''; |
655 | - foreach($airport_airport_array2 as $airport_item) |
|
655 | + foreach ($airport_airport_array2 as $airport_item) |
|
656 | 656 | { |
657 | 657 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
658 | 658 | } |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | ?> |
705 | 705 | </div> |
706 | 706 | </div> |
707 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
707 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
708 | 708 | <?php |
709 | 709 | } |
710 | 710 | ?> |
@@ -718,19 +718,19 @@ discard block |
||
718 | 718 | <div class="col-md-6"> |
719 | 719 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
720 | 720 | <?php |
721 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
721 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
722 | 722 | if (count($year_array) == 0) print _("No data available"); |
723 | 723 | else { |
724 | 724 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
725 | 725 | $year_data = ''; |
726 | 726 | $year_cnt = ''; |
727 | - foreach($year_array as $year_item) |
|
727 | + foreach ($year_array as $year_item) |
|
728 | 728 | { |
729 | 729 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
730 | 730 | $year_cnt .= $year_item['date_count'].','; |
731 | 731 | } |
732 | 732 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
733 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
733 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
734 | 734 | print 'c3.generate({ |
735 | 735 | bindto: "#chart8", |
736 | 736 | data: { x: "x", |
@@ -743,23 +743,23 @@ discard block |
||
743 | 743 | <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> |
744 | 744 | </div> |
745 | 745 | </div> |
746 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
746 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
747 | 747 | <div class="col-md-6"> |
748 | 748 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
749 | 749 | <?php |
750 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
750 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
751 | 751 | if (count($month_array) == 0) print _("No data available"); |
752 | 752 | else { |
753 | 753 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
754 | 754 | $month_data = ''; |
755 | 755 | $month_cnt = ''; |
756 | - foreach($month_array as $month_item) |
|
756 | + foreach ($month_array as $month_item) |
|
757 | 757 | { |
758 | 758 | $month_data .= '"'.$month_item['date_name'].'",'; |
759 | 759 | $month_cnt .= $month_item['date_count'].','; |
760 | 760 | } |
761 | 761 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
762 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
762 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
763 | 763 | print 'c3.generate({ |
764 | 764 | bindto: "#chart9", |
765 | 765 | data: { x: "x", |
@@ -772,24 +772,24 @@ discard block |
||
772 | 772 | <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> |
773 | 773 | </div> |
774 | 774 | </div> |
775 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
775 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
776 | 776 | |
777 | 777 | <div class="col-md-6"> |
778 | 778 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
779 | 779 | <?php |
780 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
780 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
781 | 781 | if (empty($date_array)) print _("No data available"); |
782 | 782 | else { |
783 | 783 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
784 | 784 | $date_data = ''; |
785 | 785 | $date_cnt = ''; |
786 | - foreach($date_array as $date_item) |
|
786 | + foreach ($date_array as $date_item) |
|
787 | 787 | { |
788 | 788 | $date_data .= '"'.$date_item['date_name'].'",'; |
789 | 789 | $date_cnt .= $date_item['date_count'].','; |
790 | 790 | } |
791 | 791 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
792 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
792 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
793 | 793 | print 'c3.generate({ |
794 | 794 | bindto: "#chart5", |
795 | 795 | data: { x: "x", |
@@ -802,23 +802,23 @@ discard block |
||
802 | 802 | <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> |
803 | 803 | </div> |
804 | 804 | </div> |
805 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
805 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
806 | 806 | <div class="col-md-6"> |
807 | 807 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
808 | 808 | <?php |
809 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
809 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
810 | 810 | if (empty($hour_array)) print _("No data available"); |
811 | 811 | else { |
812 | 812 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
813 | 813 | $hour_data = ''; |
814 | 814 | $hour_cnt = ''; |
815 | - foreach($hour_array as $hour_item) |
|
815 | + foreach ($hour_array as $hour_item) |
|
816 | 816 | { |
817 | 817 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
818 | 818 | $hour_cnt .= $hour_item['hour_count'].','; |
819 | 819 | } |
820 | 820 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
821 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
821 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
822 | 822 | print 'c3.generate({ |
823 | 823 | bindto: "#chart6", |
824 | 824 | data: { |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | <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> |
832 | 832 | </div> |
833 | 833 | </div> |
834 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
834 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
835 | 835 | </div> |
836 | 836 | <?php |
837 | 837 | } |
@@ -849,19 +849,19 @@ discard block |
||
849 | 849 | <div class="col-md-6"> |
850 | 850 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
851 | 851 | <?php |
852 | - $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
852 | + $year_array = $Marine->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
853 | 853 | if (count($year_array) == 0) print _("No data available"); |
854 | 854 | else { |
855 | 855 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
856 | 856 | $year_data = ''; |
857 | 857 | $year_cnt = ''; |
858 | - foreach($year_array as $year_item) |
|
858 | + foreach ($year_array as $year_item) |
|
859 | 859 | { |
860 | 860 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
861 | 861 | $year_cnt .= $year_item['date_count'].','; |
862 | 862 | } |
863 | 863 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
864 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
864 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
865 | 865 | print 'c3.generate({ |
866 | 866 | bindto: "#chart8", |
867 | 867 | data: { x: "x", |
@@ -875,23 +875,23 @@ discard block |
||
875 | 875 | </div> |
876 | 876 | </div> |
877 | 877 | |
878 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
878 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
879 | 879 | <div class="col-md-6"> |
880 | 880 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
881 | 881 | <?php |
882 | - $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
|
882 | + $month_array = $Marine->countAllDatesLastMonth($airline_icao, $filter_name); |
|
883 | 883 | if (count($month_array) == 0) print _("No data available"); |
884 | 884 | else { |
885 | 885 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
886 | 886 | $month_data = ''; |
887 | 887 | $month_cnt = ''; |
888 | - foreach($month_array as $month_item) |
|
888 | + foreach ($month_array as $month_item) |
|
889 | 889 | { |
890 | 890 | $month_data .= '"'.$month_item['date_name'].'",'; |
891 | 891 | $month_cnt .= $month_item['date_count'].','; |
892 | 892 | } |
893 | 893 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
894 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
894 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
895 | 895 | print 'c3.generate({ |
896 | 896 | bindto: "#chart9", |
897 | 897 | data: { x: "x", |
@@ -904,24 +904,24 @@ discard block |
||
904 | 904 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
905 | 905 | </div> |
906 | 906 | </div> |
907 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
907 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
908 | 908 | |
909 | 909 | <div class="col-md-6"> |
910 | 910 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
911 | 911 | <?php |
912 | - $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
|
912 | + $date_array = $Marine->countAllDatesLast7Days($airline_icao, $filter_name); |
|
913 | 913 | if (empty($date_array)) print _("No data available"); |
914 | 914 | else { |
915 | 915 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
916 | 916 | $date_data = ''; |
917 | 917 | $date_cnt = ''; |
918 | - foreach($date_array as $date_item) |
|
918 | + foreach ($date_array as $date_item) |
|
919 | 919 | { |
920 | 920 | $date_data .= '"'.$date_item['date_name'].'",'; |
921 | 921 | $date_cnt .= $date_item['date_count'].','; |
922 | 922 | } |
923 | 923 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
924 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
924 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
925 | 925 | print 'c3.generate({ |
926 | 926 | bindto: "#chart5", |
927 | 927 | data: { x: "x", |
@@ -934,23 +934,23 @@ discard block |
||
934 | 934 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
935 | 935 | </div> |
936 | 936 | </div> |
937 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
937 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
938 | 938 | <div class="col-md-6"> |
939 | 939 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
940 | 940 | <?php |
941 | - $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
|
941 | + $hour_array = $Marine->countAllHours('hour', true, $airline_icao, $filter_name); |
|
942 | 942 | if (empty($hour_array)) print _("No data available"); |
943 | 943 | else { |
944 | 944 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
945 | 945 | $hour_data = ''; |
946 | 946 | $hour_cnt = ''; |
947 | - foreach($hour_array as $hour_item) |
|
947 | + foreach ($hour_array as $hour_item) |
|
948 | 948 | { |
949 | 949 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
950 | 950 | $hour_cnt .= $hour_item['hour_count'].','; |
951 | 951 | } |
952 | 952 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
953 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
953 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
954 | 954 | print 'c3.generate({ |
955 | 955 | bindto: "#chart6", |
956 | 956 | data: { |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
964 | 964 | </div> |
965 | 965 | </div> |
966 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
966 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
967 | 967 | </div> |
968 | 968 | <?php |
969 | 969 | } |
@@ -987,13 +987,13 @@ discard block |
||
987 | 987 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
988 | 988 | $year_data = ''; |
989 | 989 | $year_cnt = ''; |
990 | - foreach($year_array as $year_item) |
|
990 | + foreach ($year_array as $year_item) |
|
991 | 991 | { |
992 | 992 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
993 | 993 | $year_cnt .= $year_item['date_count'].','; |
994 | 994 | } |
995 | 995 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
996 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
996 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
997 | 997 | print 'c3.generate({ |
998 | 998 | bindto: "#chart8", |
999 | 999 | data: { x: "x", |
@@ -1007,7 +1007,7 @@ discard block |
||
1007 | 1007 | </div> |
1008 | 1008 | </div> |
1009 | 1009 | |
1010 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1010 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1011 | 1011 | <div class="col-md-6"> |
1012 | 1012 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1013 | 1013 | <?php |
@@ -1017,13 +1017,13 @@ discard block |
||
1017 | 1017 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1018 | 1018 | $month_data = ''; |
1019 | 1019 | $month_cnt = ''; |
1020 | - foreach($month_array as $month_item) |
|
1020 | + foreach ($month_array as $month_item) |
|
1021 | 1021 | { |
1022 | 1022 | $month_data .= '"'.$month_item['date_name'].'",'; |
1023 | 1023 | $month_cnt .= $month_item['date_count'].','; |
1024 | 1024 | } |
1025 | 1025 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
1026 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
1026 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
1027 | 1027 | print 'c3.generate({ |
1028 | 1028 | bindto: "#chart9", |
1029 | 1029 | data: { x: "x", |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1037 | 1037 | </div> |
1038 | 1038 | </div> |
1039 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1039 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1040 | 1040 | |
1041 | 1041 | <div class="col-md-6"> |
1042 | 1042 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1047,13 +1047,13 @@ discard block |
||
1047 | 1047 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1048 | 1048 | $date_data = ''; |
1049 | 1049 | $date_cnt = ''; |
1050 | - foreach($date_array as $date_item) |
|
1050 | + foreach ($date_array as $date_item) |
|
1051 | 1051 | { |
1052 | 1052 | $date_data .= '"'.$date_item['date_name'].'",'; |
1053 | 1053 | $date_cnt .= $date_item['date_count'].','; |
1054 | 1054 | } |
1055 | 1055 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
1056 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
1056 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
1057 | 1057 | print 'c3.generate({ |
1058 | 1058 | bindto: "#chart5", |
1059 | 1059 | data: { x: "x", |
@@ -1066,23 +1066,23 @@ discard block |
||
1066 | 1066 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1067 | 1067 | </div> |
1068 | 1068 | </div> |
1069 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1069 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1070 | 1070 | <div class="col-md-6"> |
1071 | 1071 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1072 | 1072 | <?php |
1073 | - $hour_array = $Tracker->countAllHours('hour',true); |
|
1073 | + $hour_array = $Tracker->countAllHours('hour', true); |
|
1074 | 1074 | if (empty($hour_array)) print _("No data available"); |
1075 | 1075 | else { |
1076 | 1076 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1077 | 1077 | $hour_data = ''; |
1078 | 1078 | $hour_cnt = ''; |
1079 | - foreach($hour_array as $hour_item) |
|
1079 | + foreach ($hour_array as $hour_item) |
|
1080 | 1080 | { |
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 = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
1085 | + $hour_cnt = "['trackers',".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; ?>/tracker/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 | } |
@@ -1119,13 +1119,13 @@ discard block |
||
1119 | 1119 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
1120 | 1120 | $year_data = ''; |
1121 | 1121 | $year_cnt = ''; |
1122 | - foreach($year_array as $year_item) |
|
1122 | + foreach ($year_array as $year_item) |
|
1123 | 1123 | { |
1124 | 1124 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
1125 | 1125 | $year_cnt .= $year_item['count'].','; |
1126 | 1126 | } |
1127 | 1127 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1128 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1128 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1129 | 1129 | print 'c3.generate({ |
1130 | 1130 | bindto: "#chart32", |
1131 | 1131 | data: { x: "x", |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1139 | 1139 | </div> |
1140 | 1140 | </div> |
1141 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1141 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1142 | 1142 | |
1143 | 1143 | <div class="row column"> |
1144 | 1144 | <div class="col-md-6"> |
@@ -1150,13 +1150,13 @@ discard block |
||
1150 | 1150 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
1151 | 1151 | $year_data = ''; |
1152 | 1152 | $year_cnt = ''; |
1153 | - foreach($year_array as $year_item) |
|
1153 | + foreach ($year_array as $year_item) |
|
1154 | 1154 | { |
1155 | 1155 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
1156 | 1156 | $year_cnt .= $year_item['count'].','; |
1157 | 1157 | } |
1158 | 1158 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1159 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1159 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1160 | 1160 | print 'c3.generate({ |
1161 | 1161 | bindto: "#chart33", |
1162 | 1162 | data: { x: "x", |
@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1170 | 1170 | </div> |
1171 | 1171 | </div> |
1172 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1172 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1173 | 1173 | <br/> |
1174 | 1174 | <?php |
1175 | 1175 | } |
@@ -1185,19 +1185,19 @@ discard block |
||
1185 | 1185 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
1186 | 1186 | if ($year == '' && $month == '') { |
1187 | 1187 | if ($type == 'aircraft') { |
1188 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
1188 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
1189 | 1189 | } elseif ($type == 'marine') { |
1190 | - $polar = $Stats->getStatsSource('polar_marine',date('Y'),date('m'),date('d')); |
|
1190 | + $polar = $Stats->getStatsSource('polar_marine', date('Y'), date('m'), date('d')); |
|
1191 | 1191 | } elseif ($type == 'tracker') { |
1192 | - $polar = $Stats->getStatsSource('polar_tracker',date('Y'),date('m'),date('d')); |
|
1192 | + $polar = $Stats->getStatsSource('polar_tracker', date('Y'), date('m'), date('d')); |
|
1193 | 1193 | } |
1194 | 1194 | } else { |
1195 | 1195 | if ($type == 'aircraft') { |
1196 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
1196 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
1197 | 1197 | } elseif ($type == 'marine') { |
1198 | - $polar = $Stats->getStatsSource('polar_marine',$year,$month); |
|
1198 | + $polar = $Stats->getStatsSource('polar_marine', $year, $month); |
|
1199 | 1199 | } elseif ($type == 'tracker') { |
1200 | - $polar = $Stats->getStatsSource('polar_tracker',$year,$month); |
|
1200 | + $polar = $Stats->getStatsSource('polar_tracker', $year, $month); |
|
1201 | 1201 | } |
1202 | 1202 | } |
1203 | 1203 | if (!empty($polar)) { |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | unset($polar_data); |
1207 | 1207 | $Spotter = new Spotter(); |
1208 | 1208 | $data = json_decode($eachpolar['source_data']); |
1209 | - foreach($data as $value => $key) { |
|
1209 | + foreach ($data as $value => $key) { |
|
1210 | 1210 | $direction = $Spotter->parseDirection(($value*22.5)); |
1211 | 1211 | $distance = $key; |
1212 | 1212 | $unit = 'km'; |
@@ -1226,7 +1226,7 @@ discard block |
||
1226 | 1226 | ?> |
1227 | 1227 | <div class="col-md-6"> |
1228 | 1228 | <h4><?php print $eachpolar['source_name']; ?></h4> |
1229 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1229 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1230 | 1230 | <script> |
1231 | 1231 | (function() { |
1232 | 1232 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1250,7 +1250,7 @@ discard block |
||
1250 | 1250 | color: color, |
1251 | 1251 | unit: '<?php echo $unit; ?>' |
1252 | 1252 | }; |
1253 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1253 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1254 | 1254 | })(); |
1255 | 1255 | </script> |
1256 | 1256 | </div> |
@@ -1265,19 +1265,19 @@ discard block |
||
1265 | 1265 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
1266 | 1266 | if ($year == '' && $month == '') { |
1267 | 1267 | if ($type == 'aircraft') { |
1268 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
1268 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
1269 | 1269 | } elseif ($type == 'marine') { |
1270 | - $msg = $Stats->getStatsSource('msg_marine',date('Y'),date('m'),date('d')); |
|
1270 | + $msg = $Stats->getStatsSource('msg_marine', date('Y'), date('m'), date('d')); |
|
1271 | 1271 | } elseif ($type == 'tracker') { |
1272 | - $msg = $Stats->getStatsSource('msg_tracker',date('Y'),date('m'),date('d')); |
|
1272 | + $msg = $Stats->getStatsSource('msg_tracker', date('Y'), date('m'), date('d')); |
|
1273 | 1273 | } |
1274 | 1274 | } else { |
1275 | 1275 | if ($type == 'aircraft') { |
1276 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
1276 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
1277 | 1277 | } elseif ($type == 'marine') { |
1278 | - $msg = $Stats->getStatsSource('msg_marine',$year,$month); |
|
1278 | + $msg = $Stats->getStatsSource('msg_marine', $year, $month); |
|
1279 | 1279 | } elseif ($type == 'tracker') { |
1280 | - $msg = $Stats->getStatsSource('msg_tracker',$year,$month); |
|
1280 | + $msg = $Stats->getStatsSource('msg_tracker', $year, $month); |
|
1281 | 1281 | } |
1282 | 1282 | } |
1283 | 1283 | if (!empty($msg)) { |
@@ -1285,13 +1285,13 @@ discard block |
||
1285 | 1285 | foreach ($msg as $eachmsg) { |
1286 | 1286 | //$eachmsg = $msg[0]; |
1287 | 1287 | $data = $eachmsg['source_data']; |
1288 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
1288 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
1289 | 1289 | else $max = 500; |
1290 | 1290 | ?> |
1291 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1291 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1292 | 1292 | <script> |
1293 | 1293 | var g = new JustGage({ |
1294 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
1294 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
1295 | 1295 | value: <?php echo $data; ?>, |
1296 | 1296 | min: 0, |
1297 | 1297 | max: <?php print $max; ?>, |
@@ -1313,19 +1313,19 @@ discard block |
||
1313 | 1313 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
1314 | 1314 | if ($year == '' && $month == '') { |
1315 | 1315 | if ($type == 'aircraft') { |
1316 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
1316 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
1317 | 1317 | } elseif ($type == 'marine') { |
1318 | - $hist = $Stats->getStatsSource('hist_marine',date('Y'),date('m'),date('d')); |
|
1318 | + $hist = $Stats->getStatsSource('hist_marine', date('Y'), date('m'), date('d')); |
|
1319 | 1319 | } elseif ($type == 'tracker') { |
1320 | - $hist = $Stats->getStatsSource('hist_tracker',date('Y'),date('m'),date('d')); |
|
1320 | + $hist = $Stats->getStatsSource('hist_tracker', date('Y'), date('m'), date('d')); |
|
1321 | 1321 | } |
1322 | 1322 | } else { |
1323 | 1323 | if ($type == 'aircraft') { |
1324 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
1324 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
1325 | 1325 | } elseif ($type == 'marine') { |
1326 | - $hist = $Stats->getStatsSource('hist_marine',$year,$month); |
|
1326 | + $hist = $Stats->getStatsSource('hist_marine', $year, $month); |
|
1327 | 1327 | } elseif ($type == 'tracker') { |
1328 | - $hist = $Stats->getStatsSource('hist_tracker',$year,$month); |
|
1328 | + $hist = $Stats->getStatsSource('hist_tracker', $year, $month); |
|
1329 | 1329 | } |
1330 | 1330 | } |
1331 | 1331 | foreach ($hist as $hists) { |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | $source = $hists['source_name']; |
1336 | 1336 | $hist_array = json_decode($hists['source_data']); |
1337 | 1337 | $unit = 'km'; |
1338 | - foreach($hist_array as $distance => $nb) |
|
1338 | + foreach ($hist_array as $distance => $nb) |
|
1339 | 1339 | { |
1340 | 1340 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1341 | 1341 | $distance = round($distance*0.539957); |
@@ -1356,18 +1356,18 @@ discard block |
||
1356 | 1356 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
1357 | 1357 | ?> |
1358 | 1358 | <div class="col-md-6"> |
1359 | - <h2><?php echo sprintf(_("Distance for %s"),$source); ?></h2> |
|
1359 | + <h2><?php echo sprintf(_("Distance for %s"), $source); ?></h2> |
|
1360 | 1360 | <?php |
1361 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1361 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1362 | 1362 | print 'c3.generate({ |
1363 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
1363 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
1364 | 1364 | data: { x: "x", |
1365 | 1365 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
1366 | 1366 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
1367 | 1367 | print '</script>'; |
1368 | 1368 | ?> |
1369 | 1369 | </div> |
1370 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1370 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1371 | 1371 | <?php |
1372 | 1372 | } |
1373 | 1373 | ?> |