@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | if (isset($_POST['airport'])) |
8 | 8 | { |
9 | 9 | header('Location: '.$globalURL.'/airport/'.$_POST['airport']); |
10 | -} else if (isset($_GET['airport'])){ |
|
10 | +} else if (isset($_GET['airport'])) { |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //calculuation for the pagination |
13 | - if($_GET['limit'] == "") |
|
13 | + if ($_GET['limit'] == "") |
|
14 | 14 | { |
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
31 | 31 | |
32 | - $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
32 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | 34 | $page_url = $globalURL.'/airport/'.$airport; |
35 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport); |
37 | 37 | |
38 | 38 | if (!empty($airport_array)) |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | print '<option></option>'; |
47 | 47 | $airport_names = $Spotter->getAllAirportNames(); |
48 | 48 | ksort($airport_names); |
49 | - foreach($airport_names as $airport_name) |
|
49 | + foreach ($airport_names as $airport_name) |
|
50 | 50 | { |
51 | - if($airport == $airport_name['airport_icao']) |
|
51 | + if ($airport == $airport_name['airport_icao']) |
|
52 | 52 | { |
53 | 53 | 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>'; |
54 | 54 | } else { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '<div class="table column">'; |
81 | 81 | if ($airport_array[0]['iata'] != "NA") |
82 | 82 | { |
83 | - 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>'; |
|
83 | + 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>'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | include('table-output.php'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; |
103 | 103 | } |
104 | 104 | } else { |
105 | - $Spotter= new Spotter(); |
|
105 | + $Spotter = new Spotter(); |
|
106 | 106 | $Stats = new Stats(); |
107 | 107 | $title = _("Airports"); |
108 | 108 | require_once('header.php'); |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | ksort($airport_names); |
114 | 114 | $previous = null; |
115 | 115 | print '<div class="alphabet-legend">'; |
116 | - foreach($airport_names as $value) { |
|
116 | + foreach ($airport_names as $value) { |
|
117 | 117 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
118 | - if($previous !== $firstLetter) |
|
118 | + if ($previous !== $firstLetter) |
|
119 | 119 | { |
120 | - if ($previous !== null){ |
|
120 | + if ($previous !== null) { |
|
121 | 121 | print ' | '; |
122 | 122 | } |
123 | 123 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | } |
127 | 127 | print '</div>'; |
128 | 128 | $previous = null; |
129 | - foreach($airport_names as $value) { |
|
129 | + foreach ($airport_names as $value) { |
|
130 | 130 | $firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1)); |
131 | 131 | if ($firstLetter != "") |
132 | 132 | { |
133 | - if($previous !== $firstLetter) |
|
133 | + if ($previous !== $firstLetter) |
|
134 | 134 | { |
135 | - if ($previous !== null){ |
|
135 | + if ($previous !== null) { |
|
136 | 136 | print '</div>'; |
137 | 137 | } |
138 | 138 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -109,7 +109,9 @@ discard block |
||
109 | 109 | print '<div class="column">'; |
110 | 110 | print '<h1>'._("Airports").'</h1>'; |
111 | 111 | $airport_names = $Stats->getAllAirportNames(); |
112 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
112 | + if (empty($airport_names)) { |
|
113 | + $airport_names = $Spotter->getAllAirportNames(); |
|
114 | + } |
|
113 | 115 | ksort($airport_names); |
114 | 116 | $previous = null; |
115 | 117 | print '<div class="alphabet-legend">'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ["'._("Date").'", "'._("# of Flights").'"], '; |
27 | 27 | |
28 | 28 | $date_data = ''; |
29 | -foreach($date_array as $date_item) |
|
29 | +foreach ($date_array as $date_item) |
|
30 | 30 | { |
31 | 31 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
32 | 32 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </script>'; |
53 | 53 | } |
54 | 54 | if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) { |
55 | - print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>'; |
|
55 | + print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>'; |
|
56 | 56 | } else { |
57 | 57 | print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>'; |
58 | 58 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | print '</thead>'; |
69 | 69 | print '<tbody>'; |
70 | 70 | $i = 1; |
71 | - foreach($date_array as $date_item) |
|
71 | + foreach ($date_array as $date_item) |
|
72 | 72 | { |
73 | 73 | print '<tr>'; |
74 | 74 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ 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(FILTER_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
6 | +$sort = filter_input(FILTER_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
8 | 8 | |
9 | 9 | if (!empty($spotter_array)) |
10 | 10 | { |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | print '</div>'; |
21 | 21 | |
22 | 22 | print '<div class="info column">'; |
23 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
23 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | include('date-sub-menu.php'); |
27 | 27 | print '<div class="column">'; |
28 | 28 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
29 | - 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>'; |
|
29 | + 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>'; |
|
30 | 30 | |
31 | 31 | $aircraft_array = $Spotter->countAllAircraftRegistrationByDate($_GET['date']); |
32 | 32 | if (!empty($aircraft_array)) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | print '</thead>'; |
44 | 44 | print '<tbody>'; |
45 | 45 | $i = 1; |
46 | - foreach($aircraft_array as $aircraft_item) |
|
46 | + foreach ($aircraft_array as $aircraft_item) |
|
47 | 47 | { |
48 | 48 | print '<tr>'; |
49 | 49 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (isset($aircraft_item['aircraft_type'])) { |
54 | 54 | 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>'; |
55 | 55 | } else { |
56 | - 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>'; |
|
56 | + 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>'; |
|
57 | 57 | } |
58 | 58 | print '</td>'; |
59 | 59 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Departure Airports by Country of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Departure Airports by Country of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | include('ident-sub-menu.php'); |
24 | 24 | print '<div class="column">'; |
25 | 25 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
26 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
26 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
27 | 27 | |
28 | 28 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -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>'; |
@@ -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['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | <li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
23 | 23 | <li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
24 | 24 | <?php |
25 | - if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) { |
|
25 | + if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) { |
|
26 | 26 | ?> |
27 | 27 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
28 | 28 | <?php |
29 | - } |
|
29 | + } |
|
30 | 30 | ?> |
31 | 31 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
32 | 32 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
@@ -46,15 +46,15 @@ discard block |
||
46 | 46 | <ul><li><a class="button waypoints" onclick="showWaypoints(); return false;"><?php echo _("Waypoints"); ?></a></li></ul> |
47 | 47 | <ul><li><a class="button airspace" onclick="showAirspace(); return false;"><?php echo _("Airspace"); ?></a></li></ul> |
48 | 48 | <?php |
49 | - if (isset($globalNOTAM) && $globalNOTAM) { |
|
49 | + if (isset($globalNOTAM) && $globalNOTAM) { |
|
50 | 50 | ?> |
51 | 51 | <ul><li><a class="button notam" onclick="showNotam(); return false;"><?php echo _("NOTAM"); ?></a></li></ul> |
52 | 52 | <?php |
53 | - } |
|
53 | + } |
|
54 | 54 | ?> |
55 | 55 | </div> |
56 | 56 | <?php |
57 | - if (isset($globalArchive) && $globalArchive == TRUE) { |
|
57 | + if (isset($globalArchive) && $globalArchive == TRUE) { |
|
58 | 58 | ?> |
59 | 59 | <div class="sidebar-pane" id="archive"> |
60 | 60 | <h1><?php echo _("Playback"); ?> <i>Bêta</i></h1> |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | </form> |
111 | 111 | </div> |
112 | 112 | <?php |
113 | - } |
|
113 | + } |
|
114 | 114 | ?> |
115 | 115 | <div class="sidebar-pane" id="settings"> |
116 | 116 | <h1><?php echo _("Settings"); ?></h1> |
@@ -121,40 +121,40 @@ discard block |
||
121 | 121 | <?php |
122 | 122 | if (!isset($_COOKIE['MapType'])) $MapType = $globalMapProvider; |
123 | 123 | else $MapType = $_COOKIE['MapType']; |
124 | - ?> |
|
124 | + ?> |
|
125 | 125 | <?php |
126 | 126 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
127 | - ?> |
|
127 | + ?> |
|
128 | 128 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
129 | 129 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
130 | 130 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
131 | 131 | <?php |
132 | 132 | } |
133 | - ?> |
|
133 | + ?> |
|
134 | 134 | <?php |
135 | 135 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
136 | - ?> |
|
136 | + ?> |
|
137 | 137 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
138 | 138 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
139 | 139 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
140 | 140 | <?php |
141 | 141 | } |
142 | - ?> |
|
142 | + ?> |
|
143 | 143 | <?php |
144 | 144 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
145 | - ?> |
|
145 | + ?> |
|
146 | 146 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
147 | 147 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
148 | 148 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
149 | 149 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
150 | 150 | <?php |
151 | 151 | } |
152 | - ?> |
|
152 | + ?> |
|
153 | 153 | <?php |
154 | 154 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
155 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
156 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
157 | - ?> |
|
155 | + if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
156 | + else $MapBoxId = $_COOKIE['MapTypeId']; |
|
157 | + ?> |
|
158 | 158 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
159 | 159 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
160 | 160 | <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
@@ -169,16 +169,16 @@ discard block |
||
169 | 169 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
170 | 170 | <?php |
171 | 171 | } |
172 | - ?> |
|
172 | + ?> |
|
173 | 173 | <?php |
174 | 174 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
175 | - ?> |
|
175 | + ?> |
|
176 | 176 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
177 | 177 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
178 | 178 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
179 | 179 | <?php |
180 | 180 | } |
181 | - ?> |
|
181 | + ?> |
|
182 | 182 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
183 | 183 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
184 | 184 | </select> |
@@ -189,26 +189,26 @@ discard block |
||
189 | 189 | <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
190 | 190 | <?php |
191 | 191 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
192 | - ?> |
|
192 | + ?> |
|
193 | 193 | <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
194 | 194 | <?php |
195 | 195 | } |
196 | - ?> |
|
196 | + ?> |
|
197 | 197 | |
198 | 198 | <?php |
199 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
200 | - ?> |
|
199 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
200 | + ?> |
|
201 | 201 | <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
202 | 202 | <?php |
203 | 203 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
204 | - ?> |
|
204 | + ?> |
|
205 | 205 | <li><?php echo _("Aircraft icon color:"); ?> |
206 | 206 | <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
207 | 207 | </li> |
208 | 208 | <?php |
209 | - } |
|
210 | - } |
|
211 | - ?> |
|
209 | + } |
|
210 | + } |
|
211 | + ?> |
|
212 | 212 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
213 | 213 | <div class="range"> |
214 | 214 | <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
@@ -217,16 +217,16 @@ discard block |
||
217 | 217 | </li> |
218 | 218 | <?php |
219 | 219 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
220 | - ?> |
|
220 | + ?> |
|
221 | 221 | <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
222 | 222 | <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
223 | 223 | <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
224 | 224 | <?php |
225 | 225 | } |
226 | - ?> |
|
226 | + ?> |
|
227 | 227 | <?php |
228 | 228 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
229 | - ?> |
|
229 | + ?> |
|
230 | 230 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
231 | 231 | <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
232 | 232 | <?php } ?> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | <?php } ?> |
236 | 236 | <?php |
237 | 237 | } |
238 | - ?> |
|
238 | + ?> |
|
239 | 239 | <li><?php echo _("Display airlines:"); ?> |
240 | 240 | <select class="selectpicker" multiple onchange="airlines(this);"> |
241 | 241 | <?php |
@@ -249,12 +249,12 @@ discard block |
||
249 | 249 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
250 | 250 | } |
251 | 251 | } |
252 | - ?> |
|
252 | + ?> |
|
253 | 253 | </select> |
254 | 254 | </li> |
255 | 255 | <?php |
256 | 256 | if (isset($globalAPRS) && $globalAPRS) { |
257 | - ?> |
|
257 | + ?> |
|
258 | 258 | <li><?php echo _("Display APRS sources name:"); ?> |
259 | 259 | <select class="selectpicker" multiple onchange="sources(this);"> |
260 | 260 | <?php |
@@ -266,15 +266,15 @@ discard block |
||
266 | 266 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
267 | 267 | } |
268 | 268 | } |
269 | - ?> |
|
269 | + ?> |
|
270 | 270 | </select> |
271 | 271 | </li> |
272 | 272 | <?php |
273 | 273 | } |
274 | - ?> |
|
274 | + ?> |
|
275 | 275 | <?php |
276 | 276 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
277 | - ?> |
|
277 | + ?> |
|
278 | 278 | <li><?php echo _("Display airlines of type:"); ?> |
279 | 279 | <select class="selectpicker" onchange="airlinestype(this);"> |
280 | 280 | <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | </li> |
286 | 286 | <?php |
287 | 287 | } |
288 | - ?> |
|
288 | + ?> |
|
289 | 289 | <li><?php echo _("Distance unit:"); ?> |
290 | 290 | <select class="selectpicker" onchange="unitdistance(this);"> |
291 | 291 | <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <div class="form-group"> |
66 | 66 | <label>From (UTC):</label> |
67 | 67 | <div class='input-group date' id='datetimepicker1'> |
68 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
68 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a", $_COOKIE['archive_begin']); ?>" required /> |
|
69 | 69 | <span class="input-group-addon"> |
70 | 70 | <span class="glyphicon glyphicon-calendar"></span> |
71 | 71 | </span> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | <div class="form-group"> |
75 | 75 | <label>To (UTC):</label> |
76 | 76 | <div class='input-group date' id='datetimepicker2'> |
77 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
77 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a", $_COOKIE['archive_end']); ?>" /> |
|
78 | 78 | <span class="input-group-addon"> |
79 | 79 | <span class="glyphicon glyphicon-calendar"></span> |
80 | 80 | </span> |
@@ -240,10 +240,10 @@ discard block |
||
240 | 240 | <select class="selectpicker" multiple onchange="airlines(this);"> |
241 | 241 | <?php |
242 | 242 | $Spotter = new Spotter(); |
243 | - foreach($Spotter->getAllAirlineNames() as $airline) { |
|
243 | + foreach ($Spotter->getAllAirlineNames() as $airline) { |
|
244 | 244 | $airline_name = $airline['airline_name']; |
245 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
246 | - if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
|
245 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
246 | + if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['Airlines']))) { |
|
247 | 247 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
248 | 248 | } else { |
249 | 249 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | <select class="selectpicker" multiple onchange="sources(this);"> |
260 | 260 | <?php |
261 | 261 | $Spotter = new Spotter(); |
262 | - foreach($Spotter->getAllSourceName('aprs') as $source) { |
|
263 | - if (isset($_COOKIE['Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['Sources']))) { |
|
262 | + foreach ($Spotter->getAllSourceName('aprs') as $source) { |
|
263 | + if (isset($_COOKIE['Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['Sources']))) { |
|
264 | 264 | echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>'; |
265 | 265 | } else { |
266 | 266 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
@@ -65,7 +65,10 @@ discard block |
||
65 | 65 | <div class="form-group"> |
66 | 66 | <label>From (UTC):</label> |
67 | 67 | <div class='input-group date' id='datetimepicker1'> |
68 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
68 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) { |
|
69 | + print date("d/m/Y h:i a",$_COOKIE['archive_begin']); |
|
70 | +} |
|
71 | +?>" required /> |
|
69 | 72 | <span class="input-group-addon"> |
70 | 73 | <span class="glyphicon glyphicon-calendar"></span> |
71 | 74 | </span> |
@@ -74,7 +77,10 @@ discard block |
||
74 | 77 | <div class="form-group"> |
75 | 78 | <label>To (UTC):</label> |
76 | 79 | <div class='input-group date' id='datetimepicker2'> |
77 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
80 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) { |
|
81 | + print date("d/m/Y h:i a",$_COOKIE['archive_end']); |
|
82 | +} |
|
83 | +?>" /> |
|
78 | 84 | <span class="input-group-addon"> |
79 | 85 | <span class="glyphicon glyphicon-calendar"></span> |
80 | 86 | </span> |
@@ -97,8 +103,18 @@ discard block |
||
97 | 103 | |
98 | 104 | <li><?php echo _("Playback speed:"); ?> |
99 | 105 | <div class="range"> |
100 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
101 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
106 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) { |
|
107 | + print $_COOKIE['archive_speed']; |
|
108 | +} else { |
|
109 | + print '1'; |
|
110 | +} |
|
111 | +?>"> |
|
112 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
113 | + print $_COOKIE['archive_speed']; |
|
114 | +} else { |
|
115 | + print '1'; |
|
116 | +} |
|
117 | +?></output> |
|
102 | 118 | </div> |
103 | 119 | </li> |
104 | 120 | |
@@ -119,78 +135,180 @@ discard block |
||
119 | 135 | <li><?php echo _("Type of Map:"); ?> |
120 | 136 | <select class="selectpicker" onchange="mapType(this);"> |
121 | 137 | <?php |
122 | - if (!isset($_COOKIE['MapType'])) $MapType = $globalMapProvider; |
|
123 | - else $MapType = $_COOKIE['MapType']; |
|
138 | + if (!isset($_COOKIE['MapType'])) { |
|
139 | + $MapType = $globalMapProvider; |
|
140 | + } else { |
|
141 | + $MapType = $_COOKIE['MapType']; |
|
142 | + } |
|
124 | 143 | ?> |
125 | 144 | <?php |
126 | 145 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
127 | 146 | ?> |
128 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
129 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
130 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
147 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
148 | + print ' selected'; |
|
149 | +} |
|
150 | +?>>Bing-Aerial</option> |
|
151 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
152 | + print ' selected'; |
|
153 | +} |
|
154 | +?>>Bing-Hybrid</option> |
|
155 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
156 | + print ' selected'; |
|
157 | +} |
|
158 | +?>>Bing-Road</option> |
|
131 | 159 | <?php |
132 | 160 | } |
133 | 161 | ?> |
134 | 162 | <?php |
135 | 163 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
136 | 164 | ?> |
137 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
138 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
139 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
165 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
166 | + print ' selected'; |
|
167 | +} |
|
168 | +?>>Here-Aerial</option> |
|
169 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
170 | + print ' selected'; |
|
171 | +} |
|
172 | +?>>Here-Hybrid</option> |
|
173 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
174 | + print ' selected'; |
|
175 | +} |
|
176 | +?>>Here-Road</option> |
|
140 | 177 | <?php |
141 | 178 | } |
142 | 179 | ?> |
143 | 180 | <?php |
144 | 181 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
145 | 182 | ?> |
146 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
147 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
148 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
149 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
183 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
184 | + print ' selected'; |
|
185 | +} |
|
186 | +?>>Google Roadmap</option> |
|
187 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
188 | + print ' selected'; |
|
189 | +} |
|
190 | +?>>Google Satellite</option> |
|
191 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
192 | + print ' selected'; |
|
193 | +} |
|
194 | +?>>Google Hybrid</option> |
|
195 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
196 | + print ' selected'; |
|
197 | +} |
|
198 | +?>>Google Terrain</option> |
|
150 | 199 | <?php |
151 | 200 | } |
152 | 201 | ?> |
153 | 202 | <?php |
154 | 203 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
155 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
156 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
204 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
205 | + $MapBoxId = 'default'; |
|
206 | + } else { |
|
207 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
208 | + } |
|
157 | 209 | ?> |
158 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
159 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
160 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
161 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
162 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
163 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
164 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
165 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
166 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
167 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
168 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
169 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
210 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
211 | + print ' selected'; |
|
212 | +} |
|
213 | +?>>Mapbox default</option> |
|
214 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
215 | + print ' selected'; |
|
216 | +} |
|
217 | +?>>Mapbox streets</option> |
|
218 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
219 | + print ' selected'; |
|
220 | +} |
|
221 | +?>>Mapbox light</option> |
|
222 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
223 | + print ' selected'; |
|
224 | +} |
|
225 | +?>>Mapbox dark</option> |
|
226 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
227 | + print ' selected'; |
|
228 | +} |
|
229 | +?>>Mapbox satellite</option> |
|
230 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
231 | + print ' selected'; |
|
232 | +} |
|
233 | +?>>Mapbox streets-satellite</option> |
|
234 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
235 | + print ' selected'; |
|
236 | +} |
|
237 | +?>>Mapbox streets-basic</option> |
|
238 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
239 | + print ' selected'; |
|
240 | +} |
|
241 | +?>>Mapbox comic</option> |
|
242 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
243 | + print ' selected'; |
|
244 | +} |
|
245 | +?>>Mapbox outdoors</option> |
|
246 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
247 | + print ' selected'; |
|
248 | +} |
|
249 | +?>>Mapbox pencil</option> |
|
250 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
251 | + print ' selected'; |
|
252 | +} |
|
253 | +?>>Mapbox pirates</option> |
|
254 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
255 | + print ' selected'; |
|
256 | +} |
|
257 | +?>>Mapbox emerald</option> |
|
170 | 258 | <?php |
171 | 259 | } |
172 | 260 | ?> |
173 | 261 | <?php |
174 | 262 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
175 | 263 | ?> |
176 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
177 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
178 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
264 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
265 | + print ' selected'; |
|
266 | +} |
|
267 | +?>>MapQuest-OSM</option> |
|
268 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
269 | + print ' selected'; |
|
270 | +} |
|
271 | +?>>MapQuest-Aerial</option> |
|
272 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
273 | + print ' selected'; |
|
274 | +} |
|
275 | +?>>MapQuest-Hybrid</option> |
|
179 | 276 | <?php |
180 | 277 | } |
181 | 278 | ?> |
182 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
183 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
279 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
280 | + print ' selected'; |
|
281 | +} |
|
282 | +?>>OpenStreetMap</option> |
|
283 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
284 | + print ' selected'; |
|
285 | +} |
|
286 | +?>>Yandex</option> |
|
184 | 287 | </select> |
185 | 288 | </li> |
186 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') || !isset($_COOKIE['flightpopup'])) print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
187 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
188 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
189 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
289 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') || !isset($_COOKIE['flightpopup'])) { |
|
290 | + print 'checked'; |
|
291 | +} |
|
292 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
293 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
294 | + print 'checked'; |
|
295 | +} |
|
296 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
297 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
298 | + print 'checked'; |
|
299 | +} |
|
300 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
301 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
302 | + print 'checked'; |
|
303 | +} |
|
304 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
190 | 305 | <?php |
191 | 306 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
192 | 307 | ?> |
193 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
308 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
309 | + print 'checked'; |
|
310 | +} |
|
311 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
194 | 312 | <?php |
195 | 313 | } |
196 | 314 | ?> |
@@ -198,12 +316,22 @@ discard block |
||
198 | 316 | <?php |
199 | 317 | if (extension_loaded('gd') && function_exists('gd_info')) { |
200 | 318 | ?> |
201 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
319 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
320 | + print 'checked'; |
|
321 | +} |
|
322 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
202 | 323 | <?php |
203 | 324 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
204 | 325 | ?> |
205 | 326 | <li><?php echo _("Aircraft icon color:"); ?> |
206 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
|
327 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
328 | + print $_COOKIE['IconColor']; |
|
329 | +} elseif (isset($globalAircraftIconColor)) { |
|
330 | + print $globalAircraftIconColor; |
|
331 | +} else { |
|
332 | + print '1a3151'; |
|
333 | +} |
|
334 | +?>"> |
|
207 | 335 | </li> |
208 | 336 | <?php |
209 | 337 | } |
@@ -211,16 +339,39 @@ discard block |
||
211 | 339 | ?> |
212 | 340 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
213 | 341 | <div class="range"> |
214 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
215 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
342 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
343 | + print $_COOKIE['AirportZoom']; |
|
344 | +} elseif (isset($globalAirportZoom)) { |
|
345 | + print $globalAirportZoom; |
|
346 | +} else { |
|
347 | + print '7'; |
|
348 | +} |
|
349 | +?>"> |
|
350 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
351 | + print $_COOKIE['AirportZoom']; |
|
352 | +} elseif (isset($globalAirportZoom)) { |
|
353 | + print $globalAirportZoom; |
|
354 | +} else { |
|
355 | + print '7'; |
|
356 | +} |
|
357 | +?></output> |
|
216 | 358 | </div> |
217 | 359 | </li> |
218 | 360 | <?php |
219 | 361 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
220 | 362 | ?> |
221 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
222 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
223 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
363 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
364 | + print 'checked'; |
|
365 | +} |
|
366 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
367 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
368 | + print 'checked'; |
|
369 | +} |
|
370 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
371 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
372 | + print 'checked'; |
|
373 | +} |
|
374 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
224 | 375 | <?php |
225 | 376 | } |
226 | 377 | ?> |
@@ -228,10 +379,16 @@ discard block |
||
228 | 379 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
229 | 380 | ?> |
230 | 381 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
231 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
382 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
383 | + print 'checked'; |
|
384 | +} |
|
385 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
232 | 386 | <?php } ?> |
233 | 387 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
234 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
388 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
389 | + print 'checked'; |
|
390 | +} |
|
391 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
235 | 392 | <?php } ?> |
236 | 393 | <?php |
237 | 394 | } |
@@ -242,7 +399,9 @@ discard block |
||
242 | 399 | $Spotter = new Spotter(); |
243 | 400 | foreach($Spotter->getAllAirlineNames() as $airline) { |
244 | 401 | $airline_name = $airline['airline_name']; |
245 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
402 | + if (strlen($airline_name) > 30) { |
|
403 | + $airline_name = substr($airline_name,0,30).'...'; |
|
404 | + } |
|
246 | 405 | if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
247 | 406 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
248 | 407 | } else { |
@@ -277,10 +436,22 @@ discard block |
||
277 | 436 | ?> |
278 | 437 | <li><?php echo _("Display airlines of type:"); ?> |
279 | 438 | <select class="selectpicker" onchange="airlinestype(this);"> |
280 | - <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
281 | - <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
282 | - <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
283 | - <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
439 | + <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') { |
|
440 | + echo ' selected'; |
|
441 | +} |
|
442 | +?>><?php echo _("All"); ?></option> |
|
443 | + <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') { |
|
444 | + echo ' selected'; |
|
445 | +} |
|
446 | +?>><?php echo _("Passenger"); ?></option> |
|
447 | + <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') { |
|
448 | + echo ' selected'; |
|
449 | +} |
|
450 | +?>><?php echo _("Cargo"); ?></option> |
|
451 | + <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') { |
|
452 | + echo ' selected'; |
|
453 | +} |
|
454 | +?>><?php echo _("Military"); ?></option> |
|
284 | 455 | </select> |
285 | 456 | </li> |
286 | 457 | <?php |
@@ -288,22 +459,46 @@ discard block |
||
288 | 459 | ?> |
289 | 460 | <li><?php echo _("Distance unit:"); ?> |
290 | 461 | <select class="selectpicker" onchange="unitdistance(this);"> |
291 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
292 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
293 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
462 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
463 | + echo ' selected'; |
|
464 | +} |
|
465 | +?>>km</option> |
|
466 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
467 | + echo ' selected'; |
|
468 | +} |
|
469 | +?>>nm</option> |
|
470 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
471 | + echo ' selected'; |
|
472 | +} |
|
473 | +?>>mi</option> |
|
294 | 474 | </select> |
295 | 475 | </li> |
296 | 476 | <li><?php echo _("Altitude unit:"); ?> |
297 | 477 | <select class="selectpicker" onchange="unitaltitude(this);"> |
298 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
299 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
478 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
479 | + echo ' selected'; |
|
480 | +} |
|
481 | +?>>m</option> |
|
482 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
483 | + echo ' selected'; |
|
484 | +} |
|
485 | +?>>feet</option> |
|
300 | 486 | </select> |
301 | 487 | </li> |
302 | 488 | <li><?php echo _("Speed unit:"); ?> |
303 | 489 | <select class="selectpicker" onchange="unitspeed(this);"> |
304 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
305 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
306 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
490 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
491 | + echo ' selected'; |
|
492 | +} |
|
493 | +?>>km/h</option> |
|
494 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
495 | + echo ' selected'; |
|
496 | +} |
|
497 | +?>>mph</option> |
|
498 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
499 | + echo ' selected'; |
|
500 | +} |
|
501 | +?>>knots</option> |
|
307 | 502 | </select> |
308 | 503 | </li> |
309 | 504 | </ul> |
@@ -7,14 +7,14 @@ 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 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
13 | 13 | |
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports from %s"),$country); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports from %s"), $country); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
23 | 23 | print '<option></option>'; |
24 | 24 | $all_countries = $Spotter->getAllCountries(); |
25 | - foreach($all_countries as $all_country) |
|
25 | + foreach ($all_countries as $all_country) |
|
26 | 26 | { |
27 | - if($country == $all_country['country']) |
|
27 | + if ($country == $all_country['country']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
30 | 30 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if ($_GET['country'] != "NA") |
40 | 40 | { |
41 | 41 | print '<div class="info column">'; |
42 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
42 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
43 | 43 | print '</div>'; |
44 | 44 | } else { |
45 | 45 | 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>'; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | include('country-sub-menu.php'); |
49 | 49 | print '<div class="column">'; |
50 | 50 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
51 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
51 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
52 | 52 | $airport_airport_array = $Spotter->countAllArrivalAirportsByCountry($country); |
53 | 53 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
54 | 54 | <script> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ["'._("Airport").'", "'._("# of times").'"],'; |
64 | 64 | |
65 | 65 | $airport_data = ''; |
66 | - foreach($airport_airport_array as $airport_item) |
|
66 | + foreach ($airport_airport_array as $airport_item) |
|
67 | 67 | { |
68 | 68 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
69 | 69 | $name = str_replace("'", "", $name); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | print '</thead>'; |
102 | 102 | print '<tbody>'; |
103 | 103 | $i = 1; |
104 | - foreach($airport_airport_array as $airport_item) |
|
104 | + foreach ($airport_airport_array as $airport_item) |
|
105 | 105 | { |
106 | 106 | print '<tr>'; |
107 | 107 | 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,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$country = filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING); |
|
8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$country = filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING); |
|
8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
11 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
12 | 12 | else $spotter_array = array(); |
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
16 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -24,13 +24,13 @@ discard block |
||
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | print '<div class="info column">'; |
27 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
27 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
28 | 28 | print '</div>'; |
29 | 29 | |
30 | 30 | include('date-sub-menu.php'); |
31 | 31 | print '<div class="column">'; |
32 | 32 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
33 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
33 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
34 | 34 | |
35 | 35 | $airline_array = $Spotter->countAllAirlineCountriesByDate($date); |
36 | 36 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | var data = google.visualization.arrayToDataTable([ |
43 | 43 | ["'._("Country").'", "'._("# of times").'"], '; |
44 | 44 | $country_data = ''; |
45 | - foreach($airline_array as $airline_item) |
|
45 | + foreach ($airline_array as $airline_item) |
|
46 | 46 | { |
47 | 47 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
48 | 48 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | print '</thead>'; |
77 | 77 | print '<tbody>'; |
78 | 78 | $i = 1; |
79 | - foreach($airline_array as $airline_item) |
|
79 | + foreach ($airline_array as $airline_item) |
|
80 | 80 | { |
81 | 81 | print '<tr>'; |
82 | 82 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,8 +8,11 @@ |
||
8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
12 | -else $spotter_array = array(); |
|
11 | +if (isset($_GET['date'])) { |
|
12 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
13 | +} else { |
|
14 | + $spotter_array = array(); |
|
15 | +} |
|
13 | 16 | |
14 | 17 | if (!empty($spotter_array)) |
15 | 18 | { |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
6 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | 8 | if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
9 | 9 | else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | |
18 | 18 | print '<div class="info column">'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
28 | 28 | |
29 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
29 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
30 | 30 | $airport_airport_array = $Spotter->countAllDepartureAirportsByRegistration($registration); |
31 | 31 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
32 | 32 | <script> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | var data = google.visualization.arrayToDataTable([ |
41 | 41 | ["'._("Airport").'", "'._("# of times").'"],'; |
42 | 42 | $airport_data = ''; |
43 | - foreach($airport_airport_array as $airport_item) |
|
43 | + foreach ($airport_airport_array as $airport_item) |
|
44 | 44 | { |
45 | 45 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
46 | 46 | $name = str_replace("'", "", $name); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($airport_airport_array as $airport_item) |
|
81 | + foreach ($airport_airport_array as $airport_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,8 +5,11 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
8 | -if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
9 | -else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
8 | +if (isset($_GET['sort'])) { |
|
9 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
10 | +} else { |
|
11 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
12 | +} |
|
10 | 13 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | 14 | |
12 | 15 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | print '</thead>'; |
28 | 28 | print '<tbody>'; |
29 | 29 | $i = 1; |
30 | - foreach($route_array as $route_item) |
|
30 | + foreach ($route_array as $route_item) |
|
31 | 31 | { |
32 | 32 | print '<tr>'; |
33 | 33 | print '<td><strong>'.$i.'</strong></td>'; |