@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | require_once('require/class.Satellite.php'); |
6 | 6 | |
7 | -$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING); |
|
7 | +$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($trackident != '') { |
9 | 9 | require_once('require/class.SpotterLive.php'); |
10 | 10 | $SpotterLive = new SpotterLive(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident); |
15 | 15 | header('Location: '.$globalURL.'/flightid/'.$spotterid); |
16 | 16 | } else { |
17 | - setcookie('MapTrack',$resulttrackident[0]['flightaware_id']); |
|
17 | + setcookie('MapTrack', $resulttrackident[0]['flightaware_id']); |
|
18 | 18 | } |
19 | 19 | } else { |
20 | 20 | unset($_COOKIE['MapTrack']); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | <div class="form-group"> |
168 | 168 | <label>From (UTC):</label> |
169 | 169 | <div class='input-group date' id='datetimepicker1'> |
170 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
170 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a", $_COOKIE['archive_begin']); ?>" required /> |
|
171 | 171 | <span class="input-group-addon"> |
172 | 172 | <span class="glyphicon glyphicon-calendar"></span> |
173 | 173 | </span> |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | <div class="form-group"> |
177 | 177 | <label>To (UTC):</label> |
178 | 178 | <div class='input-group date' id='datetimepicker2'> |
179 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
179 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a", $_COOKIE['archive_end']); ?>" /> |
|
180 | 180 | <span class="input-group-addon"> |
181 | 181 | <span class="glyphicon glyphicon-calendar"></span> |
182 | 182 | </span> |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | <li><?php echo _("Type of Terrain:"); ?> |
302 | 302 | <select class="selectpicker" onchange="terrainType(this);"> |
303 | 303 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
304 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
305 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
306 | 306 | </select> |
307 | 307 | </li> |
308 | 308 | <?php |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
327 | 327 | <?php |
328 | 328 | } |
329 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
329 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
330 | 330 | ?> |
331 | 331 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
332 | 332 | <?php |
@@ -439,10 +439,10 @@ discard block |
||
439 | 439 | $Spotter = new Spotter(); |
440 | 440 | $allairlinenames = $Spotter->getAllAirlineNames(); |
441 | 441 | } |
442 | - foreach($allairlinenames as $airline) { |
|
442 | + foreach ($allairlinenames as $airline) { |
|
443 | 443 | $airline_name = $airline['airline_name']; |
444 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
445 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
444 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
445 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
446 | 446 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
447 | 447 | } else { |
448 | 448 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
462 | 462 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
463 | 463 | <?php |
464 | - foreach($allalliancenames as $alliance) { |
|
464 | + foreach ($allalliancenames as $alliance) { |
|
465 | 465 | $alliance_name = $alliance['alliance']; |
466 | 466 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
467 | 467 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -482,8 +482,8 @@ discard block |
||
482 | 482 | <select class="selectpicker" multiple onchange="sources(this);"> |
483 | 483 | <?php |
484 | 484 | $Spotter = new Spotter(); |
485 | - foreach($Spotter->getAllSourceName('aprs') as $source) { |
|
486 | - if (isset($_COOKIE['filter_Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
485 | + foreach ($Spotter->getAllSourceName('aprs') as $source) { |
|
486 | + if (isset($_COOKIE['filter_Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
487 | 487 | echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>'; |
488 | 488 | } else { |
489 | 489 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
556 | 556 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
557 | 557 | |
558 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
558 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
559 | 559 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
560 | 560 | } else { |
561 | 561 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
@@ -4,14 +4,14 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | 6 | $Spotter = new Spotter(); |
7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
9 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
10 | 10 | else $spotter_array = ''; |
11 | 11 | |
12 | 12 | if (!empty($spotter_array)) |
13 | 13 | { |
14 | - $title = sprintf(_("Most Common Airlines on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
14 | + $title = sprintf(_("Most Common Airlines on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
15 | 15 | |
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
30 | 30 | print '<br />'; |
31 | 31 | print '<div class="info column">'; |
32 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
32 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
33 | 33 | print '</div>'; |
34 | 34 | |
35 | 35 | include('date-sub-menu.php'); |
36 | 36 | print '<div class="column">'; |
37 | 37 | print '<h2>'._("Most Common Airlines").'</h2>'; |
38 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
38 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
39 | 39 | |
40 | 40 | $airline_array = $Spotter->countAllAirlinesByDate($date); |
41 | 41 | if (!empty($airline_array)) |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | print '</thead>'; |
53 | 53 | print '<tbody>'; |
54 | 54 | $i = 1; |
55 | - foreach($airline_array as $airline_item) |
|
55 | + foreach ($airline_array as $airline_item) |
|
56 | 56 | { |
57 | 57 | print '<tr>'; |
58 | 58 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,13 +3,13 @@ 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(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
12 | - $title = sprintf(_("Most Common Aircraft Manufacturer on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Aircraft Manufacturer on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | |
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
28 | 28 | print '<br />'; |
29 | 29 | print '<div class="info column">'; |
30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | 31 | print '</div>'; |
32 | 32 | |
33 | 33 | include('date-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
36 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
36 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
37 | 37 | |
38 | 38 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByDate($date); |
39 | 39 | if (!empty($manufacturers_array)) |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | print '</thead>'; |
49 | 49 | print '<tbody>'; |
50 | 50 | $i = 1; |
51 | - foreach($manufacturers_array as $manufacturer_item) |
|
51 | + foreach ($manufacturers_array as $manufacturer_item) |
|
52 | 52 | { |
53 | 53 | print '<tr>'; |
54 | 54 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ 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(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
28 | 28 | print '<br />'; |
29 | 29 | print '<div class="info column">'; |
30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | 31 | print '</div>'; |
32 | 32 | |
33 | 33 | include('date-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
36 | - 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>'; |
|
36 | + 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>'; |
|
37 | 37 | |
38 | 38 | $aircraft_array = $Spotter->countAllAircraftRegistrationByDate($date); |
39 | 39 | if (!empty($aircraft_array)) |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | print '</thead>'; |
51 | 51 | print '<tbody>'; |
52 | 52 | $i = 1; |
53 | - foreach($aircraft_array as $aircraft_item) |
|
53 | + foreach ($aircraft_array as $aircraft_item) |
|
54 | 54 | { |
55 | 55 | print '<tr>'; |
56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if (isset($aircraft_item['aircraft_type'])) { |
61 | 61 | 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>'; |
62 | 62 | } else { |
63 | - 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>'; |
|
63 | + 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>'; |
|
64 | 64 | } |
65 | 65 | print '</td>'; |
66 | 66 | } else { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | if (!isset($globalDemo)) { |
13 | 13 | if (isset($_GET['coord'])) |
14 | 14 | { |
15 | - $coords = explode(',',$_GET['coord']); |
|
15 | + $coords = explode(',', $_GET['coord']); |
|
16 | 16 | // $spotter_array = Source::getAllLocationInfobyCoord($coords); |
17 | 17 | $spotter_array = $Source->getAllLocationInfo(); |
18 | 18 | } else { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $output = '{"type": "FeatureCollection","features": ['; |
24 | 24 | if (!empty($spotter_array) && count($spotter_array) > 0) |
25 | 25 | { |
26 | - foreach($spotter_array as $spotter_item) |
|
26 | + foreach ($spotter_array as $spotter_item) |
|
27 | 27 | { |
28 | 28 | date_default_timezone_set('UTC'); |
29 | 29 | //waypoint plotting |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $output .= '}'; |
47 | 47 | $output .= '},'; |
48 | 48 | } |
49 | - $output = substr($output, 0, -1); |
|
49 | + $output = substr($output, 0, -1); |
|
50 | 50 | } |
51 | 51 | $output .= ']}'; |
52 | 52 |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($airline == $airline_name['airline_icao']) |
|
27 | + if ($airline == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | |
67 | 67 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirline($airline); |
68 | 68 | if (!empty($manufacturers_array)) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | print '</thead>'; |
78 | 78 | print '<tbody>'; |
79 | 79 | $i = 1; |
80 | - foreach($manufacturers_array as $manufacturer_item) |
|
80 | + foreach ($manufacturers_array as $manufacturer_item) |
|
81 | 81 | { |
82 | 82 | print '<tr>'; |
83 | 83 | 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("-", " ", 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("-", " ", 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 by Registration from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Aircraft by Registration from %s"), $manufacturer); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | |
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($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $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 by Registration").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | |
49 | 49 | $aircraft_array = $Spotter->countAllAircraftRegistrationByManufacturer($manufacturer); |
50 | 50 | if (!empty($aircraft_array)) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | print '</thead>'; |
62 | 62 | print '<tbody>'; |
63 | 63 | $i = 1; |
64 | - foreach($aircraft_array as $aircraft_item) |
|
64 | + foreach ($aircraft_array as $aircraft_item) |
|
65 | 65 | { |
66 | 66 | print '<tr>'; |
67 | 67 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,12 +7,12 @@ discard block |
||
7 | 7 | require_once('header.php'); |
8 | 8 | |
9 | 9 | //calculuation for the pagination |
10 | -if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
10 | +if (!isset($_GET['limit']) || $_GET['limit'] == "") |
|
11 | 11 | { |
12 | 12 | $limit_start = 0; |
13 | 13 | $limit_end = 25; |
14 | 14 | $absolute_difference = 25; |
15 | -} else { |
|
15 | +} else { |
|
16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
17 | 17 | $limit_start = $limit_explode[0]; |
18 | 18 | $limit_end = $limit_explode[1]; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | print '<div class="table column">'; |
40 | 40 | print '<p>'._("The table below shows the detailed information of all custom selected flights who have special aspects to it, such as unique liveries, destinations etc.").'</p>'; |
41 | 41 | |
42 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
42 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
43 | 43 | if ($sort != '') { |
44 | 44 | $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort); |
45 | 45 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($ariline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
27 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAirline($airline); |
67 | 67 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
68 | 68 | <script> |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | var data = google.visualization.arrayToDataTable([ |
77 | 77 | ["'._("Airport").'", "'._("# of times").'"],'; |
78 | 78 | $airport_data = ''; |
79 | - foreach($airport_airport_array as $airport_item) |
|
79 | + foreach ($airport_airport_array as $airport_item) |
|
80 | 80 | { |
81 | 81 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
82 | 82 | $name = str_replace("'", "", $name); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | print '</thead>'; |
116 | 116 | print '<tbody>'; |
117 | 117 | $i = 1; |
118 | - foreach($airport_airport_array as $airport_item) |
|
118 | + foreach ($airport_airport_array as $airport_item) |
|
119 | 119 | { |
120 | 120 | print '<tr>'; |
121 | 121 | print '<td><strong>'.$i.'</strong></td>'; |