@@ -6,20 +6,20 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft Manufacturer"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($airline_icao == 'all') { |
11 | 11 | unset($_COOKIE['stats_airline_icao']); |
12 | - setcookie('stats_airline_icao', '', time()-3600); |
|
12 | + setcookie('stats_airline_icao', '', time() - 3600); |
|
13 | 13 | $airline_icao = ''; |
14 | 14 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
15 | 15 | $airline_icao = $_COOKIE['stats_airline_icao']; |
16 | 16 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
17 | 17 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
18 | 18 | } |
19 | -setcookie('stats_airline_icao',$airline_icao); |
|
19 | +setcookie('stats_airline_icao', $airline_icao); |
|
20 | 20 | |
21 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
22 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
21 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
22 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
23 | 23 | |
24 | 24 | require_once('header.php'); |
25 | 25 | include('statistics-sub-menu.php'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | </div> |
31 | 31 | <p>'._("Below are the <strong>Top 10</strong> most common aircraft manufacturers.").'</p>'; |
32 | 32 | |
33 | -$manufacturers_array = $Stats->countAllAircraftManufacturers(true,$airline_icao,$filter_name,$year,$month); |
|
33 | +$manufacturers_array = $Stats->countAllAircraftManufacturers(true, $airline_icao, $filter_name, $year, $month); |
|
34 | 34 | print '<div id="chart" class="chart" width="100%"></div> |
35 | 35 | <script> |
36 | 36 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | var data = google.visualization.arrayToDataTable([ |
40 | 40 | ["'._("Aircraft Manufacturer").'", "'._("# of times").'"], '; |
41 | 41 | $manufacturer_data = ''; |
42 | -foreach($manufacturers_array as $manufacturer_item) |
|
42 | +foreach ($manufacturers_array as $manufacturer_item) |
|
43 | 43 | { |
44 | 44 | $manufacturer_data .= '[ "'.$manufacturer_item['aircraft_manufacturer'].'",'.$manufacturer_item['aircraft_manufacturer_count'].'],'; |
45 | 45 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | print '</thead>'; |
73 | 73 | print '<tbody>'; |
74 | 74 | $i = 1; |
75 | - foreach($manufacturers_array as $manufacturer_item) |
|
75 | + foreach ($manufacturers_array as $manufacturer_item) |
|
76 | 76 | { |
77 | 77 | print '<tr>'; |
78 | 78 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } else { |
20 | 20 | print '<option value="all">All</option>'; |
21 | 21 | } |
22 | - foreach($airlines as $airline) { |
|
22 | + foreach ($airlines as $airline) { |
|
23 | 23 | if (isset($airline_icao) && $airline_icao == $airline['airline_icao']) { |
24 | 24 | print '<option value="'.$airline['airline_icao'].'" selected>'.$airline['airline_name'].'</option>'; |
25 | 25 | } else { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | <div class="sub-menu sub-menu-container"> |
37 | 37 | <ul class="nav"> |
38 | 38 | <li class="dropdown"> |
39 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
39 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
40 | 40 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
41 | 41 | </a> |
42 | 42 | <ul class="dropdown-menu"> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | </ul> |
48 | 48 | </li> |
49 | 49 | <li class="dropdown"> |
50 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
50 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
51 | 51 | <?php echo _("Airline"); ?> <span class="caret"></span> |
52 | 52 | </a> |
53 | 53 | <ul class="dropdown-menu" role="menu"> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | </ul> |
58 | 58 | </li> |
59 | 59 | <li class="dropdown"> |
60 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
60 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
61 | 61 | <?php echo _("Airport"); ?> <span class="caret"></span> |
62 | 62 | </a> |
63 | 63 | <ul class="dropdown-menu" role="menu"> |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | </ul> |
69 | 69 | </li> |
70 | 70 | <li class="dropdown"> |
71 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
71 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
72 | 72 | <?php echo _("Route"); ?> <span class="caret"></span> |
73 | 73 | </a> |
74 | 74 | <ul class="dropdown-menu" role="menu"> |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | </ul> |
78 | 78 | </li> |
79 | 79 | <li class="dropdown"> |
80 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
80 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
81 | 81 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
82 | 82 | </a> |
83 | 83 | <ul class="dropdown-menu" role="menu"> |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (isset($globalAccidents) && $globalAccidents) { |
90 | 90 | ?> |
91 | 91 | <li class="dropdown"> |
92 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
92 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
93 | 93 | <?php echo _("Fatalities"); ?> <span class="caret"></span> |
94 | 94 | </a> |
95 | 95 | <ul class="dropdown-menu" role="menu"> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | <div class="sub-menu sub-menu-container"> |
109 | 109 | <ul class="nav"> |
110 | 110 | <li class="dropdown"> |
111 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
111 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" > |
|
112 | 112 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
113 | 113 | </a> |
114 | 114 | <ul class="dropdown-menu"> |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | </ul> |
120 | 120 | </li> |
121 | 121 | <li class="dropdown"> |
122 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
122 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
123 | 123 | <?php echo _("Airline"); ?> <span class="caret"></span> |
124 | 124 | </a> |
125 | 125 | <ul class="dropdown-menu" role="menu"> |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | </ul> |
130 | 130 | </li> |
131 | 131 | <li class="dropdown"> |
132 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
132 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
133 | 133 | <?php echo _("Airport"); ?> <span class="caret"></span> |
134 | 134 | </a> |
135 | 135 | <ul class="dropdown-menu" role="menu"> |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | </li> |
142 | 142 | <!-- |
143 | 143 | <li class="dropdown"> |
144 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
144 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
145 | 145 | <?php echo _("Route"); ?> <span class="caret"></span> |
146 | 146 | </a> |
147 | 147 | <ul class="dropdown-menu" role="menu"> |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | --> |
153 | 153 | <!-- |
154 | 154 | <li class="dropdown"> |
155 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
155 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
156 | 156 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
157 | 157 | </a> |
158 | 158 | <ul class="dropdown-menu" role="menu"> |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | ?> |
167 | 167 | <!-- |
168 | 168 | <li class="dropdown"> |
169 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
169 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
170 | 170 | <?php echo _("Fatalities"); ?> <span class="caret"></span> |
171 | 171 | </a> |
172 | 172 | <ul class="dropdown-menu" role="menu"> |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Airline"); |
7 | 7 | require_once('header.php'); |
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 | include('statistics-sub-menu.php'); |
12 | 12 | |
13 | 13 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | </div> |
17 | 17 | <p>'._("Below are the <strong>Top 10</strong> most common airlines.").'</p>'; |
18 | 18 | |
19 | -$airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
19 | +$airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
20 | 20 | print '<div id="chart" class="chart" width="100%"></div> |
21 | 21 | <script> |
22 | 22 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | var data = google.visualization.arrayToDataTable([ |
26 | 26 | ["'._("Airline").'", "'._("# of times").'"], '; |
27 | 27 | $airline_data = ''; |
28 | -foreach($airline_array as $airline_item) |
|
28 | +foreach ($airline_array as $airline_item) |
|
29 | 29 | { |
30 | 30 | $airline_data .= '[ "'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
31 | 31 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '</thead>'; |
61 | 61 | print '<tbody>'; |
62 | 62 | $i = 1; |
63 | - foreach($airline_array as $airline_item) |
|
63 | + foreach ($airline_array as $airline_item) |
|
64 | 64 | { |
65 | 65 | print '<tr>'; |
66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,19 +6,19 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Arrival Airport by Country"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($airline_icao == 'all') { |
11 | 11 | unset($_COOKIE['stats_airline_icao']); |
12 | - setcookie('stats_airline_icao', '', time()-3600); |
|
12 | + setcookie('stats_airline_icao', '', time() - 3600); |
|
13 | 13 | $airline_icao = ''; |
14 | 14 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
15 | 15 | $airline_icao = $_COOKIE['stats_airline_icao']; |
16 | 16 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
17 | 17 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
18 | 18 | } |
19 | -setcookie('stats_airline_icao',$airline_icao); |
|
20 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
21 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
19 | +setcookie('stats_airline_icao', $airline_icao); |
|
20 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
21 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | include('statistics-sub-menu.php'); |
24 | 24 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | </div> |
29 | 29 | <p>'._("Below are the <strong>Top 10</strong> most common countries of all the arrival airports.").'</p>'; |
30 | 30 | |
31 | -$airport_country_array = $Stats->countAllArrivalCountries(true,$airline_icao,$filter_name,$year,$month); |
|
31 | +$airport_country_array = $Stats->countAllArrivalCountries(true, $airline_icao, $filter_name, $year, $month); |
|
32 | 32 | |
33 | 33 | print '<script> |
34 | 34 | google.load("visualization", "1", {packages:["geochart"]}); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | ["'._("Country").'", "'._("# of times").'"],'; |
43 | 43 | |
44 | 44 | $country_data = ''; |
45 | -foreach($airport_country_array as $airport_item) |
|
45 | +foreach ($airport_country_array as $airport_item) |
|
46 | 46 | { |
47 | 47 | $country_data .= '[ "'.$airport_item['airport_arrival_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
48 | 48 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | print '</thead>'; |
78 | 78 | print '<tbody>'; |
79 | 79 | $i = 1; |
80 | -foreach($airport_country_array as $airport_item) |
|
80 | +foreach ($airport_country_array as $airport_item) |
|
81 | 81 | { |
82 | 82 | print '<tr>'; |
83 | 83 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,20 +7,20 @@ discard block |
||
7 | 7 | $title = _("Statistics"); |
8 | 8 | |
9 | 9 | if (!isset($filter_name)) $filter_name = ''; |
10 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | if ($airline_icao == 'all') { |
12 | 12 | unset($_COOKIE['stats_airline_icao']); |
13 | - setcookie('stats_airline_icao', '', time()-3600); |
|
13 | + setcookie('stats_airline_icao', '', time() - 3600); |
|
14 | 14 | $airline_icao = ''; |
15 | 15 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
16 | 16 | $airline_icao = $_COOKIE['stats_airline_icao']; |
17 | 17 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
18 | 18 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
19 | 19 | } |
20 | -setcookie('stats_airline_icao',$airline_icao); |
|
20 | +setcookie('stats_airline_icao', $airline_icao); |
|
21 | 21 | |
22 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
23 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
22 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
23 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
24 | 24 | |
25 | 25 | require_once('header.php'); |
26 | 26 | |
@@ -41,55 +41,55 @@ discard block |
||
41 | 41 | date_default_timezone_set('UTC'); |
42 | 42 | $lastupdate = strtotime($last_update[0]['value']); |
43 | 43 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
44 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
44 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
45 | 45 | } |
46 | 46 | ?> |
47 | 47 | </div> |
48 | 48 | <?php include('statistics-sub-menu.php'); ?> |
49 | 49 | <p class="global-stats"> |
50 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
51 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
52 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
53 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
50 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
51 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
52 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
53 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
54 | 54 | <?php |
55 | 55 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
56 | 56 | ?> |
57 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
58 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
57 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
58 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
59 | 59 | <?php |
60 | 60 | } else { |
61 | 61 | ?> |
62 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
63 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
62 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
63 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
64 | 64 | <?php |
65 | 65 | } |
66 | 66 | ?> |
67 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
68 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
67 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
68 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
69 | 69 | <?php |
70 | 70 | if ($airline_icao == '') { |
71 | 71 | ?> |
72 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
73 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
72 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
73 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
74 | 74 | <?php |
75 | 75 | } |
76 | 76 | ?> |
77 | 77 | <?php |
78 | 78 | if (!(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS)) { |
79 | 79 | ?> |
80 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
81 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
80 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
81 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
82 | 82 | <?php |
83 | 83 | } |
84 | 84 | ?> |
85 | 85 | </p> |
86 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
86 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
87 | 87 | <div class="specific-stats"> |
88 | 88 | <div class="row column"> |
89 | 89 | <div class="col-md-6"> |
90 | 90 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
91 | 91 | <?php |
92 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
92 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
93 | 93 | if (count($aircraft_array) == 0) print _("No data available"); |
94 | 94 | else { |
95 | 95 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | var data = google.visualization.arrayToDataTable([ |
102 | 102 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
103 | 103 | $aircraft_data = ''; |
104 | - foreach($aircraft_array as $aircraft_item) |
|
104 | + foreach ($aircraft_array as $aircraft_item) |
|
105 | 105 | { |
106 | 106 | $aircraft_data .= '[ "'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
107 | 107 | } |
@@ -138,11 +138,11 @@ discard block |
||
138 | 138 | ?> |
139 | 139 | </div> |
140 | 140 | </div> |
141 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
141 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
142 | 142 | <?php |
143 | 143 | // echo $airline_icao; |
144 | 144 | if ($airline_icao == '' || $airline_icao == 'all') { |
145 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
145 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
146 | 146 | if (count($airline_array) > 0) { |
147 | 147 | print '<div class="col-md-6">'; |
148 | 148 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | var data = google.visualization.arrayToDataTable([ |
155 | 155 | ["'._("Airline").'", "'._("# of times").'"], '; |
156 | 156 | $airline_data = ''; |
157 | - foreach($airline_array as $airline_item) |
|
157 | + foreach ($airline_array as $airline_item) |
|
158 | 158 | { |
159 | 159 | $airline_data .= '[ "'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
160 | 160 | } |
@@ -184,13 +184,13 @@ discard block |
||
184 | 184 | } |
185 | 185 | ?> |
186 | 186 | </div> |
187 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
187 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
188 | 188 | <?php |
189 | 189 | } |
190 | 190 | ?> |
191 | 191 | <div class="row column"> |
192 | 192 | <?php |
193 | - $flightover_array = $Stats->countAllFlightOverCountries($airline_icao,$filter_name,$year,$month); |
|
193 | + $flightover_array = $Stats->countAllFlightOverCountries($airline_icao, $filter_name, $year, $month); |
|
194 | 194 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
195 | 195 | if (empty($flightover_array)) { |
196 | 196 | print '<div class="col-md-12">'; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | ?> |
201 | 201 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
202 | 202 | <?php |
203 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
203 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
204 | 204 | if (count($pilot_array) == 0) print _("No data available"); |
205 | 205 | else { |
206 | 206 | print '<div id="chart7" class="chart" width="100%"></div> |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | var data = google.visualization.arrayToDataTable([ |
212 | 212 | ["'._("Pilots").'", "'._("# of times").'"], '; |
213 | 213 | $pilot_data = ''; |
214 | - foreach($pilot_array as $pilot_item) |
|
214 | + foreach ($pilot_array as $pilot_item) |
|
215 | 215 | { |
216 | 216 | $pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
217 | 217 | } |
@@ -239,14 +239,14 @@ discard block |
||
239 | 239 | ?> |
240 | 240 | </div> |
241 | 241 | |
242 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
242 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
243 | 243 | <?php |
244 | 244 | } else { |
245 | 245 | ?> |
246 | 246 | <div class="col-md-6"> |
247 | 247 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
248 | 248 | <?php |
249 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
249 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
250 | 250 | if (count($owner_array) == 0) print _("No data available"); |
251 | 251 | else { |
252 | 252 | print '<div id="chart7" class="chart" width="100%"></div> |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | var data = google.visualization.arrayToDataTable([ |
258 | 258 | ["'._("Owner").'", "'._("# of times").'"], '; |
259 | 259 | $owner_data = ''; |
260 | - foreach($owner_array as $owner_item) |
|
260 | + foreach ($owner_array as $owner_item) |
|
261 | 261 | { |
262 | 262 | $owner_data .= '[ "'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
263 | 263 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | </div> |
286 | 286 | </div> |
287 | 287 | |
288 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
288 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
289 | 289 | <?php |
290 | 290 | } |
291 | 291 | if (!empty($flightover_array)) { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | var data = google.visualization.arrayToDataTable([ |
305 | 305 | ["'._("Country").'", "'._("# of times").'"], '; |
306 | 306 | $flightover_data = ''; |
307 | - foreach($flightover_array as $flightover_item) |
|
307 | + foreach ($flightover_array as $flightover_item) |
|
308 | 308 | { |
309 | 309 | $flightover_data .= '[ "'.$flightover_item['flight_country'].' ('.$flightover_item['flight_country_iso2'].')",'.$flightover_item['flight_count'].'],'; |
310 | 310 | } |
@@ -337,14 +337,14 @@ discard block |
||
337 | 337 | } |
338 | 338 | ?> |
339 | 339 | </div> |
340 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
340 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
341 | 341 | |
342 | 342 | |
343 | 343 | </div> |
344 | 344 | <div class="row column"> |
345 | 345 | <div class="col-md-6"> |
346 | 346 | <?php |
347 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
347 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
348 | 348 | if (count($airport_airport_array) > 0) { |
349 | 349 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
350 | 350 | print '<div id="chart3" class="chart" width="100%"></div> |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | var data = google.visualization.arrayToDataTable([ |
360 | 360 | ["'._("Airport").'", "'._("# of times").'"],'; |
361 | 361 | $airport_data = ''; |
362 | - foreach($airport_airport_array as $airport_item) |
|
362 | + foreach ($airport_airport_array as $airport_item) |
|
363 | 363 | { |
364 | 364 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
365 | 365 | $name = str_replace("'", "", $name); |
@@ -386,11 +386,11 @@ discard block |
||
386 | 386 | } |
387 | 387 | ?> |
388 | 388 | </div> |
389 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
389 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
390 | 390 | |
391 | 391 | <div class="col-md-6"> |
392 | 392 | <?php |
393 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
393 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
394 | 394 | if (count($airport_airport_array2) > 0) { |
395 | 395 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
396 | 396 | print '<div id="chart4" class="chart" width="100%"></div> |
@@ -405,10 +405,10 @@ discard block |
||
405 | 405 | var data = google.visualization.arrayToDataTable([ |
406 | 406 | ["'._("Airport").'", "'._("# of times").'"],'; |
407 | 407 | $airport_data2 = ''; |
408 | - foreach($airport_airport_array2 as $airport_item2) |
|
408 | + foreach ($airport_airport_array2 as $airport_item2) |
|
409 | 409 | { |
410 | 410 | $name2 = $airport_item2['airport_arrival_city'].', '.$airport_item2['airport_arrival_country'].' ('.$airport_item2['airport_arrival_icao'].')'; |
411 | - $name2 = str_replace(array("'",'"'), '', $name2); |
|
411 | + $name2 = str_replace(array("'", '"'), '', $name2); |
|
412 | 412 | $airport_data2 .= '[ "'.$name2.'",'.$airport_item2['airport_arrival_icao_count'].'],'; |
413 | 413 | } |
414 | 414 | $airport_data2 = substr($airport_data2, 0, -1); |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | ?> |
433 | 433 | </div> |
434 | 434 | </div> |
435 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
435 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
436 | 436 | <?php |
437 | 437 | if ($year == '' && $month == '') { |
438 | 438 | ?> |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | <div class="col-md-6"> |
441 | 441 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
442 | 442 | <?php |
443 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
443 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
444 | 444 | if (count($year_array) == 0) print _("No data available"); |
445 | 445 | else { |
446 | 446 | print '<div id="chart8" class="chart" width="100%"></div> |
@@ -451,9 +451,9 @@ discard block |
||
451 | 451 | var data = google.visualization.arrayToDataTable([ |
452 | 452 | ["'._("Month").'", "'._("# of Flights").'"], '; |
453 | 453 | $year_data = ''; |
454 | - foreach($year_array as $year_item) |
|
454 | + foreach ($year_array as $year_item) |
|
455 | 455 | { |
456 | - $year_data .= '[ "'.date('F, Y',strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
456 | + $year_data .= '[ "'.date('F, Y', strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
457 | 457 | } |
458 | 458 | $year_data = substr($year_data, 0, -1); |
459 | 459 | print $year_data; |
@@ -481,11 +481,11 @@ discard block |
||
481 | 481 | <a href="<?php print $globalURL; ?>/statistics/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
482 | 482 | </div> |
483 | 483 | </div> |
484 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
484 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
485 | 485 | <div class="col-md-6"> |
486 | 486 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
487 | 487 | <?php |
488 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
488 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
489 | 489 | if (count($month_array) == 0) print _("No data available"); |
490 | 490 | else { |
491 | 491 | print '<div id="chart9" class="chart" width="100%"></div> |
@@ -496,9 +496,9 @@ discard block |
||
496 | 496 | var data = google.visualization.arrayToDataTable([ |
497 | 497 | ["'._("Day").'", "'._("# of Flights").'"], '; |
498 | 498 | $month_data = ''; |
499 | - foreach($month_array as $month_item) |
|
499 | + foreach ($month_array as $month_item) |
|
500 | 500 | { |
501 | - $month_data .= '[ "'.date('F j, Y',strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
501 | + $month_data .= '[ "'.date('F j, Y', strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
502 | 502 | } |
503 | 503 | $month_data = substr($month_data, 0, -1); |
504 | 504 | print $month_data; |
@@ -526,12 +526,12 @@ discard block |
||
526 | 526 | <a href="<?php print $globalURL; ?>/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
527 | 527 | </div> |
528 | 528 | </div> |
529 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
529 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
530 | 530 | |
531 | 531 | <div class="col-md-6"> |
532 | 532 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
533 | 533 | <?php |
534 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
534 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
535 | 535 | if (empty($date_array)) print _("No data available"); |
536 | 536 | else { |
537 | 537 | print '<div id="chart5" class="chart" width="100%"></div> |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | ["'._("Date").'", "'._("# of Flights").'"], '; |
544 | 544 | $date_data = ''; |
545 | 545 | |
546 | - foreach($date_array as $date_item) |
|
546 | + foreach ($date_array as $date_item) |
|
547 | 547 | { |
548 | 548 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
549 | 549 | } |
@@ -573,11 +573,11 @@ discard block |
||
573 | 573 | <a href="<?php print $globalURL; ?>/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
574 | 574 | </div> |
575 | 575 | </div> |
576 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
576 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
577 | 577 | <div class="col-md-6"> |
578 | 578 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
579 | 579 | <?php |
580 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
580 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
581 | 581 | if (empty($hour_array)) print _("No data available"); |
582 | 582 | else { |
583 | 583 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | var data = google.visualization.arrayToDataTable([ |
590 | 590 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
591 | 591 | $hour_data = ''; |
592 | - foreach($hour_array as $hour_item) |
|
592 | + foreach ($hour_array as $hour_item) |
|
593 | 593 | { |
594 | 594 | $hour_data .= '[ "'.$hour_item['hour_name'].':00",'.$hour_item['hour_count'].'],'; |
595 | 595 | } |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | <a href="<?php print $globalURL; ?>/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
620 | 620 | </div> |
621 | 621 | </div> |
622 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
622 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
623 | 623 | </div> |
624 | 624 | <?php |
625 | 625 | } |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | var data = google.visualization.arrayToDataTable([ |
646 | 646 | ["'._("Year").'", "'._("# of Fatalities").'"], '; |
647 | 647 | $year_data = ''; |
648 | - foreach($year_array as $year_item) |
|
648 | + foreach ($year_array as $year_item) |
|
649 | 649 | { |
650 | 650 | $year_data .= '[ "'.$year_item['year'].'",'.$year_item['count'].'],'; |
651 | 651 | } |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
676 | 676 | </div> |
677 | 677 | </div> |
678 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
678 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
679 | 679 | |
680 | 680 | <div class="row column"> |
681 | 681 | <div class="col-md-6"> |
@@ -694,9 +694,9 @@ discard block |
||
694 | 694 | var data = google.visualization.arrayToDataTable([ |
695 | 695 | ["'._("Month").'", "'._("# of Fatalities").'"], '; |
696 | 696 | $year_data = ''; |
697 | - foreach($year_array as $year_item) |
|
697 | + foreach ($year_array as $year_item) |
|
698 | 698 | { |
699 | - $year_data .= '[ "'.date('F, Y',strtotime($year_item['year'].'-'.$year_item['month'].'-01')).'",'.$year_item['count'].'],'; |
|
699 | + $year_data .= '[ "'.date('F, Y', strtotime($year_item['year'].'-'.$year_item['month'].'-01')).'",'.$year_item['count'].'],'; |
|
700 | 700 | } |
701 | 701 | $year_data = substr($year_data, 0, -1); |
702 | 702 | print $year_data; |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
725 | 725 | </div> |
726 | 726 | </div> |
727 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
727 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
728 | 728 | <br/> |
729 | 729 | <?php |
730 | 730 | } |
@@ -737,9 +737,9 @@ discard block |
||
737 | 737 | <?php |
738 | 738 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
739 | 739 | if ($year == '' && $month == '') { |
740 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
740 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
741 | 741 | } else { |
742 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
742 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
743 | 743 | } |
744 | 744 | if (!empty($polar)) { |
745 | 745 | print '<h2>'._("Coverage pattern").'</h2>'; |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | unset($polar_data); |
748 | 748 | $Spotter = new Spotter(); |
749 | 749 | $data = json_decode($eachpolar['source_data']); |
750 | - foreach($data as $value => $key) { |
|
750 | + foreach ($data as $value => $key) { |
|
751 | 751 | $direction = $Spotter->parseDirection(($value*22.5)); |
752 | 752 | $distance = $key; |
753 | 753 | $unit = 'km'; |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | ?> |
768 | 768 | <div class="col-md-6"> |
769 | 769 | <h4><?php print $eachpolar['source_name']; ?></h4> |
770 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
770 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
771 | 771 | <script> |
772 | 772 | (function() { |
773 | 773 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | color: color, |
792 | 792 | unit: '<?php echo $unit; ?>' |
793 | 793 | }; |
794 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
794 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
795 | 795 | })(); |
796 | 796 | </script> |
797 | 797 | </div> |
@@ -805,22 +805,22 @@ discard block |
||
805 | 805 | <?php |
806 | 806 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
807 | 807 | if ($year == '' && $month == '') { |
808 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
808 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
809 | 809 | } else { |
810 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
810 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
811 | 811 | } |
812 | 812 | if (!empty($msg)) { |
813 | 813 | print '<h2>'._("Messages received").'</h2>'; |
814 | 814 | foreach ($msg as $eachmsg) { |
815 | 815 | //$eachmsg = $msg[0]; |
816 | 816 | $data = $eachmsg['source_data']; |
817 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
817 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
818 | 818 | else $max = 500; |
819 | 819 | ?> |
820 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
820 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
821 | 821 | <script> |
822 | 822 | var g = new JustGage({ |
823 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
823 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
824 | 824 | value: <?php echo $data; ?>, |
825 | 825 | min: 0, |
826 | 826 | max: <?php print $max; ?>, |
@@ -842,15 +842,15 @@ discard block |
||
842 | 842 | <?php |
843 | 843 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
844 | 844 | if ($year == '' && $month == '') { |
845 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
845 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
846 | 846 | } else { |
847 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
847 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
848 | 848 | } |
849 | 849 | foreach ($hist as $hists) { |
850 | 850 | $hist_data = ''; |
851 | 851 | $source = $hists['source_name']; |
852 | 852 | $hist_array = json_decode($hists['source_data']); |
853 | - foreach($hist_array as $distance => $nb) |
|
853 | + foreach ($hist_array as $distance => $nb) |
|
854 | 854 | { |
855 | 855 | $unit = 'km'; |
856 | 856 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -868,13 +868,13 @@ discard block |
||
868 | 868 | $hist_data = substr($hist_data, 0, -1); |
869 | 869 | ?> |
870 | 870 | <div class="col-md-6"> |
871 | - <h2><?php echo sprintf(_("Flights Distance for %s"),$source); ?></h2> |
|
871 | + <h2><?php echo sprintf(_("Flights Distance for %s"), $source); ?></h2> |
|
872 | 872 | <?php |
873 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div> |
|
873 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div> |
|
874 | 874 | <script> |
875 | 875 | google.load("visualization", "1", {packages:["corechart"]}); |
876 | - google.setOnLoadCallback(drawCharthist_'.str_replace(' ','_',strtolower($source)).'); |
|
877 | - function drawCharthist_'.str_replace(' ','_',strtolower($source)).'() { |
|
876 | + google.setOnLoadCallback(drawCharthist_'.str_replace(' ', '_', strtolower($source)).'); |
|
877 | + function drawCharthist_'.str_replace(' ', '_', strtolower($source)).'() { |
|
878 | 878 | var data = google.visualization.arrayToDataTable([ |
879 | 879 | ["'._("Distance").'", "'._("# of Flights").'"], '; |
880 | 880 | print $hist_data; |
@@ -889,16 +889,16 @@ discard block |
||
889 | 889 | colors: ["#1a3151"] |
890 | 890 | }; |
891 | 891 | |
892 | - var chart = new google.visualization.AreaChart(document.getElementById("charthist-'.str_replace(' ','_',strtolower($source)).'")); |
|
892 | + var chart = new google.visualization.AreaChart(document.getElementById("charthist-'.str_replace(' ', '_', strtolower($source)).'")); |
|
893 | 893 | chart.draw(data, options); |
894 | 894 | } |
895 | 895 | $(window).resize(function(){ |
896 | - drawCharthist_'.str_replace(' ','_',strtolower($source)).'(); |
|
896 | + drawCharthist_'.str_replace(' ', '_', strtolower($source)).'(); |
|
897 | 897 | }); |
898 | 898 | </script>'; |
899 | 899 | ?> |
900 | 900 | </div> |
901 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
901 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
902 | 902 | <?php |
903 | 903 | } |
904 | 904 | ?> |
@@ -6,19 +6,19 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft Registrations"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($airline_icao == 'all') { |
11 | 11 | unset($_COOKIE['stats_airline_icao']); |
12 | - setcookie('stats_airline_icao', '', time()-3600); |
|
12 | + setcookie('stats_airline_icao', '', time() - 3600); |
|
13 | 13 | $airline_icao = ''; |
14 | 14 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
15 | 15 | $airline_icao = $_COOKIE['stats_airline_icao']; |
16 | 16 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
17 | 17 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
18 | 18 | } |
19 | -setcookie('stats_airline_icao',$airline_icao); |
|
20 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
21 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
19 | +setcookie('stats_airline_icao', $airline_icao); |
|
20 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
21 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
22 | 22 | |
23 | 23 | require_once('header.php'); |
24 | 24 | include('statistics-sub-menu.php'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | </div> |
30 | 30 | <p>'._("Below are the <strong>Top 10</strong> most common aircraft registrations.").'</p>'; |
31 | 31 | |
32 | -$registration_array = $Stats->countAllAircraftRegistrations(true,$airline_icao,$filter_name,$year,$month); |
|
32 | +$registration_array = $Stats->countAllAircraftRegistrations(true, $airline_icao, $filter_name, $year, $month); |
|
33 | 33 | print '<div id="chart" class="chart" width="100%"></div> |
34 | 34 | <script> |
35 | 35 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | var data = google.visualization.arrayToDataTable([ |
39 | 39 | ["'._("Aircraft Manufacturer").'", "'._("# of times").'"], '; |
40 | 40 | $registration_data = ''; |
41 | -foreach($registration_array as $registration_item) |
|
41 | +foreach ($registration_array as $registration_item) |
|
42 | 42 | { |
43 | 43 | $registration_data .= '[ "'.$registration_item['registration'].' - '.$registration_item['aircraft_name'].' ('.$registration_item['aircraft_icao'].')",'.$registration_item['aircraft_registration_count'].'],'; |
44 | 44 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | print '</thead>'; |
74 | 74 | print '<tbody>'; |
75 | 75 | $i = 1; |
76 | - foreach($registration_array as $registration_item) |
|
76 | + foreach ($registration_array as $registration_item) |
|
77 | 77 | { |
78 | 78 | print '<tr>'; |
79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |