@@ -8,7 +8,9 @@ discard block |
||
8 | 8 | public function __construct($dbc = null) { |
9 | 9 | $Connection = new Connection($dbc); |
10 | 10 | $this->db = $Connection->db(); |
11 | - if ($this->db === null) die('Error: No DB connection. (SpotterLive)'); |
|
11 | + if ($this->db === null) { |
|
12 | + die('Error: No DB connection. (SpotterLive)'); |
|
13 | + } |
|
12 | 14 | } |
13 | 15 | |
14 | 16 | |
@@ -30,7 +32,9 @@ discard block |
||
30 | 32 | if (isset($filter[0]['source'])) { |
31 | 33 | $filters = array_merge($filters,$filter); |
32 | 34 | } |
33 | - if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter); |
|
35 | + if (is_array($globalFilter)) { |
|
36 | + $filter = array_merge($filter,$globalFilter); |
|
37 | + } |
|
34 | 38 | $filter_query_join = ''; |
35 | 39 | $filter_query_where = ''; |
36 | 40 | foreach($filters as $flt) { |
@@ -126,8 +130,11 @@ discard block |
||
126 | 130 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
127 | 131 | $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
128 | 132 | } |
129 | - if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE'; |
|
130 | - elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND'; |
|
133 | + if ($filter_query_where == '' && $where) { |
|
134 | + $filter_query_where = ' WHERE'; |
|
135 | + } elseif ($filter_query_where != '' && $and) { |
|
136 | + $filter_query_where .= ' AND'; |
|
137 | + } |
|
131 | 138 | if ($filter_query_where != '') { |
132 | 139 | $filter_query_where = preg_replace('/^ AND/',' WHERE',$filter_query_where); |
133 | 140 | } |
@@ -168,9 +175,13 @@ discard block |
||
168 | 175 | $orderby_query = ' '.$search_orderby_array[$sort]['sql']; |
169 | 176 | } |
170 | 177 | } |
171 | - if ($orderby_query == '') $orderby_query = ' ORDER BY date DESC'; |
|
178 | + if ($orderby_query == '') { |
|
179 | + $orderby_query = ' ORDER BY date DESC'; |
|
180 | + } |
|
172 | 181 | |
173 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
182 | + if (!isset($globalLiveInterval)) { |
|
183 | + $globalLiveInterval = '200'; |
|
184 | + } |
|
174 | 185 | if ($globalDBdriver == 'mysql') { |
175 | 186 | //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 30 SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
176 | 187 | $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate'.$filter_query.$orderby_query; |
@@ -193,7 +204,9 @@ discard block |
||
193 | 204 | global $globalDBdriver, $globalLiveInterval, $globalArchive; |
194 | 205 | date_default_timezone_set('UTC'); |
195 | 206 | $filter_query = $this->getFilter($filter,true,true); |
196 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
207 | + if (!isset($globalLiveInterval)) { |
|
208 | + $globalLiveInterval = '200'; |
|
209 | + } |
|
197 | 210 | if ($globalDBdriver == 'mysql') { |
198 | 211 | if (isset($globalArchive) && $globalArchive === TRUE) { |
199 | 212 | $query = 'SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
@@ -244,8 +257,12 @@ discard block |
||
244 | 257 | $id = filter_var($id,FILTER_SANITIZE_STRING); |
245 | 258 | $filter_query = $this->getFilter($filter,true,true); |
246 | 259 | |
247 | - if (!isset($globalLiveInterval) || $globalLiveInterval == '') $globalLiveInterval = '200'; |
|
248 | - if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') $globalMap3DAircraftsLimit = '300'; |
|
260 | + if (!isset($globalLiveInterval) || $globalLiveInterval == '') { |
|
261 | + $globalLiveInterval = '200'; |
|
262 | + } |
|
263 | + if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') { |
|
264 | + $globalMap3DAircraftsLimit = '300'; |
|
265 | + } |
|
249 | 266 | if ($globalDBdriver == 'mysql') { |
250 | 267 | if (isset($globalArchive) && $globalArchive === TRUE) { |
251 | 268 | /* |
@@ -256,25 +273,41 @@ discard block |
||
256 | 273 | */ |
257 | 274 | $query = 'SELECT * FROM (SELECT spotter_archive.ident, spotter_archive.flightaware_id, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, spotter_archive.date, spotter_archive.format_source |
258 | 275 | FROM spotter_archive INNER JOIN (SELECT flightaware_id FROM spotter_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= spotter_live.date) l ON l.flightaware_id = spotter_archive.flightaware_id "; |
259 | - if ($usecoord) $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
260 | - if ($id != '') $query .= "OR spotter_archive.flightaware_id = :id "; |
|
276 | + if ($usecoord) { |
|
277 | + $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
278 | + } |
|
279 | + if ($id != '') { |
|
280 | + $query .= "OR spotter_archive.flightaware_id = :id "; |
|
281 | + } |
|
261 | 282 | $query .= "UNION |
262 | 283 | SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
263 | 284 | FROM spotter_live".$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= spotter_live.date"; |
264 | - if ($usecoord) $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
265 | - if ($id != '') $query .= " OR spotter_live.flightaware_id = :id"; |
|
285 | + if ($usecoord) { |
|
286 | + $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
287 | + } |
|
288 | + if ($id != '') { |
|
289 | + $query .= " OR spotter_live.flightaware_id = :id"; |
|
290 | + } |
|
266 | 291 | $query .= ") AS spotter |
267 | 292 | WHERE latitude <> '0' AND longitude <> '0' |
268 | 293 | ORDER BY flightaware_id, date"; |
269 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
294 | + if ($limit) { |
|
295 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
296 | + } |
|
270 | 297 | } else { |
271 | 298 | $query = 'SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
272 | 299 | FROM spotter_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= spotter_live.date "; |
273 | - if ($usecoord) $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
274 | - if ($id != '') $query .= "OR spotter_live.flightaware_id = :id "; |
|
300 | + if ($usecoord) { |
|
301 | + $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
302 | + } |
|
303 | + if ($id != '') { |
|
304 | + $query .= "OR spotter_live.flightaware_id = :id "; |
|
305 | + } |
|
275 | 306 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
276 | 307 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
277 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
308 | + if ($limit) { |
|
309 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
310 | + } |
|
278 | 311 | } |
279 | 312 | } else { |
280 | 313 | if (isset($globalArchive) && $globalArchive === TRUE) { |
@@ -286,28 +319,46 @@ discard block |
||
286 | 319 | */ |
287 | 320 | $query = "SELECT * FROM (SELECT spotter_archive.ident, spotter_archive.flightaware_id, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, spotter_archive.date, spotter_archive.format_source |
288 | 321 | FROM spotter_archive INNER JOIN (SELECT flightaware_id FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date) l ON l.flightaware_id = spotter_archive.flightaware_id "; |
289 | - if ($usecoord) $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
290 | - if ($id != '') $query .= "OR spotter_archive.flightaware_id = :id "; |
|
322 | + if ($usecoord) { |
|
323 | + $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
324 | + } |
|
325 | + if ($id != '') { |
|
326 | + $query .= "OR spotter_archive.flightaware_id = :id "; |
|
327 | + } |
|
291 | 328 | $query .= "UNION |
292 | 329 | SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
293 | 330 | FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date"; |
294 | - if ($usecoord) $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
295 | - if ($id != '') $query .= " OR spotter_live.flightaware_id = :id"; |
|
331 | + if ($usecoord) { |
|
332 | + $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
333 | + } |
|
334 | + if ($id != '') { |
|
335 | + $query .= " OR spotter_live.flightaware_id = :id"; |
|
336 | + } |
|
296 | 337 | $query .= ") AS spotter WHERE latitude <> '0' AND longitude <> '0' "; |
297 | 338 | $query .= "ORDER BY flightaware_id, date"; |
298 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
339 | + if ($limit) { |
|
340 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
341 | + } |
|
299 | 342 | } else { |
300 | 343 | $query = "SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
301 | 344 | FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date "; |
302 | - if ($usecoord) $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
303 | - if ($id != '') $query .= "OR spotter_live.flightaware_id = :id "; |
|
345 | + if ($usecoord) { |
|
346 | + $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
347 | + } |
|
348 | + if ($id != '') { |
|
349 | + $query .= "OR spotter_live.flightaware_id = :id "; |
|
350 | + } |
|
304 | 351 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
305 | 352 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
306 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
353 | + if ($limit) { |
|
354 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
355 | + } |
|
307 | 356 | } |
308 | 357 | } |
309 | 358 | $query_values = array(); |
310 | - if ($id != '') $query_values = array(':id' => $id); |
|
359 | + if ($id != '') { |
|
360 | + $query_values = array(':id' => $id); |
|
361 | + } |
|
311 | 362 | try { |
312 | 363 | $sth = $this->db->prepare($query); |
313 | 364 | $sth->execute($query_values); |
@@ -330,7 +381,9 @@ discard block |
||
330 | 381 | global $globalDBdriver, $globalLiveInterval; |
331 | 382 | $filter_query = $this->getFilter($filter,true,true); |
332 | 383 | |
333 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
384 | + if (!isset($globalLiveInterval)) { |
|
385 | + $globalLiveInterval = '200'; |
|
386 | + } |
|
334 | 387 | if ($globalDBdriver == 'mysql') { |
335 | 388 | //$query = 'SELECT COUNT(*) as nb FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate'.$filter_query; |
336 | 389 | $query = 'SELECT COUNT(DISTINCT spotter_live.flightaware_id) as nb FROM spotter_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
@@ -360,7 +413,9 @@ discard block |
||
360 | 413 | { |
361 | 414 | global $globalDBdriver, $globalLiveInterval; |
362 | 415 | $Spotter = new Spotter($this->db); |
363 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
416 | + if (!isset($globalLiveInterval)) { |
|
417 | + $globalLiveInterval = '200'; |
|
418 | + } |
|
364 | 419 | $filter_query = $this->getFilter($filter); |
365 | 420 | |
366 | 421 | if (is_array($coord)) { |
@@ -368,7 +423,9 @@ discard block |
||
368 | 423 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
369 | 424 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
370 | 425 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
371 | - } else return array(); |
|
426 | + } else { |
|
427 | + return array(); |
|
428 | + } |
|
372 | 429 | if ($globalDBdriver == 'mysql') { |
373 | 430 | $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN '.$minlat.' AND '.$maxlat.' AND spotter_live.longitude BETWEEN '.$minlong.' AND '.$maxlong.' GROUP BY spotter_live.flightaware_id'.$filter_query; |
374 | 431 | } else { |
@@ -389,7 +446,9 @@ discard block |
||
389 | 446 | { |
390 | 447 | global $globalDBdriver, $globalLiveInterval, $globalArchive; |
391 | 448 | $Spotter = new Spotter($this->db); |
392 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
449 | + if (!isset($globalLiveInterval)) { |
|
450 | + $globalLiveInterval = '200'; |
|
451 | + } |
|
393 | 452 | $filter_query = $this->getFilter($filter,true,true); |
394 | 453 | |
395 | 454 | if (is_array($coord)) { |
@@ -397,7 +456,9 @@ discard block |
||
397 | 456 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
398 | 457 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
399 | 458 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
400 | - } else return array(); |
|
459 | + } else { |
|
460 | + return array(); |
|
461 | + } |
|
401 | 462 | if ($globalDBdriver == 'mysql') { |
402 | 463 | if (isset($globalArchive) && $globalArchive === TRUE) { |
403 | 464 | $query = 'SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source |
@@ -624,11 +685,15 @@ discard block |
||
624 | 685 | //$query = self::$global_query.' WHERE spotter_live.flightaware_id = :id ORDER BY date'; |
625 | 686 | if ($globalDBdriver == 'mysql') { |
626 | 687 | $query = 'SELECT spotter_live.* FROM spotter_live WHERE spotter_live.flightaware_id = :id'; |
627 | - if ($liveinterval) $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
688 | + if ($liveinterval) { |
|
689 | + $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
690 | + } |
|
628 | 691 | $query .= ' ORDER BY date'; |
629 | 692 | } else { |
630 | 693 | $query = 'SELECT spotter_live.* FROM spotter_live WHERE spotter_live.flightaware_id = :id'; |
631 | - if ($liveinterval) $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
694 | + if ($liveinterval) { |
|
695 | + $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
696 | + } |
|
632 | 697 | $query .= ' ORDER BY date'; |
633 | 698 | } |
634 | 699 | |
@@ -723,7 +788,9 @@ discard block |
||
723 | 788 | $i++; |
724 | 789 | $j++; |
725 | 790 | if ($j == 30) { |
726 | - if ($globalDebug) echo "."; |
|
791 | + if ($globalDebug) { |
|
792 | + echo "."; |
|
793 | + } |
|
727 | 794 | try { |
728 | 795 | |
729 | 796 | $sth = $this->db->prepare(substr($query_delete,0,-1).")"); |
@@ -1076,7 +1143,9 @@ discard block |
||
1076 | 1143 | { |
1077 | 1144 | return false; |
1078 | 1145 | } |
1079 | - } else return ''; |
|
1146 | + } else { |
|
1147 | + return ''; |
|
1148 | + } |
|
1080 | 1149 | |
1081 | 1150 | if ($longitude != '') |
1082 | 1151 | { |
@@ -1084,7 +1153,9 @@ discard block |
||
1084 | 1153 | { |
1085 | 1154 | return false; |
1086 | 1155 | } |
1087 | - } else return ''; |
|
1156 | + } else { |
|
1157 | + return ''; |
|
1158 | + } |
|
1088 | 1159 | |
1089 | 1160 | if ($waypoints != '') |
1090 | 1161 | { |
@@ -1100,14 +1171,18 @@ discard block |
||
1100 | 1171 | { |
1101 | 1172 | return false; |
1102 | 1173 | } |
1103 | - } else $altitude = 0; |
|
1174 | + } else { |
|
1175 | + $altitude = 0; |
|
1176 | + } |
|
1104 | 1177 | if ($altitude_real != '') |
1105 | 1178 | { |
1106 | 1179 | if (!is_numeric($altitude_real)) |
1107 | 1180 | { |
1108 | 1181 | return false; |
1109 | 1182 | } |
1110 | - } else $altitude_real = 0; |
|
1183 | + } else { |
|
1184 | + $altitude_real = 0; |
|
1185 | + } |
|
1111 | 1186 | |
1112 | 1187 | if ($heading != '') |
1113 | 1188 | { |
@@ -1115,7 +1190,9 @@ discard block |
||
1115 | 1190 | { |
1116 | 1191 | return false; |
1117 | 1192 | } |
1118 | - } else $heading = 0; |
|
1193 | + } else { |
|
1194 | + $heading = 0; |
|
1195 | + } |
|
1119 | 1196 | |
1120 | 1197 | if ($groundspeed != '') |
1121 | 1198 | { |
@@ -1123,9 +1200,13 @@ discard block |
||
1123 | 1200 | { |
1124 | 1201 | return false; |
1125 | 1202 | } |
1126 | - } else $groundspeed = 0; |
|
1203 | + } else { |
|
1204 | + $groundspeed = 0; |
|
1205 | + } |
|
1127 | 1206 | date_default_timezone_set('UTC'); |
1128 | - if ($date == '') $date = date("Y-m-d H:i:s", time()); |
|
1207 | + if ($date == '') { |
|
1208 | + $date = date("Y-m-d H:i:s", time()); |
|
1209 | + } |
|
1129 | 1210 | |
1130 | 1211 | |
1131 | 1212 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -1170,14 +1251,24 @@ discard block |
||
1170 | 1251 | $arrival_airport_country = ''; |
1171 | 1252 | |
1172 | 1253 | |
1173 | - if ($squawk == '' || $Common->isInteger($squawk) === false ) $squawk = NULL; |
|
1174 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false ) $verticalrate = NULL; |
|
1175 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) $groundspeed = 0; |
|
1176 | - if ($heading == '' || $Common->isInteger($heading) === false ) $heading = 0; |
|
1254 | + if ($squawk == '' || $Common->isInteger($squawk) === false ) { |
|
1255 | + $squawk = NULL; |
|
1256 | + } |
|
1257 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false ) { |
|
1258 | + $verticalrate = NULL; |
|
1259 | + } |
|
1260 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) { |
|
1261 | + $groundspeed = 0; |
|
1262 | + } |
|
1263 | + if ($heading == '' || $Common->isInteger($heading) === false ) { |
|
1264 | + $heading = 0; |
|
1265 | + } |
|
1177 | 1266 | |
1178 | 1267 | $query = ''; |
1179 | 1268 | if ($globalArchive) { |
1180 | - if ($globalDebug) echo '-- Delete previous data -- '; |
|
1269 | + if ($globalDebug) { |
|
1270 | + echo '-- Delete previous data -- '; |
|
1271 | + } |
|
1181 | 1272 | $query .= 'DELETE FROM spotter_live WHERE flightaware_id = :flightaware_id;'; |
1182 | 1273 | } |
1183 | 1274 | |
@@ -1194,10 +1285,14 @@ discard block |
||
1194 | 1285 | return "error : ".$e->getMessage(); |
1195 | 1286 | } |
1196 | 1287 | if (isset($globalArchive) && $globalArchive && $putinarchive && $noarchive !== true) { |
1197 | - if ($globalDebug) echo '(Add to SBS archive : '; |
|
1288 | + if ($globalDebug) { |
|
1289 | + echo '(Add to SBS archive : '; |
|
1290 | + } |
|
1198 | 1291 | $SpotterArchive = new SpotterArchive($this->db); |
1199 | 1292 | $result = $SpotterArchive->addSpotterArchiveData($flightaware_id, $ident, $registration, $airline_name, $airline_icao, $airline_country, $airline_type, $aircraft_icao, $aircraft_shadow, $aircraft_name, $aircraft_manufacturer, $departure_airport_icao, $departure_airport_name, $departure_airport_city, $departure_airport_country, $departure_airport_time,$arrival_airport_icao, $arrival_airport_name, $arrival_airport_city, $arrival_airport_country, $arrival_airport_time, $route_stop, $date,$latitude, $longitude, $waypoints, $altitude, $altitude_real,$heading, $groundspeed, $squawk, $ModeS, $pilot_id, $pilot_name,$verticalrate,$format_source,$source_name, $over_country); |
1200 | - if ($globalDebug) echo $result.')'; |
|
1293 | + if ($globalDebug) { |
|
1294 | + echo $result.')'; |
|
1295 | + } |
|
1201 | 1296 | } elseif ($globalDebug && $putinarchive !== true) { |
1202 | 1297 | echo '(Not adding to archive)'; |
1203 | 1298 | } elseif ($globalDebug && $noarchive === true) { |
@@ -19,8 +19,12 @@ discard block |
||
19 | 19 | } |
20 | 20 | $tracker = false; |
21 | 21 | $marine = false; |
22 | -if (isset($_GET['tracker'])) $tracker = true; |
|
23 | -if (isset($_GET['marine'])) $marine = true; |
|
22 | +if (isset($_GET['tracker'])) { |
|
23 | + $tracker = true; |
|
24 | +} |
|
25 | +if (isset($_GET['marine'])) { |
|
26 | + $marine = true; |
|
27 | +} |
|
24 | 28 | if ($tracker) { |
25 | 29 | require_once('require/class.Tracker.php'); |
26 | 30 | require_once('require/class.TrackerLive.php'); |
@@ -77,24 +81,49 @@ discard block |
||
77 | 81 | } |
78 | 82 | header('Content-Type: text/javascript'); |
79 | 83 | |
80 | -if (!isset($globalJsonCompress)) $compress = true; |
|
81 | -else $compress = $globalJsonCompress; |
|
84 | +if (!isset($globalJsonCompress)) { |
|
85 | + $compress = true; |
|
86 | +} else { |
|
87 | + $compress = $globalJsonCompress; |
|
88 | +} |
|
82 | 89 | |
83 | 90 | $from_archive = false; |
84 | 91 | $min = false; |
85 | 92 | $allhistory = false; |
86 | 93 | $filter['source'] = array(); |
87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
94 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
95 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
96 | +} |
|
97 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
98 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
99 | +} |
|
100 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
101 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
102 | +} |
|
103 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
104 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
105 | +} |
|
106 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
107 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
108 | +} |
|
109 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
110 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
111 | +} |
|
112 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
113 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
114 | +} |
|
115 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
116 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
117 | +} |
|
118 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
119 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
120 | +} |
|
121 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
122 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
123 | +} |
|
124 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
125 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
126 | +} |
|
98 | 127 | /* |
99 | 128 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
100 | 129 | $min = true; |
@@ -212,8 +241,12 @@ discard block |
||
212 | 241 | } else { |
213 | 242 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
214 | 243 | } |
215 | - if ($flightcnt == '') $flightcnt = 0; |
|
216 | -} else $flightcnt = 0; |
|
244 | + if ($flightcnt == '') { |
|
245 | + $flightcnt = 0; |
|
246 | + } |
|
247 | + } else { |
|
248 | + $flightcnt = 0; |
|
249 | +} |
|
217 | 250 | |
218 | 251 | $sqltime = round(microtime(true)-$begintime,2); |
219 | 252 | $minitime = time(); |
@@ -251,7 +284,9 @@ discard block |
||
251 | 284 | $prev_flightaware_id = ''; |
252 | 285 | $speed = 1; |
253 | 286 | $gltf2 = false; |
254 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
287 | +if (isset($archivespeed)) { |
|
288 | + $speed = $archivespeed; |
|
289 | +} |
|
255 | 290 | $output = '['; |
256 | 291 | if ($tracker) { |
257 | 292 | $output .= '{"id" : "document", "name" : "tracker","version" : "1.0"'; |
@@ -287,9 +322,13 @@ discard block |
||
287 | 322 | $image = "images/placeholder_thumb.png"; |
288 | 323 | } |
289 | 324 | |
290 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
291 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
292 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
325 | + if (isset($spotter_item['flightaware_id'])) { |
|
326 | + $id = $spotter_item['flightaware_id']; |
|
327 | + } elseif (isset($spotter_item['famtrackid'])) { |
|
328 | + $id = $spotter_item['famtrackid']; |
|
329 | + } elseif (isset($spotter_item['fammarine_id'])) { |
|
330 | + $id = $spotter_item['fammarine_id']; |
|
331 | + } |
|
293 | 332 | if ($prev_flightaware_id != $id) { |
294 | 333 | if ($prev_flightaware_id != '') { |
295 | 334 | /* |
@@ -315,7 +354,9 @@ discard block |
||
315 | 354 | $output .= '"flightcnt": "'.$flightcnt.'",'; |
316 | 355 | $output .= '"onground": %onground%,'; |
317 | 356 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
318 | - if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
357 | + if (isset($spotter_item['format_source'])) { |
|
358 | + $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
359 | + } |
|
319 | 360 | if ($tracker) { |
320 | 361 | $output.= '"type": "tracker"'; |
321 | 362 | } elseif ($marine) { |
@@ -337,7 +378,9 @@ discard block |
||
337 | 378 | } |
338 | 379 | } |
339 | 380 | } |
340 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
381 | + if ($ident != '') { |
|
382 | + $output.= '"ident": "'.$ident.'",'; |
|
383 | + } |
|
341 | 384 | } |
342 | 385 | $output.= '"gltf2": %gltf2%,'; |
343 | 386 | $output.= '"type": "flight"'; |
@@ -369,7 +412,9 @@ discard block |
||
369 | 412 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
370 | 413 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
371 | 414 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
372 | - } else $aircraft_shadow = ''; |
|
415 | + } else { |
|
416 | + $aircraft_shadow = ''; |
|
417 | + } |
|
373 | 418 | $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
374 | 419 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
375 | 420 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
@@ -377,7 +422,9 @@ discard block |
||
377 | 422 | } |
378 | 423 | $output .= '},'; |
379 | 424 | } |
380 | - } else $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qI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XU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
425 | + } else { |
|
426 | + $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQ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4tg6wB76WMB0dALf526foAX8cqUot2pGP8B2Kz+krBeNYjS8636dh/8Beo2deoA9TWp76pd6g0q9cDNwKvAD8A84EfglLRBe2g+JWAfcEF68bPABOCoAl/gIPA5MA64FVgGnNhP292W3r0SeB1YVlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
427 | + } |
|
381 | 428 | } elseif ($one3dmodel) { |
382 | 429 | if (isset($globalMap3DForceModel) && $globalMap3DForceModel != '') { |
383 | 430 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$globalMap3DForceModel.'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -417,7 +464,9 @@ discard block |
||
417 | 464 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
418 | 465 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
419 | 466 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
420 | - } else $aircraft_shadow = ''; |
|
467 | + } else { |
|
468 | + $aircraft_shadow = ''; |
|
469 | + } |
|
421 | 470 | if ($aircraft_shadow != '') { |
422 | 471 | if (isset($modelsdb[$aircraft_shadow])) { |
423 | 472 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_shadow].'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -554,7 +603,9 @@ discard block |
||
554 | 603 | } |
555 | 604 | $output .= '},'; |
556 | 605 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
557 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
606 | + if ($spotter_item['aircraft_icao'] != '') { |
|
607 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
608 | + } |
|
558 | 609 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
559 | 610 | } |
560 | 611 | } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
@@ -576,7 +627,9 @@ discard block |
||
576 | 627 | } |
577 | 628 | $output .= '},'; |
578 | 629 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
579 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
630 | + if ($spotter_item['aircraft_icao'] != '') { |
|
631 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
632 | + } |
|
580 | 633 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
581 | 634 | } |
582 | 635 | } else { |
@@ -589,7 +642,9 @@ discard block |
||
589 | 642 | } |
590 | 643 | $output .= '},'; |
591 | 644 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
592 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
645 | + if ($spotter_item['aircraft_icao'] != '') { |
|
646 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
647 | + } |
|
593 | 648 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
594 | 649 | } |
595 | 650 | } elseif ($tracker && isset($spotter_item['type'])) { |
@@ -693,8 +748,11 @@ discard block |
||
693 | 748 | $output .= '},'; |
694 | 749 | } |
695 | 750 | } |
696 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
697 | - else $output = str_replace('%onground%','false',$output); |
|
751 | + if (isset($onground) && $onground) { |
|
752 | + $output = str_replace('%onground%','true',$output); |
|
753 | + } else { |
|
754 | + $output = str_replace('%onground%','false',$output); |
|
755 | + } |
|
698 | 756 | |
699 | 757 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
700 | 758 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -707,9 +765,15 @@ discard block |
||
707 | 765 | // $output .= '"interpolationDegree" : 5,'; |
708 | 766 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
709 | 767 | $output .= '"cartographicDegrees": ['; |
710 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
711 | - if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
|
712 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
768 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
769 | + $minitime = strtotime($spotter_item['date']); |
|
770 | + } |
|
771 | + if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) { |
|
772 | + $minitracktime = strtotime($spotter_item['date']); |
|
773 | + } |
|
774 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
775 | + $maxitime = strtotime($spotter_item['date']); |
|
776 | + } |
|
713 | 777 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
714 | 778 | $output .= $spotter_item['longitude'].', '; |
715 | 779 | $output .= $spotter_item['latitude']; |
@@ -732,7 +796,9 @@ discard block |
||
732 | 796 | $output .= ', '.round($spotter_item['altitude']*30.48); |
733 | 797 | $prevalt = round($spotter_item['altitude']*30.48); |
734 | 798 | } |
735 | - } else $output .= ', 0'; |
|
799 | + } else { |
|
800 | + $output .= ', 0'; |
|
801 | + } |
|
736 | 802 | //$orientation = '"orientation" : { '; |
737 | 803 | //$orientation .= '"unitQuaternion": ['; |
738 | 804 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
@@ -740,13 +806,18 @@ discard block |
||
740 | 806 | } else { |
741 | 807 | $nblatlong = $nblatlong+1; |
742 | 808 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
743 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
809 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
810 | + $maxitime = strtotime($spotter_item['date']); |
|
811 | + } |
|
744 | 812 | if ($spotter_item['ground_speed'] == 0) { |
745 | 813 | $output .= $prevlong.', '; |
746 | 814 | $output .= $prevlat; |
747 | 815 | //if (!$marine && (!isset($onground) || !$onground)) $output .= ', '.$prevalt; |
748 | - if (!$marine) $output .= ', '.$prevalt; |
|
749 | - else $output .= ', 0'; |
|
816 | + if (!$marine) { |
|
817 | + $output .= ', '.$prevalt; |
|
818 | + } else { |
|
819 | + $output .= ', 0'; |
|
820 | + } |
|
750 | 821 | } else { |
751 | 822 | $output .= $spotter_item['longitude'].', '; |
752 | 823 | $output .= $spotter_item['latitude']; |
@@ -759,14 +830,17 @@ discard block |
||
759 | 830 | $output .= ', 0'; |
760 | 831 | } |
761 | 832 | } else { |
762 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
763 | - elseif ($tracker) { |
|
833 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
834 | + $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
835 | + } elseif ($tracker) { |
|
764 | 836 | $output .= ', '.round($spotter_item['altitude']*0.3048); |
765 | 837 | } else { |
766 | 838 | $output .= ', '.round($spotter_item['altitude']*30.48); |
767 | 839 | } |
768 | 840 | } |
769 | - } else $output .= ', 0'; |
|
841 | + } else { |
|
842 | + $output .= ', 0'; |
|
843 | + } |
|
770 | 844 | } |
771 | 845 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
772 | 846 | //$orientation .= ',"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
@@ -785,15 +859,19 @@ discard block |
||
785 | 859 | } else { |
786 | 860 | $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
787 | 861 | } |
862 | + } else { |
|
863 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
788 | 864 | } |
789 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
790 | -} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
865 | + } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
791 | 866 | $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
792 | 867 | } else { |
793 | 868 | $output = str_replace('%minitime%',date("c",$minitime),$output); |
794 | 869 | } |
795 | 870 | $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
796 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
797 | -else $output = str_replace('%gltf2%','false',$output); |
|
871 | +if ($gltf2) { |
|
872 | + $output = str_replace('%gltf2%','true',$output); |
|
873 | +} else { |
|
874 | + $output = str_replace('%gltf2%','false',$output); |
|
875 | +} |
|
798 | 876 | print $output; |
799 | 877 | ?> |
@@ -51,7 +51,10 @@ discard block |
||
51 | 51 | <?php |
52 | 52 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
53 | 53 | ?> |
54 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
54 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
55 | + print '?tsk='.$tsk; |
|
56 | +} |
|
57 | +?>"></script> |
|
55 | 58 | <?php |
56 | 59 | if (!isset($globalAircraft) || $globalAircraft) { |
57 | 60 | ?> |
@@ -141,8 +144,14 @@ discard block |
||
141 | 144 | ?> |
142 | 145 | <form> |
143 | 146 | <ul> |
144 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
145 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
147 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
148 | + print 'checked'; |
|
149 | +} |
|
150 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
151 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
152 | + print 'checked'; |
|
153 | +} |
|
154 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
146 | 155 | </ul> |
147 | 156 | </form> |
148 | 157 | <?php |
@@ -150,8 +159,14 @@ discard block |
||
150 | 159 | ?> |
151 | 160 | <form> |
152 | 161 | <ul> |
153 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
154 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
162 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
163 | + print 'checked'; |
|
164 | +} |
|
165 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
166 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
167 | + print 'checked'; |
|
168 | +} |
|
169 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
155 | 170 | </ul> |
156 | 171 | <p>This layers are in Beta, this can and will crash.</p> |
157 | 172 | </form> |
@@ -162,14 +177,32 @@ discard block |
||
162 | 177 | <h1>NOTAM</h1> |
163 | 178 | <form> |
164 | 179 | <ul> |
165 | - <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
180 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
181 | + print 'checked'; |
|
182 | +} |
|
183 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
166 | 184 | <li><?php echo _("NOTAM scope:"); ?> |
167 | 185 | <select class="selectpicker" onchange="notamscope(this);"> |
168 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
169 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
170 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
171 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
172 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
186 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
187 | + print ' selected'; |
|
188 | +} |
|
189 | +?>>All</option> |
|
190 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
191 | + print ' selected'; |
|
192 | +} |
|
193 | +?>>Airport/Enroute warning</option> |
|
194 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
195 | + print ' selected'; |
|
196 | +} |
|
197 | +?>>Airport warning</option> |
|
198 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
199 | + print ' selected'; |
|
200 | +} |
|
201 | +?>>Navigation warning</option> |
|
202 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
203 | + print ' selected'; |
|
204 | +} |
|
205 | +?>>Enroute warning</option> |
|
173 | 206 | </select |
174 | 207 | </li> |
175 | 208 | </ul> |
@@ -197,7 +230,12 @@ discard block |
||
197 | 230 | <div class="form-group"> |
198 | 231 | <label>From (UTC):</label> |
199 | 232 | <div class='input-group date' id='datetimepicker1'> |
200 | - <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 /> |
|
233 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
234 | + print $_POST['start_date']; |
|
235 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
236 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
237 | +} |
|
238 | +?>" required /> |
|
201 | 239 | <span class="input-group-addon"> |
202 | 240 | <span class="glyphicon glyphicon-calendar"></span> |
203 | 241 | </span> |
@@ -206,7 +244,12 @@ discard block |
||
206 | 244 | <div class="form-group"> |
207 | 245 | <label>To (UTC):</label> |
208 | 246 | <div class='input-group date' id='datetimepicker2'> |
209 | - <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']); ?>" /> |
|
247 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
248 | + print $_POST['end_date']; |
|
249 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
250 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
251 | +} |
|
252 | +?>" /> |
|
210 | 253 | <span class="input-group-addon"> |
211 | 254 | <span class="glyphicon glyphicon-calendar"></span> |
212 | 255 | </span> |
@@ -231,8 +274,20 @@ discard block |
||
231 | 274 | </script> |
232 | 275 | <li><?php echo _("Playback speed:"); ?> |
233 | 276 | <div class="range"> |
234 | - <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'; ?>"> |
|
235 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
277 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
278 | + print $_POST['archivespeed']; |
|
279 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
280 | + print $_COOKIE['archive_speed']; |
|
281 | +} else { |
|
282 | + print '1'; |
|
283 | +} |
|
284 | +?>"> |
|
285 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
286 | + print $_COOKIE['archive_speed']; |
|
287 | +} else { |
|
288 | + print '1'; |
|
289 | +} |
|
290 | +?></output> |
|
236 | 291 | </div> |
237 | 292 | </li> |
238 | 293 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -254,29 +309,53 @@ discard block |
||
254 | 309 | <li><?php echo _("Type of Map:"); ?> |
255 | 310 | <select class="selectpicker" onchange="mapType(this);"> |
256 | 311 | <?php |
257 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
258 | - else $MapType = $_COOKIE['MapType']; |
|
312 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
313 | + $MapType = $globalMapProvider; |
|
314 | + } else { |
|
315 | + $MapType = $_COOKIE['MapType']; |
|
316 | + } |
|
259 | 317 | ?> |
260 | 318 | <?php |
261 | 319 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
262 | 320 | ?> |
263 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
321 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Natural Earth (local)</option> |
|
264 | 325 | <?php |
265 | 326 | } else { |
266 | 327 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
267 | 328 | ?> |
268 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
329 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
330 | + print ' selected'; |
|
331 | +} |
|
332 | +?>>Natural Earth (local)</option> |
|
269 | 333 | <?php |
270 | 334 | } |
271 | 335 | ?> |
272 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
273 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
336 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
337 | + print ' selected'; |
|
338 | +} |
|
339 | +?>>ArcGIS Streetmap</option> |
|
340 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
341 | + print ' selected'; |
|
342 | +} |
|
343 | +?>>ArcGIS Satellite</option> |
|
274 | 344 | <?php |
275 | 345 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
276 | 346 | ?> |
277 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
278 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
279 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
347 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
348 | + print ' selected'; |
|
349 | +} |
|
350 | +?>>Bing-Aerial</option> |
|
351 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
352 | + print ' selected'; |
|
353 | +} |
|
354 | +?>>Bing-Hybrid</option> |
|
355 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
356 | + print ' selected'; |
|
357 | +} |
|
358 | +?>>Bing-Road</option> |
|
280 | 359 | <?php |
281 | 360 | } |
282 | 361 | ?> |
@@ -286,59 +365,143 @@ discard block |
||
286 | 365 | <?php |
287 | 366 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
288 | 367 | ?> |
289 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
290 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
291 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
368 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
369 | + print ' selected'; |
|
370 | +} |
|
371 | +?>>Here-Aerial</option> |
|
372 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
373 | + print ' selected'; |
|
374 | +} |
|
375 | +?>>Here-Hybrid</option> |
|
376 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
377 | + print ' selected'; |
|
378 | +} |
|
379 | +?>>Here-Road</option> |
|
292 | 380 | <?php |
293 | 381 | } |
294 | 382 | ?> |
295 | 383 | <?php |
296 | 384 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
297 | 385 | ?> |
298 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
299 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
300 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
301 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
386 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
387 | + print ' selected'; |
|
388 | +} |
|
389 | +?>>Google Roadmap</option> |
|
390 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
391 | + print ' selected'; |
|
392 | +} |
|
393 | +?>>Google Satellite</option> |
|
394 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
395 | + print ' selected'; |
|
396 | +} |
|
397 | +?>>Google Hybrid</option> |
|
398 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
399 | + print ' selected'; |
|
400 | +} |
|
401 | +?>>Google Terrain</option> |
|
302 | 402 | <?php |
303 | 403 | } |
304 | 404 | ?> |
305 | 405 | <?php |
306 | 406 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
307 | 407 | ?> |
308 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
309 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
310 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
408 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
409 | + print ' selected'; |
|
410 | +} |
|
411 | +?>>MapQuest-OSM</option> |
|
412 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
413 | + print ' selected'; |
|
414 | +} |
|
415 | +?>>MapQuest-Aerial</option> |
|
416 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>MapQuest-Hybrid</option> |
|
311 | 420 | <?php |
312 | 421 | } |
313 | 422 | ?> |
314 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
315 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
423 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
424 | + print ' selected'; |
|
425 | +} |
|
426 | +?>>Yandex</option> |
|
427 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>Natural Earth</option> |
|
316 | 431 | <?php |
317 | 432 | } |
318 | 433 | ?> |
319 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
434 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
435 | + print ' selected'; |
|
436 | +} |
|
437 | +?>>National Geographic Street</option> |
|
320 | 438 | <?php |
321 | 439 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
322 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
323 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
440 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
441 | + $MapBoxId = 'default'; |
|
442 | + } else { |
|
443 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
444 | + } |
|
324 | 445 | ?> |
325 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
326 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
327 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
328 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
329 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
330 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
331 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
332 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
333 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
334 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
335 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
336 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
337 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
446 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
447 | + print ' selected'; |
|
448 | +} |
|
449 | +?>>Mapbox GL</option> |
|
450 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
451 | + print ' selected'; |
|
452 | +} |
|
453 | +?>>Mapbox default</option> |
|
454 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
455 | + print ' selected'; |
|
456 | +} |
|
457 | +?>>Mapbox streets</option> |
|
458 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
459 | + print ' selected'; |
|
460 | +} |
|
461 | +?>>Mapbox light</option> |
|
462 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
463 | + print ' selected'; |
|
464 | +} |
|
465 | +?>>Mapbox dark</option> |
|
466 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
467 | + print ' selected'; |
|
468 | +} |
|
469 | +?>>Mapbox satellite</option> |
|
470 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
471 | + print ' selected'; |
|
472 | +} |
|
473 | +?>>Mapbox streets-satellite</option> |
|
474 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
475 | + print ' selected'; |
|
476 | +} |
|
477 | +?>>Mapbox streets-basic</option> |
|
478 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
479 | + print ' selected'; |
|
480 | +} |
|
481 | +?>>Mapbox comic</option> |
|
482 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
483 | + print ' selected'; |
|
484 | +} |
|
485 | +?>>Mapbox outdoors</option> |
|
486 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
487 | + print ' selected'; |
|
488 | +} |
|
489 | +?>>Mapbox pencil</option> |
|
490 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
491 | + print ' selected'; |
|
492 | +} |
|
493 | +?>>Mapbox pirates</option> |
|
494 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
495 | + print ' selected'; |
|
496 | +} |
|
497 | +?>>Mapbox emerald</option> |
|
338 | 498 | <?php |
339 | 499 | } |
340 | 500 | ?> |
341 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
501 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
502 | + print ' selected'; |
|
503 | +} |
|
504 | +?>>OpenStreetMap</option> |
|
342 | 505 | <?php |
343 | 506 | } |
344 | 507 | ?> |
@@ -349,10 +512,22 @@ discard block |
||
349 | 512 | ?> |
350 | 513 | <li><?php echo _("Type of Terrain:"); ?> |
351 | 514 | <select class="selectpicker" onchange="terrainType(this);"> |
352 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
353 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
354 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
355 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
515 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
516 | + print ' selected'; |
|
517 | +} |
|
518 | +?>>stk terrain</option> |
|
519 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
520 | + print ' selected'; |
|
521 | +} |
|
522 | +?>>ellipsoid</option> |
|
523 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
524 | + print ' selected'; |
|
525 | +} |
|
526 | +?>>vr terrain</option> |
|
527 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
528 | + print ' selected'; |
|
529 | +} |
|
530 | +?>>ArticDEM</option> |
|
356 | 531 | </select> |
357 | 532 | </li> |
358 | 533 | <?php |
@@ -361,50 +536,98 @@ discard block |
||
361 | 536 | <?php |
362 | 537 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
363 | 538 | ?> |
364 | - <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
539 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
540 | + print 'checked'; |
|
541 | +} |
|
542 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
365 | 543 | |
366 | 544 | <?php |
367 | 545 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
368 | 546 | ?> |
369 | - <!--<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>--> |
|
370 | - <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> |
|
371 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
372 | - <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> |
|
373 | - <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> |
|
547 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
548 | + print 'checked'; |
|
549 | +} |
|
550 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
551 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
552 | + print 'checked'; |
|
553 | +} |
|
554 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
555 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) { |
|
556 | + print 'checked'; |
|
557 | +} |
|
558 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
559 | + <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)) { |
|
560 | + print 'checked'; |
|
561 | +} |
|
562 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
563 | + <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)) { |
|
564 | + print 'checked'; |
|
565 | +} |
|
566 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
374 | 567 | <?php |
375 | 568 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
376 | 569 | ?> |
377 | - <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
570 | + <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) { |
|
571 | + print 'checked'; |
|
572 | +} |
|
573 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
378 | 574 | <?php |
379 | 575 | } |
380 | 576 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
381 | 577 | ?> |
382 | - <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> |
|
578 | + <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)) { |
|
579 | + print 'checked'; |
|
580 | +} |
|
581 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
383 | 582 | <?php |
384 | 583 | } |
385 | 584 | } |
386 | 585 | ?> |
387 | - <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> |
|
388 | - <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> |
|
389 | - <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> |
|
390 | - <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> |
|
586 | + <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'])) { |
|
587 | + print 'checked'; |
|
588 | +} |
|
589 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
590 | + <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))) { |
|
591 | + print 'checked'; |
|
592 | +} |
|
593 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
594 | + <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))) { |
|
595 | + print 'checked'; |
|
596 | +} |
|
597 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
598 | + <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))) { |
|
599 | + print 'checked'; |
|
600 | +} |
|
601 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
391 | 602 | <?php |
392 | 603 | if (isset($globalFires)) { |
393 | 604 | ?> |
394 | - <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
605 | + <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
606 | + print 'checked'; |
|
607 | +} |
|
608 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
395 | 609 | <?php |
396 | 610 | } |
397 | 611 | if (isset($globalMap3D) && $globalMap3D) { |
398 | 612 | ?> |
399 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
613 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') { |
|
614 | + print 'checked'; |
|
615 | +} |
|
616 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
400 | 617 | <?php |
401 | 618 | } |
402 | 619 | ?> |
403 | 620 | <?php |
404 | 621 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
405 | 622 | ?> |
406 | - <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> |
|
407 | - <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
623 | + <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')) { |
|
624 | + print 'checked'; |
|
625 | +} |
|
626 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
627 | + <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) { |
|
628 | + print 'checked'; |
|
629 | +} |
|
630 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
408 | 631 | <?php |
409 | 632 | } |
410 | 633 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -417,17 +640,25 @@ discard block |
||
417 | 640 | if (function_exists('array_column')) { |
418 | 641 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
419 | 642 | ?> |
420 | - <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> |
|
643 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
644 | + print 'checked'; |
|
645 | +} |
|
646 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
421 | 647 | <?php |
422 | 648 | } |
423 | 649 | } elseif (isset($globalSources)) { |
424 | 650 | $dispolar = false; |
425 | 651 | foreach ($globalSources as $testsource) { |
426 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
652 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
653 | + $dispolar = true; |
|
654 | + } |
|
427 | 655 | } |
428 | 656 | if ($dispolar) { |
429 | 657 | ?> |
430 | - <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> |
|
658 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
659 | + print 'checked'; |
|
660 | +} |
|
661 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
431 | 662 | <?php |
432 | 663 | } |
433 | 664 | } |
@@ -440,12 +671,22 @@ discard block |
||
440 | 671 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
441 | 672 | if (extension_loaded('gd') && function_exists('gd_info')) { |
442 | 673 | ?> |
443 | - <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> |
|
674 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
675 | + print 'checked'; |
|
676 | +} |
|
677 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
444 | 678 | <?php |
445 | 679 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
446 | 680 | ?> |
447 | 681 | <li><?php echo _("Aircraft icon color:"); ?> |
448 | - <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'; ?>"> |
|
682 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
683 | + print $_COOKIE['IconColor']; |
|
684 | +} elseif (isset($globalAircraftIconColor)) { |
|
685 | + print $globalAircraftIconColor; |
|
686 | +} else { |
|
687 | + print '1a3151'; |
|
688 | +} |
|
689 | +?>"> |
|
449 | 690 | </li> |
450 | 691 | <?php |
451 | 692 | } |
@@ -457,7 +698,14 @@ discard block |
||
457 | 698 | if (extension_loaded('gd') && function_exists('gd_info')) { |
458 | 699 | ?> |
459 | 700 | <li><?php echo _("Marine icon color:"); ?> |
460 | - <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'; ?>"> |
|
701 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
702 | + print $_COOKIE['MarineIconColor']; |
|
703 | +} elseif (isset($globalMarineIconColor)) { |
|
704 | + print $globalMarineIconColor; |
|
705 | +} else { |
|
706 | + print '1a3151'; |
|
707 | +} |
|
708 | +?>"> |
|
461 | 709 | </li> |
462 | 710 | <?php |
463 | 711 | } |
@@ -468,7 +716,14 @@ discard block |
||
468 | 716 | if (extension_loaded('gd') && function_exists('gd_info')) { |
469 | 717 | ?> |
470 | 718 | <li><?php echo _("Tracker icon color:"); ?> |
471 | - <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'; ?>"> |
|
719 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
720 | + print $_COOKIE['TrackerIconColor']; |
|
721 | +} elseif (isset($globalTrackerIconColor)) { |
|
722 | + print $globalTrackerIconColor; |
|
723 | +} else { |
|
724 | + print '1a3151'; |
|
725 | +} |
|
726 | +?>"> |
|
472 | 727 | </li> |
473 | 728 | <?php |
474 | 729 | } |
@@ -479,8 +734,22 @@ discard block |
||
479 | 734 | ?> |
480 | 735 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
481 | 736 | <div class="range"> |
482 | - <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'; ?>"> |
|
483 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
737 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
738 | + print $_COOKIE['AirportZoom']; |
|
739 | +} elseif (isset($globalAirportZoom)) { |
|
740 | + print $globalAirportZoom; |
|
741 | +} else { |
|
742 | + print '7'; |
|
743 | +} |
|
744 | +?>"> |
|
745 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
746 | + print $_COOKIE['AirportZoom']; |
|
747 | +} elseif (isset($globalAirportZoom)) { |
|
748 | + print $globalAirportZoom; |
|
749 | +} else { |
|
750 | + print '7'; |
|
751 | +} |
|
752 | +?></output> |
|
484 | 753 | </div> |
485 | 754 | </li> |
486 | 755 | <?php |
@@ -492,10 +761,23 @@ discard block |
||
492 | 761 | <?php |
493 | 762 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
494 | 763 | ?> |
495 | - <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> ><?php echo _("Use airlines liveries"); ?></li> |
|
496 | - <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> |
|
764 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
765 | + print 'checked'; |
|
766 | +} |
|
767 | +?> ><?php echo _("Use airlines liveries"); ?></li> |
|
768 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
769 | + print 'checked'; |
|
770 | +} |
|
771 | +?> ><?php echo _("Force Aircraft color"); ?></li> |
|
497 | 772 | <li><?php echo _("Aircraft icon color:"); ?> |
498 | - <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'; ?>"> |
|
773 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
774 | + print $_COOKIE['IconColor']; |
|
775 | +} elseif (isset($globalAircraftIconColor)) { |
|
776 | + print $globalAircraftIconColor; |
|
777 | +} else { |
|
778 | + print 'ff0000'; |
|
779 | +} |
|
780 | +?>"> |
|
499 | 781 | </li> |
500 | 782 | <?php |
501 | 783 | } |
@@ -503,9 +785,19 @@ discard block |
||
503 | 785 | <?php |
504 | 786 | if (isset($globalMarine) && $globalMarine === TRUE) { |
505 | 787 | ?> |
506 | - <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> |
|
788 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
789 | + print 'checked'; |
|
790 | +} |
|
791 | +?> ><?php echo _("Force Marine color"); ?></li> |
|
507 | 792 | <li><?php echo _("Marine icon color:"); ?> |
508 | - <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'; ?>"> |
|
793 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
794 | + print $_COOKIE['MarineIconColor']; |
|
795 | +} elseif (isset($globalMarineIconColor)) { |
|
796 | + print $globalMarineIconColor; |
|
797 | +} else { |
|
798 | + print 'ff0000'; |
|
799 | +} |
|
800 | +?>"> |
|
509 | 801 | </li> |
510 | 802 | <?php |
511 | 803 | } |
@@ -513,9 +805,19 @@ discard block |
||
513 | 805 | <?php |
514 | 806 | if (isset($globalTracker) && $globalTracker === TRUE) { |
515 | 807 | ?> |
516 | - <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> |
|
808 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
809 | + print 'checked'; |
|
810 | +} |
|
811 | +?> ><?php echo _("Force Tracker color"); ?></li> |
|
517 | 812 | <li><?php echo _("Tracker icon color:"); ?> |
518 | - <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'; ?>"> |
|
813 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
814 | + print $_COOKIE['TrackerIconColor']; |
|
815 | +} elseif (isset($globalTrackerIconColor)) { |
|
816 | + print $globalTrackerIconColor; |
|
817 | +} else { |
|
818 | + print 'ff0000'; |
|
819 | +} |
|
820 | +?>"> |
|
519 | 821 | </li> |
520 | 822 | <?php |
521 | 823 | } |
@@ -523,22 +825,46 @@ discard block |
||
523 | 825 | ?> |
524 | 826 | <li><?php echo _("Distance unit:"); ?> |
525 | 827 | <select class="selectpicker" onchange="unitdistance(this);"> |
526 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
527 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
528 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
828 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
829 | + echo ' selected'; |
|
830 | +} |
|
831 | +?>>km</option> |
|
832 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
833 | + echo ' selected'; |
|
834 | +} |
|
835 | +?>>nm</option> |
|
836 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
837 | + echo ' selected'; |
|
838 | +} |
|
839 | +?>>mi</option> |
|
529 | 840 | </select> |
530 | 841 | </li> |
531 | 842 | <li><?php echo _("Altitude unit:"); ?> |
532 | 843 | <select class="selectpicker" onchange="unitaltitude(this);"> |
533 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
534 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
844 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
845 | + echo ' selected'; |
|
846 | +} |
|
847 | +?>>m</option> |
|
848 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
849 | + echo ' selected'; |
|
850 | +} |
|
851 | +?>>feet</option> |
|
535 | 852 | </select> |
536 | 853 | </li> |
537 | 854 | <li><?php echo _("Speed unit:"); ?> |
538 | 855 | <select class="selectpicker" onchange="unitspeed(this);"> |
539 | - <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> |
|
540 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
541 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
856 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
857 | + echo ' selected'; |
|
858 | +} |
|
859 | +?>>km/h</option> |
|
860 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
861 | + echo ' selected'; |
|
862 | +} |
|
863 | +?>>mph</option> |
|
864 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
865 | + echo ' selected'; |
|
866 | +} |
|
867 | +?>>knots</option> |
|
542 | 868 | </select> |
543 | 869 | </li> |
544 | 870 | |
@@ -556,9 +882,18 @@ discard block |
||
556 | 882 | <?php |
557 | 883 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
558 | 884 | ?> |
559 | - <?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 } ?> |
|
560 | - <?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 } ?> |
|
561 | - <?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 } ?> |
|
885 | + <?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'])) { |
|
886 | + print 'checked'; |
|
887 | +} |
|
888 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
889 | + <?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'])) { |
|
890 | + print 'checked'; |
|
891 | +} |
|
892 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
893 | + <?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'])) { |
|
894 | + print 'checked'; |
|
895 | +} |
|
896 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
562 | 897 | <?php |
563 | 898 | } |
564 | 899 | ?> |
@@ -566,10 +901,16 @@ discard block |
||
566 | 901 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
567 | 902 | ?> |
568 | 903 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
569 | - <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> |
|
904 | + <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'])) { |
|
905 | + print 'checked'; |
|
906 | +} |
|
907 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
570 | 908 | <?php } ?> |
571 | 909 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
572 | - <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> |
|
910 | + <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'])) { |
|
911 | + print 'checked'; |
|
912 | +} |
|
913 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
573 | 914 | <?php } ?> |
574 | 915 | <?php |
575 | 916 | } |
@@ -586,7 +927,9 @@ discard block |
||
586 | 927 | } |
587 | 928 | foreach($allairlinenames as $airline) { |
588 | 929 | $airline_name = $airline['airline_name']; |
589 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
930 | + if (strlen($airline_name) > 30) { |
|
931 | + $airline_name = substr($airline_name,0,30).'...'; |
|
932 | + } |
|
590 | 933 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
591 | 934 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
592 | 935 | } else { |
@@ -604,7 +947,10 @@ discard block |
||
604 | 947 | <li><?php echo _("Display alliance:"); ?> |
605 | 948 | <br/> |
606 | 949 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
607 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
950 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
951 | + echo ' selected'; |
|
952 | +} |
|
953 | +?>><?php echo _("All"); ?></option> |
|
608 | 954 | <?php |
609 | 955 | foreach($allalliancenames as $alliance) { |
610 | 956 | $alliance_name = $alliance['alliance']; |
@@ -663,10 +1009,22 @@ discard block |
||
663 | 1009 | ?> |
664 | 1010 | <li><?php echo _("Display airlines of type:"); ?><br/> |
665 | 1011 | <select class="selectpicker" onchange="airlinestype(this);"> |
666 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
667 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
668 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
669 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
1012 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
1013 | + echo ' selected'; |
|
1014 | +} |
|
1015 | +?>><?php echo _("All"); ?></option> |
|
1016 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
1017 | + echo ' selected'; |
|
1018 | +} |
|
1019 | +?>><?php echo _("Passenger"); ?></option> |
|
1020 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
1021 | + echo ' selected'; |
|
1022 | +} |
|
1023 | +?>><?php echo _("Cargo"); ?></option> |
|
1024 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
1025 | + echo ' selected'; |
|
1026 | +} |
|
1027 | +?>><?php echo _("Military"); ?></option> |
|
670 | 1028 | </select> |
671 | 1029 | </li> |
672 | 1030 | <?php |
@@ -680,14 +1038,20 @@ discard block |
||
680 | 1038 | ?> |
681 | 1039 | <li> |
682 | 1040 | <?php echo _("Display vessels with MMSI:"); ?> |
683 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
1041 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
1042 | + print $_COOKIE['filter_mmsi']; |
|
1043 | +} |
|
1044 | +?>" /> |
|
684 | 1045 | </li> |
685 | 1046 | <?php |
686 | 1047 | } |
687 | 1048 | ?> |
688 | 1049 | <li> |
689 | 1050 | <?php echo _("Display with ident:"); ?> |
690 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
1051 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
1052 | + print $_COOKIE['filter_ident']; |
|
1053 | +} |
|
1054 | +?>" /> |
|
691 | 1055 | </li> |
692 | 1056 | </ul> |
693 | 1057 | </form> |
@@ -703,7 +1067,10 @@ discard block |
||
703 | 1067 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
704 | 1068 | <form> |
705 | 1069 | <ul> |
706 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
1070 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) { |
|
1071 | + print 'checked'; |
|
1072 | +} |
|
1073 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
707 | 1074 | <li><?php echo _("Type:"); ?> |
708 | 1075 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
709 | 1076 | <?php |
@@ -711,25 +1078,45 @@ discard block |
||
711 | 1078 | $types = $Satellite->get_tle_types(); |
712 | 1079 | foreach ($types as $type) { |
713 | 1080 | $type_name = $type['tle_type']; |
714 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
715 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
716 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
717 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
718 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
719 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
720 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
721 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
722 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
723 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
724 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
725 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
726 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
727 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
728 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
729 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
730 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
731 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
732 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
1081 | + if ($type_name == 'musson') { |
|
1082 | + $type_name = 'Russian LEO Navigation'; |
|
1083 | + } else if ($type_name == 'nnss') { |
|
1084 | + $type_name = 'Navi Navigation Satellite System'; |
|
1085 | + } else if ($type_name == 'sbas') { |
|
1086 | + $type_name = 'Satellite-Based Augmentation System'; |
|
1087 | + } else if ($type_name == 'glo-ops') { |
|
1088 | + $type_name = 'Glonass Operational'; |
|
1089 | + } else if ($type_name == 'gps-ops') { |
|
1090 | + $type_name = 'GPS Operational'; |
|
1091 | + } else if ($type_name == 'argos') { |
|
1092 | + $type_name = 'ARGOS Data Collection System'; |
|
1093 | + } else if ($type_name == 'tdrss') { |
|
1094 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
1095 | + } else if ($type_name == 'sarsat') { |
|
1096 | + $type_name = 'Search & Rescue'; |
|
1097 | + } else if ($type_name == 'dmc') { |
|
1098 | + $type_name = 'Disaster Monitoring'; |
|
1099 | + } else if ($type_name == 'resource') { |
|
1100 | + $type_name = 'Earth Resources'; |
|
1101 | + } else if ($type_name == 'stations') { |
|
1102 | + $type_name = 'Space Stations'; |
|
1103 | + } else if ($type_name == 'geo') { |
|
1104 | + $type_name = 'Geostationary'; |
|
1105 | + } else if ($type_name == 'amateur') { |
|
1106 | + $type_name = 'Amateur Radio'; |
|
1107 | + } else if ($type_name == 'x-comm') { |
|
1108 | + $type_name = 'Experimental'; |
|
1109 | + } else if ($type_name == 'other-comm') { |
|
1110 | + $type_name = 'Other Comm'; |
|
1111 | + } else if ($type_name == 'science') { |
|
1112 | + $type_name = 'Space & Earth Science'; |
|
1113 | + } else if ($type_name == 'military') { |
|
1114 | + $type_name = 'Miscellaneous Military'; |
|
1115 | + } else if ($type_name == 'radar') { |
|
1116 | + $type_name = 'Radar Calibration'; |
|
1117 | + } else if ($type_name == 'tle-new') { |
|
1118 | + $type_name = 'Last 30 days launches'; |
|
1119 | + } |
|
733 | 1120 | |
734 | 1121 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
735 | 1122 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |