@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | if (isset($_POST['airline'])) |
| 10 | 10 | { |
| 11 | - header('Location: '.$globalURL.'/airline/'.filter_input(INPUT_POST,'airline',FILTER_SANITIZE_STRING)); |
|
| 11 | + header('Location: '.$globalURL.'/airline/'.filter_input(INPUT_POST, 'airline', FILTER_SANITIZE_STRING)); |
|
| 12 | 12 | } else { |
| 13 | 13 | $title = "Airlines"; |
| 14 | 14 | require_once('header.php'); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | print '<div class="column">'; |
| 18 | 18 | print '<h1>'._("Airlines").'</h1>'; |
| 19 | 19 | if (isset($_POST['airline_type'])) { |
| 20 | - $airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING); |
|
| 20 | + $airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 21 | 21 | //$airline_names = $Spotter->getAllAirlineNames($airline_type); |
| 22 | 22 | } else { |
| 23 | 23 | //$airline_names = $Spotter->getAllAirlineNames(); |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | print '<div class="alphabet">'; |
| 30 | 30 | foreach ($alliances as $alliance) { |
| 31 | 31 | print '<div class="alphabet-airline alphabet-item">'; |
| 32 | - print '<a href="'.$globalURL.'/airline/alliance_'.str_replace(' ','_',$alliance['alliance']).'">'; |
|
| 33 | - if (file_exists('images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png')) |
|
| 32 | + print '<a href="'.$globalURL.'/airline/alliance_'.str_replace(' ', '_', $alliance['alliance']).'">'; |
|
| 33 | + if (file_exists('images/airlines/'.str_replace(' ', '_', $alliance['alliance']).'.png')) |
|
| 34 | 34 | { |
| 35 | - print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
|
| 35 | + print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ', '_', $alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
|
| 36 | 36 | } else print $alliance['alliance']; |
| 37 | 37 | print '</a>'; |
| 38 | 38 | print '</div>'; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $Stats = new Stats(); |
| 56 | 56 | if (isset($_POST['airline_type'])) |
| 57 | 57 | { |
| 58 | - $airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING); |
|
| 58 | + $airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 59 | 59 | //$airline_names = $Stats->getAllAirlineNames($airline_type); |
| 60 | 60 | $airline_names = $Spotter->getAllAirlineNames($airline_type); |
| 61 | 61 | } else { |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | $previous = null; |
| 70 | 70 | print '<div class="alphabet-legend">'; |
| 71 | - foreach($airline_names as $value) |
|
| 71 | + foreach ($airline_names as $value) |
|
| 72 | 72 | { |
| 73 | 73 | //echo $value['airline_name']."\n"; |
| 74 | 74 | //echo mb_substr($value['airline_name'],0,1).' - '.$value['airline_name']."\n"; |
| 75 | 75 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airline_name'], 0, 1)); |
| 76 | - if($previous !== $firstLetter) |
|
| 76 | + if ($previous !== $firstLetter) |
|
| 77 | 77 | { |
| 78 | 78 | if ($previous !== null) print ' | '; |
| 79 | 79 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | print '</div>'; |
| 84 | 84 | $previous = null; |
| 85 | - foreach($airline_names as $value) { |
|
| 85 | + foreach ($airline_names as $value) { |
|
| 86 | 86 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airline_name'], 0, 1)); |
| 87 | 87 | if ($firstLetter != "") |
| 88 | 88 | { |
| 89 | - if($previous !== $firstLetter) |
|
| 89 | + if ($previous !== $firstLetter) |
|
| 90 | 90 | { |
| 91 | 91 | if ($previous !== null) print '</div>'; |
| 92 | 92 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -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,10 +30,10 @@ 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 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
| 36 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
| 37 | 37 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 38 | 38 | |
| 39 | 39 | if (!empty($airport_array)) |
@@ -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) aircrafts 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) aircrafts 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">'; |