@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | if (isset($_POST['airport'])) |
8 | 8 | { |
9 | 9 | header('Location: '.$globalURL.'/airport/'.$_POST['airport']); |
10 | -} else if (isset($_GET['airport'])){ |
|
10 | +} else if (isset($_GET['airport'])) { |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //calculuation for the pagination |
13 | - if($_GET['limit'] == "") |
|
13 | + if ($_GET['limit'] == "") |
|
14 | 14 | { |
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
31 | 31 | |
32 | - $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
32 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | 34 | $page_url = $globalURL.'/airport/'.$airport; |
35 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport); |
37 | 37 | |
38 | 38 | if (!empty($airport_array)) |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | print '<option></option>'; |
47 | 47 | $airport_names = $Spotter->getAllAirportNames(); |
48 | 48 | ksort($airport_names); |
49 | - foreach($airport_names as $airport_name) |
|
49 | + foreach ($airport_names as $airport_name) |
|
50 | 50 | { |
51 | - if($airport == $airport_name['airport_icao']) |
|
51 | + if ($airport == $airport_name['airport_icao']) |
|
52 | 52 | { |
53 | 53 | 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>'; |
54 | 54 | } else { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '<div class="table column">'; |
81 | 81 | if ($airport_array[0]['iata'] != "NA") |
82 | 82 | { |
83 | - print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>'; |
|
83 | + print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | include('table-output.php'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; |
103 | 103 | } |
104 | 104 | } else { |
105 | - $Spotter= new Spotter(); |
|
105 | + $Spotter = new Spotter(); |
|
106 | 106 | $Stats = new Stats(); |
107 | 107 | $title = _("Airports"); |
108 | 108 | require_once('header.php'); |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | ksort($airport_names); |
114 | 114 | $previous = null; |
115 | 115 | print '<div class="alphabet-legend">'; |
116 | - foreach($airport_names as $value) { |
|
116 | + foreach ($airport_names as $value) { |
|
117 | 117 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
118 | - if($previous !== $firstLetter) |
|
118 | + if ($previous !== $firstLetter) |
|
119 | 119 | { |
120 | - if ($previous !== null){ |
|
120 | + if ($previous !== null) { |
|
121 | 121 | print ' | '; |
122 | 122 | } |
123 | 123 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | } |
127 | 127 | print '</div>'; |
128 | 128 | $previous = null; |
129 | - foreach($airport_names as $value) { |
|
129 | + foreach ($airport_names as $value) { |
|
130 | 130 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
131 | 131 | if ($firstLetter != "") |
132 | 132 | { |
133 | - if($previous !== $firstLetter) |
|
133 | + if ($previous !== $firstLetter) |
|
134 | 134 | { |
135 | - if ($previous !== null){ |
|
135 | + if ($previous !== null) { |
|
136 | 136 | print '</div>'; |
137 | 137 | } |
138 | 138 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ["'._("Date").'", "'._("# of Flights").'"], '; |
27 | 27 | |
28 | 28 | $date_data = ''; |
29 | -foreach($date_array as $date_item) |
|
29 | +foreach ($date_array as $date_item) |
|
30 | 30 | { |
31 | 31 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
32 | 32 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </script>'; |
53 | 53 | } |
54 | 54 | if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) { |
55 | - print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>'; |
|
55 | + print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>'; |
|
56 | 56 | } else { |
57 | 57 | print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>'; |
58 | 58 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | print '</thead>'; |
69 | 69 | print '<tbody>'; |
70 | 70 | $i = 1; |
71 | - foreach($date_array as $date_item) |
|
71 | + foreach ($date_array as $date_item) |
|
72 | 72 | { |
73 | 73 | print '<tr>'; |
74 | 74 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(FILTER_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
6 | +$sort = filter_input(FILTER_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
8 | 8 | |
9 | 9 | if (!empty($spotter_array)) |
10 | 10 | { |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | print '</div>'; |
21 | 21 | |
22 | 22 | print '<div class="info column">'; |
23 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
23 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | include('date-sub-menu.php'); |
27 | 27 | print '<div class="column">'; |
28 | 28 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
29 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
29 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
30 | 30 | |
31 | 31 | $aircraft_array = $Spotter->countAllAircraftRegistrationByDate($_GET['date']); |
32 | 32 | if (!empty($aircraft_array)) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | print '</thead>'; |
44 | 44 | print '<tbody>'; |
45 | 45 | $i = 1; |
46 | - foreach($aircraft_array as $aircraft_item) |
|
46 | + foreach ($aircraft_array as $aircraft_item) |
|
47 | 47 | { |
48 | 48 | print '<tr>'; |
49 | 49 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (isset($aircraft_item['aircraft_type'])) { |
54 | 54 | print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_type'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:").' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
55 | 55 | } else { |
56 | - print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:");' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
|
56 | + print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:"); ' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
|
57 | 57 | } |
58 | 58 | print '</td>'; |
59 | 59 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Departure Airports by Country of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Departure Airports by Country of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | include('ident-sub-menu.php'); |
24 | 24 | print '<div class="column">'; |
25 | 25 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
26 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
26 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
27 | 27 | |
28 | 28 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | var data = google.visualization.arrayToDataTable([ |
36 | 36 | ["'._("Country").'", "'._("# of times").'"], '; |
37 | 37 | $country_data = ''; |
38 | - foreach($airport_country_array as $airport_item) |
|
38 | + foreach ($airport_country_array as $airport_item) |
|
39 | 39 | { |
40 | 40 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
41 | 41 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | print '</thead>'; |
70 | 70 | print '<tbody>'; |
71 | 71 | $i = 1; |
72 | - foreach($airport_country_array as $airport_item) |
|
72 | + foreach ($airport_country_array as $airport_item) |
|
73 | 73 | { |
74 | 74 | print '<tr>'; |
75 | 75 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <div class="form-group"> |
66 | 66 | <label>From (UTC):</label> |
67 | 67 | <div class='input-group date' id='datetimepicker1'> |
68 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
68 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a", $_COOKIE['archive_begin']); ?>" required /> |
|
69 | 69 | <span class="input-group-addon"> |
70 | 70 | <span class="glyphicon glyphicon-calendar"></span> |
71 | 71 | </span> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | <div class="form-group"> |
75 | 75 | <label>To (UTC):</label> |
76 | 76 | <div class='input-group date' id='datetimepicker2'> |
77 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
77 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a", $_COOKIE['archive_end']); ?>" /> |
|
78 | 78 | <span class="input-group-addon"> |
79 | 79 | <span class="glyphicon glyphicon-calendar"></span> |
80 | 80 | </span> |
@@ -240,10 +240,10 @@ discard block |
||
240 | 240 | <select class="selectpicker" multiple onchange="airlines(this);"> |
241 | 241 | <?php |
242 | 242 | $Spotter = new Spotter(); |
243 | - foreach($Spotter->getAllAirlineNames() as $airline) { |
|
243 | + foreach ($Spotter->getAllAirlineNames() as $airline) { |
|
244 | 244 | $airline_name = $airline['airline_name']; |
245 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
246 | - if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
|
245 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
246 | + if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['Airlines']))) { |
|
247 | 247 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
248 | 248 | } else { |
249 | 249 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | <select class="selectpicker" multiple onchange="sources(this);"> |
260 | 260 | <?php |
261 | 261 | $Spotter = new Spotter(); |
262 | - foreach($Spotter->getAllSourceName('aprs') as $source) { |
|
263 | - if (isset($_COOKIE['Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['Sources']))) { |
|
262 | + foreach ($Spotter->getAllSourceName('aprs') as $source) { |
|
263 | + if (isset($_COOKIE['Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['Sources']))) { |
|
264 | 264 | echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>'; |
265 | 265 | } else { |
266 | 266 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
@@ -7,14 +7,14 @@ 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 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
13 | 13 | |
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports from %s"),$country); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports from %s"), $country); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
23 | 23 | print '<option></option>'; |
24 | 24 | $all_countries = $Spotter->getAllCountries(); |
25 | - foreach($all_countries as $all_country) |
|
25 | + foreach ($all_countries as $all_country) |
|
26 | 26 | { |
27 | - if($country == $all_country['country']) |
|
27 | + if ($country == $all_country['country']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
30 | 30 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if ($_GET['country'] != "NA") |
40 | 40 | { |
41 | 41 | print '<div class="info column">'; |
42 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
42 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
43 | 43 | print '</div>'; |
44 | 44 | } else { |
45 | 45 | 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>'; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | include('country-sub-menu.php'); |
49 | 49 | print '<div class="column">'; |
50 | 50 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
51 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
51 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
52 | 52 | $airport_airport_array = $Spotter->countAllArrivalAirportsByCountry($country); |
53 | 53 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
54 | 54 | <script> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ["'._("Airport").'", "'._("# of times").'"],'; |
64 | 64 | |
65 | 65 | $airport_data = ''; |
66 | - foreach($airport_airport_array as $airport_item) |
|
66 | + foreach ($airport_airport_array as $airport_item) |
|
67 | 67 | { |
68 | 68 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
69 | 69 | $name = str_replace("'", "", $name); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | print '</thead>'; |
102 | 102 | print '<tbody>'; |
103 | 103 | $i = 1; |
104 | - foreach($airport_airport_array as $airport_item) |
|
104 | + foreach ($airport_airport_array as $airport_item) |
|
105 | 105 | { |
106 | 106 | print '<tr>'; |
107 | 107 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$country = filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING); |
|
8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$country = filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING); |
|
8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
11 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
12 | 12 | else $spotter_array = array(); |
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
16 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -24,13 +24,13 @@ discard block |
||
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | print '<div class="info column">'; |
27 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
27 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
28 | 28 | print '</div>'; |
29 | 29 | |
30 | 30 | include('date-sub-menu.php'); |
31 | 31 | print '<div class="column">'; |
32 | 32 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
33 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
33 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
34 | 34 | |
35 | 35 | $airline_array = $Spotter->countAllAirlineCountriesByDate($date); |
36 | 36 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | var data = google.visualization.arrayToDataTable([ |
43 | 43 | ["'._("Country").'", "'._("# of times").'"], '; |
44 | 44 | $country_data = ''; |
45 | - foreach($airline_array as $airline_item) |
|
45 | + foreach ($airline_array as $airline_item) |
|
46 | 46 | { |
47 | 47 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
48 | 48 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | print '</thead>'; |
77 | 77 | print '<tbody>'; |
78 | 78 | $i = 1; |
79 | - foreach($airline_array as $airline_item) |
|
79 | + foreach ($airline_array as $airline_item) |
|
80 | 80 | { |
81 | 81 | print '<tr>'; |
82 | 82 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
6 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | 8 | if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
9 | 9 | else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | |
18 | 18 | print '<div class="info column">'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
28 | 28 | |
29 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
29 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
30 | 30 | $airport_airport_array = $Spotter->countAllDepartureAirportsByRegistration($registration); |
31 | 31 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
32 | 32 | <script> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | var data = google.visualization.arrayToDataTable([ |
41 | 41 | ["'._("Airport").'", "'._("# of times").'"],'; |
42 | 42 | $airport_data = ''; |
43 | - foreach($airport_airport_array as $airport_item) |
|
43 | + foreach ($airport_airport_array as $airport_item) |
|
44 | 44 | { |
45 | 45 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
46 | 46 | $name = str_replace("'", "", $name); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($airport_airport_array as $airport_item) |
|
81 | + foreach ($airport_airport_array as $airport_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | print '</thead>'; |
28 | 28 | print '<tbody>'; |
29 | 29 | $i = 1; |
30 | - foreach($route_array as $route_item) |
|
30 | + foreach ($route_array as $route_item) |
|
31 | 31 | { |
32 | 32 | print '<tr>'; |
33 | 33 | print '<td><strong>'.$i.'</strong></td>'; |