@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 17 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
| 30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | 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>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
| 64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | print '</thead>'; |
| 76 | 76 | print '<tbody>'; |
| 77 | 77 | $i = 1; |
| 78 | - foreach($aircraft_array as $aircraft_item) |
|
| 78 | + foreach ($aircraft_array as $aircraft_item) |
|
| 79 | 79 | { |
| 80 | 80 | print '<tr>'; |
| 81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 17 | - $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
| 30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | 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>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 61 | - 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>'; |
|
| 61 | + 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>'; |
|
| 62 | 62 | |
| 63 | 63 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirport($airport); |
| 64 | 64 | if (!empty($manufacturers_array)) |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | print '</thead>'; |
| 74 | 74 | print '<tbody>'; |
| 75 | 75 | $i = 1; |
| 76 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 76 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 77 | 77 | { |
| 78 | 78 | print '<tr>'; |
| 79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 17 | - $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
| 20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
| 25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 26 | 26 | ksort($airport_names); |
| 27 | - foreach($airport_names as $airport_name) |
|
| 27 | + foreach ($airport_names as $airport_name) |
|
| 28 | 28 | { |
| 29 | - if($airport == $airport_name['airport_icao']) |
|
| 29 | + if ($airport == $airport_name['airport_icao']) |
|
| 30 | 30 | { |
| 31 | 31 | 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>'; |
| 32 | 32 | } else { |
@@ -57,14 +57,14 @@ discard block |
||
| 57 | 57 | include('airport-sub-menu.php'); |
| 58 | 58 | print '<div class="column">'; |
| 59 | 59 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 60 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 60 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 61 | 61 | |
| 62 | 62 | $airline_array = $Spotter->countAllAirlinesByAirport($airport); |
| 63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 64 | 64 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3pie.min.js"></script>'; |
| 65 | 65 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 66 | 66 | $airline_data = ''; |
| 67 | - foreach($airline_array as $airline_item) |
|
| 67 | + foreach ($airline_array as $airline_item) |
|
| 68 | 68 | { |
| 69 | 69 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
| 70 | 70 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | print '</thead>'; |
| 92 | 92 | print '<tbody>'; |
| 93 | 93 | $i = 1; |
| 94 | - foreach($airline_array as $airline_item) |
|
| 94 | + foreach ($airline_array as $airline_item) |
|
| 95 | 95 | { |
| 96 | 96 | print '<tr>'; |
| 97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,16 +7,16 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | if (isset($_POST['airport'])) |
| 9 | 9 | { |
| 10 | - header('Location: '.$globalURL.'/airport/'.filter_input(INPUT_POST,'airport',FILTER_SANITIZE_STRING)); |
|
| 11 | -} else if (isset($_GET['airport'])){ |
|
| 10 | + header('Location: '.$globalURL.'/airport/'.filter_input(INPUT_POST, 'airport', FILTER_SANITIZE_STRING)); |
|
| 11 | +} else if (isset($_GET['airport'])) { |
|
| 12 | 12 | $Spotter = new Spotter(); |
| 13 | 13 | //calculuation for the pagination |
| 14 | - if($_GET['limit'] == "") |
|
| 14 | + if ($_GET['limit'] == "") |
|
| 15 | 15 | { |
| 16 | 16 | $limit_start = 0; |
| 17 | 17 | $limit_end = 25; |
| 18 | 18 | $absolute_difference = 25; |
| 19 | - } else { |
|
| 19 | + } else { |
|
| 20 | 20 | $limit_explode = explode(",", $_GET['limit']); |
| 21 | 21 | $limit_start = $limit_explode[0]; |
| 22 | 22 | $limit_end = $limit_explode[1]; |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | $limit_previous_1 = $limit_start - $absolute_difference; |
| 31 | 31 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 32 | 32 | |
| 33 | - $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 34 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 33 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 34 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 35 | 35 | $page_url = $globalURL.'/airport/'.$airport; |
| 36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 37 | 37 | |
| 38 | 38 | if (!empty($airport_array)) |
| 39 | 39 | { |
| 40 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
| 40 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
| 41 | 41 | $title = $airport_array[0]['city'].', '.$airport_array[0]['name'].' ('.$airport_array[0]['icao'].')'; |
| 42 | 42 | |
| 43 | 43 | require_once('header.php'); |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | $airport_names = $Spotter->getAllAirportNames(); |
| 53 | 53 | } |
| 54 | 54 | ksort($airport_names); |
| 55 | - foreach($airport_names as $airport_name) |
|
| 55 | + foreach ($airport_names as $airport_name) |
|
| 56 | 56 | { |
| 57 | - if($airport == $airport_name['airport_icao']) |
|
| 57 | + if ($airport == $airport_name['airport_icao']) |
|
| 58 | 58 | { |
| 59 | 59 | 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>'; |
| 60 | 60 | } else { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | print '<div class="table column">'; |
| 88 | 88 | if ($airport_array[0]['iata'] != "NA") |
| 89 | 89 | { |
| 90 | - print '<p>'.sprintf(_("The table below shows the route(s) aircraft have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>'; |
|
| 90 | + print '<p>'.sprintf(_("The table below shows the route(s) aircraft have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>'; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | include('table-output.php'); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; |
| 110 | 110 | } |
| 111 | 111 | } else { |
| 112 | - $Spotter= new Spotter(); |
|
| 112 | + $Spotter = new Spotter(); |
|
| 113 | 113 | $Stats = new Stats(); |
| 114 | 114 | $Common = new Common(); |
| 115 | 115 | $title = _("Airports"); |
@@ -123,11 +123,11 @@ discard block |
||
| 123 | 123 | ksort($airport_names); |
| 124 | 124 | $previous = null; |
| 125 | 125 | print '<div class="alphabet-legend">'; |
| 126 | - foreach($airport_names as $value) { |
|
| 126 | + foreach ($airport_names as $value) { |
|
| 127 | 127 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airport_city'], 0, 1)); |
| 128 | - if($previous !== $firstLetter) |
|
| 128 | + if ($previous !== $firstLetter) |
|
| 129 | 129 | { |
| 130 | - if ($previous !== null){ |
|
| 130 | + if ($previous !== null) { |
|
| 131 | 131 | print ' | '; |
| 132 | 132 | } |
| 133 | 133 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | print '</div>'; |
| 138 | 138 | $previous = null; |
| 139 | - foreach($airport_names as $value) { |
|
| 139 | + foreach ($airport_names as $value) { |
|
| 140 | 140 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airport_city'], 0, 1)); |
| 141 | 141 | if ($firstLetter != "") |
| 142 | 142 | { |
| 143 | - if($previous !== $firstLetter) |
|
| 143 | + if ($previous !== $firstLetter) |
|
| 144 | 144 | { |
| 145 | - if ($previous !== null){ |
|
| 145 | + if ($previous !== null) { |
|
| 146 | 146 | print '</div>'; |
| 147 | 147 | } |
| 148 | 148 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 14 | 14 | |
| 15 | 15 | if (!empty($airport_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($airport == $airport_name['airport_icao']) |
|
| 30 | + if ($airport == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | 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>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $hour_array = $Spotter->countAllHoursByAirport($airport); |
| 64 | 64 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | $hour_data = ''; |
| 69 | 69 | $hour_cnt = ''; |
| 70 | 70 | $last = 0; |
| 71 | - foreach($hour_array as $hour_item) |
|
| 71 | + foreach ($hour_array as $hour_item) |
|
| 72 | 72 | { |
| 73 | - while($last != $hour_item['hour_name']) { |
|
| 73 | + while ($last != $hour_item['hour_name']) { |
|
| 74 | 74 | $hour_data .= '"'.$last.':00",'; |
| 75 | 75 | $hour_cnt .= '0,'; |
| 76 | 76 | $last++; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $hour_cnt .= $hour_item['hour_count'].','; |
| 81 | 81 | } |
| 82 | 82 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 83 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 83 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 84 | 84 | print 'c3.generate({ |
| 85 | 85 | bindto: "#chartHour", |
| 86 | 86 | data: { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | print '</thead>'; |
| 104 | 104 | print '<tbody>'; |
| 105 | 105 | $i = 1; |
| 106 | - foreach($hour_array as $hour_item) |
|
| 106 | + foreach ($hour_array as $hour_item) |
|
| 107 | 107 | { |
| 108 | 108 | print '<tr>'; |
| 109 | 109 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 17 | - $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
| 20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
| 25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 26 | 26 | ksort($airport_names); |
| 27 | - foreach($airport_names as $airport_name) |
|
| 27 | + foreach ($airport_names as $airport_name) |
|
| 28 | 28 | { |
| 29 | - if($airport == $airport_name['airport_icao']) |
|
| 29 | + if ($airport == $airport_name['airport_icao']) |
|
| 30 | 30 | { |
| 31 | 31 | 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>'; |
| 32 | 32 | } else { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | include('airport-sub-menu.php'); |
| 57 | 57 | print '<div class="column">'; |
| 58 | 58 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 59 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 59 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 60 | 60 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirport($airport); |
| 61 | 61 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 62 | 62 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | print '<script>'; |
| 66 | 66 | print 'var series = ['; |
| 67 | 67 | $airport_data = ''; |
| 68 | - foreach($airport_airport_array as $airport_item) |
|
| 68 | + foreach ($airport_airport_array as $airport_item) |
|
| 69 | 69 | { |
| 70 | 70 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 71 | 71 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | print '</thead>'; |
| 121 | 121 | print '<tbody>'; |
| 122 | 122 | $i = 1; |
| 123 | - foreach($airport_airport_array as $airport_item) |
|
| 123 | + foreach ($airport_airport_array as $airport_item) |
|
| 124 | 124 | { |
| 125 | 125 | print '<tr>'; |
| 126 | 126 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -9,13 +9,13 @@ discard block |
||
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | |
| 12 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 12 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 14 | 14 | |
| 15 | 15 | if (!empty($airport_array)) |
| 16 | 16 | { |
| 17 | 17 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 18 | - $title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 18 | + $title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
| 21 | 21 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($airport == $airport_name['airport_icao']) |
|
| 30 | + if ($airport == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | 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>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $aircraft_array = $Spotter->countAllAircraftTypesByAirport($airport); |
| 64 | 64 | if (!empty($aircraft_array)) |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | print '</thead>'; |
| 74 | 74 | print '<tbody>'; |
| 75 | 75 | $i = 1; |
| 76 | - foreach($aircraft_array as $aircraft_item) |
|
| 76 | + foreach ($aircraft_array as $aircraft_item) |
|
| 77 | 77 | { |
| 78 | 78 | print '<tr>'; |
| 79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 17 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
| 20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
| 25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 26 | 26 | ksort($airport_names); |
| 27 | - foreach($airport_names as $airport_name) |
|
| 27 | + foreach ($airport_names as $airport_name) |
|
| 28 | 28 | { |
| 29 | - if($airport == $airport_name['airport_icao']) |
|
| 29 | + if ($airport == $airport_name['airport_icao']) |
|
| 30 | 30 | { |
| 31 | 31 | 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>'; |
| 32 | 32 | } else { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | include('airport-sub-menu.php'); |
| 58 | 58 | print '<div class="column">'; |
| 59 | 59 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 60 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 60 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 61 | 61 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirport($airport); |
| 62 | 62 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 66 | 66 | print 'var series = ['; |
| 67 | 67 | $country_data = ''; |
| 68 | - foreach($airport_country_array as $airport_item) |
|
| 68 | + foreach ($airport_country_array as $airport_item) |
|
| 69 | 69 | { |
| 70 | 70 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 71 | 71 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | print '</thead>'; |
| 114 | 114 | print '<tbody>'; |
| 115 | 115 | $i = 1; |
| 116 | - foreach($airport_country_array as $airport_item) |
|
| 116 | + foreach ($airport_country_array as $airport_item) |
|
| 117 | 117 | { |
| 118 | 118 | print '<tr>'; |
| 119 | 119 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
| 13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 14 | 14 | |
| 15 | 15 | if (!empty($airport_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Routes to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Routes to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($airport == $airport_name['airport_icao']) |
|
| 30 | + if ($airport == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | 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>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common routes to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common routes to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $route_array = $Spotter->countAllRoutesByAirport($airport); |
| 64 | 64 | if (!empty($route_array)) |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | print '</thead>'; |
| 75 | 75 | print '<tbody>'; |
| 76 | 76 | $i = 1; |
| 77 | - foreach($route_array as $route_item) |
|
| 77 | + foreach ($route_array as $route_item) |
|
| 78 | 78 | { |
| 79 | 79 | print '<tr>'; |
| 80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |