@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines by Country from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Airlines by Country from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
|
28 | + if ($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer); |
49 | 49 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
50 | 50 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
53 | 53 | print 'var series = ['; |
54 | 54 | $country_data = ''; |
55 | - foreach($airline_array as $airline_item) |
|
55 | + foreach ($airline_array as $airline_item) |
|
56 | 56 | { |
57 | 57 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
58 | 58 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | print '</thead>'; |
100 | 100 | print '<tbody>'; |
101 | 101 | $i = 1; |
102 | - foreach($airline_array as $airline_item) |
|
102 | + foreach ($airline_array as $airline_item) |
|
103 | 103 | { |
104 | 104 | print '<tr>'; |
105 | 105 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)))); |
@@ -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("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(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 Aircraft by registration from %s"),$country); |
|
20 | + $title = sprintf(_("Most Common Aircraft by registration from %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 Aircraft by Registration").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>'; |
|
54 | 54 | $aircraft_array = $Spotter->countAllAircraftRegistrationByCountry($country); |
55 | 55 | if (!empty($aircraft_array)) |
56 | 56 | { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | print '</thead>'; |
66 | 66 | print '<tbody>'; |
67 | 67 | $i = 1; |
68 | - foreach($aircraft_array as $aircraft_item) |
|
68 | + foreach ($aircraft_array as $aircraft_item) |
|
69 | 69 | { |
70 | 70 | print '<tr>'; |
71 | 71 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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 $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 $registration; ?>" <?php if (strtolower($current_page) == "registration-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
31 | - <li><a href="<?php print $globalURL; ?>/registration/statistics/time/<?php print $registration; ?>" <?php if (strtolower($current_page) == "registration-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
30 | + <li><a href="<?php print $globalURL; ?>/registration/statistics/route/<?php print $registration; ?>" <?php if (strtolower($current_page) == "registration-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
31 | + <li><a href="<?php print $globalURL; ?>/registration/statistics/time/<?php print $registration; ?>" <?php if (strtolower($current_page) == "registration-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
32 | 32 | </ul> |
33 | 33 | </div> |
34 | 34 | \ No newline at end of file |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Departure Airports from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Departure Airports from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } 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 Departure Airports").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
54 | 54 | |
55 | 55 | $airport_airport_array = $Spotter->countAllDepartureAirportsByCountry($country); |
56 | 56 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '<script>'; |
61 | 61 | print 'var series = ['; |
62 | 62 | $airport_data = ''; |
63 | - foreach($airport_airport_array as $airport_item) |
|
63 | + foreach ($airport_airport_array as $airport_item) |
|
64 | 64 | { |
65 | 65 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
66 | 66 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | print '</thead>'; |
115 | 115 | print '<tbody>'; |
116 | 116 | $i = 1; |
117 | - foreach($airport_airport_array as $airport_item) |
|
117 | + foreach ($airport_airport_array as $airport_item) |
|
118 | 118 | { |
119 | 119 | print '<tr>'; |
120 | 120 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Aircraft from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Aircraft from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
|
28 | + if ($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | |
49 | 49 | $aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer); |
50 | 50 | if (!empty($aircraft_array)) |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | print '</thead>'; |
60 | 60 | print '<tbody>'; |
61 | 61 | $i = 1; |
62 | - foreach($aircraft_array as $aircraft_item) |
|
62 | + foreach ($aircraft_array as $aircraft_item) |
|
63 | 63 | { |
64 | 64 | print '<tr>'; |
65 | 65 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Time of Day from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Time of Day from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | 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>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | $hour_array = $Spotter->countAllHoursByCountry($country); |
56 | 56 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
57 | 57 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | $hour_data = ''; |
61 | 61 | $hour_cnt = ''; |
62 | 62 | $last = 0; |
63 | - foreach($hour_array as $hour_item) |
|
63 | + foreach ($hour_array as $hour_item) |
|
64 | 64 | { |
65 | - while($last != $hour_item['hour_name']) { |
|
65 | + while ($last != $hour_item['hour_name']) { |
|
66 | 66 | $hour_data .= '"'.$last.':00",'; |
67 | 67 | $hour_cnt .= '0,'; |
68 | 68 | $last++; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $hour_cnt .= $hour_item['hour_count'].','; |
73 | 73 | } |
74 | 74 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
75 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
75 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
76 | 76 | print 'c3.generate({ |
77 | 77 | bindto: "#chartHour", |
78 | 78 | data: { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | print '</thead>'; |
98 | 98 | print '<tbody>'; |
99 | 99 | $i = 1; |
100 | - foreach($hour_array as $hour_item) |
|
100 | + foreach ($hour_array as $hour_item) |
|
101 | 101 | { |
102 | 102 | print '<tr>'; |
103 | 103 | print '<td>'.$hour_item['hour_name'].':00</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("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(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("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Airlines by Country of %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Airlines by Country of %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | 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>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByCountry($country); |
56 | 56 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
57 | 57 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
60 | 60 | print 'var series = ['; |
61 | 61 | $country_data = ''; |
62 | - foreach($airline_array as $airline_item) |
|
62 | + foreach ($airline_array as $airline_item) |
|
63 | 63 | { |
64 | 64 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
65 | 65 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | print '</thead>'; |
108 | 108 | print '<tbody>'; |
109 | 109 | $i = 1; |
110 | - foreach($airline_array as $airline_item) |
|
110 | + foreach ($airline_array as $airline_item) |
|
111 | 111 | { |
112 | 112 | print '<tr>'; |
113 | 113 | 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("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", urldecode(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 Aircraft Manufacturer from %s"),$country); |
|
20 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %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 Aircraft Manufacturer").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>'; |
|
54 | 54 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByCountry($country); |
55 | 55 | if (!empty($manufacturers_array)) |
56 | 56 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | print '</thead>'; |
64 | 64 | print '<tbody>'; |
65 | 65 | $i = 1; |
66 | - foreach($manufacturers_array as $manufacturer_item) |
|
66 | + foreach ($manufacturers_array as $manufacturer_item) |
|
67 | 67 | { |
68 | 68 | print '<tr>'; |
69 | 69 | print '<td><strong>'.$i.'</strong></td>'; |