@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | date_default_timezone_set('UTC'); |
27 | 27 | //waypoint plotting |
28 | 28 | $output .= '{"type": "Feature",'; |
29 | - $output .= '"properties": {'; |
|
29 | + $output .= '"properties": {'; |
|
30 | 30 | $output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",'; |
31 | 31 | $output .= '"city": "'.$spotter_item['city'].'",'; |
32 | 32 | $output .= '"country": "'.$spotter_item['country'].'",'; |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | $output .= '"homepage": "'.$spotter_item['home_link'].'",'; |
50 | 50 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
51 | 51 | // $output .= '"photo": "'.$spotter_item['image_thumbnail'].'",'; |
52 | - $output .= '},'; |
|
53 | - $output .= '"geometry": {'; |
|
52 | + $output .= '},'; |
|
53 | + $output .= '"geometry": {'; |
|
54 | 54 | $output .= '"type": "Point",'; |
55 | 55 | $output .= '"coordinates": ['; |
56 | - $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
56 | + $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
57 | 57 | $output .= ']'; |
58 | - $output .= '}'; |
|
58 | + $output .= '}'; |
|
59 | 59 | $output .= '},'; |
60 | 60 | } |
61 | 61 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | if (isset($_GET['coord'])) |
13 | 13 | { |
14 | - $coords = explode(',',$_GET['coord']); |
|
14 | + $coords = explode(',', $_GET['coord']); |
|
15 | 15 | $spotter_array = $Spotter->getAllAirportInfobyCoord($coords); |
16 | 16 | } else { |
17 | 17 | $spotter_array = $Spotter->getAllAirportInfo(); |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | |
23 | 23 | if (!empty($spotter_array)) |
24 | 24 | { |
25 | - foreach($spotter_array as $spotter_item) |
|
25 | + foreach ($spotter_array as $spotter_item) |
|
26 | 26 | { |
27 | 27 | date_default_timezone_set('UTC'); |
28 | 28 | //waypoint plotting |
29 | 29 | $output .= '{"type": "Feature",'; |
30 | 30 | $output .= '"properties": {'; |
31 | - $output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",'; |
|
32 | - $output .= '"city": "'.str_replace('"',"'",$spotter_item['city']).'",'; |
|
31 | + $output .= '"name": "'.str_replace('"', "'", $spotter_item['name']).'",'; |
|
32 | + $output .= '"city": "'.str_replace('"', "'", $spotter_item['city']).'",'; |
|
33 | 33 | $output .= '"country": "'.$spotter_item['country'].'",'; |
34 | 34 | $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
35 | - $output .= '"popupContent": "'.str_replace('"',"'",$spotter_item['name']).' : '.str_replace('"',"'",$spotter_item['city']).', '.$spotter_item['country'].'",'; |
|
35 | + $output .= '"popupContent": "'.str_replace('"', "'", $spotter_item['name']).' : '.str_replace('"', "'", $spotter_item['city']).', '.$spotter_item['country'].'",'; |
|
36 | 36 | if ($spotter_item['type'] == 'large_airport') { |
37 | 37 | $output .= '"icon": "'.$globalURL.'/images/airport.png",'; |
38 | 38 | } elseif ($spotter_item['type'] == 'heliport') { |
@@ -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 | -if (!isset($_GET['airline'])){ |
|
6 | +if (!isset($_GET['airline'])) { |
|
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | -} else{ |
|
8 | +} else { |
|
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | //calculuation for the pagination |
11 | - if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
11 | + if (!isset($_GET['limit']) || $_GET['limit'] == "") |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -27,16 +27,16 @@ discard block |
||
27 | 27 | $limit_previous_1 = $limit_start - $absolute_difference; |
28 | 28 | $limit_previous_2 = $limit_end - $absolute_difference; |
29 | 29 | |
30 | - $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
30 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
31 | 31 | $page_url = $globalURL.'/airline/'.$airline; |
32 | 32 | |
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
34 | - $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'],$limit_start.",".$absolute_difference, $sort); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | + $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'], $limit_start.",".$absolute_difference, $sort); |
|
35 | 35 | |
36 | 36 | if (!empty($spotter_array)) |
37 | 37 | { |
38 | 38 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
39 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
39 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
40 | 40 | } else $title = ''; |
41 | 41 | require_once('header.php'); |
42 | 42 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
46 | 46 | print '<option></option>'; |
47 | 47 | $airline_names = $Spotter->getAllAirlineNames(); |
48 | - foreach($airline_names as $airline_name) |
|
48 | + foreach ($airline_names as $airline_name) |
|
49 | 49 | { |
50 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
50 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
51 | 51 | { |
52 | 52 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
53 | 53 | } else { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | include('airline-sub-menu.php'); |
85 | 85 | print '<div class="table column">'; |
86 | 86 | if (isset($spotter_array[0]['airline_name'])) { |
87 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
87 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | include('table-output.php'); |
@@ -14,7 +14,7 @@ discard block |
||
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 | 19 | $limit_start = $limit_explode[0]; |
20 | 20 | $limit_end = $limit_explode[1]; |
@@ -38,7 +38,9 @@ discard block |
||
38 | 38 | { |
39 | 39 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
40 | 40 | $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
41 | - } else $title = ''; |
|
41 | + } else { |
|
42 | + $title = ''; |
|
43 | + } |
|
42 | 44 | require_once('header.php'); |
43 | 45 | |
44 | 46 | print '<div class="select-item">'; |
@@ -47,7 +49,9 @@ discard block |
||
47 | 49 | print '<option></option>'; |
48 | 50 | $Stats = new Stats(); |
49 | 51 | $airline_names = $Stats->getAllAirlineNames(); |
50 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
52 | + if (empty($airline_names)) { |
|
53 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
54 | + } |
|
51 | 55 | foreach($airline_names as $airline_name) |
52 | 56 | { |
53 | 57 | if($_GET['airline'] == $airline_name['airline_icao']) |
@@ -76,8 +80,12 @@ discard block |
||
76 | 80 | print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['airline_name'].'</div>'; |
77 | 81 | print '<div><span class="label">'._("Country").'</span>'.$spotter_array[0]['airline_country'].'</div>'; |
78 | 82 | print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['airline_icao'].'</div>'; |
79 | - if (isset($spotter_array[0]['airline_iata'])) print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>'; |
|
80 | - if (isset($spotter_array[0]['airline_callsign'])) print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>'; |
|
83 | + if (isset($spotter_array[0]['airline_iata'])) { |
|
84 | + print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>'; |
|
85 | + } |
|
86 | + if (isset($spotter_array[0]['airline_callsign'])) { |
|
87 | + print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>'; |
|
88 | + } |
|
81 | 89 | print '<div><span class="label">'._("Type").'</span>'.ucwords($spotter_array[0]['airline_type']).'</div>'; |
82 | 90 | print '</div>'; |
83 | 91 | } else { |
@@ -54,7 +54,9 @@ |
||
54 | 54 | $radius = $spotter_item['radius']*1852; |
55 | 55 | $output .= '"radiusm": "'.$radius.'",'; |
56 | 56 | $output .= '"radiusnm": "'.$spotter_item['radius'].'",'; |
57 | - if ($radius > 25000) $radius = 25000; |
|
57 | + if ($radius > 25000) { |
|
58 | + $radius = 25000; |
|
59 | + } |
|
58 | 60 | $output .= '"radius": "'.$radius.'"'; |
59 | 61 | $output .= '},'; |
60 | 62 | $output .= '"geometry": {'; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | date_default_timezone_set('UTC'); |
43 | 43 | //waypoint plotting |
44 | 44 | $output .= '{"type": "Feature",'; |
45 | - $output .= '"properties": {'; |
|
45 | + $output .= '"properties": {'; |
|
46 | 46 | $output .= '"ref": "'.$spotter_item['ref'].'",'; |
47 | 47 | $output .= '"title": "'.$spotter_item['title'].'",'; |
48 | 48 | $output .= '"fir": "'.$spotter_item['fir'].'",'; |
@@ -61,28 +61,28 @@ discard block |
||
61 | 61 | // $output .= '"photo": "'.$spotter_item['image_thumbnail'].'",'; |
62 | 62 | // if ($spotter_item['radius'] > 30) $spotter_item['radius'] = 30; |
63 | 63 | if ($spotter_item['scope'] == 'Airport warning') { |
64 | - $output .= '"color": "#EACC04",'; |
|
64 | + $output .= '"color": "#EACC04",'; |
|
65 | 65 | } elseif ($spotter_item['scope'] == 'Airport/Enroute warning') { |
66 | - $output .= '"color": "#EA7D00",'; |
|
66 | + $output .= '"color": "#EA7D00",'; |
|
67 | 67 | } elseif ($spotter_item['scope'] == 'Airport/Navigation warning') { |
68 | - $output .= '"color": "#DBEA00",'; |
|
68 | + $output .= '"color": "#DBEA00",'; |
|
69 | 69 | } elseif ($spotter_item['scope'] == 'Navigation warning') { |
70 | - $output .= '"color": "#BBEA00",'; |
|
70 | + $output .= '"color": "#BBEA00",'; |
|
71 | 71 | } else { |
72 | - $output .= '"color": "#FF0000",'; |
|
72 | + $output .= '"color": "#FF0000",'; |
|
73 | 73 | } |
74 | 74 | $radius = $spotter_item['radius']*1852; |
75 | 75 | $output .= '"radiusm": "'.$radius.'",'; |
76 | 76 | $output .= '"radiusnm": "'.$spotter_item['radius'].'",'; |
77 | 77 | if ($radius > 25000) $radius = 25000; |
78 | 78 | $output .= '"radius": '.$radius.''; |
79 | - $output .= '},'; |
|
80 | - $output .= '"geometry": {'; |
|
79 | + $output .= '},'; |
|
80 | + $output .= '"geometry": {'; |
|
81 | 81 | $output .= '"type": "Point",'; |
82 | 82 | $output .= '"coordinates": ['; |
83 | - $output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude']; |
|
83 | + $output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude']; |
|
84 | 84 | $output .= ']'; |
85 | - $output .= '}'; |
|
85 | + $output .= '}'; |
|
86 | 86 | $output .= '},'; |
87 | 87 | } |
88 | 88 | $output = substr($output, 0, -1); |
@@ -10,24 +10,24 @@ discard block |
||
10 | 10 | |
11 | 11 | if (isset($_GET['coord'])) |
12 | 12 | { |
13 | - $coords = explode(',',$_GET['coord']); |
|
13 | + $coords = explode(',', $_GET['coord']); |
|
14 | 14 | if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] != '' && $_COOKIE['notamscope'] != 'All') { |
15 | - $scope = filter_var($_COOOKIE['notamscope'],FILTER_SANITIZE_STRING); |
|
16 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
15 | + $scope = filter_var($_COOOKIE['notamscope'], FILTER_SANITIZE_STRING); |
|
16 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
17 | 17 | } elseif (isset($_GET['scope']) && $_GET['scope'] != '' && $_GET['scope'] != 'All') { |
18 | - $scope = filter_input(INPUT_GET,'scope',FILTER_SANITIZE_STRING); |
|
19 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
18 | + $scope = filter_input(INPUT_GET, 'scope', FILTER_SANITIZE_STRING); |
|
19 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
20 | 20 | } else { |
21 | 21 | $spotter_array = $NOTAM->getAllNOTAMbyCoord($coords); |
22 | 22 | } |
23 | 23 | // $spotter_array = $NOTAM->getAllNOTAM(); |
24 | 24 | } else { |
25 | 25 | if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] != '' && $_COOKIE['notamscope'] != 'All') { |
26 | - $scope = filter_var($_COOKIE['notamscope'],FILTER_SANITIZE_STRING); |
|
26 | + $scope = filter_var($_COOKIE['notamscope'], FILTER_SANITIZE_STRING); |
|
27 | 27 | $spotter_array = $NOTAM->getAllNOTAMbyScope($scope); |
28 | 28 | } elseif (isset($_GET['scope']) && $_GET['scope'] != '' && $_GET['scope'] != 'All') { |
29 | - $scope = filter_input(INPUT_GET,'scope',FILTER_SANITIZE_STRING); |
|
30 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
29 | + $scope = filter_input(INPUT_GET, 'scope', FILTER_SANITIZE_STRING); |
|
30 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
31 | 31 | } else { |
32 | 32 | $spotter_array = $NOTAM->getAllNOTAM(); |
33 | 33 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | if (!empty($spotter_array)) |
39 | 39 | { |
40 | - foreach($spotter_array as $spotter_item) |
|
40 | + foreach ($spotter_array as $spotter_item) |
|
41 | 41 | { |
42 | 42 | date_default_timezone_set('UTC'); |
43 | 43 | //waypoint plotting |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $output .= '"ref": "'.$spotter_item['ref'].'",'; |
47 | 47 | $output .= '"title": "'.$spotter_item['title'].'",'; |
48 | 48 | $output .= '"fir": "'.$spotter_item['fir'].'",'; |
49 | - $output .= '"text": "'.str_replace(array("\r\n", "\r", "\n"),'<br />',str_replace(array('"',"\t"), '',$spotter_item['notam_text'])).'",'; |
|
49 | + $output .= '"text": "'.str_replace(array("\r\n", "\r", "\n"), '<br />', str_replace(array('"', "\t"), '', $spotter_item['notam_text'])).'",'; |
|
50 | 50 | $output .= '"latitude": '.$spotter_item['center_latitude'].','; |
51 | 51 | $output .= '"longitude": '.$spotter_item['center_longitude'].','; |
52 | 52 | $output .= '"lower_limit": '.$spotter_item['lower_limit'].','; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $output .= '}'; |
86 | 86 | $output .= '},'; |
87 | 87 | } |
88 | - $output = substr($output, 0, -1); |
|
88 | + $output = substr($output, 0, -1); |
|
89 | 89 | } |
90 | 90 | $output .= ']}'; |
91 | 91 |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $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 | 17 | |
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $airport_names = $Spotter->getAllAirportNames(); |
24 | 24 | ksort($airport_names); |
25 | - foreach($airport_names as $airport_name) |
|
25 | + foreach ($airport_names as $airport_name) |
|
26 | 26 | { |
27 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
27 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
28 | 28 | { |
29 | 29 | 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>'; |
30 | 30 | } else { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | include('airport-sub-menu.php'); |
56 | 56 | print '<div class="column">'; |
57 | 57 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
58 | - 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>'; |
|
58 | + 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>'; |
|
59 | 59 | |
60 | 60 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
61 | 61 | if (!empty($aircraft_array)) |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | print '</thead>'; |
73 | 73 | print '<tbody>'; |
74 | 74 | $i = 1; |
75 | - foreach($aircraft_array as $aircraft_item) |
|
75 | + foreach ($aircraft_array as $aircraft_item) |
|
76 | 76 | { |
77 | 77 | print '<tr>'; |
78 | 78 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airport'])) { |
6 | - header('Location: '.$globalURL.'/airport'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airport'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -3,16 +3,16 @@ 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); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | 7 | if (isset($_GET['registration'])) { |
8 | - $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
8 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | 11 | } else $spotter_array = array(); |
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="info column">'; |
18 | 18 | print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('registration-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
28 | 28 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByRegistration($registration); |
29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
30 | 30 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -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>'; |
@@ -12,7 +12,9 @@ |
||
12 | 12 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | -} else $spotter_array = array(); |
|
15 | +} else { |
|
16 | + $spotter_array = array(); |
|
17 | +} |
|
16 | 18 | |
17 | 19 | if (!empty($spotter_array)) |
18 | 20 | { |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/manufacturer'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
9 | +$aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $manufacturer = ucwords(str_replace("-", " ", $aircraft_manufacturer)); |
13 | 13 | |
14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Airlines from %s"),$manufacturer); |
|
18 | + $title = sprintf(_("Most Common Airlines from %s"), $manufacturer); |
|
19 | 19 | |
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
24 | 24 | print '<option></option>'; |
25 | 25 | $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 Airlines").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airline_array = $Spotter->countAllAirlinesByManufacturer($manufacturer); |
49 | 49 | if (!empty($airline_array)) |
50 | 50 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '</thead>'; |
61 | 61 | print '<tbody>'; |
62 | 62 | $i = 1; |
63 | - foreach($airline_array as $airline_item) |
|
63 | + foreach ($airline_array as $airline_item) |
|
64 | 64 | { |
65 | 65 | print '<tr>'; |
66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/date/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/date/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airline"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | </ul> |
25 | 25 | </li> |
26 | 26 | <li class="dropdown"> |
27 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
27 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
28 | 28 | <?php echo _("Airport"); ?> <span class="caret"></span> |
29 | 29 | </a> |
30 | 30 | <ul class="dropdown-menu" role="menu"> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | <li><a href="<?php print $globalURL; ?>/date/statistics/arrival-airport-country/<?php print $_GET['date']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
35 | 35 | </ul> |
36 | 36 | </li> |
37 | - <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | - <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
37 | + <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | + <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $_GET['date']; ?>" <?php if (strtolower($current_page) == "date-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
39 | 39 | </ul> |
40 | 40 | </div> |
41 | 41 | \ No newline at end of file |
@@ -7,8 +7,8 @@ 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 | if (isset($_GET['sort'])) { |
13 | 13 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
14 | 14 | } else { |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Airlines of %s"),$country); |
|
20 | + $title = sprintf(_("Most Common Airlines of %s"), $country); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="select-item">'; |
23 | 23 | print '<form action="'.$globalURL.'/country" method="post">'; |
24 | 24 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
25 | 25 | print '<option></option>'; |
26 | 26 | $all_countries = $Spotter->getAllCountries(); |
27 | - foreach($all_countries as $all_country) |
|
27 | + foreach ($all_countries as $all_country) |
|
28 | 28 | { |
29 | - if($country == $all_country['country']) |
|
29 | + if ($country == $all_country['country']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
32 | 32 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($_GET['country'] != "NA") |
42 | 42 | { |
43 | 43 | print '<div class="info column">'; |
44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
45 | 45 | print '</div>'; |
46 | 46 | } else { |
47 | 47 | 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>'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | include('country-sub-menu.php'); |
51 | 51 | print '<div class="column">'; |
52 | 52 | print '<h2>'._("Most Common Airlines").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
54 | 54 | |
55 | 55 | $airline_array = $Spotter->countAllAirlinesByCountry($country); |
56 | 56 | if (!empty($airline_array)) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '</thead>'; |
67 | 67 | print '<tbody>'; |
68 | 68 | $i = 1; |
69 | - foreach($airline_array as $airline_item) |
|
69 | + foreach ($airline_array as $airline_item) |
|
70 | 70 | { |
71 | 71 | print '<tr>'; |
72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/flightid/<?php print $_GET['id']; ?>" <?php if (strtolower($current_page) == "flightid-overview"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/flightid/<?php print $_GET['id']; ?>" <?php if (strtolower($current_page) == "flightid-overview") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <?php if ($globalFlightAware) { ?> |
8 | 8 | <li><a href="http://flightaware.com/live/flight/id/<?php print $spotter_array[0]['flightaware_id']; ?>" target="_blank"><?php echo _("Flight Status"); ?>»</a></li> |
9 | 9 | <li><a href="http://flightaware.com/live/flight/id/<?php print $spotter_array[0]['flightaware_id']; ?>/tracklog" target="_blank"><?php echo _("Flight Log"); ?>»</a></li> |