@@ -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) { |
@@ -129,8 +133,11 @@ discard block |
||
| 129 | 133 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
| 130 | 134 | $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
| 131 | 135 | } |
| 132 | - if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE'; |
|
| 133 | - elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND'; |
|
| 136 | + if ($filter_query_where == '' && $where) { |
|
| 137 | + $filter_query_where = ' WHERE'; |
|
| 138 | + } elseif ($filter_query_where != '' && $and) { |
|
| 139 | + $filter_query_where .= ' AND'; |
|
| 140 | + } |
|
| 134 | 141 | if ($filter_query_where != '') { |
| 135 | 142 | $filter_query_where = preg_replace('/^ AND/',' WHERE',$filter_query_where); |
| 136 | 143 | } |
@@ -171,9 +178,13 @@ discard block |
||
| 171 | 178 | $orderby_query = ' '.$search_orderby_array[$sort]['sql']; |
| 172 | 179 | } |
| 173 | 180 | } |
| 174 | - if ($orderby_query == '') $orderby_query = ' ORDER BY date DESC'; |
|
| 181 | + if ($orderby_query == '') { |
|
| 182 | + $orderby_query = ' ORDER BY date DESC'; |
|
| 183 | + } |
|
| 175 | 184 | |
| 176 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
| 185 | + if (!isset($globalLiveInterval)) { |
|
| 186 | + $globalLiveInterval = '200'; |
|
| 187 | + } |
|
| 177 | 188 | if ($globalDBdriver == 'mysql') { |
| 178 | 189 | //$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"; |
| 179 | 190 | $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; |
@@ -196,7 +207,9 @@ discard block |
||
| 196 | 207 | global $globalDBdriver, $globalLiveInterval, $globalArchive, $globalMap2DAircraftsLimit; |
| 197 | 208 | date_default_timezone_set('UTC'); |
| 198 | 209 | $filter_query = $this->getFilter($filter,true,true); |
| 199 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
| 210 | + if (!isset($globalLiveInterval)) { |
|
| 211 | + $globalLiveInterval = '200'; |
|
| 212 | + } |
|
| 200 | 213 | if ($globalDBdriver == 'mysql') { |
| 201 | 214 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 202 | 215 | // $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.real_altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source, spotter_live.registration |
@@ -262,8 +275,12 @@ discard block |
||
| 262 | 275 | $id = filter_var($id,FILTER_SANITIZE_STRING); |
| 263 | 276 | $filter_query = $this->getFilter($filter,true,true); |
| 264 | 277 | |
| 265 | - if (!isset($globalLiveInterval) || $globalLiveInterval == '') $globalLiveInterval = '200'; |
|
| 266 | - if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') $globalMap3DAircraftsLimit = '300'; |
|
| 278 | + if (!isset($globalLiveInterval) || $globalLiveInterval == '') { |
|
| 279 | + $globalLiveInterval = '200'; |
|
| 280 | + } |
|
| 281 | + if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') { |
|
| 282 | + $globalMap3DAircraftsLimit = '300'; |
|
| 283 | + } |
|
| 267 | 284 | if ($globalDBdriver == 'mysql') { |
| 268 | 285 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 269 | 286 | /* |
@@ -274,25 +291,41 @@ discard block |
||
| 274 | 291 | */ |
| 275 | 292 | $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, spotter_archive.registration |
| 276 | 293 | 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 "; |
| 277 | - if ($usecoord) $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 278 | - if ($id != '') $query .= "OR spotter_archive.flightaware_id = :id "; |
|
| 294 | + if ($usecoord) { |
|
| 295 | + $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 296 | + } |
|
| 297 | + if ($id != '') { |
|
| 298 | + $query .= "OR spotter_archive.flightaware_id = :id "; |
|
| 299 | + } |
|
| 279 | 300 | $query .= "UNION |
| 280 | 301 | 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, spotter_live.registration |
| 281 | 302 | FROM spotter_live".$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= spotter_live.date"; |
| 282 | - if ($usecoord) $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 283 | - if ($id != '') $query .= " OR spotter_live.flightaware_id = :id"; |
|
| 303 | + if ($usecoord) { |
|
| 304 | + $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 305 | + } |
|
| 306 | + if ($id != '') { |
|
| 307 | + $query .= " OR spotter_live.flightaware_id = :id"; |
|
| 308 | + } |
|
| 284 | 309 | $query .= ") AS spotter |
| 285 | 310 | WHERE latitude <> '0' AND longitude <> '0' |
| 286 | 311 | ORDER BY flightaware_id, date"; |
| 287 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 312 | + if ($limit) { |
|
| 313 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 314 | + } |
|
| 288 | 315 | } else { |
| 289 | 316 | $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, spotter_live.registration |
| 290 | 317 | FROM spotter_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= spotter_live.date "; |
| 291 | - if ($usecoord) $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 292 | - if ($id != '') $query .= "OR spotter_live.flightaware_id = :id "; |
|
| 318 | + if ($usecoord) { |
|
| 319 | + $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 320 | + } |
|
| 321 | + if ($id != '') { |
|
| 322 | + $query .= "OR spotter_live.flightaware_id = :id "; |
|
| 323 | + } |
|
| 293 | 324 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
| 294 | 325 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
| 295 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 326 | + if ($limit) { |
|
| 327 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 328 | + } |
|
| 296 | 329 | } |
| 297 | 330 | } else { |
| 298 | 331 | if (isset($globalArchive) && $globalArchive === TRUE) { |
@@ -309,28 +342,46 @@ discard block |
||
| 309 | 342 | SELECT flightaware_id |
| 310 | 343 | FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date"; |
| 311 | 344 | $query.= ") l ON l.flightaware_id = spotter_archive.flightaware_id "; |
| 312 | - if ($usecoord) $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 313 | - if ($id != '') $query .= "OR spotter_archive.flightaware_id = :id "; |
|
| 345 | + if ($usecoord) { |
|
| 346 | + $query .= "AND (spotter_archive.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_archive.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 347 | + } |
|
| 348 | + if ($id != '') { |
|
| 349 | + $query .= "OR spotter_archive.flightaware_id = :id "; |
|
| 350 | + } |
|
| 314 | 351 | $query .= "UNION |
| 315 | 352 | 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, spotter_live.registration |
| 316 | 353 | FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date"; |
| 317 | - if ($usecoord) $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 318 | - if ($id != '') $query .= " OR spotter_live.flightaware_id = :id"; |
|
| 354 | + if ($usecoord) { |
|
| 355 | + $query .= " AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 356 | + } |
|
| 357 | + if ($id != '') { |
|
| 358 | + $query .= " OR spotter_live.flightaware_id = :id"; |
|
| 359 | + } |
|
| 319 | 360 | $query .= ") AS spotter WHERE latitude <> '0' AND longitude <> '0' "; |
| 320 | 361 | $query .= "ORDER BY flightaware_id, date"; |
| 321 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 362 | + if ($limit) { |
|
| 363 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 364 | + } |
|
| 322 | 365 | } else { |
| 323 | 366 | $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, spotter_live.registration |
| 324 | 367 | FROM spotter_live".$filter_query." CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= spotter_live.date "; |
| 325 | - if ($usecoord) $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 326 | - if ($id != '') $query .= "OR spotter_live.flightaware_id = :id "; |
|
| 368 | + if ($usecoord) { |
|
| 369 | + $query .= "AND (spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.") "; |
|
| 370 | + } |
|
| 371 | + if ($id != '') { |
|
| 372 | + $query .= "OR spotter_live.flightaware_id = :id "; |
|
| 373 | + } |
|
| 327 | 374 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
| 328 | 375 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
| 329 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 376 | + if ($limit) { |
|
| 377 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 378 | + } |
|
| 330 | 379 | } |
| 331 | 380 | } |
| 332 | 381 | $query_values = array(); |
| 333 | - if ($id != '') $query_values = array(':id' => $id); |
|
| 382 | + if ($id != '') { |
|
| 383 | + $query_values = array(':id' => $id); |
|
| 384 | + } |
|
| 334 | 385 | try { |
| 335 | 386 | $sth = $this->db->prepare($query); |
| 336 | 387 | $sth->execute($query_values); |
@@ -355,8 +406,12 @@ discard block |
||
| 355 | 406 | $id = filter_var($id,FILTER_SANITIZE_STRING); |
| 356 | 407 | $filter_query = $this->getFilter($filter,true,true); |
| 357 | 408 | |
| 358 | - if (!isset($globalLiveInterval) || $globalLiveInterval == '') $globalLiveInterval = '200'; |
|
| 359 | - if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') $globalMap3DAircraftsLimit = '300'; |
|
| 409 | + if (!isset($globalLiveInterval) || $globalLiveInterval == '') { |
|
| 410 | + $globalLiveInterval = '200'; |
|
| 411 | + } |
|
| 412 | + if (!isset($globalMap3DAircraftsLimit) || $globalMap3DAircraftsLimit == '') { |
|
| 413 | + $globalMap3DAircraftsLimit = '300'; |
|
| 414 | + } |
|
| 360 | 415 | if ($globalDBdriver == 'mysql') { |
| 361 | 416 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 362 | 417 | $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, spotter_archive.registration |
@@ -367,13 +422,17 @@ discard block |
||
| 367 | 422 | $query .= ") AS spotter |
| 368 | 423 | WHERE latitude <> '0' AND longitude <> '0' |
| 369 | 424 | ORDER BY flightaware_id, date"; |
| 370 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 425 | + if ($limit) { |
|
| 426 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 427 | + } |
|
| 371 | 428 | } else { |
| 372 | 429 | $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, spotter_live.registration |
| 373 | 430 | FROM spotter_live'.$filter_query.' spotter_live.flightaware_id = :id '; |
| 374 | 431 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
| 375 | 432 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
| 376 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 433 | + if ($limit) { |
|
| 434 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 435 | + } |
|
| 377 | 436 | } |
| 378 | 437 | } else { |
| 379 | 438 | if (isset($globalArchive) && $globalArchive === TRUE) { |
@@ -389,13 +448,17 @@ discard block |
||
| 389 | 448 | FROM spotter_live".$filter_query." spotter_live.flightaware_id = :id"; |
| 390 | 449 | $query .= ") AS spotter WHERE latitude <> '0' AND longitude <> '0' "; |
| 391 | 450 | $query .= "ORDER BY flightaware_id, date"; |
| 392 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 451 | + if ($limit) { |
|
| 452 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 453 | + } |
|
| 393 | 454 | } else { |
| 394 | 455 | $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, spotter_live.registration |
| 395 | 456 | FROM spotter_live".$filter_query." spotter_live.flightaware_id = :id "; |
| 396 | 457 | $query .= "AND spotter_live.latitude <> '0' AND spotter_live.longitude <> '0' |
| 397 | 458 | ORDER BY spotter_live.flightaware_id, spotter_live.date"; |
| 398 | - if ($limit) $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 459 | + if ($limit) { |
|
| 460 | + $query .= " LIMIT ".$globalMap3DAircraftsLimit; |
|
| 461 | + } |
|
| 399 | 462 | } |
| 400 | 463 | } |
| 401 | 464 | $query_values = array(); |
@@ -422,7 +485,9 @@ discard block |
||
| 422 | 485 | global $globalDBdriver, $globalLiveInterval; |
| 423 | 486 | $filter_query = $this->getFilter($filter,true,true); |
| 424 | 487 | |
| 425 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
| 488 | + if (!isset($globalLiveInterval)) { |
|
| 489 | + $globalLiveInterval = '200'; |
|
| 490 | + } |
|
| 426 | 491 | if ($globalDBdriver == 'mysql') { |
| 427 | 492 | //$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; |
| 428 | 493 | $query = 'SELECT COUNT(DISTINCT spotter_live.flightaware_id) as nb FROM spotter_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
@@ -452,7 +517,9 @@ discard block |
||
| 452 | 517 | { |
| 453 | 518 | global $globalDBdriver, $globalLiveInterval,$globalMap2DAircraftsLimit; |
| 454 | 519 | $Spotter = new Spotter($this->db); |
| 455 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
| 520 | + if (!isset($globalLiveInterval)) { |
|
| 521 | + $globalLiveInterval = '200'; |
|
| 522 | + } |
|
| 456 | 523 | $filter_query = $this->getFilter($filter); |
| 457 | 524 | |
| 458 | 525 | if (is_array($coord)) { |
@@ -460,7 +527,9 @@ discard block |
||
| 460 | 527 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 461 | 528 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 462 | 529 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 463 | - } else return array(); |
|
| 530 | + } else { |
|
| 531 | + return array(); |
|
| 532 | + } |
|
| 464 | 533 | if ($globalDBdriver == 'mysql') { |
| 465 | 534 | $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; |
| 466 | 535 | } else { |
@@ -484,7 +553,9 @@ discard block |
||
| 484 | 553 | { |
| 485 | 554 | global $globalDBdriver, $globalLiveInterval, $globalArchive,$globalMap2DAircraftsLimit; |
| 486 | 555 | $Spotter = new Spotter($this->db); |
| 487 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
| 556 | + if (!isset($globalLiveInterval)) { |
|
| 557 | + $globalLiveInterval = '200'; |
|
| 558 | + } |
|
| 488 | 559 | $filter_query = $this->getFilter($filter,true,true); |
| 489 | 560 | |
| 490 | 561 | if (is_array($coord)) { |
@@ -492,7 +563,9 @@ discard block |
||
| 492 | 563 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 493 | 564 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 494 | 565 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 495 | - } else return array(); |
|
| 566 | + } else { |
|
| 567 | + return array(); |
|
| 568 | + } |
|
| 496 | 569 | if ($globalDBdriver == 'mysql') { |
| 497 | 570 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 498 | 571 | $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.real_altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date, spotter_live.format_source, spotter_live.registration |
@@ -745,11 +818,15 @@ discard block |
||
| 745 | 818 | //$query = self::$global_query.' WHERE spotter_live.flightaware_id = :id ORDER BY date'; |
| 746 | 819 | if ($globalDBdriver == 'mysql') { |
| 747 | 820 | $query = 'SELECT spotter_live.* FROM spotter_live WHERE spotter_live.flightaware_id = :id'; |
| 748 | - if ($liveinterval) $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
| 821 | + if ($liveinterval) { |
|
| 822 | + $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
| 823 | + } |
|
| 749 | 824 | $query .= ' ORDER BY date'; |
| 750 | 825 | } else { |
| 751 | 826 | $query = 'SELECT spotter_live.* FROM spotter_live WHERE spotter_live.flightaware_id = :id'; |
| 752 | - if ($liveinterval) $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
| 827 | + if ($liveinterval) { |
|
| 828 | + $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
| 829 | + } |
|
| 753 | 830 | $query .= ' ORDER BY date'; |
| 754 | 831 | } |
| 755 | 832 | |
@@ -844,7 +921,9 @@ discard block |
||
| 844 | 921 | $i++; |
| 845 | 922 | $j++; |
| 846 | 923 | if ($j == 30) { |
| 847 | - if ($globalDebug) echo "."; |
|
| 924 | + if ($globalDebug) { |
|
| 925 | + echo "."; |
|
| 926 | + } |
|
| 848 | 927 | try { |
| 849 | 928 | |
| 850 | 929 | $sth = $this->db->prepare(substr($query_delete,0,-1).")"); |
@@ -1197,7 +1276,9 @@ discard block |
||
| 1197 | 1276 | { |
| 1198 | 1277 | return false; |
| 1199 | 1278 | } |
| 1200 | - } else return ''; |
|
| 1279 | + } else { |
|
| 1280 | + return ''; |
|
| 1281 | + } |
|
| 1201 | 1282 | |
| 1202 | 1283 | if ($longitude != '') |
| 1203 | 1284 | { |
@@ -1205,7 +1286,9 @@ discard block |
||
| 1205 | 1286 | { |
| 1206 | 1287 | return false; |
| 1207 | 1288 | } |
| 1208 | - } else return ''; |
|
| 1289 | + } else { |
|
| 1290 | + return ''; |
|
| 1291 | + } |
|
| 1209 | 1292 | |
| 1210 | 1293 | if ($waypoints != '') |
| 1211 | 1294 | { |
@@ -1221,14 +1304,18 @@ discard block |
||
| 1221 | 1304 | { |
| 1222 | 1305 | return false; |
| 1223 | 1306 | } |
| 1224 | - } else $altitude = 0; |
|
| 1307 | + } else { |
|
| 1308 | + $altitude = 0; |
|
| 1309 | + } |
|
| 1225 | 1310 | if ($altitude_real != '') |
| 1226 | 1311 | { |
| 1227 | 1312 | if (!is_numeric($altitude_real)) |
| 1228 | 1313 | { |
| 1229 | 1314 | return false; |
| 1230 | 1315 | } |
| 1231 | - } else $altitude_real = 0; |
|
| 1316 | + } else { |
|
| 1317 | + $altitude_real = 0; |
|
| 1318 | + } |
|
| 1232 | 1319 | |
| 1233 | 1320 | if ($heading != '') |
| 1234 | 1321 | { |
@@ -1236,7 +1323,9 @@ discard block |
||
| 1236 | 1323 | { |
| 1237 | 1324 | return false; |
| 1238 | 1325 | } |
| 1239 | - } else $heading = 0; |
|
| 1326 | + } else { |
|
| 1327 | + $heading = 0; |
|
| 1328 | + } |
|
| 1240 | 1329 | |
| 1241 | 1330 | if ($groundspeed != '') |
| 1242 | 1331 | { |
@@ -1244,9 +1333,13 @@ discard block |
||
| 1244 | 1333 | { |
| 1245 | 1334 | return false; |
| 1246 | 1335 | } |
| 1247 | - } else $groundspeed = 0; |
|
| 1336 | + } else { |
|
| 1337 | + $groundspeed = 0; |
|
| 1338 | + } |
|
| 1248 | 1339 | date_default_timezone_set('UTC'); |
| 1249 | - if ($date == '') $date = date("Y-m-d H:i:s", time()); |
|
| 1340 | + if ($date == '') { |
|
| 1341 | + $date = date("Y-m-d H:i:s", time()); |
|
| 1342 | + } |
|
| 1250 | 1343 | |
| 1251 | 1344 | |
| 1252 | 1345 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -1291,14 +1384,24 @@ discard block |
||
| 1291 | 1384 | $arrival_airport_country = ''; |
| 1292 | 1385 | |
| 1293 | 1386 | |
| 1294 | - if ($squawk == '' || $Common->isInteger($squawk) === false ) $squawk = NULL; |
|
| 1295 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false ) $verticalrate = NULL; |
|
| 1296 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) $groundspeed = 0; |
|
| 1297 | - if ($heading == '' || $Common->isInteger($heading) === false ) $heading = 0; |
|
| 1387 | + if ($squawk == '' || $Common->isInteger($squawk) === false ) { |
|
| 1388 | + $squawk = NULL; |
|
| 1389 | + } |
|
| 1390 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false ) { |
|
| 1391 | + $verticalrate = NULL; |
|
| 1392 | + } |
|
| 1393 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) { |
|
| 1394 | + $groundspeed = 0; |
|
| 1395 | + } |
|
| 1396 | + if ($heading == '' || $Common->isInteger($heading) === false ) { |
|
| 1397 | + $heading = 0; |
|
| 1398 | + } |
|
| 1298 | 1399 | |
| 1299 | 1400 | $query = ''; |
| 1300 | 1401 | if ($globalArchive) { |
| 1301 | - if ($globalDebug) echo '-- Delete previous data -- '; |
|
| 1402 | + if ($globalDebug) { |
|
| 1403 | + echo '-- Delete previous data -- '; |
|
| 1404 | + } |
|
| 1302 | 1405 | $query .= 'DELETE FROM spotter_live WHERE flightaware_id = :flightaware_id;'; |
| 1303 | 1406 | } |
| 1304 | 1407 | |
@@ -1315,10 +1418,14 @@ discard block |
||
| 1315 | 1418 | return "error : ".$e->getMessage(); |
| 1316 | 1419 | } |
| 1317 | 1420 | if (isset($globalArchive) && $globalArchive && $putinarchive && $noarchive !== true) { |
| 1318 | - if ($globalDebug) echo '(Add to SBS archive : '; |
|
| 1421 | + if ($globalDebug) { |
|
| 1422 | + echo '(Add to SBS archive : '; |
|
| 1423 | + } |
|
| 1319 | 1424 | $SpotterArchive = new SpotterArchive($this->db); |
| 1320 | 1425 | $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); |
| 1321 | - if ($globalDebug) echo $result.')'; |
|
| 1426 | + if ($globalDebug) { |
|
| 1427 | + echo $result.')'; |
|
| 1428 | + } |
|
| 1322 | 1429 | } elseif ($globalDebug && $putinarchive !== true) { |
| 1323 | 1430 | echo '(Not adding to archive)'; |
| 1324 | 1431 | } elseif ($globalDebug && $noarchive === true) { |
@@ -12,7 +12,9 @@ discard block |
||
| 12 | 12 | $tracker = false; |
| 13 | 13 | $marine = false; |
| 14 | 14 | $usecoord = false; |
| 15 | -if (isset($_GET['test'])) exit(); |
|
| 15 | +if (isset($_GET['test'])) { |
|
| 16 | + exit(); |
|
| 17 | +} |
|
| 16 | 18 | if (isset($_GET['tracker'])) { |
| 17 | 19 | $tracker = true; |
| 18 | 20 | } |
@@ -57,31 +59,62 @@ discard block |
||
| 57 | 59 | } |
| 58 | 60 | header('Content-Type: text/javascript'); |
| 59 | 61 | |
| 60 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 61 | -else $compress = $globalJsonCompress; |
|
| 62 | +if (!isset($globalJsonCompress)) { |
|
| 63 | + $compress = true; |
|
| 64 | +} else { |
|
| 65 | + $compress = $globalJsonCompress; |
|
| 66 | +} |
|
| 62 | 67 | |
| 63 | 68 | $limit = 0; |
| 64 | 69 | $from_archive = false; |
| 65 | 70 | $min = true; |
| 66 | 71 | $allhistory = false; |
| 67 | 72 | $filter['source'] = array(); |
| 68 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 69 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 70 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 71 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 72 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 73 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 74 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 75 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 76 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 77 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 78 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 79 | -if (isset($_COOKIE['filter_race']) && $_COOKIE['filter_race'] != 'all') $filter['race'] = filter_var($_COOKIE['filter_race'],FILTER_SANITIZE_NUMBER_INT); |
|
| 80 | -if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') $filter['blocked'] = true; |
|
| 73 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
| 74 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 75 | +} |
|
| 76 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
| 77 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 78 | +} |
|
| 79 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
| 80 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 81 | +} |
|
| 82 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
| 83 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 84 | +} |
|
| 85 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
| 86 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 87 | +} |
|
| 88 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
| 89 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 90 | +} |
|
| 91 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
| 92 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 93 | +} |
|
| 94 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
| 95 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 96 | +} |
|
| 97 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
| 98 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 99 | +} |
|
| 100 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
| 101 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 102 | +} |
|
| 103 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
| 104 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 105 | +} |
|
| 106 | +if (isset($_COOKIE['filter_race']) && $_COOKIE['filter_race'] != 'all') { |
|
| 107 | + $filter['race'] = filter_var($_COOKIE['filter_race'],FILTER_SANITIZE_NUMBER_INT); |
|
| 108 | +} |
|
| 109 | +if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') { |
|
| 110 | + $filter['blocked'] = true; |
|
| 111 | +} |
|
| 81 | 112 | |
| 82 | 113 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 83 | 114 | $min = true; |
| 84 | -} else $min = false; |
|
| 115 | +} else { |
|
| 116 | + $min = false; |
|
| 117 | +} |
|
| 85 | 118 | |
| 86 | 119 | |
| 87 | 120 | if (isset($_COOKIE['map_2d_limit'])) { |
@@ -197,24 +230,38 @@ discard block |
||
| 197 | 230 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 198 | 231 | } |
| 199 | 232 | } |
| 200 | - if ($flightcnt == '') $flightcnt = 0; |
|
| 201 | -} else $flightcnt = 0; |
|
| 233 | + if ($flightcnt == '') { |
|
| 234 | + $flightcnt = 0; |
|
| 235 | + } |
|
| 236 | + } else { |
|
| 237 | + $flightcnt = 0; |
|
| 238 | +} |
|
| 202 | 239 | |
| 203 | 240 | $sqltime = round(microtime(true)-$begintime,2); |
| 204 | 241 | |
| 205 | 242 | $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
| 206 | -if ($currenttime != '') $currenttime = round($currenttime/1000); |
|
| 243 | +if ($currenttime != '') { |
|
| 244 | + $currenttime = round($currenttime/1000); |
|
| 245 | +} |
|
| 207 | 246 | |
| 208 | -if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) $usenextlatlon = false; |
|
| 209 | -else $usenextlatlon = true; |
|
| 210 | -if ($usenextlatlon === false) $currenttime = ''; |
|
| 247 | +if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) { |
|
| 248 | + $usenextlatlon = false; |
|
| 249 | +} else { |
|
| 250 | + $usenextlatlon = true; |
|
| 251 | +} |
|
| 252 | +if ($usenextlatlon === false) { |
|
| 253 | + $currenttime = ''; |
|
| 254 | +} |
|
| 211 | 255 | $j = 0; |
| 212 | 256 | $prev_flightaware_id = ''; |
| 213 | 257 | $aircrafts_shadow = array(); |
| 214 | 258 | $output = '{'; |
| 215 | 259 | $output .= '"type": "FeatureCollection",'; |
| 216 | - if ($min) $output .= '"minimal": "true",'; |
|
| 217 | - else $output .= '"minimal": "false",'; |
|
| 260 | + if ($min) { |
|
| 261 | + $output .= '"minimal": "true",'; |
|
| 262 | + } else { |
|
| 263 | + $output .= '"minimal": "false",'; |
|
| 264 | + } |
|
| 218 | 265 | //$output .= '"fc": "'.$flightcnt.'",'; |
| 219 | 266 | $output .= '"sqt": "'.$sqltime.'",'; |
| 220 | 267 | |
@@ -259,18 +306,29 @@ discard block |
||
| 259 | 306 | } |
| 260 | 307 | $output .= '"properties": {'; |
| 261 | 308 | if (isset($spotter_item['flightaware_id'])) { |
| 262 | - if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 263 | - else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 309 | + if ($compress) { |
|
| 310 | + $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 311 | + } else { |
|
| 312 | + $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 313 | + } |
|
| 264 | 314 | } elseif (isset($spotter_item['famtrackid'])) { |
| 265 | - if ($compress) $output .= '"fti": "'.$spotter_item['famtrackid'].'",'; |
|
| 266 | - else $output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",'; |
|
| 315 | + if ($compress) { |
|
| 316 | + $output .= '"fti": "'.$spotter_item['famtrackid'].'",'; |
|
| 317 | + } else { |
|
| 318 | + $output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",'; |
|
| 319 | + } |
|
| 267 | 320 | } elseif (isset($spotter_item['fammarine_id'])) { |
| 268 | - if ($compress) $output .= '"fmi": "'.$spotter_item['fammarine_id'].'",'; |
|
| 269 | - else $output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",'; |
|
| 321 | + if ($compress) { |
|
| 322 | + $output .= '"fmi": "'.$spotter_item['fammarine_id'].'",'; |
|
| 323 | + } else { |
|
| 324 | + $output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",'; |
|
| 325 | + } |
|
| 270 | 326 | } |
| 271 | 327 | $output .= '"fc": "'.$flightcnt.'",'; |
| 272 | 328 | $output .= '"sqt": "'.$sqltime.'",'; |
| 273 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 329 | + if (isset($begindate)) { |
|
| 330 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 331 | + } |
|
| 274 | 332 | |
| 275 | 333 | /* |
| 276 | 334 | if ($min) $output .= '"minimal": "true",'; |
@@ -278,16 +336,25 @@ discard block |
||
| 278 | 336 | */ |
| 279 | 337 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
| 280 | 338 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 281 | - if ($compress) $output .= '"c": '.json_encode(str_replace('\\','',$spotter_item['ident'])).','; |
|
| 282 | - else $output .= '"callsign": '.json_encode(str_replace('\\','',$spotter_item['ident'])).','; |
|
| 339 | + if ($compress) { |
|
| 340 | + $output .= '"c": '.json_encode(str_replace('\\','',$spotter_item['ident'])).','; |
|
| 341 | + } else { |
|
| 342 | + $output .= '"callsign": '.json_encode(str_replace('\\','',$spotter_item['ident'])).','; |
|
| 343 | + } |
|
| 283 | 344 | //' |
| 284 | 345 | } else { |
| 285 | - if ($compress) $output .= '"c": "NA",'; |
|
| 286 | - else $output .= '"callsign": "NA",'; |
|
| 346 | + if ($compress) { |
|
| 347 | + $output .= '"c": "NA",'; |
|
| 348 | + } else { |
|
| 349 | + $output .= '"callsign": "NA",'; |
|
| 350 | + } |
|
| 287 | 351 | } |
| 288 | 352 | if (isset($spotter_item['registration'])) { |
| 289 | - if ($compress) $output .= '"reg": '.json_encode($spotter_item['registration']).','; |
|
| 290 | - else $output .= '"registration": '.json_encode($spotter_item['registration']).','; |
|
| 353 | + if ($compress) { |
|
| 354 | + $output .= '"reg": '.json_encode($spotter_item['registration']).','; |
|
| 355 | + } else { |
|
| 356 | + $output .= '"registration": '.json_encode($spotter_item['registration']).','; |
|
| 357 | + } |
|
| 291 | 358 | } |
| 292 | 359 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 293 | 360 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
@@ -298,20 +365,30 @@ discard block |
||
| 298 | 365 | $output .= '"aircraft_name": "NA",'; |
| 299 | 366 | } |
| 300 | 367 | if (isset($spotter_item['aircraft_icao'])) { |
| 301 | - if ($compress) $output .= '"ai": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 302 | - else $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 368 | + if ($compress) { |
|
| 369 | + $output .= '"ai": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 370 | + } else { |
|
| 371 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 372 | + } |
|
| 303 | 373 | } |
| 304 | 374 | if (!isset($spotter_item['aircraft_shadow']) && !$tracker && !$marine) { |
| 305 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
| 306 | - else { |
|
| 375 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
| 376 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 377 | + } else { |
|
| 307 | 378 | $aircraft_icao = $spotter_item['aircraft_icao']; |
| 308 | - if (isset($aircrafts_shadow[$aircraft_icao])) $spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao]; |
|
| 309 | - else { |
|
| 379 | + if (isset($aircrafts_shadow[$aircraft_icao])) { |
|
| 380 | + $spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao]; |
|
| 381 | + } else { |
|
| 310 | 382 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
| 311 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 312 | - elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 313 | - elseif ($aircraft_icao == 'PARAGLIDER') $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 314 | - else $spotter_item['aircraft_shadow'] = ''; |
|
| 383 | + if (count($aircraft_info) > 0) { |
|
| 384 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 385 | + } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
|
| 386 | + $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 387 | + } elseif ($aircraft_icao == 'PARAGLIDER') { |
|
| 388 | + $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 389 | + } else { |
|
| 390 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 391 | + } |
|
| 315 | 392 | $aircrafts_shadow[$aircraft_icao] = $spotter_item['aircraft_shadow']; |
| 316 | 393 | } |
| 317 | 394 | } |
@@ -319,90 +396,171 @@ discard block |
||
| 319 | 396 | if (!isset($spotter_item['aircraft_shadow']) || $spotter_item['aircraft_shadow'] == '') { |
| 320 | 397 | if ($tracker) { |
| 321 | 398 | if (isset($spotter_item['type']) && $spotter_item['type'] == 'Ambulance') { |
| 322 | - if ($compress) $output .= '"as": "ambulance.png",'; |
|
| 323 | - else $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 399 | + if ($compress) { |
|
| 400 | + $output .= '"as": "ambulance.png",'; |
|
| 401 | + } else { |
|
| 402 | + $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 403 | + } |
|
| 324 | 404 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Police') { |
| 325 | - if ($compress) $output .= '"as": "police.png",'; |
|
| 326 | - else $output .= '"aircraft_shadow": "police.png",'; |
|
| 405 | + if ($compress) { |
|
| 406 | + $output .= '"as": "police.png",'; |
|
| 407 | + } else { |
|
| 408 | + $output .= '"aircraft_shadow": "police.png",'; |
|
| 409 | + } |
|
| 327 | 410 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Yacht (Sail)') { |
| 328 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 329 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 411 | + if ($compress) { |
|
| 412 | + $output .= '"as": "ship.png",'; |
|
| 413 | + } else { |
|
| 414 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 415 | + } |
|
| 330 | 416 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Ship (Power Boat)') { |
| 331 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 332 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 417 | + if ($compress) { |
|
| 418 | + $output .= '"as": "ship.png",'; |
|
| 419 | + } else { |
|
| 420 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 421 | + } |
|
| 333 | 422 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Shuttle') { |
| 334 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 335 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 423 | + if ($compress) { |
|
| 424 | + $output .= '"as": "ship.png",'; |
|
| 425 | + } else { |
|
| 426 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 427 | + } |
|
| 336 | 428 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck') { |
| 337 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 338 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 429 | + if ($compress) { |
|
| 430 | + $output .= '"as": "truck.png",'; |
|
| 431 | + } else { |
|
| 432 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 433 | + } |
|
| 339 | 434 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck (18 Wheeler)') { |
| 340 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 341 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 435 | + if ($compress) { |
|
| 436 | + $output .= '"as": "truck.png",'; |
|
| 437 | + } else { |
|
| 438 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 439 | + } |
|
| 342 | 440 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Aircraft (small)') { |
| 343 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 344 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 441 | + if ($compress) { |
|
| 442 | + $output .= '"as": "aircraft.png",'; |
|
| 443 | + } else { |
|
| 444 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 445 | + } |
|
| 345 | 446 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Large Aircraft') { |
| 346 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 347 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 447 | + if ($compress) { |
|
| 448 | + $output .= '"as": "aircraft.png",'; |
|
| 449 | + } else { |
|
| 450 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 451 | + } |
|
| 348 | 452 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Helicopter') { |
| 349 | - if ($compress) $output .= '"as": "helico.png",'; |
|
| 350 | - else $output .= '"aircraft_shadow": "helico.png",'; |
|
| 453 | + if ($compress) { |
|
| 454 | + $output .= '"as": "helico.png",'; |
|
| 455 | + } else { |
|
| 456 | + $output .= '"aircraft_shadow": "helico.png",'; |
|
| 457 | + } |
|
| 351 | 458 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Railroad Engine') { |
| 352 | - if ($compress) $output .= '"as": "rail.png",'; |
|
| 353 | - else $output .= '"aircraft_shadow": "rail.png",'; |
|
| 459 | + if ($compress) { |
|
| 460 | + $output .= '"as": "rail.png",'; |
|
| 461 | + } else { |
|
| 462 | + $output .= '"aircraft_shadow": "rail.png",'; |
|
| 463 | + } |
|
| 354 | 464 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Firetruck') { |
| 355 | - if ($compress) $output .= '"as": "firetruck.png",'; |
|
| 356 | - else $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 465 | + if ($compress) { |
|
| 466 | + $output .= '"as": "firetruck.png",'; |
|
| 467 | + } else { |
|
| 468 | + $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 469 | + } |
|
| 357 | 470 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bus') { |
| 358 | - if ($compress) $output .= '"as": "bus.png",'; |
|
| 359 | - else $output .= '"aircraft_shadow": "bus.png",'; |
|
| 471 | + if ($compress) { |
|
| 472 | + $output .= '"as": "bus.png",'; |
|
| 473 | + } else { |
|
| 474 | + $output .= '"aircraft_shadow": "bus.png",'; |
|
| 475 | + } |
|
| 360 | 476 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Phone') { |
| 361 | - if ($compress) $output .= '"as": "phone.png",'; |
|
| 362 | - else $output .= '"aircraft_shadow": "phone.png",'; |
|
| 477 | + if ($compress) { |
|
| 478 | + $output .= '"as": "phone.png",'; |
|
| 479 | + } else { |
|
| 480 | + $output .= '"aircraft_shadow": "phone.png",'; |
|
| 481 | + } |
|
| 363 | 482 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Jogger') { |
| 364 | - if ($compress) $output .= '"as": "jogger.png",'; |
|
| 365 | - else $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 483 | + if ($compress) { |
|
| 484 | + $output .= '"as": "jogger.png",'; |
|
| 485 | + } else { |
|
| 486 | + $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 487 | + } |
|
| 366 | 488 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bike') { |
| 367 | - if ($compress) $output .= '"as": "bike.png",'; |
|
| 368 | - else $output .= '"aircraft_shadow": "bike.png",'; |
|
| 489 | + if ($compress) { |
|
| 490 | + $output .= '"as": "bike.png",'; |
|
| 491 | + } else { |
|
| 492 | + $output .= '"aircraft_shadow": "bike.png",'; |
|
| 493 | + } |
|
| 369 | 494 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Motorcycle') { |
| 370 | - if ($compress) $output .= '"as": "motorcycle.png",'; |
|
| 371 | - else $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 495 | + if ($compress) { |
|
| 496 | + $output .= '"as": "motorcycle.png",'; |
|
| 497 | + } else { |
|
| 498 | + $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 499 | + } |
|
| 372 | 500 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Balloon') { |
| 373 | - if ($compress) $output .= '"as": "balloon.png",'; |
|
| 374 | - else $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 501 | + if ($compress) { |
|
| 502 | + $output .= '"as": "balloon.png",'; |
|
| 503 | + } else { |
|
| 504 | + $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 505 | + } |
|
| 375 | 506 | } else { |
| 376 | - if ($compress) $output .= '"as": "car.png",'; |
|
| 377 | - else $output .= '"aircraft_shadow": "car.png",'; |
|
| 507 | + if ($compress) { |
|
| 508 | + $output .= '"as": "car.png",'; |
|
| 509 | + } else { |
|
| 510 | + $output .= '"aircraft_shadow": "car.png",'; |
|
| 511 | + } |
|
| 378 | 512 | } |
| 379 | 513 | } elseif ($marine) { |
| 380 | 514 | if (isset($spotter_item['type']) && ($spotter_item['type'] == '50' Performance Cruiser' || $spotter_item['type'] == '50\' Performance Cruiser' || $spotter_item['type'] == 'Sail')) { |
| 381 | - if ($compress) $output .= '"as": "50perfcruiser.png",'; |
|
| 382 | - else $output .= '"aircraft_shadow": "50perfcruiser.png",'; |
|
| 515 | + if ($compress) { |
|
| 516 | + $output .= '"as": "50perfcruiser.png",'; |
|
| 517 | + } else { |
|
| 518 | + $output .= '"aircraft_shadow": "50perfcruiser.png",'; |
|
| 519 | + } |
|
| 383 | 520 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Sailaway Cruiser 38') { |
| 384 | - if ($compress) $output .= '"as": "cruiser38.png",'; |
|
| 385 | - else $output .= '"aircraft_shadow": "cruiser38.png",'; |
|
| 521 | + if ($compress) { |
|
| 522 | + $output .= '"as": "cruiser38.png",'; |
|
| 523 | + } else { |
|
| 524 | + $output .= '"aircraft_shadow": "cruiser38.png",'; |
|
| 525 | + } |
|
| 386 | 526 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Mini Transat') { |
| 387 | - if ($compress) $output .= '"as": "transat.png",'; |
|
| 388 | - else $output .= '"aircraft_shadow": "transat.png",'; |
|
| 527 | + if ($compress) { |
|
| 528 | + $output .= '"as": "transat.png",'; |
|
| 529 | + } else { |
|
| 530 | + $output .= '"aircraft_shadow": "transat.png",'; |
|
| 531 | + } |
|
| 389 | 532 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == '52' Cruising Cat') { |
| 390 | - if ($compress) $output .= '"as": "catamaran.png",'; |
|
| 391 | - else $output .= '"aircraft_shadow": "catamaran.png",'; |
|
| 533 | + if ($compress) { |
|
| 534 | + $output .= '"as": "catamaran.png",'; |
|
| 535 | + } else { |
|
| 536 | + $output .= '"aircraft_shadow": "catamaran.png",'; |
|
| 537 | + } |
|
| 392 | 538 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Caribbean Rose') { |
| 393 | - if ($compress) $output .= '"as": "carib.png",'; |
|
| 394 | - else $output .= '"aircraft_shadow": "carib.png",'; |
|
| 539 | + if ($compress) { |
|
| 540 | + $output .= '"as": "carib.png",'; |
|
| 541 | + } else { |
|
| 542 | + $output .= '"aircraft_shadow": "carib.png",'; |
|
| 543 | + } |
|
| 395 | 544 | } else { |
| 396 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 397 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 545 | + if ($compress) { |
|
| 546 | + $output .= '"as": "ship.png",'; |
|
| 547 | + } else { |
|
| 548 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 549 | + } |
|
| 398 | 550 | } |
| 399 | 551 | } else { |
| 400 | - if ($compress) $output .= '"as": "default.png",'; |
|
| 401 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
| 552 | + if ($compress) { |
|
| 553 | + $output .= '"as": "default.png",'; |
|
| 554 | + } else { |
|
| 555 | + $output .= '"aircraft_shadow": "default.png",'; |
|
| 556 | + } |
|
| 402 | 557 | } |
| 403 | 558 | } else { |
| 404 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 405 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 559 | + if ($compress) { |
|
| 560 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 561 | + } else { |
|
| 562 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 563 | + } |
|
| 406 | 564 | } |
| 407 | 565 | if (isset($spotter_item['airline_name'])) { |
| 408 | 566 | $output .= '"airline_name": "'.$spotter_item['airline_name'].'",'; |
@@ -410,8 +568,11 @@ discard block |
||
| 410 | 568 | $output .= '"airline_name": "NA",'; |
| 411 | 569 | } |
| 412 | 570 | if (isset($spotter_item['departure_airport'])) { |
| 413 | - if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 414 | - else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 571 | + if ($compress) { |
|
| 572 | + $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 573 | + } else { |
|
| 574 | + $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 575 | + } |
|
| 415 | 576 | } |
| 416 | 577 | if (isset($spotter_item['departure_airport_city'])) { |
| 417 | 578 | $output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",'; |
@@ -423,8 +584,11 @@ discard block |
||
| 423 | 584 | $output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",'; |
| 424 | 585 | } |
| 425 | 586 | if (isset($spotter_item['arrival_airport'])) { |
| 426 | - if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 427 | - else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 587 | + if ($compress) { |
|
| 588 | + $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 589 | + } else { |
|
| 590 | + $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 591 | + } |
|
| 428 | 592 | } |
| 429 | 593 | if (isset($spotter_item['arrival_airport_city'])) { |
| 430 | 594 | $output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",'; |
@@ -443,11 +607,17 @@ discard block |
||
| 443 | 607 | } |
| 444 | 608 | |
| 445 | 609 | if (isset($spotter_item['real_altitude'])) { |
| 446 | - if ($compress) $output .= '"a": "'.($spotter_item['real_altitude']/100).'",'; |
|
| 447 | - else $output .= '"altitude": "'.($spotter_item['real_altitude']/100).'",'; |
|
| 610 | + if ($compress) { |
|
| 611 | + $output .= '"a": "'.($spotter_item['real_altitude']/100).'",'; |
|
| 612 | + } else { |
|
| 613 | + $output .= '"altitude": "'.($spotter_item['real_altitude']/100).'",'; |
|
| 614 | + } |
|
| 448 | 615 | } elseif (isset($spotter_item['altitude'])) { |
| 449 | - if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 450 | - else $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 616 | + if ($compress) { |
|
| 617 | + $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 618 | + } else { |
|
| 619 | + $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 620 | + } |
|
| 451 | 621 | } |
| 452 | 622 | |
| 453 | 623 | $heading = $spotter_item['heading']; |
@@ -471,19 +641,24 @@ discard block |
||
| 471 | 641 | } |
| 472 | 642 | } |
| 473 | 643 | |
| 474 | - if ($compress)$output .= '"h": "'.$heading.'",'; |
|
| 475 | - else $output .= '"heading": "'.$heading.'",'; |
|
| 644 | + if ($compress) { |
|
| 645 | + $output .= '"h": "'.$heading.'",'; |
|
| 646 | + } else { |
|
| 647 | + $output .= '"heading": "'.$heading.'",'; |
|
| 648 | + } |
|
| 476 | 649 | if ($currenttime != '') { |
| 477 | 650 | if (strtotime($spotter_item['date']) < $currenttime) { |
| 478 | 651 | if (isset($archivespeed)) { |
| 479 | 652 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$heading,$archivespeed,($currenttime-strtotime($spotter_item['date'])+$globalMapRefresh)); |
| 480 | 653 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 481 | - if (!isset($idistance) || $fdistance < $idistance) $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 482 | - else { |
|
| 654 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 655 | + $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 656 | + } else { |
|
| 483 | 657 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$cheading,$archivespeed,($currenttime-strtotime($spotter_item['date'])+$globalMapRefresh)); |
| 484 | 658 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 485 | - if (!isset($idistance) || $fdistance < $idistance) $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 486 | - else { |
|
| 659 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 660 | + $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 661 | + } else { |
|
| 487 | 662 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$heading,$archivespeed); |
| 488 | 663 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 489 | 664 | } |
@@ -491,12 +666,14 @@ discard block |
||
| 491 | 666 | } elseif ($usenextlatlon) { |
| 492 | 667 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$heading,1,($currenttime-strtotime($spotter_item['date'])+$globalMapRefresh)); |
| 493 | 668 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 494 | - if (!isset($idistance) || $fdistance < $idistance) $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 495 | - else { |
|
| 669 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 670 | + $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 671 | + } else { |
|
| 496 | 672 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$cheading,1,($currenttime-strtotime($spotter_item['date'])+$globalMapRefresh)); |
| 497 | 673 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 498 | - if (!isset($idistance) || $fdistance < $idistance) $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 499 | - else { |
|
| 674 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 675 | + $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
| 676 | + } else { |
|
| 500 | 677 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$heading); |
| 501 | 678 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 502 | 679 | } |
@@ -535,7 +712,9 @@ discard block |
||
| 535 | 712 | } |
| 536 | 713 | } |
| 537 | 714 | |
| 538 | - if (!$min) $output .= '"image": "'.$image.'",'; |
|
| 715 | + if (!$min) { |
|
| 716 | + $output .= '"image": "'.$image.'",'; |
|
| 717 | + } |
|
| 539 | 718 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 540 | 719 | $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
| 541 | 720 | } |
@@ -543,8 +722,11 @@ discard block |
||
| 543 | 722 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
| 544 | 723 | } |
| 545 | 724 | if (isset($spotter_item['squawk'])) { |
| 546 | - if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 547 | - else $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 725 | + if ($compress) { |
|
| 726 | + $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 727 | + } else { |
|
| 728 | + $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 729 | + } |
|
| 548 | 730 | } |
| 549 | 731 | if (isset($spotter_item['squawk_usage'])) { |
| 550 | 732 | $output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",'; |
@@ -575,14 +757,23 @@ discard block |
||
| 575 | 757 | } |
| 576 | 758 | // type when not aircraft ? |
| 577 | 759 | if (isset($spotter_item['type'])) { |
| 578 | - if ($compress) $output .= '"t": "'.$spotter_item['type'].'"'; |
|
| 579 | - else $output .= '"type": "'.$spotter_item['type'].'"'; |
|
| 760 | + if ($compress) { |
|
| 761 | + $output .= '"t": "'.$spotter_item['type'].'"'; |
|
| 762 | + } else { |
|
| 763 | + $output .= '"type": "'.$spotter_item['type'].'"'; |
|
| 764 | + } |
|
| 580 | 765 | } elseif ($marine) { |
| 581 | - if ($compress) $output .= '"t": "ship"'; |
|
| 582 | - else $output .= '"type": "ship"'; |
|
| 766 | + if ($compress) { |
|
| 767 | + $output .= '"t": "ship"'; |
|
| 768 | + } else { |
|
| 769 | + $output .= '"type": "ship"'; |
|
| 770 | + } |
|
| 583 | 771 | } else { |
| 584 | - if ($compress) $output .= '"t": "aircraft"'; |
|
| 585 | - else $output .= '"type": "aircraft"'; |
|
| 772 | + if ($compress) { |
|
| 773 | + $output .= '"t": "aircraft"'; |
|
| 774 | + } else { |
|
| 775 | + $output .= '"type": "aircraft"'; |
|
| 776 | + } |
|
| 586 | 777 | } |
| 587 | 778 | $output .= '},'; |
| 588 | 779 | $output .= '"geometry": {'; |
@@ -590,15 +781,19 @@ discard block |
||
| 590 | 781 | $output .= '"coordinates": ['; |
| 591 | 782 | if ($currenttime != '') { |
| 592 | 783 | if (strtotime($spotter_item['date']) < $currenttime) { |
| 593 | - if (!isset($archivespeed)) $archivespeed = 1; |
|
| 784 | + if (!isset($archivespeed)) { |
|
| 785 | + $archivespeed = 1; |
|
| 786 | + } |
|
| 594 | 787 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$heading,$archivespeed,($currenttime-strtotime($spotter_item['date']))); |
| 595 | 788 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 596 | - if (!isset($idistance) || $fdistance < $idistance) $output .= $nextcoord['longitude'].','.$nextcoord['latitude']; |
|
| 597 | - else { |
|
| 789 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 790 | + $output .= $nextcoord['longitude'].','.$nextcoord['latitude']; |
|
| 791 | + } else { |
|
| 598 | 792 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$cheading,$archivespeed,($currenttime-strtotime($spotter_item['date']))); |
| 599 | 793 | $fdistance = $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$nextcoord['latitude'],$nextcoord['longitude']); |
| 600 | - if (!isset($idistance) || $fdistance < $idistance) $output .= $nextcoord['longitude'].','.$nextcoord['latitude']; |
|
| 601 | - else { |
|
| 794 | + if (!isset($idistance) || $fdistance < $idistance) { |
|
| 795 | + $output .= $nextcoord['longitude'].','.$nextcoord['latitude']; |
|
| 796 | + } else { |
|
| 602 | 797 | $output .= $spotter_item['longitude'].', '; |
| 603 | 798 | $output .= $spotter_item['latitude']; |
| 604 | 799 | } |
@@ -676,7 +871,9 @@ discard block |
||
| 676 | 871 | } |
| 677 | 872 | */ |
| 678 | 873 | $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
| 679 | - if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
| 874 | + if ($history == '' && isset($_COOKIE['history'])) { |
|
| 875 | + $history = $_COOKIE['history']; |
|
| 876 | + } |
|
| 680 | 877 | |
| 681 | 878 | if ( |
| 682 | 879 | (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') |
@@ -746,8 +943,11 @@ discard block |
||
| 746 | 943 | $output_history .= ']}},'; |
| 747 | 944 | $output .= $output_history; |
| 748 | 945 | } |
| 749 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 750 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 946 | + if ($compress) { |
|
| 947 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 948 | + } else { |
|
| 949 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 950 | + } |
|
| 751 | 951 | } |
| 752 | 952 | $output_history .= '['; |
| 753 | 953 | $output_history .= $spotter_history['longitude'].', '; |
@@ -768,10 +968,15 @@ discard block |
||
| 768 | 968 | if ($d == false) { |
| 769 | 969 | if ($compress) { |
| 770 | 970 | $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'",'; |
| 771 | - if (isset($spotter_history_array[0]['mapmatching_engine']) && $spotter_history_array[0]['mapmatching_engine'] == 'graphhopper') $output_history .= '"atr": "Powered by <a href=\"https://www.graphhopper.com/\">GraphHopper API</a>", Map matching engine use data from © <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",'; |
|
| 772 | - elseif (isset($spotter_history_array[0]['mapmatching_engine'])) $output_history .= '"atr": "Map matching engine use data from © <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",'; |
|
| 971 | + if (isset($spotter_history_array[0]['mapmatching_engine']) && $spotter_history_array[0]['mapmatching_engine'] == 'graphhopper') { |
|
| 972 | + $output_history .= '"atr": "Powered by <a href=\"https://www.graphhopper.com/\">GraphHopper API</a>", Map matching engine use data from © <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",'; |
|
| 973 | + } elseif (isset($spotter_history_array[0]['mapmatching_engine'])) { |
|
| 974 | + $output_history .= '"atr": "Map matching engine use data from © <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",'; |
|
| 975 | + } |
|
| 773 | 976 | $output_history .= '"t": "history"},"geometry": {"type": "LineString","coordinates": ['; |
| 774 | - } else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 977 | + } else { |
|
| 978 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 979 | + } |
|
| 775 | 980 | $d = true; |
| 776 | 981 | } |
| 777 | 982 | $output_history .= '['; |
@@ -794,7 +999,9 @@ discard block |
||
| 794 | 999 | $output_historyd = '['; |
| 795 | 1000 | $output_historyd .= $spotter_item['longitude'].', '; |
| 796 | 1001 | $output_historyd .= $spotter_item['latitude']; |
| 797 | - if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 1002 | + if (isset($spotter_history['altitude'])) { |
|
| 1003 | + $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 1004 | + } |
|
| 798 | 1005 | $output_historyd .= '],'; |
| 799 | 1006 | //$output_history = $output_historyd.$output_history; |
| 800 | 1007 | $output_history = $output_history.$output_historyd; |
@@ -822,8 +1029,11 @@ discard block |
||
| 822 | 1029 | && $spotter_item['arrival_airport'] != 'NA' |
| 823 | 1030 | && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") |
| 824 | 1031 | || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)))) { |
| 825 | - if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 826 | - else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1032 | + if ($compress) { |
|
| 1033 | + $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1034 | + } else { |
|
| 1035 | + $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1036 | + } |
|
| 827 | 1037 | if (isset($spotter_item['departure_airport_latitude'])) { |
| 828 | 1038 | $output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],'; |
| 829 | 1039 | } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
@@ -856,8 +1066,11 @@ discard block |
||
| 856 | 1066 | || (!isset($_COOKIE['MapRemainingRoute']) && (!isset($globalMapRemainingRoute) |
| 857 | 1067 | || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) { |
| 858 | 1068 | $havedata = false; |
| 859 | - if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 860 | - else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1069 | + if ($compress) { |
|
| 1070 | + $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1071 | + } else { |
|
| 1072 | + $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 1073 | + } |
|
| 861 | 1074 | |
| 862 | 1075 | //$output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],'; |
| 863 | 1076 | if (isset($spotter_item['arrival_airport_latitude'])) { |
@@ -882,7 +1095,9 @@ discard block |
||
| 882 | 1095 | $output_dest = substr($output_dest, 0, -1); |
| 883 | 1096 | } |
| 884 | 1097 | $output_dest .= ']}},'; |
| 885 | - if ($havedata) $output .= $output_dest; |
|
| 1098 | + if ($havedata) { |
|
| 1099 | + $output .= $output_dest; |
|
| 1100 | + } |
|
| 886 | 1101 | unset($output_dest); |
| 887 | 1102 | } |
| 888 | 1103 | } |
@@ -890,7 +1105,9 @@ discard block |
||
| 890 | 1105 | $output .= ']'; |
| 891 | 1106 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 892 | 1107 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
| 893 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 1108 | + if (isset($begindate)) { |
|
| 1109 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 1110 | + } |
|
| 894 | 1111 | $output .= '"fc": "'.$j.'"'; |
| 895 | 1112 | } else { |
| 896 | 1113 | $output .= '"features": '; |
@@ -57,7 +57,10 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
| 59 | 59 | ?> |
| 60 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
| 60 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
| 61 | + print '?tsk='.$tsk; |
|
| 62 | +} |
|
| 63 | +?>"></script> |
|
| 61 | 64 | <script src="<?php echo $globalURL; ?>/js/meuusjs.1.0.3.min.js"></script> |
| 62 | 65 | <script src="<?php echo $globalURL; ?>/js/map.3d.weather.js"></script> |
| 63 | 66 | <?php |
@@ -137,10 +140,22 @@ discard block |
||
| 137 | 140 | <h1>Weather</h1> |
| 138 | 141 | <ul> |
| 139 | 142 | |
| 140 | - <li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') print 'checked'; ?> /><?php echo _("Weather Winds"); ?></label></div></li> |
|
| 141 | - <li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') print 'checked'; ?> /><?php echo _("Ocean surface currents"); ?></label></div></li> |
|
| 142 | - <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 143 | - <!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') print 'checked'; ?> /><?php echo _("Weather Waves height background"); ?></label></div></li> --> |
|
| 143 | + <li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') { |
|
| 144 | + print 'checked'; |
|
| 145 | +} |
|
| 146 | +?> /><?php echo _("Weather Winds"); ?></label></div></li> |
|
| 147 | + <li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') { |
|
| 148 | + print 'checked'; |
|
| 149 | +} |
|
| 150 | +?> /><?php echo _("Ocean surface currents"); ?></label></div></li> |
|
| 151 | + <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') { |
|
| 152 | + print 'checked'; |
|
| 153 | +} |
|
| 154 | +?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 155 | + <!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') { |
|
| 156 | + print 'checked'; |
|
| 157 | +} |
|
| 158 | +?> /><?php echo _("Weather Waves height background"); ?></label></div></li> --> |
|
| 144 | 159 | |
| 145 | 160 | <?php |
| 146 | 161 | if (isset($globalOpenWeatherMapKey) && $globalOpenWeatherMapKey != '') { |
@@ -162,12 +177,18 @@ discard block |
||
| 162 | 177 | <?php |
| 163 | 178 | if (isset($globalMETAR) && isset($globalMETARcycle) && $globalMETAR && $globalMETARcycle) { |
| 164 | 179 | ?> |
| 165 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) print 'checked'; ?> ><?php echo _("Display 3D weather"); ?></label></div></li> |
|
| 180 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) { |
|
| 181 | + print 'checked'; |
|
| 182 | +} |
|
| 183 | +?> ><?php echo _("Display 3D weather"); ?></label></div></li> |
|
| 166 | 184 | <!-- <li><div class="checkbox"><label><input type="checkbox" name="displayrain" value="1" onclick="clickDisplayRain(this)" ><?php echo _("Display rain on 3D map"); ?></label></div></li>--> |
| 167 | 185 | <?php |
| 168 | 186 | } |
| 169 | 187 | ?> |
| 170 | - <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 188 | + <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') { |
|
| 189 | + print 'checked'; |
|
| 190 | +} |
|
| 191 | +?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 171 | 192 | </ul> |
| 172 | 193 | <?php |
| 173 | 194 | } |
@@ -183,13 +204,22 @@ discard block |
||
| 183 | 204 | <?php |
| 184 | 205 | if (!isset($globalAircraft) || $globalAircraft) { |
| 185 | 206 | ?> |
| 186 | - <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> |
|
| 187 | - <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> |
|
| 207 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 208 | + print 'checked'; |
|
| 209 | +} |
|
| 210 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
| 211 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 212 | + print 'checked'; |
|
| 213 | +} |
|
| 214 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
| 188 | 215 | <?php |
| 189 | 216 | } |
| 190 | 217 | if (isset($globalMarine) && $globalMarine) { |
| 191 | 218 | ?> |
| 192 | - <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 219 | + <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') { |
|
| 220 | + print 'checked'; |
|
| 221 | +} |
|
| 222 | +?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 193 | 223 | <?php |
| 194 | 224 | } |
| 195 | 225 | ?> |
@@ -204,13 +234,22 @@ discard block |
||
| 204 | 234 | <?php |
| 205 | 235 | if (!isset($globalAircraft) || $globalAircraft) { |
| 206 | 236 | ?> |
| 207 | - <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> |
|
| 208 | - <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> |
|
| 237 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 238 | + print 'checked'; |
|
| 239 | +} |
|
| 240 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
| 241 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 242 | + print 'checked'; |
|
| 243 | +} |
|
| 244 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
| 209 | 245 | <?php |
| 210 | 246 | } |
| 211 | 247 | if (isset($globalMarine) && $globalMarine) { |
| 212 | 248 | ?> |
| 213 | - <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 249 | + <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') { |
|
| 250 | + print 'checked'; |
|
| 251 | +} |
|
| 252 | +?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 214 | 253 | <?php |
| 215 | 254 | } |
| 216 | 255 | ?> |
@@ -225,14 +264,32 @@ discard block |
||
| 225 | 264 | <h1>NOTAM</h1> |
| 226 | 265 | <form> |
| 227 | 266 | <ul> |
| 228 | - <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> |
|
| 267 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
| 268 | + print 'checked'; |
|
| 269 | +} |
|
| 270 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
| 229 | 271 | <li><?php echo _("NOTAM scope:"); ?> |
| 230 | 272 | <select class="selectpicker" onchange="notamscope(this);"> |
| 231 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 232 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 233 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 234 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 235 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 273 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 274 | + print ' selected'; |
|
| 275 | +} |
|
| 276 | +?>>All</option> |
|
| 277 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 278 | + print ' selected'; |
|
| 279 | +} |
|
| 280 | +?>>Airport/Enroute warning</option> |
|
| 281 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 282 | + print ' selected'; |
|
| 283 | +} |
|
| 284 | +?>>Airport warning</option> |
|
| 285 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 286 | + print ' selected'; |
|
| 287 | +} |
|
| 288 | +?>>Navigation warning</option> |
|
| 289 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 290 | + print ' selected'; |
|
| 291 | +} |
|
| 292 | +?>>Enroute warning</option> |
|
| 236 | 293 | </select |
| 237 | 294 | </li> |
| 238 | 295 | </ul> |
@@ -260,7 +317,10 @@ discard block |
||
| 260 | 317 | <div class="form-group"> |
| 261 | 318 | <label><?php echo _("From:"); ?></label> |
| 262 | 319 | <div class='input-group date' id='datetimepicker1'> |
| 263 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
| 320 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
| 321 | + print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; |
|
| 322 | +} |
|
| 323 | +?>" required /> |
|
| 264 | 324 | <span class="input-group-addon"> |
| 265 | 325 | <span class="glyphicon glyphicon-calendar"></span> |
| 266 | 326 | </span> |
@@ -269,7 +329,10 @@ discard block |
||
| 269 | 329 | <div class="form-group"> |
| 270 | 330 | <label><?php echo _("To:"); ?></label> |
| 271 | 331 | <div class='input-group date' id='datetimepicker2'> |
| 272 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
| 332 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') { |
|
| 333 | + print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; |
|
| 334 | +} |
|
| 335 | +?>" /> |
|
| 273 | 336 | <span class="input-group-addon"> |
| 274 | 337 | <span class="glyphicon glyphicon-calendar"></span> |
| 275 | 338 | </span> |
@@ -301,8 +364,20 @@ discard block |
||
| 301 | 364 | </script> |
| 302 | 365 | <li><?php echo _("Playback speed:"); ?> |
| 303 | 366 | <div class="range"> |
| 304 | - <input type="range" min="0" max="50" step="1" id="archivespeed" 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'; ?>"> |
|
| 305 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 367 | + <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
| 368 | + print $_POST['archivespeed']; |
|
| 369 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
| 370 | + print $_COOKIE['archive_speed']; |
|
| 371 | +} else { |
|
| 372 | + print '1'; |
|
| 373 | +} |
|
| 374 | +?>"> |
|
| 375 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 376 | + print $_COOKIE['archive_speed']; |
|
| 377 | +} else { |
|
| 378 | + print '1'; |
|
| 379 | +} |
|
| 380 | +?></output> |
|
| 306 | 381 | </div> |
| 307 | 382 | </li> |
| 308 | 383 | <?php |
@@ -331,14 +406,20 @@ discard block |
||
| 331 | 406 | <li><?php echo _("Type of Map:"); ?> |
| 332 | 407 | <?php |
| 333 | 408 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
| 334 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 335 | - else $MapType = $_COOKIE['MapType']; |
|
| 409 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 410 | + $MapType = $globalMapProvider; |
|
| 411 | + } else { |
|
| 412 | + $MapType = $_COOKIE['MapType']; |
|
| 413 | + } |
|
| 336 | 414 | ?> |
| 337 | 415 | <select class="selectpicker" onchange="mapType(this);"> |
| 338 | 416 | <?php |
| 339 | 417 | } else { |
| 340 | - if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') $MapType = $globalMapProvider; |
|
| 341 | - else $MapType = $_COOKIE['MapType3D']; |
|
| 418 | + if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') { |
|
| 419 | + $MapType = $globalMapProvider; |
|
| 420 | + } else { |
|
| 421 | + $MapType = $_COOKIE['MapType3D']; |
|
| 422 | + } |
|
| 342 | 423 | ?> |
| 343 | 424 | <select class="selectpicker" onchange="mapType3D(this);"> |
| 344 | 425 | <?php |
@@ -347,24 +428,48 @@ discard block |
||
| 347 | 428 | <?php |
| 348 | 429 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
| 349 | 430 | ?> |
| 350 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 431 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 432 | + print ' selected'; |
|
| 433 | +} |
|
| 434 | +?>>Natural Earth (local)</option> |
|
| 351 | 435 | <?php |
| 352 | 436 | } else { |
| 353 | 437 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
| 354 | 438 | ?> |
| 355 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 439 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 440 | + print ' selected'; |
|
| 441 | +} |
|
| 442 | +?>>Natural Earth (local)</option> |
|
| 356 | 443 | <?php |
| 357 | 444 | } |
| 358 | 445 | ?> |
| 359 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
| 360 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
| 361 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') print ' selected'; ?>>ArcGIS Ocean</option> |
|
| 446 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
| 447 | + print ' selected'; |
|
| 448 | +} |
|
| 449 | +?>>ArcGIS Streetmap</option> |
|
| 450 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
| 451 | + print ' selected'; |
|
| 452 | +} |
|
| 453 | +?>>ArcGIS Satellite</option> |
|
| 454 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') { |
|
| 455 | + print ' selected'; |
|
| 456 | +} |
|
| 457 | +?>>ArcGIS Ocean</option> |
|
| 362 | 458 | <?php |
| 363 | 459 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 364 | 460 | ?> |
| 365 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 366 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 367 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 461 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 462 | + print ' selected'; |
|
| 463 | +} |
|
| 464 | +?>>Bing-Aerial</option> |
|
| 465 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 466 | + print ' selected'; |
|
| 467 | +} |
|
| 468 | +?>>Bing-Hybrid</option> |
|
| 469 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 470 | + print ' selected'; |
|
| 471 | +} |
|
| 472 | +?>>Bing-Road</option> |
|
| 368 | 473 | <?php |
| 369 | 474 | } |
| 370 | 475 | ?> |
@@ -374,59 +479,143 @@ discard block |
||
| 374 | 479 | <?php |
| 375 | 480 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 376 | 481 | ?> |
| 377 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 378 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 379 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 482 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 483 | + print ' selected'; |
|
| 484 | +} |
|
| 485 | +?>>Here-Aerial</option> |
|
| 486 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 487 | + print ' selected'; |
|
| 488 | +} |
|
| 489 | +?>>Here-Hybrid</option> |
|
| 490 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 491 | + print ' selected'; |
|
| 492 | +} |
|
| 493 | +?>>Here-Road</option> |
|
| 380 | 494 | <?php |
| 381 | 495 | } |
| 382 | 496 | ?> |
| 383 | 497 | <?php |
| 384 | 498 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 385 | 499 | ?> |
| 386 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 387 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 388 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 389 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 500 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 501 | + print ' selected'; |
|
| 502 | +} |
|
| 503 | +?>>Google Roadmap</option> |
|
| 504 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 505 | + print ' selected'; |
|
| 506 | +} |
|
| 507 | +?>>Google Satellite</option> |
|
| 508 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 509 | + print ' selected'; |
|
| 510 | +} |
|
| 511 | +?>>Google Hybrid</option> |
|
| 512 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 513 | + print ' selected'; |
|
| 514 | +} |
|
| 515 | +?>>Google Terrain</option> |
|
| 390 | 516 | <?php |
| 391 | 517 | } |
| 392 | 518 | ?> |
| 393 | 519 | <?php |
| 394 | 520 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 395 | 521 | ?> |
| 396 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 397 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 398 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 522 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 523 | + print ' selected'; |
|
| 524 | +} |
|
| 525 | +?>>MapQuest-OSM</option> |
|
| 526 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 527 | + print ' selected'; |
|
| 528 | +} |
|
| 529 | +?>>MapQuest-Aerial</option> |
|
| 530 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 531 | + print ' selected'; |
|
| 532 | +} |
|
| 533 | +?>>MapQuest-Hybrid</option> |
|
| 399 | 534 | <?php |
| 400 | 535 | } |
| 401 | 536 | ?> |
| 402 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 403 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
| 537 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 538 | + print ' selected'; |
|
| 539 | +} |
|
| 540 | +?>>Yandex</option> |
|
| 541 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 542 | + print ' selected'; |
|
| 543 | +} |
|
| 544 | +?>>Natural Earth</option> |
|
| 404 | 545 | <?php |
| 405 | 546 | } |
| 406 | 547 | ?> |
| 407 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
| 548 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
| 549 | + print ' selected'; |
|
| 550 | +} |
|
| 551 | +?>>National Geographic Street</option> |
|
| 408 | 552 | <?php |
| 409 | 553 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 410 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 411 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 554 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 555 | + $MapBoxId = 'default'; |
|
| 556 | + } else { |
|
| 557 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 558 | + } |
|
| 412 | 559 | ?> |
| 413 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
| 414 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 415 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 416 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 417 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 418 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 419 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 420 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 421 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 422 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 423 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 424 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 425 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 560 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
| 561 | + print ' selected'; |
|
| 562 | +} |
|
| 563 | +?>>Mapbox GL</option> |
|
| 564 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 565 | + print ' selected'; |
|
| 566 | +} |
|
| 567 | +?>>Mapbox default</option> |
|
| 568 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 569 | + print ' selected'; |
|
| 570 | +} |
|
| 571 | +?>>Mapbox streets</option> |
|
| 572 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 573 | + print ' selected'; |
|
| 574 | +} |
|
| 575 | +?>>Mapbox light</option> |
|
| 576 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 577 | + print ' selected'; |
|
| 578 | +} |
|
| 579 | +?>>Mapbox dark</option> |
|
| 580 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 581 | + print ' selected'; |
|
| 582 | +} |
|
| 583 | +?>>Mapbox satellite</option> |
|
| 584 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 585 | + print ' selected'; |
|
| 586 | +} |
|
| 587 | +?>>Mapbox streets-satellite</option> |
|
| 588 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 589 | + print ' selected'; |
|
| 590 | +} |
|
| 591 | +?>>Mapbox streets-basic</option> |
|
| 592 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 593 | + print ' selected'; |
|
| 594 | +} |
|
| 595 | +?>>Mapbox comic</option> |
|
| 596 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 597 | + print ' selected'; |
|
| 598 | +} |
|
| 599 | +?>>Mapbox outdoors</option> |
|
| 600 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 601 | + print ' selected'; |
|
| 602 | +} |
|
| 603 | +?>>Mapbox pencil</option> |
|
| 604 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 605 | + print ' selected'; |
|
| 606 | +} |
|
| 607 | +?>>Mapbox pirates</option> |
|
| 608 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 609 | + print ' selected'; |
|
| 610 | +} |
|
| 611 | +?>>Mapbox emerald</option> |
|
| 426 | 612 | <?php |
| 427 | 613 | } |
| 428 | 614 | ?> |
| 429 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 615 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 616 | + print ' selected'; |
|
| 617 | +} |
|
| 618 | +?>>OpenStreetMap</option> |
|
| 430 | 619 | <?php |
| 431 | 620 | } |
| 432 | 621 | ?> |
@@ -437,10 +626,22 @@ discard block |
||
| 437 | 626 | ?> |
| 438 | 627 | <li><?php echo _("Type of Terrain:"); ?> |
| 439 | 628 | <select class="selectpicker" onchange="terrainType(this);"> |
| 440 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 441 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 442 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 443 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 629 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 630 | + print ' selected'; |
|
| 631 | +} |
|
| 632 | +?>>stk terrain</option> |
|
| 633 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 634 | + print ' selected'; |
|
| 635 | +} |
|
| 636 | +?>>ellipsoid</option> |
|
| 637 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 638 | + print ' selected'; |
|
| 639 | +} |
|
| 640 | +?>>vr terrain</option> |
|
| 641 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
| 642 | + print ' selected'; |
|
| 643 | +} |
|
| 644 | +?>>ArticDEM</option> |
|
| 444 | 645 | </select> |
| 445 | 646 | </li> |
| 446 | 647 | <?php |
@@ -450,64 +651,124 @@ discard block |
||
| 450 | 651 | <?php |
| 451 | 652 | if (isset($globalMap3D) && $globalMap3D) { |
| 452 | 653 | ?> |
| 453 | - <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') print 'checked'; ?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li> |
|
| 654 | + <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') { |
|
| 655 | + print 'checked'; |
|
| 656 | +} |
|
| 657 | +?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li> |
|
| 454 | 658 | <?php |
| 455 | 659 | } |
| 456 | 660 | ?> |
| 457 | 661 | <?php |
| 458 | 662 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
| 459 | 663 | ?> |
| 460 | - <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> |
|
| 664 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
| 665 | + print 'checked'; |
|
| 666 | +} |
|
| 667 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
| 461 | 668 | |
| 462 | 669 | <?php |
| 463 | 670 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 464 | 671 | ?> |
| 465 | - <!--<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>--> |
|
| 466 | - <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> |
|
| 467 | - <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> |
|
| 468 | - <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> |
|
| 469 | - <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> |
|
| 672 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 673 | + print 'checked'; |
|
| 674 | +} |
|
| 675 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
| 676 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
| 677 | + print 'checked'; |
|
| 678 | +} |
|
| 679 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 680 | + <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)) { |
|
| 681 | + print 'checked'; |
|
| 682 | +} |
|
| 683 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 684 | + <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)) { |
|
| 685 | + print 'checked'; |
|
| 686 | +} |
|
| 687 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 688 | + <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)) { |
|
| 689 | + print 'checked'; |
|
| 690 | +} |
|
| 691 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 470 | 692 | <?php |
| 471 | 693 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
| 472 | 694 | ?> |
| 473 | - <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> |
|
| 695 | + <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)) { |
|
| 696 | + print 'checked'; |
|
| 697 | +} |
|
| 698 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
| 474 | 699 | <?php |
| 475 | 700 | } |
| 476 | 701 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
| 477 | 702 | ?> |
| 478 | - <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> |
|
| 703 | + <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)) { |
|
| 704 | + print 'checked'; |
|
| 705 | +} |
|
| 706 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 479 | 707 | <?php |
| 480 | 708 | } |
| 481 | 709 | } |
| 482 | 710 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 483 | 711 | ?> |
| 484 | - <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> |
|
| 712 | + <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'])) { |
|
| 713 | + print 'checked'; |
|
| 714 | +} |
|
| 715 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 485 | 716 | <?php |
| 486 | 717 | } |
| 487 | 718 | ?> |
| 488 | - <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> |
|
| 489 | - <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> |
|
| 490 | - <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> |
|
| 719 | + <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))) { |
|
| 720 | + print 'checked'; |
|
| 721 | +} |
|
| 722 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 723 | + <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))) { |
|
| 724 | + print 'checked'; |
|
| 725 | +} |
|
| 726 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 727 | + <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))) { |
|
| 728 | + print 'checked'; |
|
| 729 | +} |
|
| 730 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 491 | 731 | <?php |
| 492 | 732 | if (isset($globalFires) && $globalFires) { |
| 493 | 733 | ?> |
| 494 | - <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> |
|
| 734 | + <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))) { |
|
| 735 | + print 'checked'; |
|
| 736 | +} |
|
| 737 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
| 495 | 738 | <?php |
| 496 | 739 | } |
| 497 | 740 | if (isset($globalMap3D) && $globalMap3D) { |
| 498 | 741 | ?> |
| 499 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 742 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) { |
|
| 743 | + print 'checked'; |
|
| 744 | +} |
|
| 745 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 500 | 746 | <?php |
| 501 | 747 | } |
| 502 | 748 | ?> |
| 503 | - <li><div class="checkbox"><label><input type="checkbox" name="truelight" value="1" onclick="clickTrueLight(this)" <?php if ((!isset($_COOKIE['truelight']) && (!isset($globalMapTrueLight) || $globalMapTrueLight)) || (isset($_COOKIE['truelight']) && $_COOKIE['truelight'] == 'true')) print 'checked'; ?> ><?php echo _("Enable globe sun lighting"); ?></label></div></li> |
|
| 749 | + <li><div class="checkbox"><label><input type="checkbox" name="truelight" value="1" onclick="clickTrueLight(this)" <?php if ((!isset($_COOKIE['truelight']) && (!isset($globalMapTrueLight) || $globalMapTrueLight)) || (isset($_COOKIE['truelight']) && $_COOKIE['truelight'] == 'true')) { |
|
| 750 | + print 'checked'; |
|
| 751 | +} |
|
| 752 | +?> ><?php echo _("Enable globe sun lighting"); ?></label></div></li> |
|
| 504 | 753 | <?php |
| 505 | 754 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 506 | 755 | ?> |
| 507 | - <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> |
|
| 508 | - <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) print 'checked'; ?> ><?php echo _("Use shadows"); ?></label></div></li> |
|
| 509 | - <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> |
|
| 510 | - <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) print 'checked'; ?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li> |
|
| 756 | + <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')) { |
|
| 757 | + print 'checked'; |
|
| 758 | +} |
|
| 759 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 760 | + <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) { |
|
| 761 | + print 'checked'; |
|
| 762 | +} |
|
| 763 | +?> ><?php echo _("Use shadows"); ?></label></div></li> |
|
| 764 | + <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)) { |
|
| 765 | + print 'checked'; |
|
| 766 | +} |
|
| 767 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
| 768 | + <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) { |
|
| 769 | + print 'checked'; |
|
| 770 | +} |
|
| 771 | +?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li> |
|
| 511 | 772 | <?php |
| 512 | 773 | } |
| 513 | 774 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -520,17 +781,25 @@ discard block |
||
| 520 | 781 | if (function_exists('array_column')) { |
| 521 | 782 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 522 | 783 | ?> |
| 523 | - <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> |
|
| 784 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 785 | + print 'checked'; |
|
| 786 | +} |
|
| 787 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 524 | 788 | <?php |
| 525 | 789 | } |
| 526 | 790 | } elseif (isset($globalSources)) { |
| 527 | 791 | $dispolar = false; |
| 528 | 792 | foreach ($globalSources as $testsource) { |
| 529 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 793 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 794 | + $dispolar = true; |
|
| 795 | + } |
|
| 530 | 796 | } |
| 531 | 797 | if ($dispolar) { |
| 532 | 798 | ?> |
| 533 | - <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> |
|
| 799 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 800 | + print 'checked'; |
|
| 801 | +} |
|
| 802 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 534 | 803 | <?php |
| 535 | 804 | } |
| 536 | 805 | } |
@@ -541,7 +810,14 @@ discard block |
||
| 541 | 810 | <?php |
| 542 | 811 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 543 | 812 | ?> |
| 544 | - <li><?php echo _("Max number of flights to display:"); ?> <input type="number" name="2dlimit" value="<?php if (isset($_COOKIE['map_2d_limit'])) print $_COOKIE['map_2d_limit']; elseif (isset($globalMap2DAircraftsLimit)) print $globalMapAircraftsLimit; else print 15000; ?>" onchange="map2dlimit(this.value);" /></li> |
|
| 813 | + <li><?php echo _("Max number of flights to display:"); ?> <input type="number" name="2dlimit" value="<?php if (isset($_COOKIE['map_2d_limit'])) { |
|
| 814 | + print $_COOKIE['map_2d_limit']; |
|
| 815 | +} elseif (isset($globalMap2DAircraftsLimit)) { |
|
| 816 | + print $globalMapAircraftsLimit; |
|
| 817 | +} else { |
|
| 818 | + print 15000; |
|
| 819 | +} |
|
| 820 | +?>" onchange="map2dlimit(this.value);" /></li> |
|
| 545 | 821 | <?php |
| 546 | 822 | } |
| 547 | 823 | ?> |
@@ -549,11 +825,21 @@ discard block |
||
| 549 | 825 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 550 | 826 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 551 | 827 | ?> |
| 552 | - <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> |
|
| 828 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 829 | + print 'checked'; |
|
| 830 | +} |
|
| 831 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 553 | 832 | <?php |
| 554 | 833 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 555 | 834 | ?> |
| 556 | - <li><?php echo _("Aircraft icon color:"); ?> <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(this.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li> |
|
| 835 | + <li><?php echo _("Aircraft icon color:"); ?> <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(this.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 836 | + print $_COOKIE['IconColor']; |
|
| 837 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 838 | + print $globalAircraftIconColor; |
|
| 839 | +} else { |
|
| 840 | + print '1a3151'; |
|
| 841 | +} |
|
| 842 | +?>"></li> |
|
| 557 | 843 | <?php |
| 558 | 844 | } |
| 559 | 845 | } |
@@ -564,7 +850,14 @@ discard block |
||
| 564 | 850 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 565 | 851 | ?> |
| 566 | 852 | <li><?php echo _("Marine icon color:"); ?> |
| 567 | - <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'; ?>"> |
|
| 853 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 854 | + print $_COOKIE['MarineIconColor']; |
|
| 855 | +} elseif (isset($globalMarineIconColor)) { |
|
| 856 | + print $globalMarineIconColor; |
|
| 857 | +} else { |
|
| 858 | + print '1a3151'; |
|
| 859 | +} |
|
| 860 | +?>"> |
|
| 568 | 861 | </li> |
| 569 | 862 | <?php |
| 570 | 863 | } |
@@ -575,7 +868,14 @@ discard block |
||
| 575 | 868 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 576 | 869 | ?> |
| 577 | 870 | <li><?php echo _("Tracker icon color:"); ?> |
| 578 | - <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'; ?>"> |
|
| 871 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 872 | + print $_COOKIE['TrackerIconColor']; |
|
| 873 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 874 | + print $globalTrackerIconColor; |
|
| 875 | +} else { |
|
| 876 | + print '1a3151'; |
|
| 877 | +} |
|
| 878 | +?>"> |
|
| 579 | 879 | </li> |
| 580 | 880 | <?php |
| 581 | 881 | } |
@@ -586,8 +886,22 @@ discard block |
||
| 586 | 886 | ?> |
| 587 | 887 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 588 | 888 | <div class="range"> |
| 589 | - <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'; ?>"> |
|
| 590 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 889 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 890 | + print $_COOKIE['AirportZoom']; |
|
| 891 | +} elseif (isset($globalAirportZoom)) { |
|
| 892 | + print $globalAirportZoom; |
|
| 893 | +} else { |
|
| 894 | + print '7'; |
|
| 895 | +} |
|
| 896 | +?>"> |
|
| 897 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 898 | + print $_COOKIE['AirportZoom']; |
|
| 899 | +} elseif (isset($globalAirportZoom)) { |
|
| 900 | + print $globalAirportZoom; |
|
| 901 | +} else { |
|
| 902 | + print '7'; |
|
| 903 | +} |
|
| 904 | +?></output> |
|
| 591 | 905 | </div> |
| 592 | 906 | </li> |
| 593 | 907 | <?php |
@@ -598,17 +912,40 @@ discard block |
||
| 598 | 912 | ?> |
| 599 | 913 | <li><?php echo _("Set scaling factor for rendering resolution:"); ?> |
| 600 | 914 | <div class="range"> |
| 601 | - <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?>"> |
|
| 602 | - <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output> |
|
| 915 | + <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) { |
|
| 916 | + print $_COOKIE['resolutionScale']; |
|
| 917 | +} else { |
|
| 918 | + print '1'; |
|
| 919 | +} |
|
| 920 | +?>"> |
|
| 921 | + <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) { |
|
| 922 | + print $_COOKIE['resolutionScale']; |
|
| 923 | +} else { |
|
| 924 | + print '1'; |
|
| 925 | +} |
|
| 926 | +?></output> |
|
| 603 | 927 | </div> |
| 604 | 928 | </li> |
| 605 | 929 | <?php |
| 606 | 930 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 607 | 931 | ?> |
| 608 | - <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> |
|
| 609 | - <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"); ?> |
|
| 932 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
| 933 | + print 'checked'; |
|
| 934 | +} |
|
| 935 | +?> > <?php echo _("Use airlines liveries"); ?></li> |
|
| 936 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
| 937 | + print 'checked'; |
|
| 938 | +} |
|
| 939 | +?> > <?php echo _("Force Aircraft color"); ?> |
|
| 610 | 940 | <!--<li><?php echo _("Aircraft icon color:"); ?>--> |
| 611 | - <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'; ?>"> |
|
| 941 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 942 | + print $_COOKIE['IconColor']; |
|
| 943 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 944 | + print $globalAircraftIconColor; |
|
| 945 | +} else { |
|
| 946 | + print 'ff0000'; |
|
| 947 | +} |
|
| 948 | +?>"> |
|
| 612 | 949 | </li> |
| 613 | 950 | <?php |
| 614 | 951 | } |
@@ -616,9 +953,19 @@ discard block |
||
| 616 | 953 | <?php |
| 617 | 954 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 618 | 955 | ?> |
| 619 | - <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"); ?> |
|
| 956 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
| 957 | + print 'checked'; |
|
| 958 | +} |
|
| 959 | +?> ><?php echo _("Force Marine color"); ?> |
|
| 620 | 960 | <!--<li><?php echo _("Marine icon color:"); ?>--> |
| 621 | - <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'; ?>"> |
|
| 961 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 962 | + print $_COOKIE['MarineIconColor']; |
|
| 963 | +} elseif (isset($globalMarineIconColor)) { |
|
| 964 | + print $globalMarineIconColor; |
|
| 965 | +} else { |
|
| 966 | + print 'ff0000'; |
|
| 967 | +} |
|
| 968 | +?>"> |
|
| 622 | 969 | </li> |
| 623 | 970 | <?php |
| 624 | 971 | } |
@@ -626,9 +973,19 @@ discard block |
||
| 626 | 973 | <?php |
| 627 | 974 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 628 | 975 | ?> |
| 629 | - <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"); ?> |
|
| 976 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
| 977 | + print 'checked'; |
|
| 978 | +} |
|
| 979 | +?> ><?php echo _("Force Tracker color"); ?> |
|
| 630 | 980 | <!--<li><?php echo _("Tracker icon color:"); ?>--> |
| 631 | - <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'; ?>"> |
|
| 981 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 982 | + print $_COOKIE['TrackerIconColor']; |
|
| 983 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 984 | + print $globalTrackerIconColor; |
|
| 985 | +} else { |
|
| 986 | + print 'ff0000'; |
|
| 987 | +} |
|
| 988 | +?>"> |
|
| 632 | 989 | </li> |
| 633 | 990 | <?php |
| 634 | 991 | } |
@@ -636,29 +993,62 @@ discard block |
||
| 636 | 993 | ?> |
| 637 | 994 | <li><?php echo _("Distance unit:"); ?> |
| 638 | 995 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 639 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 640 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 641 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 996 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 997 | + echo ' selected'; |
|
| 998 | +} |
|
| 999 | +?>>km</option> |
|
| 1000 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 1001 | + echo ' selected'; |
|
| 1002 | +} |
|
| 1003 | +?>>nm</option> |
|
| 1004 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 1005 | + echo ' selected'; |
|
| 1006 | +} |
|
| 1007 | +?>>mi</option> |
|
| 642 | 1008 | </select> |
| 643 | 1009 | </li> |
| 644 | 1010 | <li><?php echo _("Altitude unit:"); ?> |
| 645 | 1011 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 646 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 647 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 1012 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 1013 | + echo ' selected'; |
|
| 1014 | +} |
|
| 1015 | +?>>m</option> |
|
| 1016 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 1017 | + echo ' selected'; |
|
| 1018 | +} |
|
| 1019 | +?>>feet</option> |
|
| 648 | 1020 | </select> |
| 649 | 1021 | </li> |
| 650 | 1022 | <li><?php echo _("Speed unit:"); ?> |
| 651 | 1023 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 652 | - <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> |
|
| 653 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 654 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 1024 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 1025 | + echo ' selected'; |
|
| 1026 | +} |
|
| 1027 | +?>>km/h</option> |
|
| 1028 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 1029 | + echo ' selected'; |
|
| 1030 | +} |
|
| 1031 | +?>>mph</option> |
|
| 1032 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 1033 | + echo ' selected'; |
|
| 1034 | +} |
|
| 1035 | +?>>knots</option> |
|
| 655 | 1036 | </select> |
| 656 | 1037 | </li> |
| 657 | 1038 | <li><?php echo _("Coordinate unit:"); ?> |
| 658 | 1039 | <select class="selectpicker" onchange="unitcoordinate(this);"> |
| 659 | - <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) echo ' selected'; ?>>DD</option> |
|
| 660 | - <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) echo ' selected'; ?>>DMS</option> |
|
| 661 | - <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) echo ' selected'; ?>>DM</option> |
|
| 1040 | + <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) { |
|
| 1041 | + echo ' selected'; |
|
| 1042 | +} |
|
| 1043 | +?>>DD</option> |
|
| 1044 | + <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
|
| 1045 | + echo ' selected'; |
|
| 1046 | +} |
|
| 1047 | +?>>DMS</option> |
|
| 1048 | + <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
|
| 1049 | + echo ' selected'; |
|
| 1050 | +} |
|
| 1051 | +?>>DM</option> |
|
| 662 | 1052 | </select> |
| 663 | 1053 | </li> |
| 664 | 1054 | |
@@ -676,9 +1066,18 @@ discard block |
||
| 676 | 1066 | <?php |
| 677 | 1067 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 678 | 1068 | ?> |
| 679 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 680 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 681 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 1069 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) { |
|
| 1070 | + print 'checked'; |
|
| 1071 | +} |
|
| 1072 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 1073 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) { |
|
| 1074 | + print 'checked'; |
|
| 1075 | +} |
|
| 1076 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 1077 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) { |
|
| 1078 | + print 'checked'; |
|
| 1079 | +} |
|
| 1080 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 682 | 1081 | <?php |
| 683 | 1082 | } |
| 684 | 1083 | ?> |
@@ -686,12 +1085,21 @@ discard block |
||
| 686 | 1085 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 687 | 1086 | ?> |
| 688 | 1087 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 689 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 1088 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) { |
|
| 1089 | + print 'checked'; |
|
| 1090 | +} |
|
| 1091 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 690 | 1092 | <?php } ?> |
| 691 | 1093 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 692 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 1094 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) { |
|
| 1095 | + print 'checked'; |
|
| 1096 | +} |
|
| 1097 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 693 | 1098 | <?php } ?> |
| 694 | - <li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') print 'checked'; ?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li> |
|
| 1099 | + <li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') { |
|
| 1100 | + print 'checked'; |
|
| 1101 | +} |
|
| 1102 | +?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li> |
|
| 695 | 1103 | <?php |
| 696 | 1104 | } |
| 697 | 1105 | ?> |
@@ -707,7 +1115,9 @@ discard block |
||
| 707 | 1115 | } |
| 708 | 1116 | foreach($allairlinenames as $airline) { |
| 709 | 1117 | $airline_name = $airline['airline_name']; |
| 710 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 1118 | + if (strlen($airline_name) > 30) { |
|
| 1119 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 1120 | + } |
|
| 711 | 1121 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
| 712 | 1122 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 713 | 1123 | } else { |
@@ -725,7 +1135,10 @@ discard block |
||
| 725 | 1135 | <li><?php echo _("Display alliance:"); ?> |
| 726 | 1136 | <br/> |
| 727 | 1137 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 728 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 1138 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
| 1139 | + echo ' selected'; |
|
| 1140 | +} |
|
| 1141 | +?>><?php echo _("All"); ?></option> |
|
| 729 | 1142 | <?php |
| 730 | 1143 | foreach($allalliancenames as $alliance) { |
| 731 | 1144 | $alliance_name = $alliance['alliance']; |
@@ -784,10 +1197,22 @@ discard block |
||
| 784 | 1197 | ?> |
| 785 | 1198 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 786 | 1199 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 787 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 788 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 789 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 790 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 1200 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
| 1201 | + echo ' selected'; |
|
| 1202 | +} |
|
| 1203 | +?>><?php echo _("All"); ?></option> |
|
| 1204 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
| 1205 | + echo ' selected'; |
|
| 1206 | +} |
|
| 1207 | +?>><?php echo _("Passenger"); ?></option> |
|
| 1208 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
| 1209 | + echo ' selected'; |
|
| 1210 | +} |
|
| 1211 | +?>><?php echo _("Cargo"); ?></option> |
|
| 1212 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
| 1213 | + echo ' selected'; |
|
| 1214 | +} |
|
| 1215 | +?>><?php echo _("Military"); ?></option> |
|
| 791 | 1216 | </select> |
| 792 | 1217 | </li> |
| 793 | 1218 | <?php |
@@ -801,7 +1226,10 @@ discard block |
||
| 801 | 1226 | ?> |
| 802 | 1227 | <li> |
| 803 | 1228 | <?php echo _("Display vessels with MMSI:"); ?> |
| 804 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
| 1229 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
| 1230 | + print $_COOKIE['filter_mmsi']; |
|
| 1231 | +} |
|
| 1232 | +?>" /> |
|
| 805 | 1233 | </li> |
| 806 | 1234 | <?php |
| 807 | 1235 | if (isset($globalVM) && $globalVM) { |
@@ -832,7 +1260,10 @@ discard block |
||
| 832 | 1260 | ?> |
| 833 | 1261 | <li> |
| 834 | 1262 | <?php echo _("Display with ident:"); ?> |
| 835 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
| 1263 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
| 1264 | + print $_COOKIE['filter_ident']; |
|
| 1265 | +} |
|
| 1266 | +?>" /> |
|
| 836 | 1267 | </li> |
| 837 | 1268 | </ul> |
| 838 | 1269 | </form> |
@@ -848,7 +1279,10 @@ discard block |
||
| 848 | 1279 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 849 | 1280 | <form> |
| 850 | 1281 | <ul> |
| 851 | - <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> |
|
| 1282 | + <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'])) { |
|
| 1283 | + print 'checked'; |
|
| 1284 | +} |
|
| 1285 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 852 | 1286 | <li><?php echo _("Type:"); ?> |
| 853 | 1287 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 854 | 1288 | <?php |
@@ -856,25 +1290,45 @@ discard block |
||
| 856 | 1290 | $types = $Satellite->get_tle_types(); |
| 857 | 1291 | foreach ($types as $type) { |
| 858 | 1292 | $type_name = $type['tle_type']; |
| 859 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 860 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 861 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 862 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 863 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 864 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 865 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 866 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 867 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 868 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 869 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 870 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 871 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 872 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 873 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 874 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 875 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 876 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 877 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 1293 | + if ($type_name == 'musson') { |
|
| 1294 | + $type_name = 'Russian LEO Navigation'; |
|
| 1295 | + } else if ($type_name == 'nnss') { |
|
| 1296 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 1297 | + } else if ($type_name == 'sbas') { |
|
| 1298 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 1299 | + } else if ($type_name == 'glo-ops') { |
|
| 1300 | + $type_name = 'Glonass Operational'; |
|
| 1301 | + } else if ($type_name == 'gps-ops') { |
|
| 1302 | + $type_name = 'GPS Operational'; |
|
| 1303 | + } else if ($type_name == 'argos') { |
|
| 1304 | + $type_name = 'ARGOS Data Collection System'; |
|
| 1305 | + } else if ($type_name == 'tdrss') { |
|
| 1306 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 1307 | + } else if ($type_name == 'sarsat') { |
|
| 1308 | + $type_name = 'Search & Rescue'; |
|
| 1309 | + } else if ($type_name == 'dmc') { |
|
| 1310 | + $type_name = 'Disaster Monitoring'; |
|
| 1311 | + } else if ($type_name == 'resource') { |
|
| 1312 | + $type_name = 'Earth Resources'; |
|
| 1313 | + } else if ($type_name == 'stations') { |
|
| 1314 | + $type_name = 'Space Stations'; |
|
| 1315 | + } else if ($type_name == 'geo') { |
|
| 1316 | + $type_name = 'Geostationary'; |
|
| 1317 | + } else if ($type_name == 'amateur') { |
|
| 1318 | + $type_name = 'Amateur Radio'; |
|
| 1319 | + } else if ($type_name == 'x-comm') { |
|
| 1320 | + $type_name = 'Experimental'; |
|
| 1321 | + } else if ($type_name == 'other-comm') { |
|
| 1322 | + $type_name = 'Other Comm'; |
|
| 1323 | + } else if ($type_name == 'science') { |
|
| 1324 | + $type_name = 'Space & Earth Science'; |
|
| 1325 | + } else if ($type_name == 'military') { |
|
| 1326 | + $type_name = 'Miscellaneous Military'; |
|
| 1327 | + } else if ($type_name == 'radar') { |
|
| 1328 | + $type_name = 'Radar Calibration'; |
|
| 1329 | + } else if ($type_name == 'tle-new') { |
|
| 1330 | + $type_name = 'Last 30 days launches'; |
|
| 1331 | + } |
|
| 878 | 1332 | |
| 879 | 1333 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 880 | 1334 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |