@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | if (isset($_GET['sort'])) { |
13 | 13 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
14 | 14 | } else { |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Airlines of %s"),$country); |
|
20 | + $title = sprintf(_("Most Common Airlines of %s"), $country); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="select-item">'; |
23 | 23 | print '<form action="'.$globalURL.'/country" method="post">'; |
24 | 24 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
25 | 25 | print '<option></option>'; |
26 | 26 | $all_countries = $Spotter->getAllCountries(); |
27 | - foreach($all_countries as $all_country) |
|
27 | + foreach ($all_countries as $all_country) |
|
28 | 28 | { |
29 | - if($country == $all_country['country']) |
|
29 | + if ($country == $all_country['country']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
32 | 32 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($_GET['country'] != "NA") |
42 | 42 | { |
43 | 43 | print '<div class="info column">'; |
44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
45 | 45 | print '</div>'; |
46 | 46 | } else { |
47 | 47 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | include('country-sub-menu.php'); |
51 | 51 | print '<div class="column">'; |
52 | 52 | print '<h2>'._("Most Common Airlines").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
54 | 54 | |
55 | 55 | $airline_array = $Spotter->countAllAirlinesByCountry($country); |
56 | 56 | if (!empty($airline_array)) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '</thead>'; |
67 | 67 | print '<tbody>'; |
68 | 68 | $i = 1; |
69 | - foreach($airline_array as $airline_item) |
|
69 | + foreach ($airline_array as $airline_item) |
|
70 | 70 | { |
71 | 71 | print '<tr>'; |
72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/flightid/<?php print $_GET['id']; ?>" <?php if (strtolower($current_page) == "flightid-overview"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/flightid/<?php print $_GET['id']; ?>" <?php if (strtolower($current_page) == "flightid-overview") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <?php if ($globalFlightAware) { ?> |
8 | 8 | <li><a href="http://flightaware.com/live/flight/id/<?php print $spotter_array[0]['flightaware_id']; ?>" target="_blank"><?php echo _("Flight Status"); ?>»</a></li> |
9 | 9 | <li><a href="http://flightaware.com/live/flight/id/<?php print $spotter_array[0]['flightaware_id']; ?>/tracklog" target="_blank"><?php echo _("Flight Log"); ?>»</a></li> |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airport'])) { |
6 | - header('Location: '.$globalURL.'/airport'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airport'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
17 | 17 | |
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $airport_names = $Spotter->getAllAirportNames(); |
24 | 24 | ksort($airport_names); |
25 | - foreach($airport_names as $airport_name) |
|
25 | + foreach ($airport_names as $airport_name) |
|
26 | 26 | { |
27 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
27 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
30 | 30 | } else { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | include('airport-sub-menu.php'); |
56 | 56 | print '<div class="column">'; |
57 | 57 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
58 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
58 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
59 | 59 | |
60 | 60 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirport($_GET['airport']); |
61 | 61 | if (!empty($manufacturers_array)) |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | print '</thead>'; |
71 | 71 | print '<tbody>'; |
72 | 72 | $i = 1; |
73 | - foreach($manufacturers_array as $manufacturer_item) |
|
73 | + foreach ($manufacturers_array as $manufacturer_item) |
|
74 | 74 | { |
75 | 75 | print '<tr>'; |
76 | 76 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/route/<?php print $_GET['departure_airport']; ?>/<?php print $_GET['arrival_airport']; ?>" <?php if (strtolower($current_page) == "route-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/route/<?php print $_GET['departure_airport']; ?>/<?php print $_GET['arrival_airport']; ?>" <?php if (strtolower($current_page) == "route-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "route-statistics-aircraft" || strtolower($current_page) == "route-statistics-registration" || strtolower($current_page) == "route-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "route-statistics-aircraft" || strtolower($current_page) == "route-statistics-registration" || strtolower($current_page) == "route-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "route-statistics-airline" || strtolower($current_page) == "route-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "route-statistics-airline" || strtolower($current_page) == "route-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airline"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | <li><a href="<?php print $globalURL; ?>/route/statistics/airline-country/<?php print $_GET['departure_airport']; ?>/<?php print $_GET['arrival_airport']; ?>"><?php echo _("Airline by Country"); ?></a></li> |
24 | 24 | </ul> |
25 | 25 | </li> |
26 | - <li><a href="<?php print $globalURL; ?>/route/statistics/time/<?php print $_GET['departure_airport']; ?>/<?php print $_GET['arrival_airport']; ?>" <?php if (strtolower($current_page) == "route-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
26 | + <li><a href="<?php print $globalURL; ?>/route/statistics/time/<?php print $_GET['departure_airport']; ?>/<?php print $_GET['arrival_airport']; ?>" <?php if (strtolower($current_page) == "route-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
27 | 27 | <li><a href="http://flightaware.com/live/findflight/<?php print $spotter_array[0]['departure_airport_icao']; ?>/<?php print $spotter_array[0]['arrival_airport_icao']; ?>/" target="_blank"><?php echo _("Upcoming Schedule"); ?>»</a></li> |
28 | 28 | </ul> |
29 | 29 | </div> |
30 | 30 | \ No newline at end of file |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
26 | 26 | print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
27 | 27 | } |
28 | - ?> |
|
28 | + ?> |
|
29 | 29 | </div> |
30 | 30 | |
31 | 31 | <?php include('statistics-sub-menu.php'); ?> |
@@ -35,18 +35,18 @@ discard block |
||
35 | 35 | <div class="col-md-2"><span class="type"><?php echo _("Arrivals seen"); ?></span><span><?php print number_format($Stats->countOverallArrival()); ?></span></div> |
36 | 36 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
37 | 37 | <?php |
38 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
38 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
39 | 39 | ?> |
40 | 40 | <div class="col-md-2"><span class="type"><?php echo _("Pilots"); ?></span><span><?php print number_format($Stats->countOverallPilots()); ?></span></div> |
41 | 41 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
42 | 42 | <?php |
43 | - } else { |
|
44 | - ?> |
|
43 | + } else { |
|
44 | + ?> |
|
45 | 45 | <div class="col-md-2"><span class="type"><?php echo _("Owners"); ?></span><span><?php print number_format($Stats->countOverallOwners()); ?></span></div> |
46 | 46 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
47 | 47 | <?php |
48 | - } |
|
49 | - ?> |
|
48 | + } |
|
49 | + ?> |
|
50 | 50 | <div class="col-md-2"><span class="type"><?php echo _("Aircrafts"); ?></span><span><?php print number_format($Stats->countOverallAircrafts()); ?></span></div> |
51 | 51 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
52 | 52 | <div class="col-md-2"><span class="type"><?php echo _("Airlines"); ?></span><span><?php print number_format($Stats->countOverallAirlines()); ?></span></div> |
@@ -66,25 +66,25 @@ discard block |
||
66 | 66 | <div class="col-md-6"> |
67 | 67 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
68 | 68 | <?php |
69 | - $aircraft_array = $Stats->countAllAircraftTypes(); |
|
70 | - if (count($aircraft_array) == 0) print _("No data available"); |
|
71 | - else { |
|
69 | + $aircraft_array = $Stats->countAllAircraftTypes(); |
|
70 | + if (count($aircraft_array) == 0) print _("No data available"); |
|
71 | + else { |
|
72 | 72 | |
73 | - print '<div id="chart1" class="chart" width="100%"></div> |
|
73 | + print '<div id="chart1" class="chart" width="100%"></div> |
|
74 | 74 | <script> |
75 | 75 | google.load("visualization", "1", {packages:["corechart"]}); |
76 | 76 | google.setOnLoadCallback(drawChart1); |
77 | 77 | function drawChart1() { |
78 | 78 | var data = google.visualization.arrayToDataTable([ |
79 | 79 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
80 | - $aircraft_data = ''; |
|
81 | - foreach($aircraft_array as $aircraft_item) |
|
82 | - { |
|
83 | - $aircraft_data .= '[ "'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
84 | - } |
|
85 | - $aircraft_data = substr($aircraft_data, 0, -1); |
|
86 | - print $aircraft_data; |
|
87 | - print ']); |
|
80 | + $aircraft_data = ''; |
|
81 | + foreach($aircraft_array as $aircraft_item) |
|
82 | + { |
|
83 | + $aircraft_data .= '[ "'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
84 | + } |
|
85 | + $aircraft_data = substr($aircraft_data, 0, -1); |
|
86 | + print $aircraft_data; |
|
87 | + print ']); |
|
88 | 88 | |
89 | 89 | var options = { |
90 | 90 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | drawChart1(); |
100 | 100 | }); |
101 | 101 | </script>'; |
102 | - } |
|
103 | - ?> |
|
102 | + } |
|
103 | + ?> |
|
104 | 104 | <div class="more"> |
105 | 105 | <a href="<?php print $globalURL; ?>/statistics/aircraft" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
106 | 106 | </div> |
@@ -110,25 +110,25 @@ discard block |
||
110 | 110 | <div class="col-md-6"> |
111 | 111 | <h2><?php echo _("Top 10 Most Common Airline"); ?></h2> |
112 | 112 | <?php |
113 | - $airline_array = $Stats->countAllAirlines(); |
|
114 | - if (count($airline_array) == 0) print _("No data available"); |
|
115 | - else { |
|
113 | + $airline_array = $Stats->countAllAirlines(); |
|
114 | + if (count($airline_array) == 0) print _("No data available"); |
|
115 | + else { |
|
116 | 116 | |
117 | - print '<div id="chart2" class="chart" width="100%"></div> |
|
117 | + print '<div id="chart2" class="chart" width="100%"></div> |
|
118 | 118 | <script> |
119 | 119 | google.load("visualization", "1", {packages:["corechart"]}); |
120 | 120 | google.setOnLoadCallback(drawChart2); |
121 | 121 | function drawChart2() { |
122 | 122 | var data = google.visualization.arrayToDataTable([ |
123 | 123 | ["'._("Airline").'", "'._("# of times").'"], '; |
124 | - $airline_data = ''; |
|
125 | - foreach($airline_array as $airline_item) |
|
126 | - { |
|
127 | - $airline_data .= '[ "'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
|
128 | - } |
|
129 | - $airline_data = substr($airline_data, 0, -1); |
|
130 | - print $airline_data; |
|
131 | - print ']); |
|
124 | + $airline_data = ''; |
|
125 | + foreach($airline_array as $airline_item) |
|
126 | + { |
|
127 | + $airline_data .= '[ "'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
|
128 | + } |
|
129 | + $airline_data = substr($airline_data, 0, -1); |
|
130 | + print $airline_data; |
|
131 | + print ']); |
|
132 | 132 | |
133 | 133 | var options = { |
134 | 134 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | drawChart2(); |
144 | 144 | }); |
145 | 145 | </script>'; |
146 | - } |
|
147 | - ?> |
|
146 | + } |
|
147 | + ?> |
|
148 | 148 | <div class="more"> |
149 | 149 | <a href="<?php print $globalURL; ?>/statistics/airline" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
150 | 150 | </div> |
@@ -154,40 +154,40 @@ discard block |
||
154 | 154 | <div class="row column"> |
155 | 155 | |
156 | 156 | <?php |
157 | - $flightover_array = $Stats->countAllFlightOverCountries(); |
|
157 | + $flightover_array = $Stats->countAllFlightOverCountries(); |
|
158 | 158 | |
159 | 159 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
160 | - if (empty($flightover_array)) { |
|
161 | - ?> |
|
160 | + if (empty($flightover_array)) { |
|
161 | + ?> |
|
162 | 162 | <div class="col-md-12"> |
163 | 163 | <?php |
164 | - } else { |
|
165 | - ?> |
|
164 | + } else { |
|
165 | + ?> |
|
166 | 166 | <div class="col-md-6"> |
167 | 167 | <?php |
168 | - } |
|
169 | - ?> |
|
168 | + } |
|
169 | + ?> |
|
170 | 170 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
171 | 171 | <?php |
172 | - $pilot_array = $Stats->countAllPilots(); |
|
173 | - if (count($pilot_array) == 0) print _("No data available"); |
|
174 | - else { |
|
172 | + $pilot_array = $Stats->countAllPilots(); |
|
173 | + if (count($pilot_array) == 0) print _("No data available"); |
|
174 | + else { |
|
175 | 175 | |
176 | - print '<div id="chart7" class="chart" width="100%"></div> |
|
176 | + print '<div id="chart7" class="chart" width="100%"></div> |
|
177 | 177 | <script> |
178 | 178 | google.load("visualization", "1", {packages:["corechart"]}); |
179 | 179 | google.setOnLoadCallback(drawChart7); |
180 | 180 | function drawChart7() { |
181 | 181 | var data = google.visualization.arrayToDataTable([ |
182 | 182 | ["'._("Pilots").'", "'._("# of times").'"], '; |
183 | - $pilot_data = ''; |
|
184 | - foreach($pilot_array as $pilot_item) |
|
185 | - { |
|
186 | - $pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
|
187 | - } |
|
188 | - $pilot_data = substr($pilot_data, 0, -1); |
|
189 | - print $pilot_data; |
|
190 | - print ']); |
|
183 | + $pilot_data = ''; |
|
184 | + foreach($pilot_array as $pilot_item) |
|
185 | + { |
|
186 | + $pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
|
187 | + } |
|
188 | + $pilot_data = substr($pilot_data, 0, -1); |
|
189 | + print $pilot_data; |
|
190 | + print ']); |
|
191 | 191 | |
192 | 192 | var options = { |
193 | 193 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | drawChart7(); |
203 | 203 | }); |
204 | 204 | </script>'; |
205 | - } |
|
206 | - ?> |
|
205 | + } |
|
206 | + ?> |
|
207 | 207 | <div class="more"> |
208 | 208 | <a href="<?php print $globalURL; ?>/statistics/pilot" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
209 | 209 | </div> |
@@ -211,30 +211,30 @@ discard block |
||
211 | 211 | |
212 | 212 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
213 | 213 | <?php |
214 | - } else { |
|
215 | - ?> |
|
214 | + } else { |
|
215 | + ?> |
|
216 | 216 | <div class="col-md-6"> |
217 | 217 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
218 | 218 | <?php |
219 | - $owner_array = $Stats->countAllOwners(); |
|
220 | - if (count($owner_array) == 0) print _("No data available"); |
|
221 | - else { |
|
219 | + $owner_array = $Stats->countAllOwners(); |
|
220 | + if (count($owner_array) == 0) print _("No data available"); |
|
221 | + else { |
|
222 | 222 | |
223 | - print '<div id="chart7" class="chart" width="100%"></div> |
|
223 | + print '<div id="chart7" class="chart" width="100%"></div> |
|
224 | 224 | <script> |
225 | 225 | google.load("visualization", "1", {packages:["corechart"]}); |
226 | 226 | google.setOnLoadCallback(drawChart7); |
227 | 227 | function drawChart7() { |
228 | 228 | var data = google.visualization.arrayToDataTable([ |
229 | 229 | ["'._("Owner").'", "'._("# of times").'"], '; |
230 | - $owner_data = ''; |
|
231 | - foreach($owner_array as $owner_item) |
|
232 | - { |
|
233 | - $owner_data .= '[ "'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
|
234 | - } |
|
235 | - $owner_data = substr($owner_data, 0, -1); |
|
236 | - print $owner_data; |
|
237 | - print ']); |
|
230 | + $owner_data = ''; |
|
231 | + foreach($owner_array as $owner_item) |
|
232 | + { |
|
233 | + $owner_data .= '[ "'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
|
234 | + } |
|
235 | + $owner_data = substr($owner_data, 0, -1); |
|
236 | + print $owner_data; |
|
237 | + print ']); |
|
238 | 238 | |
239 | 239 | var options = { |
240 | 240 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -249,8 +249,8 @@ discard block |
||
249 | 249 | drawChart7(); |
250 | 250 | }); |
251 | 251 | </script>'; |
252 | - } |
|
253 | - ?> |
|
252 | + } |
|
253 | + ?> |
|
254 | 254 | <div class="more"> |
255 | 255 | <a href="<?php print $globalURL; ?>/statistics/owner" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
256 | 256 | </div> |
@@ -258,32 +258,32 @@ discard block |
||
258 | 258 | |
259 | 259 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
260 | 260 | <?php |
261 | - } |
|
262 | - if (!empty($flightover_array)) { |
|
263 | - ?> |
|
261 | + } |
|
262 | + if (!empty($flightover_array)) { |
|
263 | + ?> |
|
264 | 264 | |
265 | 265 | <div class="col-md-6"> |
266 | 266 | <h2><?php echo _("Top 20 Most Common Country a Flight was Over"); ?></h2> |
267 | 267 | <?php |
268 | - //$flightover_array = $Stats->countAllFlightOverCountries(); |
|
269 | - if (count($flightover_array) == 0) print _("No data available"); |
|
270 | - else { |
|
268 | + //$flightover_array = $Stats->countAllFlightOverCountries(); |
|
269 | + if (count($flightover_array) == 0) print _("No data available"); |
|
270 | + else { |
|
271 | 271 | |
272 | - print '<div id="chart10" class="chart" width="100%"></div> |
|
272 | + print '<div id="chart10" class="chart" width="100%"></div> |
|
273 | 273 | <script> |
274 | 274 | google.load("visualization", "1", {packages:["corechart"]}); |
275 | 275 | google.setOnLoadCallback(drawChart10); |
276 | 276 | function drawChart10() { |
277 | 277 | var data = google.visualization.arrayToDataTable([ |
278 | 278 | ["'._("Country").'", "'._("# of times").'"], '; |
279 | - $flightover_data = ''; |
|
280 | - foreach($flightover_array as $flightover_item) |
|
281 | - { |
|
282 | - $flightover_data .= '[ "'.$flightover_item['flight_country'].' ('.$flightover_item['flight_country_iso2'].')",'.$flightover_item['flight_count'].'],'; |
|
283 | - } |
|
284 | - $flightover_data = substr($flightover_data, 0, -1); |
|
285 | - print $flightover_data; |
|
286 | - print ']); |
|
279 | + $flightover_data = ''; |
|
280 | + foreach($flightover_array as $flightover_item) |
|
281 | + { |
|
282 | + $flightover_data .= '[ "'.$flightover_item['flight_country'].' ('.$flightover_item['flight_country_iso2'].')",'.$flightover_item['flight_count'].'],'; |
|
283 | + } |
|
284 | + $flightover_data = substr($flightover_data, 0, -1); |
|
285 | + print $flightover_data; |
|
286 | + print ']); |
|
287 | 287 | |
288 | 288 | var options = { |
289 | 289 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -300,15 +300,15 @@ discard block |
||
300 | 300 | drawChart10(); |
301 | 301 | }); |
302 | 302 | </script>'; |
303 | - } |
|
304 | - ?> |
|
303 | + } |
|
304 | + ?> |
|
305 | 305 | <div class="more"> |
306 | 306 | <a href="<?php print $globalURL; ?>/statistics/country" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
307 | 307 | </div> |
308 | 308 | </div> |
309 | 309 | <?php |
310 | - } |
|
311 | - ?> |
|
310 | + } |
|
311 | + ?> |
|
312 | 312 | </div> |
313 | 313 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
314 | 314 | |
@@ -318,11 +318,11 @@ discard block |
||
318 | 318 | <div class="col-md-6"> |
319 | 319 | <h2><?php echo _("Top 10 Most Common Departure Airports"); ?></h2> |
320 | 320 | <?php |
321 | - $airport_airport_array = $Stats->countAllDepartureAirports(); |
|
322 | - if (count($airport_airport_array) == 0) print _("No data available"); |
|
323 | - else { |
|
321 | + $airport_airport_array = $Stats->countAllDepartureAirports(); |
|
322 | + if (count($airport_airport_array) == 0) print _("No data available"); |
|
323 | + else { |
|
324 | 324 | |
325 | - print '<div id="chart3" class="chart" width="100%"></div> |
|
325 | + print '<div id="chart3" class="chart" width="100%"></div> |
|
326 | 326 | <script> |
327 | 327 | google.load("visualization", "1", {packages:["geochart"]}); |
328 | 328 | google.setOnLoadCallback(drawCharts3); |
@@ -333,17 +333,17 @@ discard block |
||
333 | 333 | |
334 | 334 | var data = google.visualization.arrayToDataTable([ |
335 | 335 | ["'._("Airport").'", "'._("# of times").'"],'; |
336 | - $airport_data = ''; |
|
337 | - foreach($airport_airport_array as $airport_item) |
|
338 | - { |
|
339 | - $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
|
340 | - $name = str_replace("'", "", $name); |
|
341 | - $name = str_replace('"', "", $name); |
|
342 | - $airport_data .= '[ "'.$name.'",'.$airport_item['airport_departure_icao_count'].'],'; |
|
343 | - } |
|
344 | - $airport_data = substr($airport_data, 0, -1); |
|
345 | - print $airport_data; |
|
346 | - print ']); |
|
336 | + $airport_data = ''; |
|
337 | + foreach($airport_airport_array as $airport_item) |
|
338 | + { |
|
339 | + $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
|
340 | + $name = str_replace("'", "", $name); |
|
341 | + $name = str_replace('"', "", $name); |
|
342 | + $airport_data .= '[ "'.$name.'",'.$airport_item['airport_departure_icao_count'].'],'; |
|
343 | + } |
|
344 | + $airport_data = substr($airport_data, 0, -1); |
|
345 | + print $airport_data; |
|
346 | + print ']); |
|
347 | 347 | |
348 | 348 | var options = { |
349 | 349 | legend: {position: "none"}, |
@@ -357,8 +357,8 @@ discard block |
||
357 | 357 | chart.draw(data, options); |
358 | 358 | } |
359 | 359 | </script>'; |
360 | - } |
|
361 | - ?> |
|
360 | + } |
|
361 | + ?> |
|
362 | 362 | <div class="more"> |
363 | 363 | <a href="<?php print $globalURL; ?>/statistics/airport-departure" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
364 | 364 | </div> |
@@ -368,11 +368,11 @@ discard block |
||
368 | 368 | <div class="col-md-6"> |
369 | 369 | <h2><?php echo _("Top 10 Most Common Arrival Airports"); ?></h2> |
370 | 370 | <?php |
371 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(); |
|
372 | - if (count($airport_airport_array2) == 0) print _("No data available"); |
|
373 | - else { |
|
371 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(); |
|
372 | + if (count($airport_airport_array2) == 0) print _("No data available"); |
|
373 | + else { |
|
374 | 374 | |
375 | - print '<div id="chart4" class="chart" width="100%"></div> |
|
375 | + print '<div id="chart4" class="chart" width="100%"></div> |
|
376 | 376 | <script> |
377 | 377 | google.load("visualization", "1", {packages:["geochart"]}); |
378 | 378 | google.setOnLoadCallback(drawCharts4); |
@@ -383,17 +383,17 @@ discard block |
||
383 | 383 | |
384 | 384 | var data = google.visualization.arrayToDataTable([ |
385 | 385 | ["'._("Airport").'", "'._("# of times").'"],'; |
386 | - $airport_data2 = ''; |
|
387 | - foreach($airport_airport_array2 as $airport_item2) |
|
388 | - { |
|
389 | - $name2 = $airport_item2['airport_arrival_city'].', '.$airport_item2['airport_arrival_country'].' ('.$airport_item2['airport_arrival_icao'].')'; |
|
390 | - $name2 = str_replace("'", "", $name2); |
|
391 | - $name2 = str_replace('"', "", $name2); |
|
392 | - $airport_data2 .= '[ "'.$name2.'",'.$airport_item2['airport_arrival_icao_count'].'],'; |
|
393 | - } |
|
394 | - $airport_data2 = substr($airport_data2, 0, -1); |
|
395 | - print $airport_data2; |
|
396 | - print ']); |
|
386 | + $airport_data2 = ''; |
|
387 | + foreach($airport_airport_array2 as $airport_item2) |
|
388 | + { |
|
389 | + $name2 = $airport_item2['airport_arrival_city'].', '.$airport_item2['airport_arrival_country'].' ('.$airport_item2['airport_arrival_icao'].')'; |
|
390 | + $name2 = str_replace("'", "", $name2); |
|
391 | + $name2 = str_replace('"', "", $name2); |
|
392 | + $airport_data2 .= '[ "'.$name2.'",'.$airport_item2['airport_arrival_icao_count'].'],'; |
|
393 | + } |
|
394 | + $airport_data2 = substr($airport_data2, 0, -1); |
|
395 | + print $airport_data2; |
|
396 | + print ']); |
|
397 | 397 | |
398 | 398 | var options = { |
399 | 399 | legend: {position: "none"}, |
@@ -407,8 +407,8 @@ discard block |
||
407 | 407 | chart.draw(data, options); |
408 | 408 | } |
409 | 409 | </script>'; |
410 | - } |
|
411 | - ?> |
|
410 | + } |
|
411 | + ?> |
|
412 | 412 | <div class="more"> |
413 | 413 | <a href="<?php print $globalURL; ?>/statistics/airport-arrival" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
414 | 414 | </div> |
@@ -420,24 +420,24 @@ discard block |
||
420 | 420 | <div class="col-md-6"> |
421 | 421 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
422 | 422 | <?php |
423 | - $year_array = $Stats->countAllMonthsLastYear(); |
|
424 | - if (count($year_array) == 0) print _("No data available"); |
|
425 | - else { |
|
426 | - print '<div id="chart8" class="chart" width="100%"></div> |
|
423 | + $year_array = $Stats->countAllMonthsLastYear(); |
|
424 | + if (count($year_array) == 0) print _("No data available"); |
|
425 | + else { |
|
426 | + print '<div id="chart8" class="chart" width="100%"></div> |
|
427 | 427 | <script> |
428 | 428 | google.load("visualization", "1", {packages:["corechart"]}); |
429 | 429 | google.setOnLoadCallback(drawChart8); |
430 | 430 | function drawChart8() { |
431 | 431 | var data = google.visualization.arrayToDataTable([ |
432 | 432 | ["'._("Month").'", "'._("# of Flights").'"], '; |
433 | - $year_data = ''; |
|
434 | - foreach($year_array as $year_item) |
|
435 | - { |
|
436 | - $year_data .= '[ "'.date('F, Y',strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
437 | - } |
|
438 | - $year_data = substr($year_data, 0, -1); |
|
439 | - print $year_data; |
|
440 | - print ']); |
|
433 | + $year_data = ''; |
|
434 | + foreach($year_array as $year_item) |
|
435 | + { |
|
436 | + $year_data .= '[ "'.date('F, Y',strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
437 | + } |
|
438 | + $year_data = substr($year_data, 0, -1); |
|
439 | + print $year_data; |
|
440 | + print ']); |
|
441 | 441 | |
442 | 442 | var options = { |
443 | 443 | legend: {position: "none"}, |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | drawChart8(); |
456 | 456 | }); |
457 | 457 | </script>'; |
458 | - } |
|
459 | - ?> |
|
458 | + } |
|
459 | + ?> |
|
460 | 460 | <div class="more"> |
461 | 461 | <a href="<?php print $globalURL; ?>/statistics/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
462 | 462 | </div> |
@@ -466,24 +466,24 @@ discard block |
||
466 | 466 | <div class="col-md-6"> |
467 | 467 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
468 | 468 | <?php |
469 | - $month_array = $Stats->countAllDatesLastMonth(); |
|
470 | - if (count($month_array) == 0) print _("No data available"); |
|
471 | - else { |
|
472 | - print '<div id="chart9" class="chart" width="100%"></div> |
|
469 | + $month_array = $Stats->countAllDatesLastMonth(); |
|
470 | + if (count($month_array) == 0) print _("No data available"); |
|
471 | + else { |
|
472 | + print '<div id="chart9" class="chart" width="100%"></div> |
|
473 | 473 | <script> |
474 | 474 | google.load("visualization", "1", {packages:["corechart"]}); |
475 | 475 | google.setOnLoadCallback(drawChart9); |
476 | 476 | function drawChart9() { |
477 | 477 | var data = google.visualization.arrayToDataTable([ |
478 | 478 | ["'._("Day").'", "'._("# of Flights").'"], '; |
479 | - $month_data = ''; |
|
480 | - foreach($month_array as $month_item) |
|
481 | - { |
|
482 | - $month_data .= '[ "'.date('F j, Y',strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
483 | - } |
|
484 | - $month_data = substr($month_data, 0, -1); |
|
485 | - print $month_data; |
|
486 | - print ']); |
|
479 | + $month_data = ''; |
|
480 | + foreach($month_array as $month_item) |
|
481 | + { |
|
482 | + $month_data .= '[ "'.date('F j, Y',strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
483 | + } |
|
484 | + $month_data = substr($month_data, 0, -1); |
|
485 | + print $month_data; |
|
486 | + print ']); |
|
487 | 487 | |
488 | 488 | var options = { |
489 | 489 | legend: {position: "none"}, |
@@ -501,8 +501,8 @@ discard block |
||
501 | 501 | drawChart9(); |
502 | 502 | }); |
503 | 503 | </script>'; |
504 | - } |
|
505 | - ?> |
|
504 | + } |
|
505 | + ?> |
|
506 | 506 | <div class="more"> |
507 | 507 | <a href="<?php print $globalURL; ?>/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
508 | 508 | </div> |
@@ -512,25 +512,25 @@ discard block |
||
512 | 512 | <div class="col-md-6"> |
513 | 513 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
514 | 514 | <?php |
515 | - $date_array = $Stats->countAllDatesLast7Days(); |
|
516 | - if (empty($date_array)) print _("No data available"); |
|
517 | - else { |
|
518 | - print '<div id="chart5" class="chart" width="100%"></div> |
|
515 | + $date_array = $Stats->countAllDatesLast7Days(); |
|
516 | + if (empty($date_array)) print _("No data available"); |
|
517 | + else { |
|
518 | + print '<div id="chart5" class="chart" width="100%"></div> |
|
519 | 519 | <script> |
520 | 520 | google.load("visualization", "1", {packages:["corechart"]}); |
521 | 521 | google.setOnLoadCallback(drawChart5); |
522 | 522 | function drawChart5() { |
523 | 523 | var data = google.visualization.arrayToDataTable([ |
524 | 524 | ["'._("Date").'", "'._("# of Flights").'"], '; |
525 | - $date_data = ''; |
|
525 | + $date_data = ''; |
|
526 | 526 | |
527 | - foreach($date_array as $date_item) |
|
528 | - { |
|
529 | - $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
|
530 | - } |
|
531 | - $date_data = substr($date_data, 0, -1); |
|
532 | - print $date_data; |
|
533 | - print ']); |
|
527 | + foreach($date_array as $date_item) |
|
528 | + { |
|
529 | + $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
|
530 | + } |
|
531 | + $date_data = substr($date_data, 0, -1); |
|
532 | + print $date_data; |
|
533 | + print ']); |
|
534 | 534 | |
535 | 535 | var options = { |
536 | 536 | legend: {position: "none"}, |
@@ -548,8 +548,8 @@ discard block |
||
548 | 548 | drawChart5(); |
549 | 549 | }); |
550 | 550 | </script>'; |
551 | - } |
|
552 | - ?> |
|
551 | + } |
|
552 | + ?> |
|
553 | 553 | <div class="more"> |
554 | 554 | <a href="<?php print $globalURL; ?>/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
555 | 555 | </div> |
@@ -559,25 +559,25 @@ discard block |
||
559 | 559 | <div class="col-md-6"> |
560 | 560 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
561 | 561 | <?php |
562 | - $hour_array = $Stats->countAllHours('hour'); |
|
563 | - if (empty($hour_array)) print _("No data available"); |
|
564 | - else { |
|
562 | + $hour_array = $Stats->countAllHours('hour'); |
|
563 | + if (empty($hour_array)) print _("No data available"); |
|
564 | + else { |
|
565 | 565 | |
566 | - print '<div id="chart6" class="chart" width="100%"></div> |
|
566 | + print '<div id="chart6" class="chart" width="100%"></div> |
|
567 | 567 | <script> |
568 | 568 | google.load("visualization", "1", {packages:["corechart"]}); |
569 | 569 | google.setOnLoadCallback(drawChart6); |
570 | 570 | function drawChart6() { |
571 | 571 | var data = google.visualization.arrayToDataTable([ |
572 | 572 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
573 | - $hour_data = ''; |
|
574 | - foreach($hour_array as $hour_item) |
|
575 | - { |
|
576 | - $hour_data .= '[ "'.$hour_item['hour_name'].':00",'.$hour_item['hour_count'].'],'; |
|
577 | - } |
|
578 | - $hour_data = substr($hour_data, 0, -1); |
|
579 | - print $hour_data; |
|
580 | - print ']); |
|
573 | + $hour_data = ''; |
|
574 | + foreach($hour_array as $hour_item) |
|
575 | + { |
|
576 | + $hour_data .= '[ "'.$hour_item['hour_name'].':00",'.$hour_item['hour_count'].'],'; |
|
577 | + } |
|
578 | + $hour_data = substr($hour_data, 0, -1); |
|
579 | + print $hour_data; |
|
580 | + print ']); |
|
581 | 581 | |
582 | 582 | var options = { |
583 | 583 | legend: {position: "none"}, |
@@ -595,8 +595,8 @@ discard block |
||
595 | 595 | drawChart6(); |
596 | 596 | }); |
597 | 597 | </script>'; |
598 | - } |
|
599 | - ?> |
|
598 | + } |
|
599 | + ?> |
|
600 | 600 | <div class="more"> |
601 | 601 | <a href="<?php print $globalURL; ?>/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
602 | 602 | </div> |
@@ -605,17 +605,17 @@ discard block |
||
605 | 605 | </div> |
606 | 606 | <div class="row column"> |
607 | 607 | <?php |
608 | - $polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
|
609 | - if (!empty($polar)) { |
|
610 | - print '<h2>'._("Coverage pattern").'</h2>'; |
|
611 | - foreach ($polar as $eachpolar) { |
|
612 | - unset($polar_data); |
|
613 | - $Spotter = new Spotter(); |
|
614 | - $data = json_decode($eachpolar['source_data']); |
|
615 | - foreach($data as $value => $key) { |
|
616 | - $direction = $Spotter->parseDirection(($value*22.5)); |
|
617 | - $distance = $key; |
|
618 | - $unit = 'km'; |
|
608 | + $polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
|
609 | + if (!empty($polar)) { |
|
610 | + print '<h2>'._("Coverage pattern").'</h2>'; |
|
611 | + foreach ($polar as $eachpolar) { |
|
612 | + unset($polar_data); |
|
613 | + $Spotter = new Spotter(); |
|
614 | + $data = json_decode($eachpolar['source_data']); |
|
615 | + foreach($data as $value => $key) { |
|
616 | + $direction = $Spotter->parseDirection(($value*22.5)); |
|
617 | + $distance = $key; |
|
618 | + $unit = 'km'; |
|
619 | 619 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
620 | 620 | $distance = round($distance*0.539957); |
621 | 621 | $unit = 'nm'; |
@@ -626,10 +626,10 @@ discard block |
||
626 | 626 | $distance = $distance; |
627 | 627 | $unit = 'km'; |
628 | 628 | } |
629 | - if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
630 | - else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
631 | - } |
|
632 | - ?> |
|
629 | + if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
630 | + else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
631 | + } |
|
632 | + ?> |
|
633 | 633 | <div class="col-md-6"> |
634 | 634 | <h4><?php print $eachpolar['source_name']; ?></h4> |
635 | 635 | <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
@@ -661,22 +661,22 @@ discard block |
||
661 | 661 | </script> |
662 | 662 | </div> |
663 | 663 | <?php |
664 | - } |
|
665 | - } |
|
666 | - ?> |
|
664 | + } |
|
665 | + } |
|
666 | + ?> |
|
667 | 667 | </div> |
668 | 668 | <div class="row column"> |
669 | 669 | <div class="col-md-6"> |
670 | 670 | <?php |
671 | - $msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
|
672 | - if (!empty($msg)) { |
|
673 | - print '<h2>'._("Messages received").'</h2>'; |
|
674 | - foreach ($msg as $eachmsg) { |
|
675 | - //$eachmsg = $msg[0]; |
|
676 | - $data = $eachmsg['source_data']; |
|
677 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
678 | - else $max = 500; |
|
679 | - ?> |
|
671 | + $msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
|
672 | + if (!empty($msg)) { |
|
673 | + print '<h2>'._("Messages received").'</h2>'; |
|
674 | + foreach ($msg as $eachmsg) { |
|
675 | + //$eachmsg = $msg[0]; |
|
676 | + $data = $eachmsg['source_data']; |
|
677 | + if ($data > 500) $max = (round(($data+100)/100))*100; |
|
678 | + else $max = 500; |
|
679 | + ?> |
|
680 | 680 | <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
681 | 681 | <script> |
682 | 682 | var g = new JustGage({ |
@@ -692,9 +692,9 @@ discard block |
||
692 | 692 | }); |
693 | 693 | </script> |
694 | 694 | <?php |
695 | - } |
|
696 | - } |
|
697 | - ?> |
|
695 | + } |
|
696 | + } |
|
697 | + ?> |
|
698 | 698 | </div> |
699 | 699 | </div> |
700 | 700 | <div class="row column"> |
@@ -721,19 +721,19 @@ discard block |
||
721 | 721 | $hist_data .= '[ "'.$distance.'",'.$nb.'],'; |
722 | 722 | } |
723 | 723 | $hist_data = substr($hist_data, 0, -1); |
724 | - ?> |
|
724 | + ?> |
|
725 | 725 | <div class="col-md-6"> |
726 | 726 | <h2><?php echo sprintf(_("Flights Distance for %s"),$source); ?></h2> |
727 | 727 | <?php |
728 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div> |
|
728 | + print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div> |
|
729 | 729 | <script> |
730 | 730 | google.load("visualization", "1", {packages:["corechart"]}); |
731 | 731 | google.setOnLoadCallback(drawCharthist_'.str_replace(' ','_',strtolower($source)).'); |
732 | 732 | function drawCharthist_'.str_replace(' ','_',strtolower($source)).'() { |
733 | 733 | var data = google.visualization.arrayToDataTable([ |
734 | 734 | ["'._("Distance").'", "'._("# of Flights").'"], '; |
735 | - print $hist_data; |
|
736 | - print ']); |
|
735 | + print $hist_data; |
|
736 | + print ']); |
|
737 | 737 | |
738 | 738 | var options = { |
739 | 739 | legend: {position: "none"}, |
@@ -751,12 +751,12 @@ discard block |
||
751 | 751 | drawCharthist_'.str_replace(' ','_',strtolower($source)).'(); |
752 | 752 | }); |
753 | 753 | </script>'; |
754 | - ?> |
|
754 | + ?> |
|
755 | 755 | </div> |
756 | 756 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
757 | 757 | <?php |
758 | - } |
|
759 | - ?> |
|
758 | + } |
|
759 | + ?> |
|
760 | 760 | </div> |
761 | 761 | </div> |
762 | 762 | </div> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | date_default_timezone_set('UTC'); |
24 | 24 | $lastupdate = strtotime($last_update[0]['value']); |
25 | 25 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
26 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
26 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
27 | 27 | } |
28 | 28 | ?> |
29 | 29 | </div> |
@@ -31,36 +31,36 @@ discard block |
||
31 | 31 | <?php include('statistics-sub-menu.php'); ?> |
32 | 32 | <div class="row global-stats"> |
33 | 33 | <div class="col-md-2"><span class="type"><?php echo _("Flights"); ?></span><span><?php print number_format($Stats->countOverallFlights()); ?></span></div> |
34 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
34 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
35 | 35 | <div class="col-md-2"><span class="type"><?php echo _("Arrivals seen"); ?></span><span><?php print number_format($Stats->countOverallArrival()); ?></span></div> |
36 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
36 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
37 | 37 | <?php |
38 | 38 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
39 | 39 | ?> |
40 | 40 | <div class="col-md-2"><span class="type"><?php echo _("Pilots"); ?></span><span><?php print number_format($Stats->countOverallPilots()); ?></span></div> |
41 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
41 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
42 | 42 | <?php |
43 | 43 | } else { |
44 | 44 | ?> |
45 | 45 | <div class="col-md-2"><span class="type"><?php echo _("Owners"); ?></span><span><?php print number_format($Stats->countOverallOwners()); ?></span></div> |
46 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
46 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
47 | 47 | <?php |
48 | 48 | } |
49 | 49 | ?> |
50 | 50 | <div class="col-md-2"><span class="type"><?php echo _("Aircrafts"); ?></span><span><?php print number_format($Stats->countOverallAircrafts()); ?></span></div> |
51 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
51 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
52 | 52 | <div class="col-md-2"><span class="type"><?php echo _("Airlines"); ?></span><span><?php print number_format($Stats->countOverallAirlines()); ?></span></div> |
53 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
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 | 57 | <div class="col-md-2"><span class="type"><?php echo _("Military"); ?></span><span><?php print number_format($Stats->countOverallMilitaryFlights()); ?></span></div> |
58 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
58 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
59 | 59 | <?php |
60 | 60 | } |
61 | 61 | ?> |
62 | 62 | </div> |
63 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
63 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
64 | 64 | <div class="specific-stats"> |
65 | 65 | <div class="row column"> |
66 | 66 | <div class="col-md-6"> |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | var data = google.visualization.arrayToDataTable([ |
79 | 79 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
80 | 80 | $aircraft_data = ''; |
81 | - foreach($aircraft_array as $aircraft_item) |
|
81 | + foreach ($aircraft_array as $aircraft_item) |
|
82 | 82 | { |
83 | 83 | $aircraft_data .= '[ "'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
84 | 84 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | <a href="<?php print $globalURL; ?>/statistics/aircraft" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
106 | 106 | </div> |
107 | 107 | </div> |
108 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
108 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
109 | 109 | |
110 | 110 | <div class="col-md-6"> |
111 | 111 | <h2><?php echo _("Top 10 Most Common Airline"); ?></h2> |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | var data = google.visualization.arrayToDataTable([ |
123 | 123 | ["'._("Airline").'", "'._("# of times").'"], '; |
124 | 124 | $airline_data = ''; |
125 | - foreach($airline_array as $airline_item) |
|
125 | + foreach ($airline_array as $airline_item) |
|
126 | 126 | { |
127 | 127 | $airline_data .= '[ "'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
128 | 128 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | </div> |
151 | 151 | </div> |
152 | 152 | </div> |
153 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
153 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
154 | 154 | <div class="row column"> |
155 | 155 | |
156 | 156 | <?php |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | var data = google.visualization.arrayToDataTable([ |
182 | 182 | ["'._("Pilots").'", "'._("# of times").'"], '; |
183 | 183 | $pilot_data = ''; |
184 | - foreach($pilot_array as $pilot_item) |
|
184 | + foreach ($pilot_array as $pilot_item) |
|
185 | 185 | { |
186 | 186 | $pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
187 | 187 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | </div> |
210 | 210 | </div> |
211 | 211 | |
212 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
212 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
213 | 213 | <?php |
214 | 214 | } else { |
215 | 215 | ?> |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | var data = google.visualization.arrayToDataTable([ |
229 | 229 | ["'._("Owner").'", "'._("# of times").'"], '; |
230 | 230 | $owner_data = ''; |
231 | - foreach($owner_array as $owner_item) |
|
231 | + foreach ($owner_array as $owner_item) |
|
232 | 232 | { |
233 | 233 | $owner_data .= '[ "'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
234 | 234 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | </div> |
257 | 257 | </div> |
258 | 258 | |
259 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
259 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
260 | 260 | <?php |
261 | 261 | } |
262 | 262 | if (!empty($flightover_array)) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | var data = google.visualization.arrayToDataTable([ |
278 | 278 | ["'._("Country").'", "'._("# of times").'"], '; |
279 | 279 | $flightover_data = ''; |
280 | - foreach($flightover_array as $flightover_item) |
|
280 | + foreach ($flightover_array as $flightover_item) |
|
281 | 281 | { |
282 | 282 | $flightover_data .= '[ "'.$flightover_item['flight_country'].' ('.$flightover_item['flight_country_iso2'].')",'.$flightover_item['flight_count'].'],'; |
283 | 283 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | } |
311 | 311 | ?> |
312 | 312 | </div> |
313 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
313 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
314 | 314 | |
315 | 315 | |
316 | 316 | </div> |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | var data = google.visualization.arrayToDataTable([ |
335 | 335 | ["'._("Airport").'", "'._("# of times").'"],'; |
336 | 336 | $airport_data = ''; |
337 | - foreach($airport_airport_array as $airport_item) |
|
337 | + foreach ($airport_airport_array as $airport_item) |
|
338 | 338 | { |
339 | 339 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
340 | 340 | $name = str_replace("'", "", $name); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | <a href="<?php print $globalURL; ?>/statistics/airport-departure" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
364 | 364 | </div> |
365 | 365 | </div> |
366 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
366 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
367 | 367 | |
368 | 368 | <div class="col-md-6"> |
369 | 369 | <h2><?php echo _("Top 10 Most Common Arrival Airports"); ?></h2> |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | var data = google.visualization.arrayToDataTable([ |
385 | 385 | ["'._("Airport").'", "'._("# of times").'"],'; |
386 | 386 | $airport_data2 = ''; |
387 | - foreach($airport_airport_array2 as $airport_item2) |
|
387 | + foreach ($airport_airport_array2 as $airport_item2) |
|
388 | 388 | { |
389 | 389 | $name2 = $airport_item2['airport_arrival_city'].', '.$airport_item2['airport_arrival_country'].' ('.$airport_item2['airport_arrival_icao'].')'; |
390 | 390 | $name2 = str_replace("'", "", $name2); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | </div> |
415 | 415 | </div> |
416 | 416 | </div> |
417 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
417 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
418 | 418 | |
419 | 419 | <div class="row column"> |
420 | 420 | <div class="col-md-6"> |
@@ -431,9 +431,9 @@ discard block |
||
431 | 431 | var data = google.visualization.arrayToDataTable([ |
432 | 432 | ["'._("Month").'", "'._("# of Flights").'"], '; |
433 | 433 | $year_data = ''; |
434 | - foreach($year_array as $year_item) |
|
434 | + foreach ($year_array as $year_item) |
|
435 | 435 | { |
436 | - $year_data .= '[ "'.date('F, Y',strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
436 | + $year_data .= '[ "'.date('F, Y', strtotime($year_item['year_name'].'-'.$year_item['month_name'].'-01')).'",'.$year_item['date_count'].'],'; |
|
437 | 437 | } |
438 | 438 | $year_data = substr($year_data, 0, -1); |
439 | 439 | print $year_data; |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | <a href="<?php print $globalURL; ?>/statistics/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
462 | 462 | </div> |
463 | 463 | </div> |
464 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
464 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
465 | 465 | |
466 | 466 | <div class="col-md-6"> |
467 | 467 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
@@ -477,9 +477,9 @@ discard block |
||
477 | 477 | var data = google.visualization.arrayToDataTable([ |
478 | 478 | ["'._("Day").'", "'._("# of Flights").'"], '; |
479 | 479 | $month_data = ''; |
480 | - foreach($month_array as $month_item) |
|
480 | + foreach ($month_array as $month_item) |
|
481 | 481 | { |
482 | - $month_data .= '[ "'.date('F j, Y',strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
482 | + $month_data .= '[ "'.date('F j, Y', strtotime($month_item['date_name'])).'",'.$month_item['date_count'].'],'; |
|
483 | 483 | } |
484 | 484 | $month_data = substr($month_data, 0, -1); |
485 | 485 | print $month_data; |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | <a href="<?php print $globalURL; ?>/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
508 | 508 | </div> |
509 | 509 | </div> |
510 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
510 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
511 | 511 | |
512 | 512 | <div class="col-md-6"> |
513 | 513 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | ["'._("Date").'", "'._("# of Flights").'"], '; |
525 | 525 | $date_data = ''; |
526 | 526 | |
527 | - foreach($date_array as $date_item) |
|
527 | + foreach ($date_array as $date_item) |
|
528 | 528 | { |
529 | 529 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
530 | 530 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | <a href="<?php print $globalURL; ?>/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
555 | 555 | </div> |
556 | 556 | </div> |
557 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
557 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
558 | 558 | |
559 | 559 | <div class="col-md-6"> |
560 | 560 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | var data = google.visualization.arrayToDataTable([ |
572 | 572 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
573 | 573 | $hour_data = ''; |
574 | - foreach($hour_array as $hour_item) |
|
574 | + foreach ($hour_array as $hour_item) |
|
575 | 575 | { |
576 | 576 | $hour_data .= '[ "'.$hour_item['hour_name'].':00",'.$hour_item['hour_count'].'],'; |
577 | 577 | } |
@@ -601,18 +601,18 @@ discard block |
||
601 | 601 | <a href="<?php print $globalURL; ?>/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
602 | 602 | </div> |
603 | 603 | </div> |
604 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
604 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
605 | 605 | </div> |
606 | 606 | <div class="row column"> |
607 | 607 | <?php |
608 | - $polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
|
608 | + $polar = $Stats->getStatsSource(date('Y-m-d'), 'polar'); |
|
609 | 609 | if (!empty($polar)) { |
610 | 610 | print '<h2>'._("Coverage pattern").'</h2>'; |
611 | 611 | foreach ($polar as $eachpolar) { |
612 | 612 | unset($polar_data); |
613 | 613 | $Spotter = new Spotter(); |
614 | 614 | $data = json_decode($eachpolar['source_data']); |
615 | - foreach($data as $value => $key) { |
|
615 | + foreach ($data as $value => $key) { |
|
616 | 616 | $direction = $Spotter->parseDirection(($value*22.5)); |
617 | 617 | $distance = $key; |
618 | 618 | $unit = 'km'; |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | ?> |
633 | 633 | <div class="col-md-6"> |
634 | 634 | <h4><?php print $eachpolar['source_name']; ?></h4> |
635 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
635 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
636 | 636 | <script> |
637 | 637 | (function() { |
638 | 638 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | color: color, |
657 | 657 | unit: '<?php echo $unit; ?>' |
658 | 658 | }; |
659 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
659 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
660 | 660 | })(); |
661 | 661 | </script> |
662 | 662 | </div> |
@@ -668,19 +668,19 @@ discard block |
||
668 | 668 | <div class="row column"> |
669 | 669 | <div class="col-md-6"> |
670 | 670 | <?php |
671 | - $msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
|
671 | + $msg = $Stats->getStatsSource(date('Y-m-d'), 'msg'); |
|
672 | 672 | if (!empty($msg)) { |
673 | 673 | print '<h2>'._("Messages received").'</h2>'; |
674 | 674 | foreach ($msg as $eachmsg) { |
675 | 675 | //$eachmsg = $msg[0]; |
676 | 676 | $data = $eachmsg['source_data']; |
677 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
677 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
678 | 678 | else $max = 500; |
679 | 679 | ?> |
680 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
680 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
681 | 681 | <script> |
682 | 682 | var g = new JustGage({ |
683 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
683 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
684 | 684 | value: <?php echo $data; ?>, |
685 | 685 | min: 0, |
686 | 686 | max: <?php print $max; ?>, |
@@ -700,12 +700,12 @@ discard block |
||
700 | 700 | <div class="row column"> |
701 | 701 | |
702 | 702 | <?php |
703 | - $hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
|
703 | + $hist = $Stats->getStatsSource(date('Y-m-d'), 'hist'); |
|
704 | 704 | foreach ($hist as $hists) { |
705 | 705 | $hist_data = ''; |
706 | 706 | $source = $hists['source_name']; |
707 | 707 | $hist_array = json_decode($hists['source_data']); |
708 | - foreach($hist_array as $distance => $nb) |
|
708 | + foreach ($hist_array as $distance => $nb) |
|
709 | 709 | { |
710 | 710 | $unit = 'km'; |
711 | 711 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -723,13 +723,13 @@ discard block |
||
723 | 723 | $hist_data = substr($hist_data, 0, -1); |
724 | 724 | ?> |
725 | 725 | <div class="col-md-6"> |
726 | - <h2><?php echo sprintf(_("Flights Distance for %s"),$source); ?></h2> |
|
726 | + <h2><?php echo sprintf(_("Flights Distance for %s"), $source); ?></h2> |
|
727 | 727 | <?php |
728 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div> |
|
728 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div> |
|
729 | 729 | <script> |
730 | 730 | google.load("visualization", "1", {packages:["corechart"]}); |
731 | - google.setOnLoadCallback(drawCharthist_'.str_replace(' ','_',strtolower($source)).'); |
|
732 | - function drawCharthist_'.str_replace(' ','_',strtolower($source)).'() { |
|
731 | + google.setOnLoadCallback(drawCharthist_'.str_replace(' ', '_', strtolower($source)).'); |
|
732 | + function drawCharthist_'.str_replace(' ', '_', strtolower($source)).'() { |
|
733 | 733 | var data = google.visualization.arrayToDataTable([ |
734 | 734 | ["'._("Distance").'", "'._("# of Flights").'"], '; |
735 | 735 | print $hist_data; |
@@ -744,16 +744,16 @@ discard block |
||
744 | 744 | colors: ["#1a3151"] |
745 | 745 | }; |
746 | 746 | |
747 | - var chart = new google.visualization.AreaChart(document.getElementById("charthist-'.str_replace(' ','_',strtolower($source)).'")); |
|
747 | + var chart = new google.visualization.AreaChart(document.getElementById("charthist-'.str_replace(' ', '_', strtolower($source)).'")); |
|
748 | 748 | chart.draw(data, options); |
749 | 749 | } |
750 | 750 | $(window).resize(function(){ |
751 | - drawCharthist_'.str_replace(' ','_',strtolower($source)).'(); |
|
751 | + drawCharthist_'.str_replace(' ', '_', strtolower($source)).'(); |
|
752 | 752 | }); |
753 | 753 | </script>'; |
754 | 754 | ?> |
755 | 755 | </div> |
756 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
756 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
757 | 757 | <?php |
758 | 758 | } |
759 | 759 | ?> |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | if (isset($last_update[0]['value'])) { |
23 | 23 | date_default_timezone_set('UTC'); |
24 | 24 | $lastupdate = strtotime($last_update[0]['value']); |
25 | - if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
|
25 | + if (isset($globalTimezone) && $globalTimezone != '') { |
|
26 | + date_default_timezone_set($globalTimezone); |
|
27 | + } |
|
26 | 28 | print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
27 | 29 | } |
28 | 30 | ?> |
@@ -67,8 +69,9 @@ discard block |
||
67 | 69 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
68 | 70 | <?php |
69 | 71 | $aircraft_array = $Stats->countAllAircraftTypes(); |
70 | - if (count($aircraft_array) == 0) print _("No data available"); |
|
71 | - else { |
|
72 | + if (count($aircraft_array) == 0) { |
|
73 | + print _("No data available"); |
|
74 | + } else { |
|
72 | 75 | |
73 | 76 | print '<div id="chart1" class="chart" width="100%"></div> |
74 | 77 | <script> |
@@ -111,8 +114,9 @@ discard block |
||
111 | 114 | <h2><?php echo _("Top 10 Most Common Airline"); ?></h2> |
112 | 115 | <?php |
113 | 116 | $airline_array = $Stats->countAllAirlines(); |
114 | - if (count($airline_array) == 0) print _("No data available"); |
|
115 | - else { |
|
117 | + if (count($airline_array) == 0) { |
|
118 | + print _("No data available"); |
|
119 | + } else { |
|
116 | 120 | |
117 | 121 | print '<div id="chart2" class="chart" width="100%"></div> |
118 | 122 | <script> |
@@ -170,8 +174,9 @@ discard block |
||
170 | 174 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
171 | 175 | <?php |
172 | 176 | $pilot_array = $Stats->countAllPilots(); |
173 | - if (count($pilot_array) == 0) print _("No data available"); |
|
174 | - else { |
|
177 | + if (count($pilot_array) == 0) { |
|
178 | + print _("No data available"); |
|
179 | + } else { |
|
175 | 180 | |
176 | 181 | print '<div id="chart7" class="chart" width="100%"></div> |
177 | 182 | <script> |
@@ -217,8 +222,9 @@ discard block |
||
217 | 222 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
218 | 223 | <?php |
219 | 224 | $owner_array = $Stats->countAllOwners(); |
220 | - if (count($owner_array) == 0) print _("No data available"); |
|
221 | - else { |
|
225 | + if (count($owner_array) == 0) { |
|
226 | + print _("No data available"); |
|
227 | + } else { |
|
222 | 228 | |
223 | 229 | print '<div id="chart7" class="chart" width="100%"></div> |
224 | 230 | <script> |
@@ -266,8 +272,9 @@ discard block |
||
266 | 272 | <h2><?php echo _("Top 20 Most Common Country a Flight was Over"); ?></h2> |
267 | 273 | <?php |
268 | 274 | //$flightover_array = $Stats->countAllFlightOverCountries(); |
269 | - if (count($flightover_array) == 0) print _("No data available"); |
|
270 | - else { |
|
275 | + if (count($flightover_array) == 0) { |
|
276 | + print _("No data available"); |
|
277 | + } else { |
|
271 | 278 | |
272 | 279 | print '<div id="chart10" class="chart" width="100%"></div> |
273 | 280 | <script> |
@@ -319,8 +326,9 @@ discard block |
||
319 | 326 | <h2><?php echo _("Top 10 Most Common Departure Airports"); ?></h2> |
320 | 327 | <?php |
321 | 328 | $airport_airport_array = $Stats->countAllDepartureAirports(); |
322 | - if (count($airport_airport_array) == 0) print _("No data available"); |
|
323 | - else { |
|
329 | + if (count($airport_airport_array) == 0) { |
|
330 | + print _("No data available"); |
|
331 | + } else { |
|
324 | 332 | |
325 | 333 | print '<div id="chart3" class="chart" width="100%"></div> |
326 | 334 | <script> |
@@ -369,8 +377,9 @@ discard block |
||
369 | 377 | <h2><?php echo _("Top 10 Most Common Arrival Airports"); ?></h2> |
370 | 378 | <?php |
371 | 379 | $airport_airport_array2 = $Stats->countAllArrivalAirports(); |
372 | - if (count($airport_airport_array2) == 0) print _("No data available"); |
|
373 | - else { |
|
380 | + if (count($airport_airport_array2) == 0) { |
|
381 | + print _("No data available"); |
|
382 | + } else { |
|
374 | 383 | |
375 | 384 | print '<div id="chart4" class="chart" width="100%"></div> |
376 | 385 | <script> |
@@ -421,8 +430,9 @@ discard block |
||
421 | 430 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
422 | 431 | <?php |
423 | 432 | $year_array = $Stats->countAllMonthsLastYear(); |
424 | - if (count($year_array) == 0) print _("No data available"); |
|
425 | - else { |
|
433 | + if (count($year_array) == 0) { |
|
434 | + print _("No data available"); |
|
435 | + } else { |
|
426 | 436 | print '<div id="chart8" class="chart" width="100%"></div> |
427 | 437 | <script> |
428 | 438 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -467,8 +477,9 @@ discard block |
||
467 | 477 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
468 | 478 | <?php |
469 | 479 | $month_array = $Stats->countAllDatesLastMonth(); |
470 | - if (count($month_array) == 0) print _("No data available"); |
|
471 | - else { |
|
480 | + if (count($month_array) == 0) { |
|
481 | + print _("No data available"); |
|
482 | + } else { |
|
472 | 483 | print '<div id="chart9" class="chart" width="100%"></div> |
473 | 484 | <script> |
474 | 485 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -513,8 +524,9 @@ discard block |
||
513 | 524 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
514 | 525 | <?php |
515 | 526 | $date_array = $Stats->countAllDatesLast7Days(); |
516 | - if (empty($date_array)) print _("No data available"); |
|
517 | - else { |
|
527 | + if (empty($date_array)) { |
|
528 | + print _("No data available"); |
|
529 | + } else { |
|
518 | 530 | print '<div id="chart5" class="chart" width="100%"></div> |
519 | 531 | <script> |
520 | 532 | google.load("visualization", "1", {packages:["corechart"]}); |
@@ -560,8 +572,9 @@ discard block |
||
560 | 572 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
561 | 573 | <?php |
562 | 574 | $hour_array = $Stats->countAllHours('hour'); |
563 | - if (empty($hour_array)) print _("No data available"); |
|
564 | - else { |
|
575 | + if (empty($hour_array)) { |
|
576 | + print _("No data available"); |
|
577 | + } else { |
|
565 | 578 | |
566 | 579 | print '<div id="chart6" class="chart" width="100%"></div> |
567 | 580 | <script> |
@@ -626,8 +639,11 @@ discard block |
||
626 | 639 | $distance = $distance; |
627 | 640 | $unit = 'km'; |
628 | 641 | } |
629 | - if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
630 | - else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
642 | + if (!isset($polar_data)) { |
|
643 | + $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
644 | + } else { |
|
645 | + $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
646 | + } |
|
631 | 647 | } |
632 | 648 | ?> |
633 | 649 | <div class="col-md-6"> |
@@ -674,8 +690,11 @@ discard block |
||
674 | 690 | foreach ($msg as $eachmsg) { |
675 | 691 | //$eachmsg = $msg[0]; |
676 | 692 | $data = $eachmsg['source_data']; |
677 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
678 | - else $max = 500; |
|
693 | + if ($data > 500) { |
|
694 | + $max = (round(($data+100)/100))*100; |
|
695 | + } else { |
|
696 | + $max = 500; |
|
697 | + } |
|
679 | 698 | ?> |
680 | 699 | <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
681 | 700 | <script> |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Aircraft from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Aircraft from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($airline == $airline_name['airline_icao']) |
|
24 | + if ($airline == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | |
64 | 64 | $aircraft_array = $Spotter->countAllAircraftTypesByAirline($airline); |
65 | 65 | if (!empty($aircraft_array)) |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | print '</thead>'; |
75 | 75 | print '<tbody>'; |
76 | 76 | $i = 1; |
77 | - foreach($aircraft_array as $aircraft_item) |
|
77 | + foreach ($aircraft_array as $aircraft_item) |
|
78 | 78 | { |
79 | 79 | print '<tr>'; |
80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
41 | 41 | { |
42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
43 | - } |
|
44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
45 | 44 | { |
46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | 46 | } |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -if (!isset($_GET['country'])){ |
|
6 | +if (!isset($_GET['country'])) { |
|
7 | 7 | header('Location: '.$globalURL.''); |
8 | 8 | } else { |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | //calculuation for the pagination |
11 | - if(!isset($_GET['limit'])) |
|
11 | + if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | if (!empty($spotter_array)) |
41 | 41 | { |
42 | - $title = sprintf(_("Detailed View for Airports & Airlines from %s"),$country); |
|
42 | + $title = sprintf(_("Detailed View for Airports & Airlines from %s"), $country); |
|
43 | 43 | |
44 | 44 | require_once('header.php'); |
45 | 45 | print '<div class="select-item">'; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
48 | 48 | print '<option></option>'; |
49 | 49 | $all_countries = $Spotter->getAllCountries(); |
50 | - foreach($all_countries as $all_country) |
|
50 | + foreach ($all_countries as $all_country) |
|
51 | 51 | { |
52 | - if($country == $all_country['country']) |
|
52 | + if ($country == $all_country['country']) |
|
53 | 53 | { |
54 | 54 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
55 | 55 | } else { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if ($_GET['country'] != "NA") |
65 | 65 | { |
66 | 66 | print '<div class="info column">'; |
67 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
67 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
68 | 68 | print '</div>'; |
69 | 69 | } else { |
70 | 70 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | include('country-sub-menu.php'); |
74 | 74 | print '<div class="table column">'; |
75 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure & arrival) OR airlines from <strong>%s</strong>."),$country).'</p>'; |
|
75 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure & arrival) OR airlines from <strong>%s</strong>."), $country).'</p>'; |
|
76 | 76 | |
77 | 77 | include('table-output.php'); |
78 | 78 | print '<div class="pagination">'; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | </span> |
16 | 16 | <div class="sub-menu sub-menu-container"> |
17 | 17 | <ul class="nav nav-pills"> |
18 | - <li><a href="<?php print $globalURL; ?>/registration/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
18 | + <li><a href="<?php print $globalURL; ?>/registration/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
19 | 19 | <li class="dropdown"> |
20 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "registration-statistics-departure-airport" || strtolower($current_page) == "registration-statistics-departure-airport-country" || strtolower($current_page) == "registration-statistics-arrival-airport" || strtolower($current_page) == "registration-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
20 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "registration-statistics-departure-airport" || strtolower($current_page) == "registration-statistics-departure-airport-country" || strtolower($current_page) == "registration-statistics-arrival-airport" || strtolower($current_page) == "registration-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
21 | 21 | <?php _("Airport"); ?> <span class="caret"></span> |
22 | 22 | </a> |
23 | 23 | <ul class="dropdown-menu" role="menu"> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <li><a href="<?php print $globalURL; ?>/registration/statistics/arrival-airport-country/<?php print $_GET['registration']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
28 | 28 | </ul> |
29 | 29 | </li> |
30 | - <li><a href="<?php print $globalURL; ?>/registration/statistics/route/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-statistics-route"){ print 'class="active"'; } ?>><?php _("Route"); ?></a></li> |
|
31 | - <li><a href="<?php print $globalURL; ?>/registration/statistics/time/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-statistics-time"){ print 'class="active"'; } ?>><?php _("Time"); ?></a></li> |
|
30 | + <li><a href="<?php print $globalURL; ?>/registration/statistics/route/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-statistics-route") { print 'class="active"'; } ?>><?php _("Route"); ?></a></li> |
|
31 | + <li><a href="<?php print $globalURL; ?>/registration/statistics/time/<?php print $_GET['registration']; ?>" <?php if (strtolower($current_page) == "registration-statistics-time") { print 'class="active"'; } ?>><?php _("Time"); ?></a></li> |
|
32 | 32 | </ul> |
33 | 33 | </div> |
34 | 34 | \ No newline at end of file |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | print '<div class="select-item">'; |
42 | 42 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
43 | 43 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
44 | - print '<option></option>'; |
|
44 | + print '<option></option>'; |
|
45 | 45 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
46 | 46 | foreach($aircraft_types as $aircrafttype) |
47 | 47 | { |
@@ -51,20 +51,20 @@ discard block |
||
51 | 51 | } else { |
52 | 52 | print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
53 | 53 | } |
54 | - } |
|
55 | - print '</select>'; |
|
56 | - print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>'; |
|
54 | + } |
|
55 | + print '</select>'; |
|
56 | + print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>'; |
|
57 | 57 | print '</form>'; |
58 | 58 | print '</div>'; |
59 | 59 | |
60 | 60 | if ($aircraft_type != "NA") |
61 | 61 | { |
62 | - print '<div class="info column">'; |
|
63 | - print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>'; |
|
64 | - print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>'; |
|
65 | - print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; |
|
66 | - if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
67 | - print '</div>'; |
|
62 | + print '<div class="info column">'; |
|
63 | + print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>'; |
|
64 | + print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>'; |
|
65 | + print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; |
|
66 | + if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
67 | + print '</div>'; |
|
68 | 68 | } else { |
69 | 69 | print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>'; |
70 | 70 | } |
@@ -4,16 +4,16 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | |
7 | -if (!isset($_GET['aircraft_type'])){ |
|
7 | +if (!isset($_GET['aircraft_type'])) { |
|
8 | 8 | header('Location: '.$globalURL.'/aircraft'); |
9 | 9 | } else { |
10 | 10 | //calculuation for the pagination |
11 | - if(!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2) |
|
11 | + if (!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | $limit_previous_1 = $limit_start - $absolute_difference; |
28 | 28 | $limit_previous_2 = $limit_end - $absolute_difference; |
29 | 29 | |
30 | - $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
30 | + $aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
31 | 31 | $page_url = $globalURL.'/aircraft/'.$aircraft_type; |
32 | 32 | |
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
34 | - $spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,$limit_start.",".$absolute_difference, $sort); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | + $spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, $limit_start.",".$absolute_difference, $sort); |
|
35 | 35 | |
36 | 36 | if (!empty($spotter_array)) |
37 | 37 | { |
38 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
38 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
39 | 39 | require_once('header.php'); |
40 | 40 | |
41 | 41 | print '<div class="select-item">'; |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
44 | 44 | print '<option></option>'; |
45 | 45 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
46 | - foreach($aircraft_types as $aircrafttype) |
|
46 | + foreach ($aircraft_types as $aircrafttype) |
|
47 | 47 | { |
48 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
48 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
49 | 49 | { |
50 | 50 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
51 | 51 | } else { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | include('aircraft-sub-menu.php'); |
73 | 73 | |
74 | 74 | print '<div class="table column">'; |
75 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
75 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
76 | 76 | |
77 | 77 | include('table-output.php'); |
78 | 78 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -63,7 +63,9 @@ discard block |
||
63 | 63 | print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>'; |
64 | 64 | print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>'; |
65 | 65 | print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; |
66 | - if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
66 | + if (isset($spotter_array[0]['aircraft_manufacturer'])) { |
|
67 | + print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
68 | + } |
|
67 | 69 | print '</div>'; |
68 | 70 | } else { |
69 | 71 | print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>'; |