@@ -4,20 +4,20 @@ discard block |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | |
7 | -if (!isset($_GET['airline'])){ |
|
7 | +if (!isset($_GET['airline'])) { |
|
8 | 8 | header('Location: '.$globalURL.'/airline'); |
9 | -} else{ |
|
9 | +} else { |
|
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | //calculuation for the pagination |
12 | - if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
12 | + if (!isset($_GET['limit']) || $_GET['limit'] == "") |
|
13 | 13 | { |
14 | 14 | $limit_start = 0; |
15 | 15 | $limit_end = 25; |
16 | 16 | $absolute_difference = 25; |
17 | - } else { |
|
17 | + } else { |
|
18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
19 | - $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
|
20 | - $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
|
19 | + $limit_start = filter_var($limit_explode[0], FILTER_SANITIZE_NUMBER_INT); |
|
20 | + $limit_end = filter_var($limit_explode[1], FILTER_SANITIZE_NUMBER_INT); |
|
21 | 21 | if (!ctype_digit(strval($limit_start)) || !ctype_digit(strval($limit_end))) { |
22 | 22 | $limit_start = 0; |
23 | 23 | $limit_end = 25; |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | $limit_previous_1 = $limit_start - $absolute_difference; |
29 | 29 | $limit_previous_2 = $limit_end - $absolute_difference; |
30 | 30 | |
31 | - $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
31 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
32 | 32 | $page_url = $globalURL.'/airline/'.$airline; |
33 | 33 | |
34 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
35 | - $spotter_array = $Spotter->getSpotterDataByAirline($airline,$limit_start.",".$absolute_difference, $sort); |
|
34 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAirline($airline, $limit_start.",".$absolute_difference, $sort); |
|
36 | 36 | |
37 | 37 | if (!empty($spotter_array)) |
38 | 38 | { |
39 | 39 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
40 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
40 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
41 | 41 | } else $title = ''; |
42 | 42 | require_once('header.php'); |
43 | 43 | |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | $Stats = new Stats(); |
49 | 49 | $airline_names = $Stats->getAllAirlineNames(); |
50 | 50 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
51 | - foreach($airline_names as $airline_name) |
|
51 | + foreach ($airline_names as $airline_name) |
|
52 | 52 | { |
53 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
53 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
54 | 54 | { |
55 | 55 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
56 | 56 | } else { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | include('airline-sub-menu.php'); |
89 | 89 | print '<div class="table column">'; |
90 | 90 | if (isset($spotter_array[0]['airline_name'])) { |
91 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
91 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | include('table-output.php'); |