@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
3 | -if ($date == '') $date = date('Y-m-d'); |
|
3 | +if ($date == '') { |
|
4 | + $date = date('Y-m-d'); |
|
5 | +} |
|
4 | 6 | header('Location: '.$globalURL.'/incident/'.$date); |
5 | 7 | ?> |
6 | 8 | \ No newline at end of file |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
23 | 23 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
24 | 24 | $airline_icao = filter_var($airline_icao,FILTER_SANITIZE_STRING); |
25 | - if ($registration == '' && $aircraft_icao != '') $registration = $aircraft_icao.$airline_icao; |
|
25 | + if ($registration == '' && $aircraft_icao != '') { |
|
26 | + $registration = $aircraft_icao.$airline_icao; |
|
27 | + } |
|
26 | 28 | $registration = trim($registration); |
27 | 29 | $query = "SELECT spotter_image.image, spotter_image.image_thumbnail, spotter_image.image_source, spotter_image.image_source_website,spotter_image.image_copyright, spotter_image.registration |
28 | 30 | FROM spotter_image |
@@ -60,8 +62,11 @@ discard block |
||
60 | 62 | public function getExifCopyright($url) { |
61 | 63 | $exif = exif_read_data($url); |
62 | 64 | $copyright = ''; |
63 | - if (isset($exif['COMPUTED']['copyright'])) $copyright = $exif['COMPUTED']['copyright']; |
|
64 | - elseif (isset($exif['copyright'])) $copyright = $exif['copyright']; |
|
65 | + if (isset($exif['COMPUTED']['copyright'])) { |
|
66 | + $copyright = $exif['COMPUTED']['copyright']; |
|
67 | + } elseif (isset($exif['copyright'])) { |
|
68 | + $copyright = $exif['copyright']; |
|
69 | + } |
|
65 | 70 | if ($copyright != '') { |
66 | 71 | $copyright = str_replace('Copyright ','',$copyright); |
67 | 72 | $copyright = str_replace('© ','',$copyright); |
@@ -79,18 +84,29 @@ discard block |
||
79 | 84 | public function addSpotterImage($registration,$aircraft_icao = '', $airline_icao = '') |
80 | 85 | { |
81 | 86 | global $globalDebug,$globalAircraftImageFetch; |
82 | - if (isset($globalAircraftImageFetch) && !$globalAircraftImageFetch) return ''; |
|
87 | + if (isset($globalAircraftImageFetch) && !$globalAircraftImageFetch) { |
|
88 | + return ''; |
|
89 | + } |
|
83 | 90 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
84 | 91 | $registration = trim($registration); |
85 | 92 | //getting the aircraft image |
86 | - if ($globalDebug && $registration != '') echo 'Try to find an aircraft image for '.$registration.'...'; |
|
87 | - elseif ($globalDebug && $aircraft_icao != '') echo 'Try to find an aircraft image for '.$aircraft_icao.'...'; |
|
88 | - elseif ($globalDebug && $airline_icao != '') echo 'Try to find an aircraft image for '.$airline_icao.'...'; |
|
89 | - else return "success"; |
|
93 | + if ($globalDebug && $registration != '') { |
|
94 | + echo 'Try to find an aircraft image for '.$registration.'...'; |
|
95 | + } elseif ($globalDebug && $aircraft_icao != '') { |
|
96 | + echo 'Try to find an aircraft image for '.$aircraft_icao.'...'; |
|
97 | + } elseif ($globalDebug && $airline_icao != '') { |
|
98 | + echo 'Try to find an aircraft image for '.$airline_icao.'...'; |
|
99 | + } else { |
|
100 | + return "success"; |
|
101 | + } |
|
90 | 102 | $image_url = $this->findAircraftImage($registration,$aircraft_icao,$airline_icao); |
91 | - if ($registration == '' && $aircraft_icao != '') $registration = $aircraft_icao.$airline_icao; |
|
103 | + if ($registration == '' && $aircraft_icao != '') { |
|
104 | + $registration = $aircraft_icao.$airline_icao; |
|
105 | + } |
|
92 | 106 | if ($image_url['original'] != '') { |
93 | - if ($globalDebug) echo 'Found !'."\n"; |
|
107 | + if ($globalDebug) { |
|
108 | + echo 'Found !'."\n"; |
|
109 | + } |
|
94 | 110 | $query = "INSERT INTO spotter_image (registration, image, image_thumbnail, image_copyright, image_source,image_source_website) VALUES (:registration,:image,:image_thumbnail,:copyright,:source,:source_website)"; |
95 | 111 | try { |
96 | 112 | $sth = $this->db->prepare($query); |
@@ -99,7 +115,9 @@ discard block |
||
99 | 115 | echo $e->getMessage()."\n"; |
100 | 116 | return "error"; |
101 | 117 | } |
102 | - } elseif ($globalDebug) echo "Not found :'(\n"; |
|
118 | + } elseif ($globalDebug) { |
|
119 | + echo "Not found :'(\n"; |
|
120 | + } |
|
103 | 121 | return "success"; |
104 | 122 | } |
105 | 123 | |
@@ -114,36 +132,75 @@ discard block |
||
114 | 132 | { |
115 | 133 | global $globalAircraftImageSources, $globalIVAO; |
116 | 134 | $Spotter = new Spotter($this->db); |
117 | - if (!isset($globalIVAO)) $globalIVAO = FALSE; |
|
135 | + if (!isset($globalIVAO)) { |
|
136 | + $globalIVAO = FALSE; |
|
137 | + } |
|
118 | 138 | $aircraft_registration = filter_var($aircraft_registration,FILTER_SANITIZE_STRING); |
119 | 139 | if ($aircraft_registration != '') { |
120 | - if (strpos($aircraft_registration,'/') !== false) return array('thumbnail' => '','original' => '', 'copyright' => '','source' => '','source_website' => ''); |
|
140 | + if (strpos($aircraft_registration,'/') !== false) { |
|
141 | + return array('thumbnail' => '','original' => '', 'copyright' => '','source' => '','source_website' => ''); |
|
142 | + } |
|
121 | 143 | $aircraft_registration = urlencode(trim($aircraft_registration)); |
122 | 144 | $aircraft_info = $Spotter->getAircraftInfoByRegistration($aircraft_registration); |
123 | - if (isset($aircraft_info[0]['aircraft_name'])) $aircraft_name = $aircraft_info[0]['aircraft_name']; |
|
124 | - else $aircraft_name = ''; |
|
125 | - if (isset($aircraft_info[0]['aircraft_icao'])) $aircraft_name = $aircraft_info[0]['aircraft_icao']; |
|
126 | - else $aircraft_icao = ''; |
|
127 | - if (isset($aircraft_info[0]['airline_icao'])) $airline_icao = $aircraft_info[0]['airline_icao']; |
|
128 | - else $airline_icao = ''; |
|
145 | + if (isset($aircraft_info[0]['aircraft_name'])) { |
|
146 | + $aircraft_name = $aircraft_info[0]['aircraft_name']; |
|
147 | + } else { |
|
148 | + $aircraft_name = ''; |
|
149 | + } |
|
150 | + if (isset($aircraft_info[0]['aircraft_icao'])) { |
|
151 | + $aircraft_name = $aircraft_info[0]['aircraft_icao']; |
|
152 | + } else { |
|
153 | + $aircraft_icao = ''; |
|
154 | + } |
|
155 | + if (isset($aircraft_info[0]['airline_icao'])) { |
|
156 | + $airline_icao = $aircraft_info[0]['airline_icao']; |
|
157 | + } else { |
|
158 | + $airline_icao = ''; |
|
159 | + } |
|
129 | 160 | } elseif ($aircraft_icao != '') { |
130 | 161 | $aircraft_registration = $aircraft_icao; |
131 | 162 | $aircraft_name = ''; |
132 | - } else return array('thumbnail' => '','original' => '', 'copyright' => '', 'source' => '','source_website' => ''); |
|
133 | - if (!isset($globalAircraftImageSources)) $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
163 | + } else { |
|
164 | + return array('thumbnail' => '','original' => '', 'copyright' => '', 'source' => '','source_website' => ''); |
|
165 | + } |
|
166 | + if (!isset($globalAircraftImageSources)) { |
|
167 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
168 | + } |
|
134 | 169 | foreach ($globalAircraftImageSources as $source) { |
135 | 170 | $source = strtolower($source); |
136 | - if ($source == 'ivaomtl' && $globalIVAO && $aircraft_icao != '' && $airline_icao != '') $images_array = $this->fromIvaoMtl($aircraft_icao,$airline_icao); |
|
137 | - if ($source == 'planespotters' && !$globalIVAO) $images_array = $this->fromPlanespotters($aircraft_registration,$aircraft_name); |
|
138 | - if ($source == 'flickr') $images_array = $this->fromFlickr($aircraft_registration,$aircraft_name); |
|
139 | - if ($source == 'bing') $images_array = $this->fromBing($aircraft_registration,$aircraft_name); |
|
140 | - if ($source == 'deviantart') $images_array = $this->fromDeviantart($aircraft_registration,$aircraft_name); |
|
141 | - if ($source == 'wikimedia') $images_array = $this->fromWikimedia($aircraft_registration,$aircraft_name); |
|
142 | - if ($source == 'jetphotos' && !$globalIVAO) $images_array = $this->fromJetPhotos($aircraft_registration,$aircraft_name); |
|
143 | - if ($source == 'planepictures' && !$globalIVAO) $images_array = $this->fromPlanePictures($aircraft_registration,$aircraft_name); |
|
144 | - if ($source == 'airportdata' && !$globalIVAO) $images_array = $this->fromAirportData($aircraft_registration,$aircraft_name); |
|
145 | - if ($source == 'customsources') $images_array = $this->fromCustomSource($aircraft_registration,$aircraft_name); |
|
146 | - if (isset($images_array) && $images_array['original'] != '') return $images_array; |
|
171 | + if ($source == 'ivaomtl' && $globalIVAO && $aircraft_icao != '' && $airline_icao != '') { |
|
172 | + $images_array = $this->fromIvaoMtl($aircraft_icao,$airline_icao); |
|
173 | + } |
|
174 | + if ($source == 'planespotters' && !$globalIVAO) { |
|
175 | + $images_array = $this->fromPlanespotters($aircraft_registration,$aircraft_name); |
|
176 | + } |
|
177 | + if ($source == 'flickr') { |
|
178 | + $images_array = $this->fromFlickr($aircraft_registration,$aircraft_name); |
|
179 | + } |
|
180 | + if ($source == 'bing') { |
|
181 | + $images_array = $this->fromBing($aircraft_registration,$aircraft_name); |
|
182 | + } |
|
183 | + if ($source == 'deviantart') { |
|
184 | + $images_array = $this->fromDeviantart($aircraft_registration,$aircraft_name); |
|
185 | + } |
|
186 | + if ($source == 'wikimedia') { |
|
187 | + $images_array = $this->fromWikimedia($aircraft_registration,$aircraft_name); |
|
188 | + } |
|
189 | + if ($source == 'jetphotos' && !$globalIVAO) { |
|
190 | + $images_array = $this->fromJetPhotos($aircraft_registration,$aircraft_name); |
|
191 | + } |
|
192 | + if ($source == 'planepictures' && !$globalIVAO) { |
|
193 | + $images_array = $this->fromPlanePictures($aircraft_registration,$aircraft_name); |
|
194 | + } |
|
195 | + if ($source == 'airportdata' && !$globalIVAO) { |
|
196 | + $images_array = $this->fromAirportData($aircraft_registration,$aircraft_name); |
|
197 | + } |
|
198 | + if ($source == 'customsources') { |
|
199 | + $images_array = $this->fromCustomSource($aircraft_registration,$aircraft_name); |
|
200 | + } |
|
201 | + if (isset($images_array) && $images_array['original'] != '') { |
|
202 | + return $images_array; |
|
203 | + } |
|
147 | 204 | } |
148 | 205 | return array('thumbnail' => '','original' => '', 'copyright' => '','source' => '','source_website' => ''); |
149 | 206 | } |
@@ -301,8 +358,11 @@ discard block |
||
301 | 358 | */ |
302 | 359 | public function fromFlickr($aircraft_registration,$aircraft_name='') { |
303 | 360 | $Common = new Common(); |
304 | - if ($aircraft_name != '') $url = 'https://api.flickr.com/services/feeds/photos_public.gne?format=rss2&license=1,2,3,4,5,6,7&per_page=1&tags='.$aircraft_registration.','.urlencode($aircraft_name); |
|
305 | - else $url = 'https://api.flickr.com/services/feeds/photos_public.gne?format=rss2&license=1,2,3,4,5,6,7&per_page=1&tags='.$aircraft_registration.',aircraft'; |
|
361 | + if ($aircraft_name != '') { |
|
362 | + $url = 'https://api.flickr.com/services/feeds/photos_public.gne?format=rss2&license=1,2,3,4,5,6,7&per_page=1&tags='.$aircraft_registration.','.urlencode($aircraft_name); |
|
363 | + } else { |
|
364 | + $url = 'https://api.flickr.com/services/feeds/photos_public.gne?format=rss2&license=1,2,3,4,5,6,7&per_page=1&tags='.$aircraft_registration.',aircraft'; |
|
365 | + } |
|
306 | 366 | $data = $Common->getData($url); |
307 | 367 | if ($xml = simplexml_load_string($data)) { |
308 | 368 | if (isset($xml->channel->item)) { |
@@ -346,9 +406,14 @@ discard block |
||
346 | 406 | public function fromBing($aircraft_registration,$aircraft_name='') { |
347 | 407 | global $globalImageBingKey; |
348 | 408 | $Common = new Common(); |
349 | - if (!isset($globalImageBingKey) || $globalImageBingKey == '') return false; |
|
350 | - if ($aircraft_name != '') $url = 'https://api.datamarket.azure.com/Bing/Search/v1/Image?$format=json&$top=1&Query=%27'.$aircraft_registration.'%20'.urlencode($aircraft_name).'%20-site:planespotters.com%20-site:flickr.com%27'; |
|
351 | - else $url = 'https://api.datamarket.azure.com/Bing/Search/v1/Image?$format=json&$top=1&Query=%27%2B'.$aircraft_registration.'%20%2Baircraft%20-site:planespotters.com%20-site:flickr.com%27'; |
|
409 | + if (!isset($globalImageBingKey) || $globalImageBingKey == '') { |
|
410 | + return false; |
|
411 | + } |
|
412 | + if ($aircraft_name != '') { |
|
413 | + $url = 'https://api.datamarket.azure.com/Bing/Search/v1/Image?$format=json&$top=1&Query=%27'.$aircraft_registration.'%20'.urlencode($aircraft_name).'%20-site:planespotters.com%20-site:flickr.com%27'; |
|
414 | + } else { |
|
415 | + $url = 'https://api.datamarket.azure.com/Bing/Search/v1/Image?$format=json&$top=1&Query=%27%2B'.$aircraft_registration.'%20%2Baircraft%20-site:planespotters.com%20-site:flickr.com%27'; |
|
416 | + } |
|
352 | 417 | $headers = array("Authorization: Basic " . base64_encode("ignored:".$globalImageBingKey)); |
353 | 418 | $data = $Common->getData($url,'get','',$headers); |
354 | 419 | $result = json_decode($data); |
@@ -402,13 +467,18 @@ discard block |
||
402 | 467 | */ |
403 | 468 | public function fromWikimedia($aircraft_registration,$aircraft_name='') { |
404 | 469 | $Common = new Common(); |
405 | - if ($aircraft_name != '') $url = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srlimit=1&srnamespace=6&continue&srsearch="'.$aircraft_registration.'"%20'.urlencode($aircraft_name); |
|
406 | - else $url = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srlimit=1&srnamespace=6&continue&srsearch="'.$aircraft_registration.'"%20aircraft'; |
|
470 | + if ($aircraft_name != '') { |
|
471 | + $url = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srlimit=1&srnamespace=6&continue&srsearch="'.$aircraft_registration.'"%20'.urlencode($aircraft_name); |
|
472 | + } else { |
|
473 | + $url = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srlimit=1&srnamespace=6&continue&srsearch="'.$aircraft_registration.'"%20aircraft'; |
|
474 | + } |
|
407 | 475 | $data = $Common->getData($url); |
408 | 476 | $result = json_decode($data); |
409 | 477 | if (isset($result->query->search[0]->title)) { |
410 | 478 | $fileo = $result->query->search[0]->title; |
411 | - if (substr($fileo,-3) == 'pdf') return false; |
|
479 | + if (substr($fileo,-3) == 'pdf') { |
|
480 | + return false; |
|
481 | + } |
|
412 | 482 | $file = urlencode($fileo); |
413 | 483 | $url2 = 'https://commons.wikimedia.org/w/api.php?action=query&format=json&continue&iilimit=500&prop=imageinfo&iiprop=user|url|size|mime|sha1|timestamp&iiurlwidth=200%27&titles='.$file; |
414 | 484 | $data2 = $Common->getData($url2); |
@@ -478,17 +548,25 @@ discard block |
||
478 | 548 | $image_url = array(); |
479 | 549 | $image_url['thumbnail'] = $url_thumbnail; |
480 | 550 | $image_url['original'] = $url; |
481 | - if ($source['exif'] && exif_imagetype($url) == IMAGETYPE_JPEG) $exifCopyright = $this->getExifCopyright($url); |
|
482 | - else $exifCopyright = ''; |
|
483 | - if ($exifCopyright != '') $image_url['copyright'] = $exifCopyright; |
|
484 | - else $image_url['copyright'] = $source['copyright']; |
|
551 | + if ($source['exif'] && exif_imagetype($url) == IMAGETYPE_JPEG) { |
|
552 | + $exifCopyright = $this->getExifCopyright($url); |
|
553 | + } else { |
|
554 | + $exifCopyright = ''; |
|
555 | + } |
|
556 | + if ($exifCopyright != '') { |
|
557 | + $image_url['copyright'] = $exifCopyright; |
|
558 | + } else { |
|
559 | + $image_url['copyright'] = $source['copyright']; |
|
560 | + } |
|
485 | 561 | $image_url['source_website'] = $source['source_website']; |
486 | 562 | $image_url['source'] = $source['source']; |
487 | 563 | return $image_url; |
488 | 564 | } |
489 | 565 | } |
490 | 566 | return false; |
491 | - } else return false; |
|
567 | + } else { |
|
568 | + return false; |
|
569 | + } |
|
492 | 570 | } |
493 | 571 | } |
494 | 572 |
@@ -5,8 +5,11 @@ discard block |
||
5 | 5 | setcookie("MapFormat",'2d'); |
6 | 6 | |
7 | 7 | // Compressed GeoJson is used if true |
8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
9 | -else $compress = $globalJsonCompress; |
|
8 | +if (!isset($globalJsonCompress)) { |
|
9 | + $compress = true; |
|
10 | +} else { |
|
11 | + $compress = $globalJsonCompress; |
|
12 | +} |
|
10 | 13 | if (isset($_GET['archive'])) { |
11 | 14 | //$archiveupdatetime = 50; |
12 | 15 | $archiveupdatetime = $globalMapRefresh; |
@@ -16,8 +19,11 @@ discard block |
||
16 | 19 | //$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10)); |
17 | 20 | //$lastupd = 20; |
18 | 21 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
19 | - if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
|
20 | - else $enddate = time(); |
|
22 | + if (isset($_GET['enddate']) && $_GET['enddate'] != '') { |
|
23 | + $enddate = $_GET['enddate']; |
|
24 | + } else { |
|
25 | + $enddate = time(); |
|
26 | + } |
|
21 | 27 | setcookie("archive_begin",$begindate); |
22 | 28 | setcookie("archive_end",$enddate); |
23 | 29 | setcookie("archive_update",$lastupd); |
@@ -123,7 +129,17 @@ discard block |
||
123 | 129 | } |
124 | 130 | |
125 | 131 | //create the map |
126 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
132 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
133 | + print $latitude; |
|
134 | +} else { |
|
135 | + print $globalCenterLatitude; |
|
136 | +} |
|
137 | +?>,<?php if (isset($longitude)) { |
|
138 | + print $longitude; |
|
139 | +} else { |
|
140 | + print $globalCenterLongitude; |
|
141 | +} |
|
142 | +?>], zoom); |
|
127 | 143 | <?php |
128 | 144 | } else { |
129 | 145 | ?> |
@@ -136,9 +152,19 @@ discard block |
||
136 | 152 | || navigator.userAgent.match(/BlackBerry/i) |
137 | 153 | || navigator.userAgent.match(/Windows Phone/i)) |
138 | 154 | { |
139 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
155 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
156 | + print $globalLiveZoom-1; |
|
157 | +} else { |
|
158 | + print '8'; |
|
159 | +} |
|
160 | +?>; |
|
140 | 161 | } else { |
141 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
|
162 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
163 | + print $globalLiveZoom; |
|
164 | +} else { |
|
165 | + print '9'; |
|
166 | +} |
|
167 | +?>; |
|
142 | 168 | } |
143 | 169 | |
144 | 170 | //create the map |
@@ -163,16 +189,27 @@ discard block |
||
163 | 189 | bounds = L.latLngBounds(southWest,northEast); |
164 | 190 | //a few title layers |
165 | 191 | <?php |
166 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
167 | - else $MapType = $globalMapProvider; |
|
192 | + if (isset($_COOKIE['MapType'])) { |
|
193 | + $MapType = $_COOKIE['MapType']; |
|
194 | + } else { |
|
195 | + $MapType = $globalMapProvider; |
|
196 | + } |
|
168 | 197 | |
169 | 198 | if ($MapType == 'Mapbox') { |
170 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
171 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
172 | -?> |
|
199 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
200 | + $MapBoxId = $globalMapboxId; |
|
201 | + } else { |
|
202 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
203 | + } |
|
204 | + ?> |
|
173 | 205 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
174 | 206 | maxZoom: 18, |
175 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
207 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
208 | + print 'false'; |
|
209 | +} else { |
|
210 | + print 'true'; |
|
211 | +} |
|
212 | +?>, |
|
176 | 213 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
177 | 214 | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + |
178 | 215 | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', |
@@ -184,7 +221,12 @@ discard block |
||
184 | 221 | ?> |
185 | 222 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
186 | 223 | maxZoom: 18, |
187 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
224 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
225 | + print 'false'; |
|
226 | +} else { |
|
227 | + print 'true'; |
|
228 | +} |
|
229 | +?>, |
|
188 | 230 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
189 | 231 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
190 | 232 | }).addTo(map); |
@@ -230,20 +272,26 @@ discard block |
||
230 | 272 | map.addLayer(yandexLayer); |
231 | 273 | <?php |
232 | 274 | } elseif ($MapType == 'Bing-Aerial') { |
233 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
234 | -?> |
|
275 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
276 | + setcookie('MapType','OpenStreetMap'); |
|
277 | + } |
|
278 | + ?> |
|
235 | 279 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
236 | 280 | map.addLayer(bingLayer); |
237 | 281 | <?php |
238 | 282 | } elseif ($MapType == 'Bing-Hybrid') { |
239 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
240 | -?> |
|
283 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
284 | + setcookie('MapType','OpenStreetMap'); |
|
285 | + } |
|
286 | + ?> |
|
241 | 287 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
242 | 288 | map.addLayer(bingLayer); |
243 | 289 | <?php |
244 | 290 | } elseif ($MapType == 'Bing-Road') { |
245 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
246 | -?> |
|
291 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
292 | + setcookie('MapType','OpenStreetMap'); |
|
293 | + } |
|
294 | + ?> |
|
247 | 295 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
248 | 296 | map.addLayer(bingLayer); |
249 | 297 | <?php |
@@ -291,7 +339,12 @@ discard block |
||
291 | 339 | } |
292 | 340 | } elseif ($globalBounding == 'circle') { |
293 | 341 | ?> |
294 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
342 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
343 | + print $globalBoundingCircleSize; |
|
344 | +} else { |
|
345 | + print '70000'; |
|
346 | +} |
|
347 | +?>,{ |
|
295 | 348 | color: '#92C7D1', |
296 | 349 | fillColor: '#92C7D1', |
297 | 350 | fillOpacity: 0.3, |
@@ -350,8 +403,11 @@ discard block |
||
350 | 403 | |
351 | 404 | function update_airportsLayer() { |
352 | 405 | <?php |
353 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
354 | - else $getZoom = '7'; |
|
406 | + if (isset($_COOKIE['AirportZoom'])) { |
|
407 | + $getZoom = $_COOKIE['AirportZoom']; |
|
408 | + } else { |
|
409 | + $getZoom = '7'; |
|
410 | + } |
|
355 | 411 | ?> |
356 | 412 | //if (map.getZoom() <= <?php print $getZoom; ?>) { |
357 | 413 | if (typeof airportsLayer != 'undefined') { |
@@ -687,9 +743,13 @@ discard block |
||
687 | 743 | if (callsign != ""){ markerLabel += callsign; } |
688 | 744 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
689 | 745 | <?php |
690 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
691 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
692 | - else $IconColor = '1a3151'; |
|
746 | + if (isset($_COOKIE['IconColor'])) { |
|
747 | + $IconColor = $_COOKIE['IconColor']; |
|
748 | + } elseif (isset($globalAircraftIconColor)) { |
|
749 | + $IconColor = $globalAircraftIconColor; |
|
750 | + } else { |
|
751 | + $IconColor = '1a3151'; |
|
752 | + } |
|
693 | 753 | if (!isset($ident) && !isset($flightaware_id)) { |
694 | 754 | ?> |
695 | 755 | info_update(feature.properties.fc); |
@@ -737,7 +797,12 @@ discard block |
||
737 | 797 | <?php |
738 | 798 | } else { |
739 | 799 | ?> |
740 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
800 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
801 | + print $archiveupdatetime*1000; |
|
802 | +} else { |
|
803 | + print $globalMapRefresh*1000+20000; |
|
804 | +} |
|
805 | +?>+feature.properties.sqt*1000); |
|
741 | 806 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
742 | 807 | <?php |
743 | 808 | } |
@@ -786,7 +851,12 @@ discard block |
||
786 | 851 | <?php |
787 | 852 | } else { |
788 | 853 | ?> |
789 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
854 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
855 | + print $archiveupdatetime*1000; |
|
856 | +} else { |
|
857 | + print $globalMapRefresh*1000+20000; |
|
858 | +} |
|
859 | +?>+feature.properties.sqt*1000); |
|
790 | 860 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
791 | 861 | <?php |
792 | 862 | } |
@@ -834,7 +904,12 @@ discard block |
||
834 | 904 | <?php |
835 | 905 | } else { |
836 | 906 | ?> |
837 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
907 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
908 | + print $archiveupdatetime*1000; |
|
909 | +} else { |
|
910 | + print $globalMapRefresh*1000+20000; |
|
911 | +} |
|
912 | +?>+feature.properties.sqt*1000); |
|
838 | 913 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
839 | 914 | <?php |
840 | 915 | } |
@@ -1177,14 +1252,24 @@ discard block |
||
1177 | 1252 | if (isset($_GET['archive'])) { |
1178 | 1253 | ?> |
1179 | 1254 | //then load it again every 30 seconds |
1180 | -// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
1255 | +// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
1256 | + print ($globalMapRefresh*1000)/2; |
|
1257 | +} else { |
|
1258 | + print '15000'; |
|
1259 | +} |
|
1260 | +?>); |
|
1181 | 1261 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
1182 | 1262 | <?php |
1183 | 1263 | } else { |
1184 | 1264 | ?> |
1185 | 1265 | //then load it again every 30 seconds |
1186 | 1266 | reloadPage = setInterval( |
1187 | - function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
1267 | + function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
1268 | + print $globalMapRefresh*1000; |
|
1269 | +} else { |
|
1270 | + print '30000'; |
|
1271 | +} |
|
1272 | +?>); |
|
1188 | 1273 | var currentdate = new Date(); |
1189 | 1274 | var currentyear = new Date().getFullYear(); |
1190 | 1275 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -1196,7 +1281,12 @@ discard block |
||
1196 | 1281 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
1197 | 1282 | ?> |
1198 | 1283 | update_polarLayer(); |
1199 | -setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1284 | +setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
1285 | + print $globalMapRefresh*1000*2; |
|
1286 | +} else { |
|
1287 | + print '60000'; |
|
1288 | +} |
|
1289 | +?>); |
|
1200 | 1290 | <?php |
1201 | 1291 | } |
1202 | 1292 | ?> |
@@ -1212,7 +1302,12 @@ discard block |
||
1212 | 1302 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
1213 | 1303 | ?> |
1214 | 1304 | update_atcLayer(); |
1215 | -setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1305 | +setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
1306 | + print $globalMapRefresh*1000*2; |
|
1307 | +} else { |
|
1308 | + print '60000'; |
|
1309 | +} |
|
1310 | +?>); |
|
1216 | 1311 | <?php |
1217 | 1312 | } |
1218 | 1313 | ?> |
@@ -135,11 +135,26 @@ discard block |
||
135 | 135 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
136 | 136 | <li><?php echo _("NOTAM scope:"); ?> |
137 | 137 | <select class="selectpicker" onchange="notamscope(this);"> |
138 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
139 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
140 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
141 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
142 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
138 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
139 | + print ' selected'; |
|
140 | +} |
|
141 | +?>>All</option> |
|
142 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
143 | + print ' selected'; |
|
144 | +} |
|
145 | +?>>Airport/Enroute warning</option> |
|
146 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
147 | + print ' selected'; |
|
148 | +} |
|
149 | +?>>Airport warning</option> |
|
150 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
151 | + print ' selected'; |
|
152 | +} |
|
153 | +?>>Navigation warning</option> |
|
154 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
155 | + print ' selected'; |
|
156 | +} |
|
157 | +?>>Enroute warning</option> |
|
143 | 158 | </select |
144 | 159 | </li> |
145 | 160 | </ul> |
@@ -167,7 +182,12 @@ discard block |
||
167 | 182 | <div class="form-group"> |
168 | 183 | <label>From (UTC):</label> |
169 | 184 | <div class='input-group date' id='datetimepicker1'> |
170 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
185 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
186 | + print $_POST['start_date']; |
|
187 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
188 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
189 | +} |
|
190 | +?>" required /> |
|
171 | 191 | <span class="input-group-addon"> |
172 | 192 | <span class="glyphicon glyphicon-calendar"></span> |
173 | 193 | </span> |
@@ -176,7 +196,12 @@ discard block |
||
176 | 196 | <div class="form-group"> |
177 | 197 | <label>To (UTC):</label> |
178 | 198 | <div class='input-group date' id='datetimepicker2'> |
179 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
199 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
200 | + print $_POST['end_date']; |
|
201 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
202 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
203 | +} |
|
204 | +?>" /> |
|
180 | 205 | <span class="input-group-addon"> |
181 | 206 | <span class="glyphicon glyphicon-calendar"></span> |
182 | 207 | </span> |
@@ -202,8 +227,20 @@ discard block |
||
202 | 227 | |
203 | 228 | <li><?php echo _("Playback speed:"); ?> |
204 | 229 | <div class="range"> |
205 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
206 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
230 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
231 | + print $_POST['archivespeed']; |
|
232 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
233 | + print $_COOKIE['archive_speed']; |
|
234 | +} else { |
|
235 | + print '1'; |
|
236 | +} |
|
237 | +?>"> |
|
238 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
239 | + print $_COOKIE['archive_speed']; |
|
240 | +} else { |
|
241 | + print '1'; |
|
242 | +} |
|
243 | +?></output> |
|
207 | 244 | </div> |
208 | 245 | </li> |
209 | 246 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -225,15 +262,27 @@ discard block |
||
225 | 262 | <li><?php echo _("Type of Map:"); ?> |
226 | 263 | <select class="selectpicker" onchange="mapType(this);"> |
227 | 264 | <?php |
228 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
229 | - else $MapType = $_COOKIE['MapType']; |
|
265 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
266 | + $MapType = $globalMapProvider; |
|
267 | + } else { |
|
268 | + $MapType = $_COOKIE['MapType']; |
|
269 | + } |
|
230 | 270 | ?> |
231 | 271 | <?php |
232 | 272 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
233 | 273 | ?> |
234 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
235 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
236 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
274 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
275 | + print ' selected'; |
|
276 | +} |
|
277 | +?>>Bing-Aerial</option> |
|
278 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
279 | + print ' selected'; |
|
280 | +} |
|
281 | +?>>Bing-Hybrid</option> |
|
282 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
283 | + print ' selected'; |
|
284 | +} |
|
285 | +?>>Bing-Road</option> |
|
237 | 286 | <?php |
238 | 287 | } |
239 | 288 | ?> |
@@ -243,56 +292,131 @@ discard block |
||
243 | 292 | <?php |
244 | 293 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
245 | 294 | ?> |
246 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
247 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
248 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
295 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
296 | + print ' selected'; |
|
297 | +} |
|
298 | +?>>Here-Aerial</option> |
|
299 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
300 | + print ' selected'; |
|
301 | +} |
|
302 | +?>>Here-Hybrid</option> |
|
303 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
304 | + print ' selected'; |
|
305 | +} |
|
306 | +?>>Here-Road</option> |
|
249 | 307 | <?php |
250 | 308 | } |
251 | 309 | ?> |
252 | 310 | <?php |
253 | 311 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
254 | 312 | ?> |
255 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
256 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
257 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
258 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
313 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
314 | + print ' selected'; |
|
315 | +} |
|
316 | +?>>Google Roadmap</option> |
|
317 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
318 | + print ' selected'; |
|
319 | +} |
|
320 | +?>>Google Satellite</option> |
|
321 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Google Hybrid</option> |
|
325 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
326 | + print ' selected'; |
|
327 | +} |
|
328 | +?>>Google Terrain</option> |
|
259 | 329 | <?php |
260 | 330 | } |
261 | 331 | ?> |
262 | 332 | <?php |
263 | 333 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
264 | 334 | ?> |
265 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
266 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
267 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
335 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
336 | + print ' selected'; |
|
337 | +} |
|
338 | +?>>MapQuest-OSM</option> |
|
339 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
340 | + print ' selected'; |
|
341 | +} |
|
342 | +?>>MapQuest-Aerial</option> |
|
343 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
344 | + print ' selected'; |
|
345 | +} |
|
346 | +?>>MapQuest-Hybrid</option> |
|
268 | 347 | <?php |
269 | 348 | } |
270 | 349 | ?> |
271 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
350 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
351 | + print ' selected'; |
|
352 | +} |
|
353 | +?>>Yandex</option> |
|
272 | 354 | <?php |
273 | 355 | } |
274 | 356 | ?> |
275 | 357 | <?php |
276 | 358 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
277 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
278 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
359 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
360 | + $MapBoxId = 'default'; |
|
361 | + } else { |
|
362 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
363 | + } |
|
279 | 364 | ?> |
280 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
281 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
282 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
283 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
284 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
285 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
286 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
287 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
288 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
289 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
290 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
291 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
365 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
366 | + print ' selected'; |
|
367 | +} |
|
368 | +?>>Mapbox default</option> |
|
369 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
370 | + print ' selected'; |
|
371 | +} |
|
372 | +?>>Mapbox streets</option> |
|
373 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
374 | + print ' selected'; |
|
375 | +} |
|
376 | +?>>Mapbox light</option> |
|
377 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
378 | + print ' selected'; |
|
379 | +} |
|
380 | +?>>Mapbox dark</option> |
|
381 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
382 | + print ' selected'; |
|
383 | +} |
|
384 | +?>>Mapbox satellite</option> |
|
385 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
386 | + print ' selected'; |
|
387 | +} |
|
388 | +?>>Mapbox streets-satellite</option> |
|
389 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
390 | + print ' selected'; |
|
391 | +} |
|
392 | +?>>Mapbox streets-basic</option> |
|
393 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
394 | + print ' selected'; |
|
395 | +} |
|
396 | +?>>Mapbox comic</option> |
|
397 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
398 | + print ' selected'; |
|
399 | +} |
|
400 | +?>>Mapbox outdoors</option> |
|
401 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
402 | + print ' selected'; |
|
403 | +} |
|
404 | +?>>Mapbox pencil</option> |
|
405 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
406 | + print ' selected'; |
|
407 | +} |
|
408 | +?>>Mapbox pirates</option> |
|
409 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
410 | + print ' selected'; |
|
411 | +} |
|
412 | +?>>Mapbox emerald</option> |
|
292 | 413 | <?php |
293 | 414 | } |
294 | 415 | ?> |
295 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
416 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>OpenStreetMap</option> |
|
296 | 420 | </select> |
297 | 421 | </li> |
298 | 422 | <?php |
@@ -300,9 +424,18 @@ discard block |
||
300 | 424 | ?> |
301 | 425 | <li><?php echo _("Type of Terrain:"); ?> |
302 | 426 | <select class="selectpicker" onchange="terrainType(this);"> |
303 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
427 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>stk terrain</option> |
|
431 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
432 | + print ' selected'; |
|
433 | +} |
|
434 | +?>>ellipsoid</option> |
|
435 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
436 | + print ' selected'; |
|
437 | +} |
|
438 | +?>>vr terrain</option> |
|
306 | 439 | </select> |
307 | 440 | </li> |
308 | 441 | <?php |
@@ -312,18 +445,36 @@ discard block |
||
312 | 445 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
313 | 446 | ?> |
314 | 447 | |
315 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
316 | - <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> |
|
317 | - <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> |
|
318 | - <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> |
|
448 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
449 | + print 'checked'; |
|
450 | +} |
|
451 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
452 | + <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'])) { |
|
453 | + print 'checked'; |
|
454 | +} |
|
455 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
456 | + <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'])) { |
|
457 | + print 'checked'; |
|
458 | +} |
|
459 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
460 | + <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)) { |
|
461 | + print 'checked'; |
|
462 | +} |
|
463 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
319 | 464 | <?php |
320 | 465 | } |
321 | 466 | ?> |
322 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
467 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
468 | + print 'checked'; |
|
469 | +} |
|
470 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
323 | 471 | <?php |
324 | 472 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
325 | 473 | ?> |
326 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
474 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
475 | + print 'checked'; |
|
476 | +} |
|
477 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
327 | 478 | <?php |
328 | 479 | } |
329 | 480 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -337,17 +488,25 @@ discard block |
||
337 | 488 | if (function_exists('array_column')) { |
338 | 489 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
339 | 490 | ?> |
340 | - <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> |
|
491 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
492 | + print 'checked'; |
|
493 | +} |
|
494 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
341 | 495 | <?php |
342 | 496 | } |
343 | 497 | } elseif (isset($globalSources)) { |
344 | 498 | $dispolar = false; |
345 | 499 | foreach ($globalSources as $testsource) { |
346 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
500 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
501 | + $dispolar = true; |
|
502 | + } |
|
347 | 503 | } |
348 | 504 | if ($dispolar) { |
349 | 505 | ?> |
350 | - <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> |
|
506 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
507 | + print 'checked'; |
|
508 | +} |
|
509 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
351 | 510 | <?php |
352 | 511 | } |
353 | 512 | } |
@@ -359,12 +518,22 @@ discard block |
||
359 | 518 | <?php |
360 | 519 | if (extension_loaded('gd') && function_exists('gd_info')) { |
361 | 520 | ?> |
362 | - <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> |
|
521 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
522 | + print 'checked'; |
|
523 | +} |
|
524 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
363 | 525 | <?php |
364 | 526 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
365 | 527 | ?> |
366 | 528 | <li><?php echo _("Aircraft icon color:"); ?> |
367 | - <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'; ?>"> |
|
529 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
530 | + print $_COOKIE['IconColor']; |
|
531 | +} elseif (isset($globalAircraftIconColor)) { |
|
532 | + print $globalAircraftIconColor; |
|
533 | +} else { |
|
534 | + print '1a3151'; |
|
535 | +} |
|
536 | +?>"> |
|
368 | 537 | </li> |
369 | 538 | <?php |
370 | 539 | } |
@@ -372,8 +541,22 @@ discard block |
||
372 | 541 | ?> |
373 | 542 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
374 | 543 | <div class="range"> |
375 | - <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'; ?>"> |
|
376 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
544 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
545 | + print $_COOKIE['AirportZoom']; |
|
546 | +} elseif (isset($globalAirportZoom)) { |
|
547 | + print $globalAirportZoom; |
|
548 | +} else { |
|
549 | + print '7'; |
|
550 | +} |
|
551 | +?>"> |
|
552 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
553 | + print $_COOKIE['AirportZoom']; |
|
554 | +} elseif (isset($globalAirportZoom)) { |
|
555 | + print $globalAirportZoom; |
|
556 | +} else { |
|
557 | + print '7'; |
|
558 | +} |
|
559 | +?></output> |
|
377 | 560 | </div> |
378 | 561 | </li> |
379 | 562 | <?php |
@@ -381,22 +564,46 @@ discard block |
||
381 | 564 | ?> |
382 | 565 | <li><?php echo _("Distance unit:"); ?> |
383 | 566 | <select class="selectpicker" onchange="unitdistance(this);"> |
384 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
385 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
386 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
567 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
568 | + echo ' selected'; |
|
569 | +} |
|
570 | +?>>km</option> |
|
571 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
572 | + echo ' selected'; |
|
573 | +} |
|
574 | +?>>nm</option> |
|
575 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
576 | + echo ' selected'; |
|
577 | +} |
|
578 | +?>>mi</option> |
|
387 | 579 | </select> |
388 | 580 | </li> |
389 | 581 | <li><?php echo _("Altitude unit:"); ?> |
390 | 582 | <select class="selectpicker" onchange="unitaltitude(this);"> |
391 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
392 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
583 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
584 | + echo ' selected'; |
|
585 | +} |
|
586 | +?>>m</option> |
|
587 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
588 | + echo ' selected'; |
|
589 | +} |
|
590 | +?>>feet</option> |
|
393 | 591 | </select> |
394 | 592 | </li> |
395 | 593 | <li><?php echo _("Speed unit:"); ?> |
396 | 594 | <select class="selectpicker" onchange="unitspeed(this);"> |
397 | - <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> |
|
398 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
399 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
595 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
596 | + echo ' selected'; |
|
597 | +} |
|
598 | +?>>km/h</option> |
|
599 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
600 | + echo ' selected'; |
|
601 | +} |
|
602 | +?>>mph</option> |
|
603 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
604 | + echo ' selected'; |
|
605 | +} |
|
606 | +?>>knots</option> |
|
400 | 607 | </select> |
401 | 608 | </li> |
402 | 609 | |
@@ -411,9 +618,18 @@ discard block |
||
411 | 618 | <?php |
412 | 619 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
413 | 620 | ?> |
414 | - <?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 } ?> |
|
415 | - <?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 } ?> |
|
416 | - <?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 } ?> |
|
621 | + <?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'])) { |
|
622 | + print 'checked'; |
|
623 | +} |
|
624 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
625 | + <?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'])) { |
|
626 | + print 'checked'; |
|
627 | +} |
|
628 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
629 | + <?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'])) { |
|
630 | + print 'checked'; |
|
631 | +} |
|
632 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
417 | 633 | <?php |
418 | 634 | } |
419 | 635 | ?> |
@@ -421,10 +637,16 @@ discard block |
||
421 | 637 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
422 | 638 | ?> |
423 | 639 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
424 | - <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> |
|
640 | + <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'])) { |
|
641 | + print 'checked'; |
|
642 | +} |
|
643 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
425 | 644 | <?php } ?> |
426 | 645 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
427 | - <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> |
|
646 | + <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'])) { |
|
647 | + print 'checked'; |
|
648 | +} |
|
649 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
428 | 650 | <?php } ?> |
429 | 651 | <?php |
430 | 652 | } |
@@ -441,7 +663,9 @@ discard block |
||
441 | 663 | } |
442 | 664 | foreach($allairlinenames as $airline) { |
443 | 665 | $airline_name = $airline['airline_name']; |
444 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
666 | + if (strlen($airline_name) > 30) { |
|
667 | + $airline_name = substr($airline_name,0,30).'...'; |
|
668 | + } |
|
445 | 669 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
446 | 670 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
447 | 671 | } else { |
@@ -459,7 +683,10 @@ discard block |
||
459 | 683 | <li><?php echo _("Display alliance:"); ?> |
460 | 684 | <br/> |
461 | 685 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
462 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
686 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
687 | + echo ' selected'; |
|
688 | +} |
|
689 | +?>><?php echo _("All"); ?></option> |
|
463 | 690 | <?php |
464 | 691 | foreach($allalliancenames as $alliance) { |
465 | 692 | $alliance_name = $alliance['alliance']; |
@@ -500,10 +727,22 @@ discard block |
||
500 | 727 | ?> |
501 | 728 | <li><?php echo _("Display airlines of type:"); ?><br/> |
502 | 729 | <select class="selectpicker" onchange="airlinestype(this);"> |
503 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
504 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
505 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
506 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
730 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
731 | + echo ' selected'; |
|
732 | +} |
|
733 | +?>><?php echo _("All"); ?></option> |
|
734 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
735 | + echo ' selected'; |
|
736 | +} |
|
737 | +?>><?php echo _("Passenger"); ?></option> |
|
738 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
739 | + echo ' selected'; |
|
740 | +} |
|
741 | +?>><?php echo _("Cargo"); ?></option> |
|
742 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
743 | + echo ' selected'; |
|
744 | +} |
|
745 | +?>><?php echo _("Military"); ?></option> |
|
507 | 746 | </select> |
508 | 747 | </li> |
509 | 748 | <?php |
@@ -511,7 +750,10 @@ discard block |
||
511 | 750 | ?> |
512 | 751 | <li> |
513 | 752 | <?php echo _("Display flight with ident:"); ?> |
514 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
753 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
754 | + print $_COOKIE['filter_ident']; |
|
755 | +} |
|
756 | +?>" /> |
|
515 | 757 | </li> |
516 | 758 | </ul> |
517 | 759 | </form> |
@@ -527,7 +769,10 @@ discard block |
||
527 | 769 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
528 | 770 | <form> |
529 | 771 | <ul> |
530 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
772 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
773 | + print 'checked'; |
|
774 | +} |
|
775 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
531 | 776 | <li><?php echo _("Type:"); ?> |
532 | 777 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
533 | 778 | <?php |
@@ -535,25 +780,45 @@ discard block |
||
535 | 780 | $types = $Satellite->get_tle_types(); |
536 | 781 | foreach ($types as $type) { |
537 | 782 | $type_name = $type['tle_type']; |
538 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
539 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
540 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
541 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
542 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
543 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
544 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
545 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
546 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
547 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
548 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
549 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
550 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
551 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
552 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
553 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
554 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
555 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
556 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
783 | + if ($type_name == 'musson') { |
|
784 | + $type_name = 'Russian LEO Navigation'; |
|
785 | + } else if ($type_name == 'nnss') { |
|
786 | + $type_name = 'Navi Navigation Satellite System'; |
|
787 | + } else if ($type_name == 'sbas') { |
|
788 | + $type_name = 'Satellite-Based Augmentation System'; |
|
789 | + } else if ($type_name == 'glo-ops') { |
|
790 | + $type_name = 'Glonass Operational'; |
|
791 | + } else if ($type_name == 'gps-ops') { |
|
792 | + $type_name = 'GPS Operational'; |
|
793 | + } else if ($type_name == 'argos') { |
|
794 | + $type_name = 'ARGOS Data Collection System'; |
|
795 | + } else if ($type_name == 'tdrss') { |
|
796 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
797 | + } else if ($type_name == 'sarsat') { |
|
798 | + $type_name = 'Search & Rescue'; |
|
799 | + } else if ($type_name == 'dmc') { |
|
800 | + $type_name = 'Disaster Monitoring'; |
|
801 | + } else if ($type_name == 'resource') { |
|
802 | + $type_name = 'Earth Resources'; |
|
803 | + } else if ($type_name == 'stations') { |
|
804 | + $type_name = 'Space Stations'; |
|
805 | + } else if ($type_name == 'geo') { |
|
806 | + $type_name = 'Geostationary'; |
|
807 | + } else if ($type_name == 'amateur') { |
|
808 | + $type_name = 'Amateur Radio'; |
|
809 | + } else if ($type_name == 'x-comm') { |
|
810 | + $type_name = 'Experimental'; |
|
811 | + } else if ($type_name == 'other-comm') { |
|
812 | + $type_name = 'Other Comm'; |
|
813 | + } else if ($type_name == 'science') { |
|
814 | + $type_name = 'Space & Earth Science'; |
|
815 | + } else if ($type_name == 'military') { |
|
816 | + $type_name = 'Miscellaneous Military'; |
|
817 | + } else if ($type_name == 'radar') { |
|
818 | + $type_name = 'Radar Calibration'; |
|
819 | + } else if ($type_name == 'tle-new') { |
|
820 | + $type_name = 'Last 30 days launches'; |
|
821 | + } |
|
557 | 822 | |
558 | 823 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
559 | 824 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -24,13 +24,21 @@ discard block |
||
24 | 24 | |
25 | 25 | print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option value="all"'; |
27 | - if ($airline_type == 'all') print 'selected="selected" '; |
|
27 | + if ($airline_type == 'all') { |
|
28 | + print 'selected="selected" '; |
|
29 | + } |
|
28 | 30 | print '>'._("All").'</option><option value="passenger"'; |
29 | - if ($airline_type == 'passenger') print 'selected="selected" '; |
|
31 | + if ($airline_type == 'passenger') { |
|
32 | + print 'selected="selected" '; |
|
33 | + } |
|
30 | 34 | print '>'._("Passenger").'</option><option value="cargo"'; |
31 | - if ($airline_type == 'cargo') print 'selected="selected" '; |
|
35 | + if ($airline_type == 'cargo') { |
|
36 | + print 'selected="selected" '; |
|
37 | + } |
|
32 | 38 | print '>'._("Cargo").'</option><option value="military"'; |
33 | - if ($airline_type == 'military') print 'selected="selected" '; |
|
39 | + if ($airline_type == 'military') { |
|
40 | + print 'selected="selected" '; |
|
41 | + } |
|
34 | 42 | print '>'._("Military").'</option></select>'; |
35 | 43 | print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>'; |
36 | 44 | |
@@ -57,7 +65,9 @@ discard block |
||
57 | 65 | $firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8'); |
58 | 66 | if($previous !== $firstLetter) |
59 | 67 | { |
60 | - if ($previous !== null) print ' | '; |
|
68 | + if ($previous !== null) { |
|
69 | + print ' | '; |
|
70 | + } |
|
61 | 71 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
62 | 72 | } |
63 | 73 | $previous = $firstLetter; |
@@ -70,7 +80,9 @@ discard block |
||
70 | 80 | { |
71 | 81 | if($previous !== $firstLetter) |
72 | 82 | { |
73 | - if ($previous !== null) print '</div>'; |
|
83 | + if ($previous !== null) { |
|
84 | + print '</div>'; |
|
85 | + } |
|
74 | 86 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
75 | 87 | } |
76 | 88 | $previous = $firstLetter; |
@@ -82,10 +94,14 @@ discard block |
||
82 | 94 | } elseif (@getimagesize('images/airlines/'.$value['airline_icao'].'.png') || @getimagesize($globalURL.'/images/airlines/'.$value['airline_icao'].'.png')) |
83 | 95 | { |
84 | 96 | print '<img src="'.$globalURL.'/images/airlines/'.$value['airline_icao'].'.png" alt="'._("Click to see airline activity").'" title="'._("Click to see airline activity").'" /> '; |
85 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
97 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
98 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
99 | + } |
|
86 | 100 | } else { |
87 | 101 | print $value['airline_name']; |
88 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
102 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
103 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
104 | + } |
|
89 | 105 | } |
90 | 106 | print '</a>'; |
91 | 107 | print '</div>'; |
@@ -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,10 +80,16 @@ 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 | - if (isset($spotter_array[0]['ban_eu']) && $spotter_array[0]['ban_eu'] == 1) print '<div><img src="'.$globalURL.'/images/baneu.png" alt="'._("This airline is banned in Europe").'" title="'._("This airline is banned in Europe").'" /></div>'; |
|
90 | + if (isset($spotter_array[0]['ban_eu']) && $spotter_array[0]['ban_eu'] == 1) { |
|
91 | + print '<div><img src="'.$globalURL.'/images/baneu.png" alt="'._("This airline is banned in Europe").'" title="'._("This airline is banned in Europe").'" /></div>'; |
|
92 | + } |
|
83 | 93 | print '</div>'; |
84 | 94 | } else { |
85 | 95 | print '<div class="alert alert-warning">'._("This special airline profile shows all flights that do <u>not</u> have a airline associated with them.").'</div>'; |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
24 | + if (empty($airline_names)) { |
|
25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
26 | + } |
|
25 | 27 | foreach($airline_names as $airline_name) |
26 | 28 | { |
27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
44 | 46 | { |
45 | 47 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
46 | - } |
|
47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | 49 | { |
49 | 50 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
50 | 51 | } |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $limit_start = 0; |
13 | 13 | $limit_end = 25; |
14 | 14 | $absolute_difference = 25; |
15 | -} else { |
|
15 | +} else { |
|
16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
17 | 17 | $limit_start = $limit_explode[0]; |
18 | 18 | $limit_end = $limit_explode[1]; |