@@ -33,7 +33,9 @@ discard block |
||
33 | 33 | if (file_exists('images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png')) |
34 | 34 | { |
35 | 35 | print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
36 | - } else print $alliance['alliance']; |
|
36 | + } else { |
|
37 | + print $alliance['alliance']; |
|
38 | + } |
|
37 | 39 | print '</a>'; |
38 | 40 | print '</div>'; |
39 | 41 | } |
@@ -42,13 +44,21 @@ discard block |
||
42 | 44 | } |
43 | 45 | print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">'; |
44 | 46 | print '<option value="all"'; |
45 | - if ($airline_type == 'all') print 'selected="selected" '; |
|
47 | + if ($airline_type == 'all') { |
|
48 | + print 'selected="selected" '; |
|
49 | + } |
|
46 | 50 | print '>'._("All").'</option><option value="passenger"'; |
47 | - if ($airline_type == 'passenger') print 'selected="selected" '; |
|
51 | + if ($airline_type == 'passenger') { |
|
52 | + print 'selected="selected" '; |
|
53 | + } |
|
48 | 54 | print '>'._("Passenger").'</option><option value="cargo"'; |
49 | - if ($airline_type == 'cargo') print 'selected="selected" '; |
|
55 | + if ($airline_type == 'cargo') { |
|
56 | + print 'selected="selected" '; |
|
57 | + } |
|
50 | 58 | print '>'._("Cargo").'</option><option value="military"'; |
51 | - if ($airline_type == 'military') print 'selected="selected" '; |
|
59 | + if ($airline_type == 'military') { |
|
60 | + print 'selected="selected" '; |
|
61 | + } |
|
52 | 62 | print '>'._("Military").'</option></select>'; |
53 | 63 | print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>'; |
54 | 64 | |
@@ -75,7 +85,9 @@ discard block |
||
75 | 85 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airline_name'], 0, 1)); |
76 | 86 | if($previous !== $firstLetter) |
77 | 87 | { |
78 | - if ($previous !== null) print ' | '; |
|
88 | + if ($previous !== null) { |
|
89 | + print ' | '; |
|
90 | + } |
|
79 | 91 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
80 | 92 | } |
81 | 93 | $previous = $firstLetter; |
@@ -88,7 +100,9 @@ discard block |
||
88 | 100 | { |
89 | 101 | if($previous !== $firstLetter) |
90 | 102 | { |
91 | - if ($previous !== null) print '</div>'; |
|
103 | + if ($previous !== null) { |
|
104 | + print '</div>'; |
|
105 | + } |
|
92 | 106 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
93 | 107 | } |
94 | 108 | $previous = $firstLetter; |
@@ -102,10 +116,14 @@ discard block |
||
102 | 116 | } elseif (file_exists('images/airlines/'.$value['airline_icao'].'.png')) |
103 | 117 | { |
104 | 118 | print '<img src="'.$globalURL.'/images/airlines/'.$value['airline_icao'].'.png" alt="'._("Click to see airline activity").'" title="'._("Click to see airline activity").'" /> '; |
105 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
119 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
120 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
121 | + } |
|
106 | 122 | } else { |
107 | 123 | print $value['airline_name']; |
108 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
124 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
125 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
126 | + } |
|
109 | 127 | } |
110 | 128 | print '</a>'; |
111 | 129 | print '</div>'; |
@@ -10,7 +10,9 @@ discard block |
||
10 | 10 | public function __construct($dbc = null) { |
11 | 11 | $Connection = new Connection($dbc); |
12 | 12 | $this->db = $Connection->db(); |
13 | - if ($this->db === null) die('Error: No DB connection.'); |
|
13 | + if ($this->db === null) { |
|
14 | + die('Error: No DB connection.'); |
|
15 | + } |
|
14 | 16 | } |
15 | 17 | |
16 | 18 | public function get() { |
@@ -109,8 +111,11 @@ discard block |
||
109 | 111 | $data = array(); |
110 | 112 | if ($row['registration'] != '') { |
111 | 113 | $image_array = $Image->getSpotterImage($row['registration']); |
112 | - if (count($image_array) > 0) $data = array_merge($data,array('image' => $image_array[0]['image'],'image_thumbnail' => $image_array[0]['image_thumbnail'],'image_copyright' => $image_array[0]['image_copyright'],'image_source' => $image_array[0]['image_source'],'image_source_website' => $image_array[0]['image_source_website'])); |
|
113 | - else $data = array_merge($data,array('image' => '','image_thumbnail' => '','image_copyright' => '','image_source' => '','image_source_website' => '')); |
|
114 | + if (count($image_array) > 0) { |
|
115 | + $data = array_merge($data,array('image' => $image_array[0]['image'],'image_thumbnail' => $image_array[0]['image_thumbnail'],'image_copyright' => $image_array[0]['image_copyright'],'image_source' => $image_array[0]['image_source'],'image_source_website' => $image_array[0]['image_source_website'])); |
|
116 | + } else { |
|
117 | + $data = array_merge($data,array('image' => '','image_thumbnail' => '','image_copyright' => '','image_source' => '','image_source_website' => '')); |
|
118 | + } |
|
114 | 119 | $aircraft_type = $Spotter->getAllAircraftTypeByRegistration($row['registration']); |
115 | 120 | $aircraft_info = $Spotter->getAllAircraftInfo($aircraft_type); |
116 | 121 | if (!empty($aircraft_info)) { |
@@ -126,17 +131,30 @@ discard block |
||
126 | 131 | $data['aircraft_base'] = $owner_data['base']; |
127 | 132 | $data['aircraft_date_first_reg'] = $owner_data['date_first_reg']; |
128 | 133 | } |
129 | - } else $data = array_merge($data,array('image' => '','image_thumbnail' => '','image_copyright' => '','image_source' => '','image_source_website' => '')); |
|
130 | - if ($row['registration'] == '') $row['registration'] = 'NA'; |
|
131 | - if ($row['ident'] == '') $row['ident'] = 'NA'; |
|
134 | + } else { |
|
135 | + $data = array_merge($data,array('image' => '','image_thumbnail' => '','image_copyright' => '','image_source' => '','image_source_website' => '')); |
|
136 | + } |
|
137 | + if ($row['registration'] == '') { |
|
138 | + $row['registration'] = 'NA'; |
|
139 | + } |
|
140 | + if ($row['ident'] == '') { |
|
141 | + $row['ident'] = 'NA'; |
|
142 | + } |
|
132 | 143 | $identicao = $Spotter->getAllAirlineInfo(substr($row['ident'],0,3)); |
133 | 144 | if (isset($identicao[0])) { |
134 | 145 | if (substr($row['ident'],0,2) == 'AF') { |
135 | - if (filter_var(substr($row['ident'],2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $row['ident']; |
|
136 | - else $icao = 'AFR'.ltrim(substr($row['ident'],2),'0'); |
|
137 | - } else $icao = $identicao[0]['icao'].ltrim(substr($row['ident'],2),'0'); |
|
146 | + if (filter_var(substr($row['ident'],2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) { |
|
147 | + $icao = $row['ident']; |
|
148 | + } else { |
|
149 | + $icao = 'AFR'.ltrim(substr($row['ident'],2),'0'); |
|
150 | + } |
|
151 | + } else { |
|
152 | + $icao = $identicao[0]['icao'].ltrim(substr($row['ident'],2),'0'); |
|
153 | + } |
|
138 | 154 | $data = array_merge($data,array('airline_icao' => $identicao[0]['icao'],'airline_name' => $identicao[0]['name'])); |
139 | - } else $icao = $row['ident']; |
|
155 | + } else { |
|
156 | + $icao = $row['ident']; |
|
157 | + } |
|
140 | 158 | $icao = $Translation->checkTranslation($icao,false); |
141 | 159 | //$data = array_merge($data,array('registration' => $row['registration'], 'date' => $row['date'], 'ident' => $icao,'url' => $row['url'])); |
142 | 160 | if ($row['airline_name'] != '' && !isset($data['airline_name'])) { |
@@ -151,10 +169,14 @@ discard block |
||
151 | 169 | //else echo 'No data...'."\n"; |
152 | 170 | } |
153 | 171 | $data = array_merge($row,$data); |
154 | - if ($data['ident'] == null) $data['ident'] = $icao; |
|
172 | + if ($data['ident'] == null) { |
|
173 | + $data['ident'] = $icao; |
|
174 | + } |
|
155 | 175 | if ($data['title'] == null) { |
156 | 176 | $data['message'] = $row['type'].' of '.$row['registration'].' at '.$row['place'].','.$row['country']; |
157 | - } else $data['message'] = strtolower($data['title']); |
|
177 | + } else { |
|
178 | + $data['message'] = strtolower($data['title']); |
|
179 | + } |
|
158 | 180 | $ids = $Spotter->getAllIDByRegistration($data['registration'],true); |
159 | 181 | $date = $data['date']; |
160 | 182 | if (isset($ids[$date])) { |
@@ -173,8 +195,9 @@ discard block |
||
173 | 195 | if (isset($result)) { |
174 | 196 | $result[0]['query_number_rows'] = $i; |
175 | 197 | return $result; |
198 | + } else { |
|
199 | + return array(); |
|
176 | 200 | } |
177 | - else return array(); |
|
178 | 201 | } |
179 | 202 | |
180 | 203 | /* |
@@ -219,7 +242,9 @@ discard block |
||
219 | 242 | */ |
220 | 243 | public function import($file) { |
221 | 244 | global $globalTransaction, $globalDebug; |
222 | - if ($globalDebug) echo 'Import '.$file."\n"; |
|
245 | + if ($globalDebug) { |
|
246 | + echo 'Import '.$file."\n"; |
|
247 | + } |
|
223 | 248 | $result = array(); |
224 | 249 | if (file_exists($file)) { |
225 | 250 | if (($handle = fopen($file,'r')) !== FALSE) { |
@@ -230,8 +255,11 @@ discard block |
||
230 | 255 | } |
231 | 256 | fclose($handle); |
232 | 257 | } |
233 | - if (!empty($result)) $this->add($result,true); |
|
234 | - elseif ($globalDebug) echo 'Nothing to import'; |
|
258 | + if (!empty($result)) { |
|
259 | + $this->add($result,true); |
|
260 | + } elseif ($globalDebug) { |
|
261 | + echo 'Nothing to import'; |
|
262 | + } |
|
235 | 263 | } |
236 | 264 | } |
237 | 265 | |
@@ -267,14 +295,23 @@ discard block |
||
267 | 295 | } |
268 | 296 | } |
269 | 297 | fclose($handle); |
270 | - } elseif ($globalDebug) echo "Can't open ".dirname(__FILE__).'/../install/tmp/cr-all.md5'; |
|
271 | - } elseif ($globalDebug) echo 'Download cr-all.md5 failed. '.dirname(__FILE__).'/../install/tmp/cr-all.md5 not here.'; |
|
298 | + } elseif ($globalDebug) { |
|
299 | + echo "Can't open ".dirname(__FILE__).'/../install/tmp/cr-all.md5'; |
|
300 | + } |
|
301 | + } elseif ($globalDebug) { |
|
302 | + echo 'Download cr-all.md5 failed. '.dirname(__FILE__).'/../install/tmp/cr-all.md5 not here.'; |
|
303 | + } |
|
272 | 304 | $result = $Common->arr_diff($all_md5_new,$all_md5); |
273 | - if (empty($result) && $globalDebug) echo 'Nothing to update'; |
|
305 | + if (empty($result) && $globalDebug) { |
|
306 | + echo 'Nothing to update'; |
|
307 | + } |
|
274 | 308 | foreach ($result as $file => $md5) { |
275 | 309 | $Common->download('http://data.flightairmap.fr/data/cr/'.$file,dirname(__FILE__).'/../install/tmp/'.$file); |
276 | - if (file_exists(dirname(__FILE__).'/../install/tmp/'.$file)) $this->import(dirname(__FILE__).'/../install/tmp/'.$file); |
|
277 | - elseif ($globalDebug) echo 'Download '.$file.' failed'; |
|
310 | + if (file_exists(dirname(__FILE__).'/../install/tmp/'.$file)) { |
|
311 | + $this->import(dirname(__FILE__).'/../install/tmp/'.$file); |
|
312 | + } elseif ($globalDebug) { |
|
313 | + echo 'Download '.$file.' failed'; |
|
314 | + } |
|
278 | 315 | } |
279 | 316 | } |
280 | 317 | |
@@ -291,13 +328,17 @@ discard block |
||
291 | 328 | $Image = new Image(); |
292 | 329 | $Spotter = new Spotter(); |
293 | 330 | |
294 | - if (empty($crash)) return false; |
|
331 | + if (empty($crash)) { |
|
332 | + return false; |
|
333 | + } |
|
295 | 334 | if (!$new) { |
296 | 335 | $query_delete = 'DELETE FROM accidents WHERE source = :source'; |
297 | 336 | $sthd = $Connection->db->prepare($query_delete); |
298 | 337 | $sthd->execute(array(':source' => $crash[0]['source'])); |
299 | 338 | } |
300 | - if ($globalTransaction) $Connection->db->beginTransaction(); |
|
339 | + if ($globalTransaction) { |
|
340 | + $Connection->db->beginTransaction(); |
|
341 | + } |
|
301 | 342 | $initial_array = array('ident' => null,'type' => 'accident','url' => null,'registration' => null, 'date' => null, 'place' => null,'country' => null, 'latitude' => null, 'longitude' => null, 'fatalities' => null, 'title' => '','source' => '','aircraft_manufacturer' => null,'aircraft_name' => null,'operator' => null); |
302 | 343 | $query_check = 'SELECT COUNT(*) as nb FROM accidents WHERE registration = :registration AND date = :date AND type = :type AND source = :source'; |
303 | 344 | $sth_check = $Connection->db->prepare($query_check); |
@@ -312,7 +353,9 @@ discard block |
||
312 | 353 | return $value === "" ? NULL : $value; |
313 | 354 | }, $cr); |
314 | 355 | if ($cr['date'] != '' && $cr['registration'] != null && $cr['registration'] != '' && $cr['registration'] != '?' && $cr['registration'] != '-' && strtolower($cr['registration']) != 'unknown' && $cr['date'] < time() && !preg_match('/\s/',$cr['registration'])) { |
315 | - if (strpos($cr['registration'],'-') === FALSE) $cr['registration'] = $Spotter->convertAircraftRegistration($cr['registration']); |
|
356 | + if (strpos($cr['registration'],'-') === FALSE) { |
|
357 | + $cr['registration'] = $Spotter->convertAircraftRegistration($cr['registration']); |
|
358 | + } |
|
316 | 359 | $query_check_values = array(':registration' => $cr['registration'],':date' => date('Y-m-d',$cr['date']),':type' => $cr['type'],':source' => $cr['source']); |
317 | 360 | $sth_check->execute($query_check_values); |
318 | 361 | $result_check = $sth_check->fetch(PDO::FETCH_ASSOC); |
@@ -321,13 +364,19 @@ discard block |
||
321 | 364 | $sth->execute($query_values); |
322 | 365 | if ($cr['date'] > time()-(30*86400)) { |
323 | 366 | if (empty($Image->getSpotterImage($cr['registration']))) { |
324 | - if ($globalDebug) echo "\t".'Get image for '.$cr['registration'].'...'; |
|
367 | + if ($globalDebug) { |
|
368 | + echo "\t".'Get image for '.$cr['registration'].'...'; |
|
369 | + } |
|
325 | 370 | $Image->addSpotterImage($cr['registration']); |
326 | - if ($globalDebug) echo "\t".'Done'."\n"; |
|
371 | + if ($globalDebug) { |
|
372 | + echo "\t".'Done'."\n"; |
|
373 | + } |
|
327 | 374 | } |
328 | 375 | // elseif ($globalDebug) echo 'Image already in DB'."\n"; |
329 | 376 | } |
330 | - if ($cr['title'] == '') $cr['title'] = $cr['registration'].' '.$cr['type']; |
|
377 | + if ($cr['title'] == '') { |
|
378 | + $cr['title'] = $cr['registration'].' '.$cr['type']; |
|
379 | + } |
|
331 | 380 | $Spotter->setHighlightFlightByRegistration($cr['registration'],$cr['title'],date('Y-m-d',$cr['date'])); |
332 | 381 | } |
333 | 382 | } |
@@ -336,9 +385,13 @@ discard block |
||
336 | 385 | $Connection->db->beginTransaction(); |
337 | 386 | } |
338 | 387 | } |
339 | - if ($globalTransaction) $Connection->db->commit(); |
|
388 | + if ($globalTransaction) { |
|
389 | + $Connection->db->commit(); |
|
390 | + } |
|
340 | 391 | } catch(PDOException $e) { |
341 | - if ($globalTransaction) $Connection->db->rollBack(); |
|
392 | + if ($globalTransaction) { |
|
393 | + $Connection->db->rollBack(); |
|
394 | + } |
|
342 | 395 | echo $e->getMessage(); |
343 | 396 | } |
344 | 397 | $sth_check->closeCursor(); |
@@ -377,8 +430,11 @@ discard block |
||
377 | 430 | return "error : ".$e->getMessage(); |
378 | 431 | } |
379 | 432 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
380 | - if ($row['nb'] > 0) return false; |
|
381 | - else return true; |
|
433 | + if ($row['nb'] > 0) { |
|
434 | + return false; |
|
435 | + } else { |
|
436 | + return true; |
|
437 | + } |
|
382 | 438 | } |
383 | 439 | |
384 | 440 | public static function insert_last_accidents_update() { |
@@ -58,13 +58,19 @@ discard block |
||
58 | 58 | $nextlatlon = $Satellite->position($spotter_item['name'],time()+$globalMapRefresh+20); |
59 | 59 | $nextlat = $nextlatlon['latitude']; |
60 | 60 | if (abs($nextlat-$spotter_item['latitude']) > 90) { |
61 | - if ($spotter_item['latitude'] < 0) $nexlat = -90; |
|
62 | - else $nexlat = 90; |
|
61 | + if ($spotter_item['latitude'] < 0) { |
|
62 | + $nexlat = -90; |
|
63 | + } else { |
|
64 | + $nexlat = 90; |
|
65 | + } |
|
63 | 66 | } |
64 | 67 | $nextlon = $nextlatlon['longitude']; |
65 | 68 | if (abs($nextlon-$spotter_item['longitude']) > 180) { |
66 | - if ($spotter_item['longitude'] < 0) $nextlon = -180; |
|
67 | - else $nextlon = 180; |
|
69 | + if ($spotter_item['longitude'] < 0) { |
|
70 | + $nextlon = -180; |
|
71 | + } else { |
|
72 | + $nextlon = 180; |
|
73 | + } |
|
68 | 74 | } |
69 | 75 | $output_data .= '"nextlatlon":['.$nextlat.','.$nextlon.'],'; |
70 | 76 | //$output_data .= '"heading":"'.$Common->getHeading($spotter_item['latitude'],$spotter_item['longitude'],$nextlatlon['latitude'],$nextlatlon['longitude']).'",'; |
@@ -94,7 +100,9 @@ discard block |
||
94 | 100 | } |
95 | 101 | } |
96 | 102 | } |
97 | -if (isset($output_data)) $output = substr($output,0,-1); |
|
103 | +if (isset($output_data)) { |
|
104 | + $output = substr($output,0,-1); |
|
105 | +} |
|
98 | 106 | $output .= ']}'; |
99 | 107 | print $output; |
100 | 108 | ?> |
@@ -105,8 +105,11 @@ |
||
105 | 105 | } elseif (isset($_GET['satellite'])) { |
106 | 106 | readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/satellites/'.$filename); |
107 | 107 | } else { |
108 | - if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
109 | - else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
108 | + if ($color == 'FF0000') { |
|
109 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
110 | + } else { |
|
111 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
112 | + } |
|
110 | 113 | } |
111 | 114 | } |
112 | 115 | ?> |
113 | 116 | \ No newline at end of file |
@@ -3,11 +3,18 @@ discard block |
||
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | 5 | // Compressed GeoJson is used if true |
6 | -if (!isset($globalJsonCompress)) $compress = true; |
|
7 | -else $compress = $globalJsonCompress; |
|
6 | +if (!isset($globalJsonCompress)) { |
|
7 | + $compress = true; |
|
8 | +} else { |
|
9 | + $compress = $globalJsonCompress; |
|
10 | +} |
|
8 | 11 | |
9 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
12 | +if (isset($_GET['ident'])) { |
|
13 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
14 | +} |
|
15 | +if (isset($_GET['flightaware_id'])) { |
|
16 | + $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
17 | +} |
|
11 | 18 | ?> |
12 | 19 | |
13 | 20 | |
@@ -72,9 +79,12 @@ discard block |
||
72 | 79 | |
73 | 80 | function update_airportsLayer() { |
74 | 81 | <?php |
75 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
76 | - else $getZoom = '7'; |
|
77 | -?> |
|
82 | + if (isset($_COOKIE['AirportZoom'])) { |
|
83 | + $getZoom = $_COOKIE['AirportZoom']; |
|
84 | + } else { |
|
85 | + $getZoom = '7'; |
|
86 | + } |
|
87 | + ?> |
|
78 | 88 | if (typeof airportsLayer != 'undefined') { |
79 | 89 | if (map.hasLayer(airportsLayer) == true) { |
80 | 90 | map.removeLayer(airportsLayer); |
@@ -320,9 +330,13 @@ discard block |
||
320 | 330 | if (callsign != ""){ markerLabel += callsign; } |
321 | 331 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
322 | 332 | <?php |
323 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
324 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
325 | - else $IconColor = '1a3151'; |
|
333 | + if (isset($_COOKIE['IconColor'])) { |
|
334 | + $IconColor = $_COOKIE['IconColor']; |
|
335 | + } elseif (isset($globalAircraftIconColor)) { |
|
336 | + $IconColor = $globalAircraftIconColor; |
|
337 | + } else { |
|
338 | + $IconColor = '1a3151'; |
|
339 | + } |
|
326 | 340 | if (!isset($ident) && !isset($flightaware_id)) { |
327 | 341 | ?> |
328 | 342 | //info_update(feature.properties.fc); |
@@ -370,7 +384,12 @@ discard block |
||
370 | 384 | <?php |
371 | 385 | } else { |
372 | 386 | ?> |
373 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
387 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
388 | + print $archiveupdatetime*1000; |
|
389 | +} else { |
|
390 | + print $globalMapRefresh*1000+20000; |
|
391 | +} |
|
392 | +?>+feature.properties.sqt*1000); |
|
374 | 393 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
375 | 394 | <?php |
376 | 395 | } |
@@ -419,7 +438,12 @@ discard block |
||
419 | 438 | <?php |
420 | 439 | } else { |
421 | 440 | ?> |
422 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
441 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
442 | + print $archiveupdatetime*1000; |
|
443 | +} else { |
|
444 | + print $globalMapRefresh*1000+20000; |
|
445 | +} |
|
446 | +?>+feature.properties.sqt*1000); |
|
423 | 447 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
424 | 448 | <?php |
425 | 449 | } |
@@ -466,7 +490,12 @@ discard block |
||
466 | 490 | <?php |
467 | 491 | } else { |
468 | 492 | ?> |
469 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
493 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
494 | + print $archiveupdatetime*1000; |
|
495 | +} else { |
|
496 | + print $globalMapRefresh*1000+20000; |
|
497 | +} |
|
498 | +?>+feature.properties.sqt*1000); |
|
470 | 499 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
471 | 500 | <?php |
472 | 501 | } |
@@ -820,13 +849,23 @@ discard block |
||
820 | 849 | if (isset($archive) && $archive) { |
821 | 850 | ?> |
822 | 851 | //then load it again every 30 seconds |
823 | - // var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
852 | + // var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
853 | + print ($globalMapRefresh*1000)/2; |
|
854 | +} else { |
|
855 | + print '15000'; |
|
856 | +} |
|
857 | +?>); |
|
824 | 858 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
825 | 859 | <?php |
826 | 860 | } else { |
827 | 861 | ?> |
828 | 862 | //then load it again every 30 seconds |
829 | - reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
863 | + reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
864 | + print $globalMapRefresh*1000; |
|
865 | +} else { |
|
866 | + print '30000'; |
|
867 | +} |
|
868 | +?>); |
|
830 | 869 | var currentdate = new Date(); |
831 | 870 | var currentyear = new Date().getFullYear(); |
832 | 871 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -838,7 +877,12 @@ discard block |
||
838 | 877 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
839 | 878 | ?> |
840 | 879 | update_polarLayer(); |
841 | - setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
880 | + setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
881 | + print $globalMapRefresh*1000*2; |
|
882 | +} else { |
|
883 | + print '60000'; |
|
884 | +} |
|
885 | +?>); |
|
842 | 886 | <?php |
843 | 887 | } |
844 | 888 | ?> |
@@ -853,7 +897,12 @@ discard block |
||
853 | 897 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
854 | 898 | ?> |
855 | 899 | update_atcLayer(); |
856 | - setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
900 | + setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
901 | + print $globalMapRefresh*1000*2; |
|
902 | +} else { |
|
903 | + print '60000'; |
|
904 | +} |
|
905 | +?>); |
|
857 | 906 | <?php |
858 | 907 | } |
859 | 908 | ?> |
@@ -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 | ?> |
11 | 14 | |
12 | 15 | |
@@ -156,9 +159,13 @@ discard block |
||
156 | 159 | if (callsign != ""){ markerMarineLabel += callsign; } |
157 | 160 | if (type != ""){ markerMarineLabel += ' - '+type; } |
158 | 161 | <?php |
159 | - if (isset($_COOKIE['MarineIconColor'])) $MarineIconColor = $_COOKIE['MarineIconColor']; |
|
160 | - elseif (isset($globalMarineIconColor)) $MarineIconColor = $globalMarineIconColor; |
|
161 | - else $MarineIconColor = '1a3151'; |
|
162 | + if (isset($_COOKIE['MarineIconColor'])) { |
|
163 | + $MarineIconColor = $_COOKIE['MarineIconColor']; |
|
164 | + } elseif (isset($globalMarineIconColor)) { |
|
165 | + $MarineIconColor = $globalMarineIconColor; |
|
166 | + } else { |
|
167 | + $MarineIconColor = '1a3151'; |
|
168 | + } |
|
162 | 169 | if (!isset($ident) && !isset($fammarine_id)) { |
163 | 170 | ?> |
164 | 171 | //info_marine_update(feature.properties.fc); |
@@ -193,7 +200,12 @@ discard block |
||
193 | 200 | <?php |
194 | 201 | } else { |
195 | 202 | ?> |
196 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
203 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
204 | + print $archiveupdatetime*1000; |
|
205 | +} else { |
|
206 | + print $globalMapRefresh*1000+20000; |
|
207 | +} |
|
208 | +?>+feature.properties.sqt*1000); |
|
197 | 209 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
198 | 210 | <?php |
199 | 211 | } |
@@ -249,7 +261,12 @@ discard block |
||
249 | 261 | <?php |
250 | 262 | } else { |
251 | 263 | ?> |
252 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
264 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
265 | + print $archiveupdatetime*1000; |
|
266 | +} else { |
|
267 | + print $globalMapRefresh*1000+20000; |
|
268 | +} |
|
269 | +?>+feature.properties.sqt*1000); |
|
253 | 270 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
254 | 271 | <?php |
255 | 272 | } |
@@ -304,7 +321,12 @@ discard block |
||
304 | 321 | <?php |
305 | 322 | } else { |
306 | 323 | ?> |
307 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
324 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
325 | + print $archiveupdatetime*1000; |
|
326 | +} else { |
|
327 | + print $globalMapRefresh*1000+20000; |
|
328 | +} |
|
329 | +?>+feature.properties.sqt*1000); |
|
308 | 330 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
309 | 331 | <?php |
310 | 332 | } |
@@ -594,14 +616,24 @@ discard block |
||
594 | 616 | if (isset($archive) && $archive) { |
595 | 617 | ?> |
596 | 618 | //then load it again every 30 seconds |
597 | -// var reload = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
619 | +// var reload = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) { |
|
620 | + print ($globalMapRefresh*1000)/2; |
|
621 | +} else { |
|
622 | + print '15000'; |
|
623 | +} |
|
624 | +?>); |
|
598 | 625 | reloadMarinePage = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php print $archiveupdatetime*1000; ?>); |
599 | 626 | <?php |
600 | 627 | } else { |
601 | 628 | ?> |
602 | 629 | //then load it again every 30 seconds |
603 | 630 | reloadMarinePage = setInterval( |
604 | - function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
631 | + function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) { |
|
632 | + print $globalMapRefresh*1000; |
|
633 | +} else { |
|
634 | + print '30000'; |
|
635 | +} |
|
636 | +?>); |
|
605 | 637 | <?php |
606 | 638 | } |
607 | 639 | ?> |
@@ -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 | $compress = false; |
11 | 14 | ?> |
12 | 15 | |
@@ -158,9 +161,13 @@ discard block |
||
158 | 161 | if (callsign != ""){ markerSatelliteLabel += callsign; } |
159 | 162 | if (type != ""){ markerSatelliteLabel += ' - '+type; } |
160 | 163 | <?php |
161 | - if (isset($_COOKIE['SatelliteIconColor'])) $IconColor = $_COOKIE['SatelliteIconColor']; |
|
162 | - elseif (isset($globalSatelliteIconColor)) $IconColor = $globalSatelliteIconColor; |
|
163 | - else $IconColor = '1a3151'; |
|
164 | + if (isset($_COOKIE['SatelliteIconColor'])) { |
|
165 | + $IconColor = $_COOKIE['SatelliteIconColor']; |
|
166 | + } elseif (isset($globalSatelliteIconColor)) { |
|
167 | + $IconColor = $globalSatelliteIconColor; |
|
168 | + } else { |
|
169 | + $IconColor = '1a3151'; |
|
170 | + } |
|
164 | 171 | if (!isset($ident) && !isset($famsatid)) { |
165 | 172 | ?> |
166 | 173 | info_satellite_update(feature.properties.fc); |
@@ -194,7 +201,12 @@ discard block |
||
194 | 201 | <?php |
195 | 202 | } else { |
196 | 203 | ?> |
197 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
204 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
205 | + print $archiveupdatetime*1000; |
|
206 | +} else { |
|
207 | + print $globalMapRefresh*1000+20000; |
|
208 | +} |
|
209 | +?>+feature.properties.sqt*1000); |
|
198 | 210 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
199 | 211 | <?php |
200 | 212 | } |
@@ -250,7 +262,12 @@ discard block |
||
250 | 262 | <?php |
251 | 263 | } else { |
252 | 264 | ?> |
253 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
265 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
266 | + print $archiveupdatetime*1000; |
|
267 | +} else { |
|
268 | + print $globalMapRefresh*1000+20000; |
|
269 | +} |
|
270 | +?>+feature.properties.sqt*1000); |
|
254 | 271 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
255 | 272 | <?php |
256 | 273 | } |
@@ -305,7 +322,12 @@ discard block |
||
305 | 322 | <?php |
306 | 323 | } else { |
307 | 324 | ?> |
308 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
325 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
326 | + print $archiveupdatetime*1000; |
|
327 | +} else { |
|
328 | + print $globalMapRefresh*1000+20000; |
|
329 | +} |
|
330 | +?>+feature.properties.sqt*1000); |
|
309 | 331 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
310 | 332 | <?php |
311 | 333 | } |
@@ -600,14 +622,24 @@ discard block |
||
600 | 622 | if (isset($archive) && $archive) { |
601 | 623 | ?> |
602 | 624 | //then load it again every 30 seconds |
603 | -// var reload = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
625 | +// var reload = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) { |
|
626 | + print ($globalMapRefresh*1000)/2; |
|
627 | +} else { |
|
628 | + print '15000'; |
|
629 | +} |
|
630 | +?>); |
|
604 | 631 | reloadSatellitePage = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php print $archiveupdatetime*1000; ?>); |
605 | 632 | <?php |
606 | 633 | } else { |
607 | 634 | ?> |
608 | 635 | //then load it again every 30 seconds |
609 | 636 | reloadSatellitePage = setInterval( |
610 | - function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
637 | + function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) { |
|
638 | + print $globalMapRefresh*1000; |
|
639 | +} else { |
|
640 | + print '30000'; |
|
641 | +} |
|
642 | +?>); |
|
611 | 643 | <?php |
612 | 644 | } |
613 | 645 | ?> |
@@ -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 | ?> |
11 | 14 | |
12 | 15 | |
@@ -157,9 +160,13 @@ discard block |
||
157 | 160 | if (callsign != ""){ markerTrackerLabel += callsign; } |
158 | 161 | if (type != ""){ markerTrackerLabel += ' - '+type; } |
159 | 162 | <?php |
160 | - if (isset($_COOKIE['TrackerIconColor'])) $IconColor = $_COOKIE['TrackerIconColor']; |
|
161 | - elseif (isset($globalTrackerIconColor)) $IconColor = $globalTrackerIconColor; |
|
162 | - else $IconColor = '1a3151'; |
|
163 | + if (isset($_COOKIE['TrackerIconColor'])) { |
|
164 | + $IconColor = $_COOKIE['TrackerIconColor']; |
|
165 | + } elseif (isset($globalTrackerIconColor)) { |
|
166 | + $IconColor = $globalTrackerIconColor; |
|
167 | + } else { |
|
168 | + $IconColor = '1a3151'; |
|
169 | + } |
|
163 | 170 | if (!isset($ident) && !isset($famtrackid)) { |
164 | 171 | ?> |
165 | 172 | //info_tracker_update(feature.properties.fc); |
@@ -193,7 +200,12 @@ discard block |
||
193 | 200 | <?php |
194 | 201 | } else { |
195 | 202 | ?> |
196 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
203 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
204 | + print $archiveupdatetime*1000; |
|
205 | +} else { |
|
206 | + print $globalMapRefresh*1000+20000; |
|
207 | +} |
|
208 | +?>+feature.properties.sqt*1000); |
|
197 | 209 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
198 | 210 | <?php |
199 | 211 | } |
@@ -249,7 +261,12 @@ discard block |
||
249 | 261 | <?php |
250 | 262 | } else { |
251 | 263 | ?> |
252 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
264 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
265 | + print $archiveupdatetime*1000; |
|
266 | +} else { |
|
267 | + print $globalMapRefresh*1000+20000; |
|
268 | +} |
|
269 | +?>+feature.properties.sqt*1000); |
|
253 | 270 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
254 | 271 | <?php |
255 | 272 | } |
@@ -304,7 +321,12 @@ discard block |
||
304 | 321 | <?php |
305 | 322 | } else { |
306 | 323 | ?> |
307 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
324 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
325 | + print $archiveupdatetime*1000; |
|
326 | +} else { |
|
327 | + print $globalMapRefresh*1000+20000; |
|
328 | +} |
|
329 | +?>+feature.properties.sqt*1000); |
|
308 | 330 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
309 | 331 | <?php |
310 | 332 | } |
@@ -595,14 +617,24 @@ discard block |
||
595 | 617 | if (isset($archive) && $archive) { |
596 | 618 | ?> |
597 | 619 | //then load it again every 30 seconds |
598 | -// var reload = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
620 | +// var reload = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) { |
|
621 | + print ($globalMapRefresh*1000)/2; |
|
622 | +} else { |
|
623 | + print '15000'; |
|
624 | +} |
|
625 | +?>); |
|
599 | 626 | reloadTrackerPage = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php print $archiveupdatetime*1000; ?>); |
600 | 627 | <?php |
601 | 628 | } else { |
602 | 629 | ?> |
603 | 630 | //then load it again every 30 seconds |
604 | 631 | reloadTrackerPage = setInterval( |
605 | - function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
632 | + function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) { |
|
633 | + print $globalMapRefresh*1000; |
|
634 | +} else { |
|
635 | + print '30000'; |
|
636 | +} |
|
637 | +?>); |
|
606 | 638 | <?php |
607 | 639 | } |
608 | 640 | ?> |
@@ -162,11 +162,26 @@ discard block |
||
162 | 162 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
163 | 163 | <li><?php echo _("NOTAM scope:"); ?> |
164 | 164 | <select class="selectpicker" onchange="notamscope(this);"> |
165 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
166 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
167 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
168 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
169 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
165 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
166 | + print ' selected'; |
|
167 | +} |
|
168 | +?>>All</option> |
|
169 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
170 | + print ' selected'; |
|
171 | +} |
|
172 | +?>>Airport/Enroute warning</option> |
|
173 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
174 | + print ' selected'; |
|
175 | +} |
|
176 | +?>>Airport warning</option> |
|
177 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
178 | + print ' selected'; |
|
179 | +} |
|
180 | +?>>Navigation warning</option> |
|
181 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
182 | + print ' selected'; |
|
183 | +} |
|
184 | +?>>Enroute warning</option> |
|
170 | 185 | </select |
171 | 186 | </li> |
172 | 187 | </ul> |
@@ -194,7 +209,12 @@ discard block |
||
194 | 209 | <div class="form-group"> |
195 | 210 | <label>From (UTC):</label> |
196 | 211 | <div class='input-group date' id='datetimepicker1'> |
197 | - <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 /> |
|
212 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
213 | + print $_POST['start_date']; |
|
214 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
215 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
216 | +} |
|
217 | +?>" required /> |
|
198 | 218 | <span class="input-group-addon"> |
199 | 219 | <span class="glyphicon glyphicon-calendar"></span> |
200 | 220 | </span> |
@@ -203,7 +223,12 @@ discard block |
||
203 | 223 | <div class="form-group"> |
204 | 224 | <label>To (UTC):</label> |
205 | 225 | <div class='input-group date' id='datetimepicker2'> |
206 | - <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']); ?>" /> |
|
226 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
227 | + print $_POST['end_date']; |
|
228 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
229 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
230 | +} |
|
231 | +?>" /> |
|
207 | 232 | <span class="input-group-addon"> |
208 | 233 | <span class="glyphicon glyphicon-calendar"></span> |
209 | 234 | </span> |
@@ -229,8 +254,20 @@ discard block |
||
229 | 254 | |
230 | 255 | <li><?php echo _("Playback speed:"); ?> |
231 | 256 | <div class="range"> |
232 | - <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'; ?>"> |
|
233 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
257 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
258 | + print $_POST['archivespeed']; |
|
259 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
260 | + print $_COOKIE['archive_speed']; |
|
261 | +} else { |
|
262 | + print '1'; |
|
263 | +} |
|
264 | +?>"> |
|
265 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
266 | + print $_COOKIE['archive_speed']; |
|
267 | +} else { |
|
268 | + print '1'; |
|
269 | +} |
|
270 | +?></output> |
|
234 | 271 | </div> |
235 | 272 | </li> |
236 | 273 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -252,15 +289,27 @@ discard block |
||
252 | 289 | <li><?php echo _("Type of Map:"); ?> |
253 | 290 | <select class="selectpicker" onchange="mapType(this);"> |
254 | 291 | <?php |
255 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
256 | - else $MapType = $_COOKIE['MapType']; |
|
292 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
293 | + $MapType = $globalMapProvider; |
|
294 | + } else { |
|
295 | + $MapType = $_COOKIE['MapType']; |
|
296 | + } |
|
257 | 297 | ?> |
258 | 298 | <?php |
259 | 299 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
260 | 300 | ?> |
261 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
262 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
263 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
301 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
302 | + print ' selected'; |
|
303 | +} |
|
304 | +?>>Bing-Aerial</option> |
|
305 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
306 | + print ' selected'; |
|
307 | +} |
|
308 | +?>>Bing-Hybrid</option> |
|
309 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
310 | + print ' selected'; |
|
311 | +} |
|
312 | +?>>Bing-Road</option> |
|
264 | 313 | <?php |
265 | 314 | } |
266 | 315 | ?> |
@@ -270,56 +319,131 @@ discard block |
||
270 | 319 | <?php |
271 | 320 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
272 | 321 | ?> |
273 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
274 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
275 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
322 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
323 | + print ' selected'; |
|
324 | +} |
|
325 | +?>>Here-Aerial</option> |
|
326 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
327 | + print ' selected'; |
|
328 | +} |
|
329 | +?>>Here-Hybrid</option> |
|
330 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
331 | + print ' selected'; |
|
332 | +} |
|
333 | +?>>Here-Road</option> |
|
276 | 334 | <?php |
277 | 335 | } |
278 | 336 | ?> |
279 | 337 | <?php |
280 | 338 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
281 | 339 | ?> |
282 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
283 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
284 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
285 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
340 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
341 | + print ' selected'; |
|
342 | +} |
|
343 | +?>>Google Roadmap</option> |
|
344 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
345 | + print ' selected'; |
|
346 | +} |
|
347 | +?>>Google Satellite</option> |
|
348 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
349 | + print ' selected'; |
|
350 | +} |
|
351 | +?>>Google Hybrid</option> |
|
352 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
353 | + print ' selected'; |
|
354 | +} |
|
355 | +?>>Google Terrain</option> |
|
286 | 356 | <?php |
287 | 357 | } |
288 | 358 | ?> |
289 | 359 | <?php |
290 | 360 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
291 | 361 | ?> |
292 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
293 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
294 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
362 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
363 | + print ' selected'; |
|
364 | +} |
|
365 | +?>>MapQuest-OSM</option> |
|
366 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
367 | + print ' selected'; |
|
368 | +} |
|
369 | +?>>MapQuest-Aerial</option> |
|
370 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
371 | + print ' selected'; |
|
372 | +} |
|
373 | +?>>MapQuest-Hybrid</option> |
|
295 | 374 | <?php |
296 | 375 | } |
297 | 376 | ?> |
298 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
377 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
378 | + print ' selected'; |
|
379 | +} |
|
380 | +?>>Yandex</option> |
|
299 | 381 | <?php |
300 | 382 | } |
301 | 383 | ?> |
302 | 384 | <?php |
303 | 385 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
304 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
305 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
386 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
387 | + $MapBoxId = 'default'; |
|
388 | + } else { |
|
389 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
390 | + } |
|
306 | 391 | ?> |
307 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
308 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
309 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
310 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
311 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
312 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
313 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
314 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
315 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
316 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
317 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
318 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
392 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
393 | + print ' selected'; |
|
394 | +} |
|
395 | +?>>Mapbox default</option> |
|
396 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
397 | + print ' selected'; |
|
398 | +} |
|
399 | +?>>Mapbox streets</option> |
|
400 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
401 | + print ' selected'; |
|
402 | +} |
|
403 | +?>>Mapbox light</option> |
|
404 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
405 | + print ' selected'; |
|
406 | +} |
|
407 | +?>>Mapbox dark</option> |
|
408 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
409 | + print ' selected'; |
|
410 | +} |
|
411 | +?>>Mapbox satellite</option> |
|
412 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
413 | + print ' selected'; |
|
414 | +} |
|
415 | +?>>Mapbox streets-satellite</option> |
|
416 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>Mapbox streets-basic</option> |
|
420 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
421 | + print ' selected'; |
|
422 | +} |
|
423 | +?>>Mapbox comic</option> |
|
424 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
425 | + print ' selected'; |
|
426 | +} |
|
427 | +?>>Mapbox outdoors</option> |
|
428 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
429 | + print ' selected'; |
|
430 | +} |
|
431 | +?>>Mapbox pencil</option> |
|
432 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
433 | + print ' selected'; |
|
434 | +} |
|
435 | +?>>Mapbox pirates</option> |
|
436 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
437 | + print ' selected'; |
|
438 | +} |
|
439 | +?>>Mapbox emerald</option> |
|
319 | 440 | <?php |
320 | 441 | } |
321 | 442 | ?> |
322 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
443 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
444 | + print ' selected'; |
|
445 | +} |
|
446 | +?>>OpenStreetMap</option> |
|
323 | 447 | </select> |
324 | 448 | </li> |
325 | 449 | <?php |
@@ -327,10 +451,22 @@ discard block |
||
327 | 451 | ?> |
328 | 452 | <li><?php echo _("Type of Terrain:"); ?> |
329 | 453 | <select class="selectpicker" onchange="terrainType(this);"> |
330 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
331 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
332 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
333 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
454 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
455 | + print ' selected'; |
|
456 | +} |
|
457 | +?>>stk terrain</option> |
|
458 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
459 | + print ' selected'; |
|
460 | +} |
|
461 | +?>>ellipsoid</option> |
|
462 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
463 | + print ' selected'; |
|
464 | +} |
|
465 | +?>>vr terrain</option> |
|
466 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
467 | + print ' selected'; |
|
468 | +} |
|
469 | +?>>ArticDEM</option> |
|
334 | 470 | </select> |
335 | 471 | </li> |
336 | 472 | <?php |
@@ -342,28 +478,61 @@ discard block |
||
342 | 478 | <?php |
343 | 479 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
344 | 480 | ?> |
345 | - <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> |
|
346 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
347 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
348 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
349 | - <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> |
|
481 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
482 | + print 'checked'; |
|
483 | +} |
|
484 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
485 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
486 | + print 'checked'; |
|
487 | +} |
|
488 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
489 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) { |
|
490 | + print 'checked'; |
|
491 | +} |
|
492 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
493 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
494 | + print 'checked'; |
|
495 | +} |
|
496 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
497 | + <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)) { |
|
498 | + print 'checked'; |
|
499 | +} |
|
500 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
350 | 501 | <?php |
351 | 502 | } |
352 | 503 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
353 | 504 | ?> |
354 | - <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
505 | + <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
506 | + print 'checked'; |
|
507 | +} |
|
508 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
355 | 509 | <?php |
356 | 510 | } |
357 | 511 | } |
358 | 512 | ?> |
359 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
360 | - <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
361 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
362 | - <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
513 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) { |
|
514 | + print 'checked'; |
|
515 | +} |
|
516 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
517 | + <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
518 | + print 'checked'; |
|
519 | +} |
|
520 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
521 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) { |
|
522 | + print 'checked'; |
|
523 | +} |
|
524 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
525 | + <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) { |
|
526 | + print 'checked'; |
|
527 | +} |
|
528 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
363 | 529 | <?php |
364 | 530 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
365 | 531 | ?> |
366 | - <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> |
|
532 | + <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')) { |
|
533 | + print 'checked'; |
|
534 | +} |
|
535 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
367 | 536 | <?php |
368 | 537 | } |
369 | 538 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -377,17 +546,25 @@ discard block |
||
377 | 546 | if (function_exists('array_column')) { |
378 | 547 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
379 | 548 | ?> |
380 | - <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> |
|
549 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
550 | + print 'checked'; |
|
551 | +} |
|
552 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
381 | 553 | <?php |
382 | 554 | } |
383 | 555 | } elseif (isset($globalSources)) { |
384 | 556 | $dispolar = false; |
385 | 557 | foreach ($globalSources as $testsource) { |
386 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
558 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
559 | + $dispolar = true; |
|
560 | + } |
|
387 | 561 | } |
388 | 562 | if ($dispolar) { |
389 | 563 | ?> |
390 | - <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> |
|
564 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
565 | + print 'checked'; |
|
566 | +} |
|
567 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
391 | 568 | <?php |
392 | 569 | } |
393 | 570 | } |
@@ -400,12 +577,22 @@ discard block |
||
400 | 577 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
401 | 578 | if (extension_loaded('gd') && function_exists('gd_info')) { |
402 | 579 | ?> |
403 | - <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> |
|
580 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
581 | + print 'checked'; |
|
582 | +} |
|
583 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
404 | 584 | <?php |
405 | 585 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
406 | 586 | ?> |
407 | 587 | <li><?php echo _("Aircraft icon color:"); ?> |
408 | - <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'; ?>"> |
|
588 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
589 | + print $_COOKIE['IconColor']; |
|
590 | +} elseif (isset($globalAircraftIconColor)) { |
|
591 | + print $globalAircraftIconColor; |
|
592 | +} else { |
|
593 | + print '1a3151'; |
|
594 | +} |
|
595 | +?>"> |
|
409 | 596 | </li> |
410 | 597 | <?php |
411 | 598 | } |
@@ -417,7 +604,14 @@ discard block |
||
417 | 604 | if (extension_loaded('gd') && function_exists('gd_info')) { |
418 | 605 | ?> |
419 | 606 | <li><?php echo _("Marine icon color:"); ?> |
420 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
|
607 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
608 | + print $_COOKIE['MarineIconColor']; |
|
609 | +} elseif (isset($globalMarineIconColor)) { |
|
610 | + print $globalMarineIconColor; |
|
611 | +} else { |
|
612 | + print '1a3151'; |
|
613 | +} |
|
614 | +?>"> |
|
421 | 615 | </li> |
422 | 616 | <?php |
423 | 617 | } |
@@ -428,7 +622,14 @@ discard block |
||
428 | 622 | if (extension_loaded('gd') && function_exists('gd_info')) { |
429 | 623 | ?> |
430 | 624 | <li><?php echo _("Tracker icon color:"); ?> |
431 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
|
625 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
626 | + print $_COOKIE['TrackerIconColor']; |
|
627 | +} elseif (isset($globalTrackerIconColor)) { |
|
628 | + print $globalTrackerIconColor; |
|
629 | +} else { |
|
630 | + print '1a3151'; |
|
631 | +} |
|
632 | +?>"> |
|
432 | 633 | </li> |
433 | 634 | <?php |
434 | 635 | } |
@@ -439,8 +640,22 @@ discard block |
||
439 | 640 | ?> |
440 | 641 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
441 | 642 | <div class="range"> |
442 | - <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'; ?>"> |
|
443 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
643 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
644 | + print $_COOKIE['AirportZoom']; |
|
645 | +} elseif (isset($globalAirportZoom)) { |
|
646 | + print $globalAirportZoom; |
|
647 | +} else { |
|
648 | + print '7'; |
|
649 | +} |
|
650 | +?>"> |
|
651 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
652 | + print $_COOKIE['AirportZoom']; |
|
653 | +} elseif (isset($globalAirportZoom)) { |
|
654 | + print $globalAirportZoom; |
|
655 | +} else { |
|
656 | + print '7'; |
|
657 | +} |
|
658 | +?></output> |
|
444 | 659 | </div> |
445 | 660 | </li> |
446 | 661 | <?php |
@@ -452,9 +667,19 @@ discard block |
||
452 | 667 | <?php |
453 | 668 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
454 | 669 | ?> |
455 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li> |
|
670 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
671 | + print 'checked'; |
|
672 | +} |
|
673 | +?> ><?php echo _("Force Aircraft color"); ?></li> |
|
456 | 674 | <li><?php echo _("Aircraft icon color:"); ?> |
457 | - <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 'ff0000'; ?>"> |
|
675 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
676 | + print $_COOKIE['IconColor']; |
|
677 | +} elseif (isset($globalAircraftIconColor)) { |
|
678 | + print $globalAircraftIconColor; |
|
679 | +} else { |
|
680 | + print 'ff0000'; |
|
681 | +} |
|
682 | +?>"> |
|
458 | 683 | </li> |
459 | 684 | <?php |
460 | 685 | } |
@@ -462,9 +687,19 @@ discard block |
||
462 | 687 | <?php |
463 | 688 | if (isset($globalMarine) && $globalMarine === TRUE) { |
464 | 689 | ?> |
465 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li> |
|
690 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
691 | + print 'checked'; |
|
692 | +} |
|
693 | +?> ><?php echo _("Force Marine color"); ?></li> |
|
466 | 694 | <li><?php echo _("Marine icon color:"); ?> |
467 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>"> |
|
695 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
696 | + print $_COOKIE['MarineIconColor']; |
|
697 | +} elseif (isset($globalMarineIconColor)) { |
|
698 | + print $globalMarineIconColor; |
|
699 | +} else { |
|
700 | + print 'ff0000'; |
|
701 | +} |
|
702 | +?>"> |
|
468 | 703 | </li> |
469 | 704 | <?php |
470 | 705 | } |
@@ -472,9 +707,19 @@ discard block |
||
472 | 707 | <?php |
473 | 708 | if (isset($globalTracker) && $globalTracker === TRUE) { |
474 | 709 | ?> |
475 | - <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?></li> |
|
710 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
711 | + print 'checked'; |
|
712 | +} |
|
713 | +?> ><?php echo _("Force Tracker color"); ?></li> |
|
476 | 714 | <li><?php echo _("Tracker icon color:"); ?> |
477 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>"> |
|
715 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
716 | + print $_COOKIE['TrackerIconColor']; |
|
717 | +} elseif (isset($globalTrackerIconColor)) { |
|
718 | + print $globalTrackerIconColor; |
|
719 | +} else { |
|
720 | + print 'ff0000'; |
|
721 | +} |
|
722 | +?>"> |
|
478 | 723 | </li> |
479 | 724 | <?php |
480 | 725 | } |
@@ -482,22 +727,46 @@ discard block |
||
482 | 727 | ?> |
483 | 728 | <li><?php echo _("Distance unit:"); ?> |
484 | 729 | <select class="selectpicker" onchange="unitdistance(this);"> |
485 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
486 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
487 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
730 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
731 | + echo ' selected'; |
|
732 | +} |
|
733 | +?>>km</option> |
|
734 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
735 | + echo ' selected'; |
|
736 | +} |
|
737 | +?>>nm</option> |
|
738 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
739 | + echo ' selected'; |
|
740 | +} |
|
741 | +?>>mi</option> |
|
488 | 742 | </select> |
489 | 743 | </li> |
490 | 744 | <li><?php echo _("Altitude unit:"); ?> |
491 | 745 | <select class="selectpicker" onchange="unitaltitude(this);"> |
492 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
493 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
746 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
747 | + echo ' selected'; |
|
748 | +} |
|
749 | +?>>m</option> |
|
750 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
751 | + echo ' selected'; |
|
752 | +} |
|
753 | +?>>feet</option> |
|
494 | 754 | </select> |
495 | 755 | </li> |
496 | 756 | <li><?php echo _("Speed unit:"); ?> |
497 | 757 | <select class="selectpicker" onchange="unitspeed(this);"> |
498 | - <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> |
|
499 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
500 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
758 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
759 | + echo ' selected'; |
|
760 | +} |
|
761 | +?>>km/h</option> |
|
762 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
763 | + echo ' selected'; |
|
764 | +} |
|
765 | +?>>mph</option> |
|
766 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
767 | + echo ' selected'; |
|
768 | +} |
|
769 | +?>>knots</option> |
|
501 | 770 | </select> |
502 | 771 | </li> |
503 | 772 | |
@@ -515,9 +784,18 @@ discard block |
||
515 | 784 | <?php |
516 | 785 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
517 | 786 | ?> |
518 | - <?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 } ?> |
|
519 | - <?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 } ?> |
|
520 | - <?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 } ?> |
|
787 | + <?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'])) { |
|
788 | + print 'checked'; |
|
789 | +} |
|
790 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
791 | + <?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'])) { |
|
792 | + print 'checked'; |
|
793 | +} |
|
794 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
795 | + <?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'])) { |
|
796 | + print 'checked'; |
|
797 | +} |
|
798 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
521 | 799 | <?php |
522 | 800 | } |
523 | 801 | ?> |
@@ -525,10 +803,16 @@ discard block |
||
525 | 803 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
526 | 804 | ?> |
527 | 805 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
528 | - <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> |
|
806 | + <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'])) { |
|
807 | + print 'checked'; |
|
808 | +} |
|
809 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
529 | 810 | <?php } ?> |
530 | 811 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
531 | - <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> |
|
812 | + <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'])) { |
|
813 | + print 'checked'; |
|
814 | +} |
|
815 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
532 | 816 | <?php } ?> |
533 | 817 | <?php |
534 | 818 | } |
@@ -545,7 +829,9 @@ discard block |
||
545 | 829 | } |
546 | 830 | foreach($allairlinenames as $airline) { |
547 | 831 | $airline_name = $airline['airline_name']; |
548 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
832 | + if (strlen($airline_name) > 30) { |
|
833 | + $airline_name = substr($airline_name,0,30).'...'; |
|
834 | + } |
|
549 | 835 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
550 | 836 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
551 | 837 | } else { |
@@ -563,7 +849,10 @@ discard block |
||
563 | 849 | <li><?php echo _("Display alliance:"); ?> |
564 | 850 | <br/> |
565 | 851 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
566 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
852 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
853 | + echo ' selected'; |
|
854 | +} |
|
855 | +?>><?php echo _("All"); ?></option> |
|
567 | 856 | <?php |
568 | 857 | foreach($allalliancenames as $alliance) { |
569 | 858 | $alliance_name = $alliance['alliance']; |
@@ -610,10 +899,22 @@ discard block |
||
610 | 899 | ?> |
611 | 900 | <li><?php echo _("Display airlines of type:"); ?><br/> |
612 | 901 | <select class="selectpicker" onchange="airlinestype(this);"> |
613 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
614 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
615 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
616 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
902 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
903 | + echo ' selected'; |
|
904 | +} |
|
905 | +?>><?php echo _("All"); ?></option> |
|
906 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
907 | + echo ' selected'; |
|
908 | +} |
|
909 | +?>><?php echo _("Passenger"); ?></option> |
|
910 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
911 | + echo ' selected'; |
|
912 | +} |
|
913 | +?>><?php echo _("Cargo"); ?></option> |
|
914 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
915 | + echo ' selected'; |
|
916 | +} |
|
917 | +?>><?php echo _("Military"); ?></option> |
|
617 | 918 | </select> |
618 | 919 | </li> |
619 | 920 | <?php |
@@ -621,7 +922,10 @@ discard block |
||
621 | 922 | ?> |
622 | 923 | <li> |
623 | 924 | <?php echo _("Display flight with ident:"); ?> |
624 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
925 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
926 | + print $_COOKIE['filter_ident']; |
|
927 | +} |
|
928 | +?>" /> |
|
625 | 929 | </li> |
626 | 930 | <?php |
627 | 931 | } |
@@ -640,7 +944,10 @@ discard block |
||
640 | 944 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
641 | 945 | <form> |
642 | 946 | <ul> |
643 | - <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> |
|
947 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
948 | + print 'checked'; |
|
949 | +} |
|
950 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
644 | 951 | <li><?php echo _("Type:"); ?> |
645 | 952 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
646 | 953 | <?php |
@@ -648,25 +955,45 @@ discard block |
||
648 | 955 | $types = $Satellite->get_tle_types(); |
649 | 956 | foreach ($types as $type) { |
650 | 957 | $type_name = $type['tle_type']; |
651 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
652 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
653 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
654 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
655 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
656 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
657 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
658 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
659 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
660 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
661 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
662 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
663 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
664 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
665 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
666 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
667 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
668 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
669 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
958 | + if ($type_name == 'musson') { |
|
959 | + $type_name = 'Russian LEO Navigation'; |
|
960 | + } else if ($type_name == 'nnss') { |
|
961 | + $type_name = 'Navi Navigation Satellite System'; |
|
962 | + } else if ($type_name == 'sbas') { |
|
963 | + $type_name = 'Satellite-Based Augmentation System'; |
|
964 | + } else if ($type_name == 'glo-ops') { |
|
965 | + $type_name = 'Glonass Operational'; |
|
966 | + } else if ($type_name == 'gps-ops') { |
|
967 | + $type_name = 'GPS Operational'; |
|
968 | + } else if ($type_name == 'argos') { |
|
969 | + $type_name = 'ARGOS Data Collection System'; |
|
970 | + } else if ($type_name == 'tdrss') { |
|
971 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
972 | + } else if ($type_name == 'sarsat') { |
|
973 | + $type_name = 'Search & Rescue'; |
|
974 | + } else if ($type_name == 'dmc') { |
|
975 | + $type_name = 'Disaster Monitoring'; |
|
976 | + } else if ($type_name == 'resource') { |
|
977 | + $type_name = 'Earth Resources'; |
|
978 | + } else if ($type_name == 'stations') { |
|
979 | + $type_name = 'Space Stations'; |
|
980 | + } else if ($type_name == 'geo') { |
|
981 | + $type_name = 'Geostationary'; |
|
982 | + } else if ($type_name == 'amateur') { |
|
983 | + $type_name = 'Amateur Radio'; |
|
984 | + } else if ($type_name == 'x-comm') { |
|
985 | + $type_name = 'Experimental'; |
|
986 | + } else if ($type_name == 'other-comm') { |
|
987 | + $type_name = 'Other Comm'; |
|
988 | + } else if ($type_name == 'science') { |
|
989 | + $type_name = 'Space & Earth Science'; |
|
990 | + } else if ($type_name == 'military') { |
|
991 | + $type_name = 'Miscellaneous Military'; |
|
992 | + } else if ($type_name == 'radar') { |
|
993 | + $type_name = 'Radar Calibration'; |
|
994 | + } else if ($type_name == 'tle-new') { |
|
995 | + $type_name = 'Last 30 days launches'; |
|
996 | + } |
|
670 | 997 | |
671 | 998 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
672 | 999 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |