@@ -9,7 +9,7 @@ |
||
| 9 | 9 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
| 10 | 10 | exec("ps ux", $output, $result); |
| 11 | 11 | $j = 0; |
| 12 | - foreach ($output as $line) if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
| 12 | + foreach ($output as $line) if (strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
| 13 | 13 | if ($j > 1) { |
| 14 | 14 | echo "Script is already runnning..."; |
| 15 | 15 | die(); |
@@ -9,7 +9,9 @@ discard block |
||
| 9 | 9 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
| 10 | 10 | exec("ps ux", $output, $result); |
| 11 | 11 | $j = 0; |
| 12 | - foreach ($output as $line) if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
| 12 | + foreach ($output as $line) { |
|
| 13 | + if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
| 14 | + } |
|
| 13 | 15 | if ($j > 1) { |
| 14 | 16 | echo "Script is already runnning..."; |
| 15 | 17 | die(); |
@@ -29,14 +31,18 @@ discard block |
||
| 29 | 31 | $update_db->update_notam(); |
| 30 | 32 | } |
| 31 | 33 | $update_db->insert_last_notam_update(); |
| 32 | - } elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) echo "NOTAM are only updated once a day.\n"; |
|
| 34 | + } elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) { |
|
| 35 | + echo "NOTAM are only updated once a day.\n"; |
|
| 36 | + } |
|
| 33 | 37 | if ($update_db->check_last_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
| 34 | 38 | $update_db->update_all(); |
| 35 | 39 | // require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
| 36 | 40 | // $Spotter = new Spotter(); |
| 37 | 41 | // $Spotter->updateFieldsFromOtherTables(); |
| 38 | 42 | $update_db->insert_last_update(); |
| 39 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n"; |
|
| 43 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) { |
|
| 44 | + echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n"; |
|
| 45 | + } |
|
| 40 | 46 | if (isset($globalWaypoints) && $globalWaypoints && $update_db->check_last_airspace_update()) { |
| 41 | 47 | echo "Check if new airspace version exist..."; |
| 42 | 48 | echo $update_db->update_airspace_fam(); |
@@ -45,8 +51,11 @@ discard block |
||
| 45 | 51 | if (isset($globalGeoid) && $globalGeoid && $update_db->check_last_geoid_update()) { |
| 46 | 52 | echo "Check if new geoid version exist..."; |
| 47 | 53 | $error = $update_db->update_geoid_fam(); |
| 48 | - if ($error == '') $update_db->insert_last_geoid_update(); |
|
| 49 | - else echo $error; |
|
| 54 | + if ($error == '') { |
|
| 55 | + $update_db->insert_last_geoid_update(); |
|
| 56 | + } else { |
|
| 57 | + echo $error; |
|
| 58 | + } |
|
| 50 | 59 | } |
| 51 | 60 | if (isset($globalMarine) && $globalMarine && $update_db->check_last_marine_identity_update()) { |
| 52 | 61 | echo "Check if new marine identity version exist..."; |
@@ -64,13 +73,17 @@ discard block |
||
| 64 | 73 | //echo "Done"; |
| 65 | 74 | } |
| 66 | 75 | $update_db->insert_last_owner_update(); |
| 67 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Owner are only updated every 15 days.\n"; |
|
| 76 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
| 77 | + echo "Owner are only updated every 15 days.\n"; |
|
| 78 | + } |
|
| 68 | 79 | |
| 69 | 80 | if ($update_db->check_last_airlines_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
| 70 | 81 | echo "Updating airlines...\n"; |
| 71 | 82 | echo $update_db->update_airlines_fam(); |
| 72 | 83 | $update_db->insert_last_airlines_update(); |
| 73 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Airlines are only updated every 15 days.\n"; |
|
| 84 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
| 85 | + echo "Airlines are only updated every 15 days.\n"; |
|
| 86 | + } |
|
| 74 | 87 | |
| 75 | 88 | if (isset($globalAccidents) && $globalAccidents && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
| 76 | 89 | require_once(dirname(__FILE__).'/../require/class.Accident.php'); |
@@ -79,7 +92,9 @@ discard block |
||
| 79 | 92 | if ($Accident->check_last_accidents_update()) { |
| 80 | 93 | $Accident->download_update(); |
| 81 | 94 | $Accident->insert_last_accidents_update(); |
| 82 | - } else echo "Accidents are updated once a day.\n"; |
|
| 95 | + } else { |
|
| 96 | + echo "Accidents are updated once a day.\n"; |
|
| 97 | + } |
|
| 83 | 98 | } |
| 84 | 99 | |
| 85 | 100 | } |
@@ -92,7 +107,9 @@ discard block |
||
| 92 | 107 | if ($METAR->check_last_update()) { |
| 93 | 108 | $METAR->addMETARCycle(); |
| 94 | 109 | $METAR->insert_last_update(); |
| 95 | - } else echo "METAR are only updated every 30 minutes.\n"; |
|
| 110 | + } else { |
|
| 111 | + echo "METAR are only updated every 30 minutes.\n"; |
|
| 112 | + } |
|
| 96 | 113 | } |
| 97 | 114 | |
| 98 | 115 | if (isset($globalSchedules) && $globalSchedules && $update_db->check_last_schedules_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
@@ -100,8 +117,10 @@ discard block |
||
| 100 | 117 | //$update_db->update_oneworld(); |
| 101 | 118 | $update_db->update_skyteam(); |
| 102 | 119 | $update_db->insert_last_schedules_update(); |
| 103 | - } elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Schedules are only updated every 15 days.\n"; |
|
| 104 | -} |
|
| 120 | + } elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
| 121 | + echo "Schedules are only updated every 15 days.\n"; |
|
| 122 | + } |
|
| 123 | + } |
|
| 105 | 124 | |
| 106 | 125 | if (isset($globalArchiveMonths) && $globalArchiveMonths > 0) { |
| 107 | 126 | echo "Updating statistics and archive old data...\n"; |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | break; |
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | - var tsk_geojson = Cesium.loadJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>"); |
|
| 317 | + var tsk_geojson = Cesium.loadJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>"); |
|
| 318 | 318 | tsk_geojson.then(function(geojsondata) { |
| 319 | 319 | tsk = new Cesium.CustomDataSource('tsk'); |
| 320 | 320 | for (var i =0;i < geojsondata.features.length; i++) { |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | <?php |
| 390 | 390 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
| 391 | 391 | if (isset($_COOKIE['lastcentercoord'])) { |
| 392 | - $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
|
| 392 | + $lastcentercoord = explode(',', $_COOKIE['lastcentercoord']); |
|
| 393 | 393 | if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
| 394 | 394 | else $zoom = $lastcentercoord[3]; |
| 395 | 395 | $viewcenterlatitude = $lastcentercoord[0]; |
@@ -5,21 +5,30 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | document.cookie = 'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 7 | 7 | <?php |
| 8 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
| 9 | - else $MapType = $globalMapProvider; |
|
| 10 | -// unset($_COOKIE['MapType']); |
|
| 8 | + if (isset($_COOKIE['MapType'])) { |
|
| 9 | + $MapType = $_COOKIE['MapType']; |
|
| 10 | + } else { |
|
| 11 | + $MapType = $globalMapProvider; |
|
| 12 | + } |
|
| 13 | + // unset($_COOKIE['MapType']); |
|
| 11 | 14 | |
| 12 | 15 | if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') { |
| 13 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial'; |
|
| 14 | - else $MapType = 'OpenStreetMap'; |
|
| 16 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 17 | + $MapType = 'Bing-Aerial'; |
|
| 18 | + } else { |
|
| 19 | + $MapType = 'OpenStreetMap'; |
|
| 20 | + } |
|
| 15 | 21 | } |
| 16 | 22 | if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) { |
| 17 | 23 | $MapType = 'OpenStreetMap'; |
| 18 | 24 | } |
| 19 | 25 | if ($MapType == 'Mapbox') { |
| 20 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 21 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 22 | -?> |
|
| 26 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 27 | + $MapBoxId = $globalMapboxId; |
|
| 28 | + } else { |
|
| 29 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 30 | + } |
|
| 31 | + ?> |
|
| 23 | 32 | var imProv = Cesium.MapboxImageryProvider({ |
| 24 | 33 | credit: 'Map data © OpenStreetMap contributors, ' + |
| 25 | 34 | 'CC-BY-SA, ' + |
@@ -86,13 +95,23 @@ discard block |
||
| 86 | 95 | credit : 'Imagery courtesy Natural Earth' |
| 87 | 96 | }); |
| 88 | 97 | <?php |
| 89 | - } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 98 | + } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 90 | 99 | $customid = $MapType; |
| 91 | 100 | ?> |
| 92 | 101 | var imProv = Cesium.createOpenStreetMapImageryProvider({ |
| 93 | 102 | url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>', |
| 94 | - maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>, |
|
| 95 | - minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 103 | + maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 104 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 105 | +} else { |
|
| 106 | + print '99'; |
|
| 107 | +} |
|
| 108 | +?>, |
|
| 109 | + minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 110 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 111 | +} else { |
|
| 112 | + print '0'; |
|
| 113 | +} |
|
| 114 | +?>, |
|
| 96 | 115 | credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 97 | 116 | }); |
| 98 | 117 | <?php |
@@ -376,7 +395,12 @@ discard block |
||
| 376 | 395 | imageryProvider : imProv, |
| 377 | 396 | timeline : archive, |
| 378 | 397 | animation : false, |
| 379 | - shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) print 'false'; else print 'true'; ?>, |
|
| 398 | + shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) { |
|
| 399 | + print 'false'; |
|
| 400 | +} else { |
|
| 401 | + print 'true'; |
|
| 402 | +} |
|
| 403 | +?>, |
|
| 380 | 404 | infoBox : false, |
| 381 | 405 | navigationHelpButton : false, |
| 382 | 406 | geocoder : false, |
@@ -390,8 +414,11 @@ discard block |
||
| 390 | 414 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
| 391 | 415 | if (isset($_COOKIE['lastcentercoord'])) { |
| 392 | 416 | $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
| 393 | - if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
|
| 394 | - else $zoom = $lastcentercoord[3]; |
|
| 417 | + if (!isset($lastcentercoord[3])) { |
|
| 418 | + $zoom = $lastcentercoord[2]*1000000.0; |
|
| 419 | + } else { |
|
| 420 | + $zoom = $lastcentercoord[3]; |
|
| 421 | + } |
|
| 395 | 422 | $viewcenterlatitude = $lastcentercoord[0]; |
| 396 | 423 | $viewcenterlongitude = $lastcentercoord[1]; |
| 397 | 424 | } else { |
@@ -473,7 +500,12 @@ discard block |
||
| 473 | 500 | ?> |
| 474 | 501 | |
| 475 | 502 | update_locationsLayer(); |
| 476 | -setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 503 | +setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 504 | + print $globalMapRefresh*1000*2; |
|
| 505 | +} else { |
|
| 506 | + print '60000'; |
|
| 507 | +} |
|
| 508 | +?>); |
|
| 477 | 509 | viewer.camera.moveEnd.addEventListener(function() { |
| 478 | 510 | <?php |
| 479 | 511 | if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
@@ -11,13 +11,13 @@ discard block |
||
| 11 | 11 | $Connection = new Connection(); |
| 12 | 12 | |
| 13 | 13 | if (!$Connection->tableExists('airspace')) { |
| 14 | - die; |
|
| 14 | + die; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | if (isset($_GET['coord'])) |
| 18 | 18 | { |
| 19 | 19 | $coords = explode(',',$_GET['coord']); |
| 20 | - if ($globalDBdriver == 'mysql') { |
|
| 20 | + if ($globalDBdriver == 'mysql') { |
|
| 21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
| 22 | 22 | try { |
| 23 | 23 | $sth = $Connection->db->prepare($query); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } else { |
| 40 | - if ($globalDBdriver == 'mysql') { |
|
| 40 | + if ($globalDBdriver == 'mysql') { |
|
| 41 | 41 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace"; |
| 42 | 42 | } else { |
| 43 | 43 | $query = "SELECT *, ST_AsBinary(wkb_geometry,'NDR') AS wkb FROM airspace"; |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $geojson = array( |
| 54 | - 'type' => 'FeatureCollection', |
|
| 55 | - 'features' => array() |
|
| 54 | + 'type' => 'FeatureCollection', |
|
| 55 | + 'features' => array() |
|
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | 58 | while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | if (isset($properties['type']) && $properties['type'] != '') { |
| 117 | 117 | $feature = array( |
| 118 | - 'type' => 'Feature', |
|
| 119 | - 'geometry' => json_decode($geom->out('json')), |
|
| 120 | - 'properties' => $properties |
|
| 118 | + 'type' => 'Feature', |
|
| 119 | + 'geometry' => json_decode($geom->out('json')), |
|
| 120 | + 'properties' => $properties |
|
| 121 | 121 | ); |
| 122 | 122 | array_push($geojson['features'], $feature); |
| 123 | 123 | } |
@@ -16,14 +16,14 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | if (isset($_GET['coord'])) |
| 18 | 18 | { |
| 19 | - $coords = explode(',',$_GET['coord']); |
|
| 19 | + $coords = explode(',', $_GET['coord']); |
|
| 20 | 20 | if ($globalDBdriver == 'mysql') { |
| 21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
| 22 | 22 | try { |
| 23 | 23 | $sth = $Connection->db->prepare($query); |
| 24 | - $sth->execute(array(':minlon' => $coords[0],':minlat' => $coords[1],':maxlon' => $coords[2],':maxlat' => $coords[3])); |
|
| 24 | + $sth->execute(array(':minlon' => $coords[0], ':minlat' => $coords[1], ':maxlon' => $coords[2], ':maxlat' => $coords[3])); |
|
| 25 | 25 | //$sth->execute(); |
| 26 | - } catch(PDOException $e) { |
|
| 26 | + } catch (PDOException $e) { |
|
| 27 | 27 | echo "error"; |
| 28 | 28 | } |
| 29 | 29 | } else { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $sth = $Connection->db->prepare($query); |
| 33 | 33 | //$sth->execute(array(':minlon' => $coords[0],':minlat' => $coords[1],':maxlon' => $coords[2],':maxlat' => $coords[3])); |
| 34 | 34 | $sth->execute(); |
| 35 | - } catch(PDOException $e) { |
|
| 35 | + } catch (PDOException $e) { |
|
| 36 | 36 | echo "error"; |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | try { |
| 46 | 46 | $sth = $Connection->db->prepare($query); |
| 47 | 47 | $sth->execute(); |
| 48 | - } catch(PDOException $e) { |
|
| 48 | + } catch (PDOException $e) { |
|
| 49 | 49 | echo "error"; |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -75,22 +75,22 @@ discard block |
||
| 75 | 75 | if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling']; |
| 76 | 76 | if (isset($properties['floor'])) $properties['base'] = $properties['floor']; |
| 77 | 77 | if (isset($properties['tops'])) { |
| 78 | - if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) { |
|
| 78 | + if (preg_match('/^FL(\s)*(?<alt>\d+)/', strtoupper($properties['tops']), $matches)) { |
|
| 79 | 79 | $properties['upper_limit'] = round($matches['alt']*100*0.38048); |
| 80 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['tops']),$matches)) { |
|
| 80 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/', strtoupper($properties['tops']), $matches)) { |
|
| 81 | 81 | $properties['upper_limit'] = round($matches['alt']*0.38048); |
| 82 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*M/',strtoupper($properties['tops']),$matches)) { |
|
| 82 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*M/', strtoupper($properties['tops']), $matches)) { |
|
| 83 | 83 | $properties['upper_limit'] = $matches['alt']; |
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | if (isset($properties['base'])) { |
| 87 | 87 | if ($properties['base'] == 'SFC' || $properties['base'] == 'MSL' || $properties['base'] == 'GROUND' || $properties['base'] == 'GND') { |
| 88 | 88 | $properties['lower_limit'] = 0; |
| 89 | - } elseif (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['base']),$matches)) { |
|
| 89 | + } elseif (preg_match('/^FL(\s)*(?<alt>\d+)/', strtoupper($properties['base']), $matches)) { |
|
| 90 | 90 | $properties['lower_limit'] = round($matches['alt']*100*0.38048); |
| 91 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['base']),$matches)) { |
|
| 91 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/', strtoupper($properties['base']), $matches)) { |
|
| 92 | 92 | $properties['lower_limit'] = round($matches['alt']*0.38048); |
| 93 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*M/',strtoupper($properties['base']),$matches)) { |
|
| 93 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*M/', strtoupper($properties['base']), $matches)) { |
|
| 94 | 94 | $properties['lower_limit'] = $matches['alt']; |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -68,12 +68,22 @@ |
||
| 68 | 68 | } else { |
| 69 | 69 | $geom = geoPHP::load(stream_get_contents($row['wkb'])); |
| 70 | 70 | } |
| 71 | - if (isset($properties['type'])) $properties['type'] = trim($properties['type']); |
|
| 72 | - elseif (isset($properties['class'])) $properties['type'] = trim($properties['class']); |
|
| 73 | - if (isset($properties['ogr_fid'])) $properties['id'] = $properties['ogr_fid']; |
|
| 74 | - elseif (isset($properties['ogc_fid'])) $properties['id'] = $properties['ogc_fid']; |
|
| 75 | - if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling']; |
|
| 76 | - if (isset($properties['floor'])) $properties['base'] = $properties['floor']; |
|
| 71 | + if (isset($properties['type'])) { |
|
| 72 | + $properties['type'] = trim($properties['type']); |
|
| 73 | + } elseif (isset($properties['class'])) { |
|
| 74 | + $properties['type'] = trim($properties['class']); |
|
| 75 | + } |
|
| 76 | + if (isset($properties['ogr_fid'])) { |
|
| 77 | + $properties['id'] = $properties['ogr_fid']; |
|
| 78 | + } elseif (isset($properties['ogc_fid'])) { |
|
| 79 | + $properties['id'] = $properties['ogc_fid']; |
|
| 80 | + } |
|
| 81 | + if (isset($properties['ceiling'])) { |
|
| 82 | + $properties['tops'] = $properties['ceiling']; |
|
| 83 | + } |
|
| 84 | + if (isset($properties['floor'])) { |
|
| 85 | + $properties['base'] = $properties['floor']; |
|
| 86 | + } |
|
| 77 | 87 | if (isset($properties['tops'])) { |
| 78 | 88 | if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) { |
| 79 | 89 | $properties['upper_limit'] = round($matches['alt']*100*0.38048); |
@@ -58,7 +58,9 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
| 60 | 60 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
| 61 | - } else $image = $spotter_item['image_thumbnail']; |
|
| 61 | + } else { |
|
| 62 | + $image = $spotter_item['image_thumbnail']; |
|
| 63 | + } |
|
| 62 | 64 | } |
| 63 | 65 | /* else { |
| 64 | 66 | $image = "images/placeholder_thumb.png"; |
@@ -75,10 +77,14 @@ discard block |
||
| 75 | 77 | print '<div class="callsign-details">'; |
| 76 | 78 | if ($spotter_item['ident'] != 'Not Available') { |
| 77 | 79 | print '<div class="callsign"><a href="'.$globalURL.'/redirect/'.$spotter_item['flightaware_id'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
| 78 | - if (isset($spotter_item['blocked']) && $spotter_item['blocked'] === true) print '<img src="'.$globalURL.'/images/forbidden.png" title="'._("Callsign is in blocked FAA list").'" class="blocked" />'; |
|
| 80 | + if (isset($spotter_item['blocked']) && $spotter_item['blocked'] === true) { |
|
| 81 | + print '<img src="'.$globalURL.'/images/forbidden.png" title="'._("Callsign is in blocked FAA list").'" class="blocked" />'; |
|
| 82 | + } |
|
| 79 | 83 | print '</div>'; |
| 80 | 84 | } |
| 81 | - if (isset($spotter_item['airline_name']) && $spotter_item['airline_name'] != 'Not Available') print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
| 85 | + if (isset($spotter_item['airline_name']) && $spotter_item['airline_name'] != 'Not Available') { |
|
| 86 | + print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
| 87 | + } |
|
| 82 | 88 | print '</div>'; |
| 83 | 89 | if ($spotter_item['departure_airport'] != 'NA' && $spotter_item['arrival_airport'] != 'NA') { |
| 84 | 90 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
@@ -110,13 +116,21 @@ discard block |
||
| 110 | 116 | print '</div>'; |
| 111 | 117 | print '<div id="aircraft">'; |
| 112 | 118 | print '<span>'._("Aircraft").'</span>'; |
| 113 | - if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
| 119 | + if (isset($spotter_item['aircraft_wiki'])) { |
|
| 120 | + print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
| 121 | + } |
|
| 114 | 122 | if (isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_manufacturer']) && $spotter_item['aircraft_manufacturer'] != 'N/A' && isset($spotter_item['aircraft_name']) && $spotter_item['aircraft_name'] != 'N/A') { |
| 115 | 123 | $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
| 116 | - if (count($aircraft_names) == 1) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 117 | - else print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 118 | - } elseif (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
|
| 119 | - else print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
| 124 | + if (count($aircraft_names) == 1) { |
|
| 125 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 126 | + } else { |
|
| 127 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 128 | + } |
|
| 129 | + } elseif (isset($spotter_item['aircraft_type'])) { |
|
| 130 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
|
| 131 | + } else { |
|
| 132 | + print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
| 133 | + } |
|
| 120 | 134 | |
| 121 | 135 | print '</div>'; |
| 122 | 136 | print '<div id ="altitude"><span>'._("Altitude").'</span>'; |
@@ -129,11 +143,17 @@ discard block |
||
| 129 | 143 | } |
| 130 | 144 | |
| 131 | 145 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
| 132 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') print $spotter_item['real_altitude'].' feet (FL'.$spotter_item['altitude'].')'; |
|
| 133 | - else print $spotter_item['altitude'].'00 feet (FL'.$spotter_item['altitude'].')'; |
|
| 146 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
| 147 | + print $spotter_item['real_altitude'].' feet (FL'.$spotter_item['altitude'].')'; |
|
| 148 | + } else { |
|
| 149 | + print $spotter_item['altitude'].'00 feet (FL'.$spotter_item['altitude'].')'; |
|
| 150 | + } |
|
| 134 | 151 | } else { |
| 135 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') print round($spotter_item['real_altitude']*0.3048).' m (FL'.$spotter_item['altitude'].')'; |
|
| 136 | - else print round($spotter_item['altitude']*30.48).' m (FL'.$spotter_item['altitude'].')'; |
|
| 152 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
| 153 | + print round($spotter_item['real_altitude']*0.3048).' m (FL'.$spotter_item['altitude'].')'; |
|
| 154 | + } else { |
|
| 155 | + print round($spotter_item['altitude']*30.48).' m (FL'.$spotter_item['altitude'].')'; |
|
| 156 | + } |
|
| 137 | 157 | } |
| 138 | 158 | |
| 139 | 159 | if (isset($groundAltitude) && $groundAltitude < $spotter_item['altitude']*30.48) { |
@@ -147,7 +167,9 @@ discard block |
||
| 147 | 167 | print '</i>'; |
| 148 | 168 | } |
| 149 | 169 | print '</div>'; |
| 150 | - if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
| 170 | + if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') { |
|
| 171 | + print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
| 172 | + } |
|
| 151 | 173 | print '<div id="speed"><span>'._("Speed").'</span>'; |
| 152 | 174 | if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
| 153 | 175 | print round($spotter_item['ground_speed']*1.15078).' mph'; |
@@ -189,8 +211,11 @@ discard block |
||
| 189 | 211 | } |
| 190 | 212 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != '') { |
| 191 | 213 | print '<div id="pilot"><span>'._("Pilot").'</span>'; |
| 192 | - if (isset($spotter_item['pilot_id'])) print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 193 | - else print $spotter_item['pilot_name']; |
|
| 214 | + if (isset($spotter_item['pilot_id'])) { |
|
| 215 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 216 | + } else { |
|
| 217 | + print $spotter_item['pilot_name']; |
|
| 218 | + } |
|
| 194 | 219 | print '</div>'; |
| 195 | 220 | } |
| 196 | 221 | if (isset($spotter_item['aircraft_owner']) && $spotter_item['aircraft_owner'] != '') { |
@@ -216,10 +241,18 @@ discard block |
||
| 216 | 241 | } |
| 217 | 242 | print '</div>'; |
| 218 | 243 | print '</div>'; |
| 219 | - if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
| 220 | - if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
| 221 | - if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
| 222 | - if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
| 244 | + if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') { |
|
| 245 | + print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
| 246 | + } |
|
| 247 | + if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') { |
|
| 248 | + print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
| 249 | + } |
|
| 250 | + if (isset($spotter_item['acars']['message'])) { |
|
| 251 | + print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
| 252 | + } |
|
| 253 | + if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) { |
|
| 254 | + print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
| 255 | + } |
|
| 223 | 256 | print '</div>'; |
| 224 | 257 | } |
| 225 | 258 | ?> |
@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $from_archive = false; |
| 13 | 13 | if (isset($_GET['ident'])) { |
| 14 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 14 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 15 | 15 | if (isset($_GET['currenttime'])) { |
| 16 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
| 16 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
| 17 | 17 | $currenttime = round($currenttime/1000); |
| 18 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident,$currenttime); |
|
| 18 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident, $currenttime); |
|
| 19 | 19 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
| 20 | 20 | $from_archive = true; |
| 21 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident,$currenttime); |
|
| 21 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident, $currenttime); |
|
| 22 | 22 | } |
| 23 | 23 | } else { |
| 24 | 24 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
@@ -29,15 +29,15 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | if (isset($_GET['flightaware_id'])) { |
| 32 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 32 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 33 | 33 | if (isset($_GET['currenttime'])) { |
| 34 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
| 34 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
| 35 | 35 | $currenttime = round($currenttime/1000); |
| 36 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id,$currenttime); |
|
| 36 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id, $currenttime); |
|
| 37 | 37 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
| 38 | 38 | $from_archive = true; |
| 39 | 39 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
| 40 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id,$currenttime); |
|
| 40 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id, $currenttime); |
|
| 41 | 41 | } |
| 42 | 42 | } else { |
| 43 | 43 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
| 58 | 58 | { |
| 59 | 59 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
| 60 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 60 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
| 61 | 61 | } else $image = $spotter_item['image_thumbnail']; |
| 62 | 62 | } |
| 63 | 63 | /* else { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
| 85 | 85 | if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
| 86 | 86 | if ($spotter_item['departure_airport_time'] > 2460) { |
| 87 | - print '<br /><span class="time">'.date('H:m',$spotter_item['departure_airport_time']).'</span>'; |
|
| 87 | + print '<br /><span class="time">'.date('H:m', $spotter_item['departure_airport_time']).'</span>'; |
|
| 88 | 88 | } else { |
| 89 | 89 | print '<br /><span class="time">'.$spotter_item['departure_airport_time'].'</span>'; |
| 90 | 90 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '<span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport'].'</a></span>'.$spotter_item['arrival_airport_city'].' '.$spotter_item['arrival_airport_country']; |
| 94 | 94 | if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
| 95 | 95 | if ($spotter_item['arrival_airport_time'] > 2460) { |
| 96 | - print '<br /><span class="time">'.date('H:m',$spotter_item['arrival_airport_time']).'</span>'; |
|
| 96 | + print '<br /><span class="time">'.date('H:m', $spotter_item['arrival_airport_time']).'</span>'; |
|
| 97 | 97 | } else { |
| 98 | 98 | print '<br /><span class="time">'.$spotter_item['arrival_airport_time'].'</span>'; |
| 99 | 99 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | print '<span>'._("Aircraft").'</span>'; |
| 113 | 113 | if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
| 114 | 114 | if (isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_manufacturer']) && $spotter_item['aircraft_manufacturer'] != 'N/A' && isset($spotter_item['aircraft_name']) && $spotter_item['aircraft_name'] != 'N/A') { |
| 115 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
| 115 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
| 116 | 116 | if (count($aircraft_names) == 1) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
| 117 | 117 | else print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
| 118 | 118 | } elseif (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
@@ -122,8 +122,8 @@ discard block |
||
| 122 | 122 | print '<div id ="altitude"><span>'._("Altitude").'</span>'; |
| 123 | 123 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
| 124 | 124 | try { |
| 125 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
| 126 | - } catch(Exception $e) { |
|
| 125 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
| 126 | + } catch (Exception $e) { |
|
| 127 | 127 | // If catched not exist |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -162,9 +162,9 @@ discard block |
||
| 162 | 162 | if (isset($globalCam) && $globalCam) { |
| 163 | 163 | require_once(dirname(__FILE__).'/require/class.Common.php'); |
| 164 | 164 | $Common = new Common(); |
| 165 | - $azimuth = round($Common->azimuth($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'])); |
|
| 166 | - $distance = $Common->distance($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'],'m'); |
|
| 167 | - $plunge = round($Common->plunge($globalCenterAltitude,$spotter_item['real_altitude'],$distance)); |
|
| 165 | + $azimuth = round($Common->azimuth($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'])); |
|
| 166 | + $distance = $Common->distance($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'], 'm'); |
|
| 167 | + $plunge = round($Common->plunge($globalCenterAltitude, $spotter_item['real_altitude'], $distance)); |
|
| 168 | 168 | print '<div id="camcoordinates"><span>'._("Cam Coordinates").'</span>'; |
| 169 | 169 | print 'azimuth: '.$azimuth; |
| 170 | 170 | print ' / '; |
@@ -174,16 +174,16 @@ discard block |
||
| 174 | 174 | print '</div>'; |
| 175 | 175 | //echo $Common->getData('http://127.0.0.1/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
| 176 | 176 | //echo $Common->getData('file://'.dirname(__FILE__).'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
| 177 | - echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
|
| 177 | + echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge, 'get', '', '', '', '', '', '', false, true); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | print '<div id="heading"><span>'._("Heading").'</span><span class="heading">'.$spotter_item['heading'].'</span>°</div>'; |
| 181 | 181 | if (isset($spotter_item['verticalrate']) && $spotter_item['verticalrate'] != '') { |
| 182 | 182 | print '<div id="verticalrate"><span>'._("Vertical rate").'</span>'; |
| 183 | 183 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
| 184 | - print $spotter_item['verticalrate']. ' ft/min'; |
|
| 184 | + print $spotter_item['verticalrate'].' ft/min'; |
|
| 185 | 185 | } else { |
| 186 | - print round($spotter_item['verticalrate']*0.3048). ' m/min'; |
|
| 186 | + print round($spotter_item['verticalrate']*0.3048).' m/min'; |
|
| 187 | 187 | } |
| 188 | 188 | print '</div>'; |
| 189 | 189 | } |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | print '</div>'; |
| 219 | 219 | if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
| 220 | 220 | if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
| 221 | - if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
| 221 | + if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br/>', $spotter_item['acars']['message'])).'</div>'; |
|
| 222 | 222 | if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
| 223 | 223 | print '</div>'; |
| 224 | 224 | } |
@@ -275,7 +275,12 @@ discard block |
||
| 275 | 275 | <?php |
| 276 | 276 | } else { |
| 277 | 277 | ?> |
| 278 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
| 278 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
| 279 | + print $globalMapRefresh*2000; |
|
| 280 | +} else { |
|
| 281 | + print '60000'; |
|
| 282 | +} |
|
| 283 | +?>)) { |
|
| 279 | 284 | viewer.dataSources.get(dsn).entities.remove(entity); |
| 280 | 285 | czmlds.entities.removeById(entityid); |
| 281 | 286 | } |
@@ -564,7 +569,12 @@ discard block |
||
| 564 | 569 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 565 | 570 | ?> |
| 566 | 571 | update_polarLayer(); |
| 567 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 572 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 573 | + print $globalMapRefresh*1000*2; |
|
| 574 | +} else { |
|
| 575 | + print '60000'; |
|
| 576 | +} |
|
| 577 | +?>); |
|
| 568 | 578 | <?php |
| 569 | 579 | } |
| 570 | 580 | ?> |
@@ -695,7 +705,12 @@ discard block |
||
| 695 | 705 | } |
| 696 | 706 | } |
| 697 | 707 | } |
| 698 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 708 | + ,<?php if (isset($globalMapRefresh)) { |
|
| 709 | + print $globalMapRefresh*1000; |
|
| 710 | +} else { |
|
| 711 | + print '30000'; |
|
| 712 | +} |
|
| 713 | +?>); |
|
| 699 | 714 | } else { |
| 700 | 715 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
| 701 | 716 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -724,7 +739,12 @@ discard block |
||
| 724 | 739 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 725 | 740 | ?> |
| 726 | 741 | update_atcLayer(); |
| 727 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 742 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 743 | + print $globalMapRefresh*1000*2; |
|
| 744 | +} else { |
|
| 745 | + print '60000'; |
|
| 746 | +} |
|
| 747 | +?>); |
|
| 728 | 748 | <?php |
| 729 | 749 | } |
| 730 | 750 | ?> |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | var entityid = entity.id; |
| 290 | 290 | var lastupdateentity = entity.properties.lastupdate; |
| 291 | 291 | <?php |
| 292 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
| 293 | - // Remove flights not in latest CZML |
|
| 292 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
| 293 | + // Remove flights not in latest CZML |
|
| 294 | 294 | ?> |
| 295 | 295 | if (lastupdateentity != lastupdate) { |
| 296 | 296 | console.log('Remove...'); |
@@ -298,14 +298,14 @@ discard block |
||
| 298 | 298 | czmlds.entities.removeById(entityid); |
| 299 | 299 | } |
| 300 | 300 | <?php |
| 301 | - } else { |
|
| 301 | + } else { |
|
| 302 | 302 | ?> |
| 303 | 303 | if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
| 304 | 304 | viewer.dataSources.get(dsn).entities.remove(entity); |
| 305 | 305 | czmlds.entities.removeById(entityid); |
| 306 | 306 | } |
| 307 | 307 | <?php |
| 308 | - } |
|
| 308 | + } |
|
| 309 | 309 | ?> |
| 310 | 310 | } |
| 311 | 311 | } |
@@ -762,12 +762,12 @@ discard block |
||
| 762 | 762 | } |
| 763 | 763 | |
| 764 | 764 | <?php |
| 765 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
| 765 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
| 766 | 766 | ?> |
| 767 | 767 | update_atcLayer(); |
| 768 | 768 | setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
| 769 | 769 | <?php |
| 770 | - } |
|
| 770 | + } |
|
| 771 | 771 | ?> |
| 772 | 772 | |
| 773 | 773 | function iconColor(color) { |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | require_once('require/class.Satellite.php'); |
| 6 | 6 | |
| 7 | -$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING); |
|
| 7 | +$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING); |
|
| 8 | 8 | if ($trackident != '') { |
| 9 | 9 | require_once('require/class.SpotterLive.php'); |
| 10 | 10 | $SpotterLive = new SpotterLive(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident); |
| 15 | 15 | header('Location: '.$globalURL.'/flightid/'.$spotterid); |
| 16 | 16 | } else { |
| 17 | - setcookie('MapTrack',$resulttrackident[0]['flightaware_id']); |
|
| 17 | + setcookie('MapTrack', $resulttrackident[0]['flightaware_id']); |
|
| 18 | 18 | } |
| 19 | 19 | /* |
| 20 | 20 | } else { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | <div class="form-group"> |
| 198 | 198 | <label><?php echo _("From:"); ?></label> |
| 199 | 199 | <div class='input-group date' id='datetimepicker1'> |
| 200 | - <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 /> |
|
| 200 | + <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 /> |
|
| 201 | 201 | <span class="input-group-addon"> |
| 202 | 202 | <span class="glyphicon glyphicon-calendar"></span> |
| 203 | 203 | </span> |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | <div class="form-group"> |
| 207 | 207 | <label><?php echo _("To:"); ?></label> |
| 208 | 208 | <div class='input-group date' id='datetimepicker2'> |
| 209 | - <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'; ?>" /> |
|
| 209 | + <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'; ?>" /> |
|
| 210 | 210 | <span class="input-group-addon"> |
| 211 | 211 | <span class="glyphicon glyphicon-calendar"></span> |
| 212 | 212 | </span> |
@@ -354,9 +354,9 @@ discard block |
||
| 354 | 354 | <li><?php echo _("Type of Terrain:"); ?> |
| 355 | 355 | <select class="selectpicker" onchange="terrainType(this);"> |
| 356 | 356 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
| 357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 357 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
| 358 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
| 359 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected'; ?>>ArticDEM</option> |
|
| 360 | 360 | </select> |
| 361 | 361 | </li> |
| 362 | 362 | <?php |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | <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> |
| 412 | 412 | <?php |
| 413 | 413 | } |
| 414 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 414 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
| 415 | 415 | ?> |
| 416 | 416 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
| 417 | 417 | <?php |
@@ -586,10 +586,10 @@ discard block |
||
| 586 | 586 | $Spotter = new Spotter(); |
| 587 | 587 | $allairlinenames = $Spotter->getAllAirlineNames(); |
| 588 | 588 | } |
| 589 | - foreach($allairlinenames as $airline) { |
|
| 589 | + foreach ($allairlinenames as $airline) { |
|
| 590 | 590 | $airline_name = $airline['airline_name']; |
| 591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 592 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
| 591 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
| 592 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
| 593 | 593 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 594 | 594 | } else { |
| 595 | 595 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 609 | 609 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
| 610 | 610 | <?php |
| 611 | - foreach($allalliancenames as $alliance) { |
|
| 611 | + foreach ($allalliancenames as $alliance) { |
|
| 612 | 612 | $alliance_name = $alliance['alliance']; |
| 613 | 613 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
| 614 | 614 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -644,8 +644,8 @@ discard block |
||
| 644 | 644 | */ |
| 645 | 645 | $Source = new Source(); |
| 646 | 646 | $datasource = $Source->getLocationInfoByType('gs'); |
| 647 | - foreach($datasource as $src) { |
|
| 648 | - if (isset($_COOKIE['filter_Sources']) && in_array($src['name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
| 647 | + foreach ($datasource as $src) { |
|
| 648 | + if (isset($_COOKIE['filter_Sources']) && in_array($src['name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
| 649 | 649 | echo '<option value="'.$src['name'].'" selected>'.$src['name'].'</option>'; |
| 650 | 650 | } else { |
| 651 | 651 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
| 734 | 734 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
| 735 | 735 | |
| 736 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
| 736 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
| 737 | 737 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
| 738 | 738 | } else { |
| 739 | 739 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | <?php }; if (isset($globalSatellite) && $globalSatellite) { ?><td><div id="ibxsatellite"><h4><?php echo _("Satellites Displayed"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?> |
| 51 | 51 | </tr></table></div> |
| 52 | 52 | <?php |
| 53 | - if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
| 53 | + if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
| 54 | 54 | ?> |
| 55 | 55 | <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
| 56 | 56 | <?php |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script> |
| 75 | 75 | <?php |
| 76 | 76 | } |
| 77 | - } |
|
| 77 | + } |
|
| 78 | 78 | ?> |
| 79 | 79 | |
| 80 | 80 | <div id="sidebar" class="sidebar collapsed"> |
@@ -85,34 +85,34 @@ discard block |
||
| 85 | 85 | <li><a href="" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
| 86 | 86 | <li><a href="" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
| 87 | 87 | <?php |
| 88 | - //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) { |
|
| 88 | + //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) { |
|
| 89 | 89 | if (isset($globalArchive) && $globalArchive == TRUE && (!isset($globalAircraft) || $globalAircraft === TRUE)) { |
| 90 | 90 | ?> |
| 91 | 91 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
| 92 | 92 | <?php |
| 93 | 93 | } |
| 94 | - //} |
|
| 94 | + //} |
|
| 95 | 95 | ?> |
| 96 | 96 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
| 97 | 97 | <li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li> |
| 98 | 98 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
| 99 | 99 | <?php |
| 100 | - if (isset($globalMap3D) && $globalMap3D) { |
|
| 100 | + if (isset($globalMap3D) && $globalMap3D) { |
|
| 101 | 101 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
| 102 | 102 | ?> |
| 103 | 103 | <li><a href="" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li> |
| 104 | 104 | <?php |
| 105 | 105 | } else { |
| 106 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 106 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 107 | 107 | ?> |
| 108 | 108 | <li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li> |
| 109 | 109 | <?php |
| 110 | - } |
|
| 110 | + } |
|
| 111 | 111 | ?> |
| 112 | 112 | <li><a href="" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li> |
| 113 | 113 | <?php |
| 114 | 114 | } |
| 115 | - } |
|
| 115 | + } |
|
| 116 | 116 | ?> |
| 117 | 117 | </ul> |
| 118 | 118 | |
@@ -244,15 +244,15 @@ discard block |
||
| 244 | 244 | </div> |
| 245 | 245 | </li> |
| 246 | 246 | <?php |
| 247 | - if (isset($globalDemo) && $globalDemo) { |
|
| 247 | + if (isset($globalDemo) && $globalDemo) { |
|
| 248 | 248 | ?> |
| 249 | 249 | <li><button type="button" class="btn btn-primary disabled"><?php echo _("Show archive"); ?></button> Disabled in Demo mode</li> |
| 250 | 250 | <?php |
| 251 | - } else { |
|
| 251 | + } else { |
|
| 252 | 252 | ?> |
| 253 | 253 | <li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li> |
| 254 | 254 | <?php |
| 255 | - } |
|
| 255 | + } |
|
| 256 | 256 | ?> |
| 257 | 257 | </ul> |
| 258 | 258 | <ul> |
@@ -271,72 +271,72 @@ discard block |
||
| 271 | 271 | <?php |
| 272 | 272 | if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
| 273 | 273 | else $MapType = $_COOKIE['MapType']; |
| 274 | - ?> |
|
| 274 | + ?> |
|
| 275 | 275 | <?php |
| 276 | 276 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
| 277 | - ?> |
|
| 277 | + ?> |
|
| 278 | 278 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
| 279 | 279 | <?php |
| 280 | 280 | } else { |
| 281 | - if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
| 282 | - ?> |
|
| 281 | + if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
| 282 | + ?> |
|
| 283 | 283 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
| 284 | 284 | <?php |
| 285 | - } |
|
| 286 | - ?> |
|
| 285 | + } |
|
| 286 | + ?> |
|
| 287 | 287 | <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
| 288 | 288 | <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
| 289 | 289 | <?php |
| 290 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 291 | - ?> |
|
| 290 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 291 | + ?> |
|
| 292 | 292 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
| 293 | 293 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
| 294 | 294 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
| 295 | 295 | <?php |
| 296 | - } |
|
| 297 | - ?> |
|
| 296 | + } |
|
| 297 | + ?> |
|
| 298 | 298 | <?php |
| 299 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 300 | - ?> |
|
| 299 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 300 | + ?> |
|
| 301 | 301 | <?php |
| 302 | 302 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 303 | - ?> |
|
| 303 | + ?> |
|
| 304 | 304 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
| 305 | 305 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
| 306 | 306 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
| 307 | 307 | <?php |
| 308 | 308 | } |
| 309 | - ?> |
|
| 309 | + ?> |
|
| 310 | 310 | <?php |
| 311 | 311 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 312 | - ?> |
|
| 312 | + ?> |
|
| 313 | 313 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
| 314 | 314 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
| 315 | 315 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
| 316 | 316 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
| 317 | 317 | <?php |
| 318 | 318 | } |
| 319 | - ?> |
|
| 319 | + ?> |
|
| 320 | 320 | <?php |
| 321 | 321 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 322 | - ?> |
|
| 322 | + ?> |
|
| 323 | 323 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
| 324 | 324 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
| 325 | 325 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
| 326 | 326 | <?php |
| 327 | 327 | } |
| 328 | - ?> |
|
| 328 | + ?> |
|
| 329 | 329 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
| 330 | 330 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
| 331 | 331 | <?php |
| 332 | - } |
|
| 333 | - ?> |
|
| 332 | + } |
|
| 333 | + ?> |
|
| 334 | 334 | <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
| 335 | 335 | <?php |
| 336 | - if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
| 336 | + if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
| 337 | 337 | if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
| 338 | 338 | else $MapBoxId = $_COOKIE['MapTypeId']; |
| 339 | - ?> |
|
| 339 | + ?> |
|
| 340 | 340 | <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
| 341 | 341 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
| 342 | 342 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
@@ -351,16 +351,16 @@ discard block |
||
| 351 | 351 | <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
| 352 | 352 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
| 353 | 353 | <?php |
| 354 | - } |
|
| 355 | - ?> |
|
| 354 | + } |
|
| 355 | + ?> |
|
| 356 | 356 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
| 357 | 357 | <?php |
| 358 | 358 | } |
| 359 | - ?> |
|
| 359 | + ?> |
|
| 360 | 360 | </select> |
| 361 | 361 | </li> |
| 362 | 362 | <?php |
| 363 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
| 363 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
| 364 | 364 | ?> |
| 365 | 365 | <li><?php echo _("Type of Terrain:"); ?> |
| 366 | 366 | <select class="selectpicker" onchange="terrainType(this);"> |
@@ -371,10 +371,10 @@ discard block |
||
| 371 | 371 | </select> |
| 372 | 372 | </li> |
| 373 | 373 | <?php |
| 374 | - } |
|
| 374 | + } |
|
| 375 | 375 | ?> |
| 376 | 376 | <?php |
| 377 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 377 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 378 | 378 | ?> |
| 379 | 379 | <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> |
| 380 | 380 | |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | <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> |
| 398 | 398 | <?php |
| 399 | 399 | } |
| 400 | - } |
|
| 400 | + } |
|
| 401 | 401 | ?> |
| 402 | 402 | <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> |
| 403 | 403 | <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> |
@@ -416,80 +416,80 @@ discard block |
||
| 416 | 416 | } |
| 417 | 417 | ?> |
| 418 | 418 | <?php |
| 419 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 419 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 420 | 420 | ?> |
| 421 | 421 | <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> |
| 422 | 422 | <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> |
| 423 | 423 | <?php |
| 424 | - } |
|
| 425 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 424 | + } |
|
| 425 | + if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 426 | 426 | ?> |
| 427 | 427 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
| 428 | 428 | <?php |
| 429 | - } |
|
| 429 | + } |
|
| 430 | 430 | ?> |
| 431 | 431 | <?php |
| 432 | 432 | if (function_exists('array_column')) { |
| 433 | - if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
| 434 | - ?> |
|
| 433 | + if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
| 434 | + ?> |
|
| 435 | 435 | <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> |
| 436 | 436 | <?php |
| 437 | - } |
|
| 437 | + } |
|
| 438 | 438 | } elseif (isset($globalSources)) { |
| 439 | - $dispolar = false; |
|
| 440 | - foreach ($globalSources as $testsource) { |
|
| 441 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 442 | - } |
|
| 443 | - if ($dispolar) { |
|
| 444 | - ?> |
|
| 439 | + $dispolar = false; |
|
| 440 | + foreach ($globalSources as $testsource) { |
|
| 441 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 442 | + } |
|
| 443 | + if ($dispolar) { |
|
| 444 | + ?> |
|
| 445 | 445 | <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> |
| 446 | 446 | <?php |
| 447 | - } |
|
| 448 | - } |
|
| 449 | - ?> |
|
| 447 | + } |
|
| 448 | + } |
|
| 449 | + ?> |
|
| 450 | 450 | <?php |
| 451 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 451 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 452 | 452 | ?> |
| 453 | 453 | |
| 454 | 454 | <?php |
| 455 | 455 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 456 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 457 | - ?> |
|
| 456 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 457 | + ?> |
|
| 458 | 458 | <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> |
| 459 | 459 | <?php |
| 460 | 460 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 461 | - ?> |
|
| 461 | + ?> |
|
| 462 | 462 | <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li> |
| 463 | 463 | <?php |
| 464 | 464 | } |
| 465 | - } |
|
| 466 | - } |
|
| 467 | - ?> |
|
| 465 | + } |
|
| 466 | + } |
|
| 467 | + ?> |
|
| 468 | 468 | <?php |
| 469 | 469 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 470 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 471 | - ?> |
|
| 470 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 471 | + ?> |
|
| 472 | 472 | <li><?php echo _("Marine icon color:"); ?> |
| 473 | 473 | <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'; ?>"> |
| 474 | 474 | </li> |
| 475 | 475 | <?php |
| 476 | - } |
|
| 477 | - } |
|
| 478 | - ?> |
|
| 476 | + } |
|
| 477 | + } |
|
| 478 | + ?> |
|
| 479 | 479 | <?php |
| 480 | 480 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 481 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 482 | - ?> |
|
| 481 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 482 | + ?> |
|
| 483 | 483 | <li><?php echo _("Tracker icon color:"); ?> |
| 484 | 484 | <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'; ?>"> |
| 485 | 485 | </li> |
| 486 | 486 | <?php |
| 487 | - } |
|
| 488 | - } |
|
| 489 | - ?> |
|
| 487 | + } |
|
| 488 | + } |
|
| 489 | + ?> |
|
| 490 | 490 | <?php |
| 491 | 491 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 492 | - ?> |
|
| 492 | + ?> |
|
| 493 | 493 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 494 | 494 | <div class="range"> |
| 495 | 495 | <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'; ?>"> |
@@ -498,9 +498,9 @@ discard block |
||
| 498 | 498 | </li> |
| 499 | 499 | <?php |
| 500 | 500 | } |
| 501 | - ?> |
|
| 501 | + ?> |
|
| 502 | 502 | <?php |
| 503 | - } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
| 503 | + } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
| 504 | 504 | ?> |
| 505 | 505 | <li><?php echo _("Set scaling factor for rendering resolution:"); ?> |
| 506 | 506 | <div class="range"> |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | </li> |
| 539 | 539 | <?php |
| 540 | 540 | } |
| 541 | - } |
|
| 541 | + } |
|
| 542 | 542 | ?> |
| 543 | 543 | <li><?php echo _("Distance unit:"); ?> |
| 544 | 544 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -571,19 +571,19 @@ discard block |
||
| 571 | 571 | <ul> |
| 572 | 572 | <?php |
| 573 | 573 | if (!isset($globalAircraft) || $globalAircraft) { |
| 574 | - ?> |
|
| 574 | + ?> |
|
| 575 | 575 | <?php |
| 576 | 576 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 577 | - ?> |
|
| 577 | + ?> |
|
| 578 | 578 | <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
| 579 | 579 | <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
| 580 | 580 | <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
| 581 | 581 | <?php |
| 582 | 582 | } |
| 583 | - ?> |
|
| 583 | + ?> |
|
| 584 | 584 | <?php |
| 585 | 585 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 586 | - ?> |
|
| 586 | + ?> |
|
| 587 | 587 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 588 | 588 | <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
| 589 | 589 | <?php } ?> |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | <?php } ?> |
| 593 | 593 | <?php |
| 594 | 594 | } |
| 595 | - ?> |
|
| 595 | + ?> |
|
| 596 | 596 | <li><?php echo _("Display airlines:"); ?> |
| 597 | 597 | <br/> |
| 598 | 598 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -612,14 +612,14 @@ discard block |
||
| 612 | 612 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
| 613 | 613 | } |
| 614 | 614 | } |
| 615 | - ?> |
|
| 615 | + ?> |
|
| 616 | 616 | </select> |
| 617 | 617 | </li> |
| 618 | 618 | <?php |
| 619 | 619 | $Spotter = new Spotter(); |
| 620 | 620 | $allalliancenames = $Spotter->getAllAllianceNames(); |
| 621 | 621 | if (!empty($allalliancenames)) { |
| 622 | - ?> |
|
| 622 | + ?> |
|
| 623 | 623 | <li><?php echo _("Display alliance:"); ?> |
| 624 | 624 | <br/> |
| 625 | 625 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -633,18 +633,18 @@ discard block |
||
| 633 | 633 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
| 634 | 634 | } |
| 635 | 635 | } |
| 636 | - ?> |
|
| 636 | + ?> |
|
| 637 | 637 | </select> |
| 638 | 638 | </li> |
| 639 | 639 | <?php |
| 640 | 640 | } |
| 641 | - ?> |
|
| 641 | + ?> |
|
| 642 | 642 | <?php |
| 643 | 643 | } |
| 644 | - ?> |
|
| 644 | + ?> |
|
| 645 | 645 | <?php |
| 646 | 646 | if (isset($globalAPRS) && $globalAPRS) { |
| 647 | - ?> |
|
| 647 | + ?> |
|
| 648 | 648 | <li><?php echo _("Display APRS sources name:"); ?> |
| 649 | 649 | <select class="selectpicker" multiple onchange="sources(this);"> |
| 650 | 650 | <?php |
@@ -668,18 +668,18 @@ discard block |
||
| 668 | 668 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
| 669 | 669 | } |
| 670 | 670 | } |
| 671 | - ?> |
|
| 671 | + ?> |
|
| 672 | 672 | </select> |
| 673 | 673 | </li> |
| 674 | 674 | <?php |
| 675 | 675 | } |
| 676 | - ?> |
|
| 676 | + ?> |
|
| 677 | 677 | <?php |
| 678 | 678 | if (!isset($globalAircraft) || $globalAircraft) { |
| 679 | - ?> |
|
| 679 | + ?> |
|
| 680 | 680 | <?php |
| 681 | - if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
| 682 | - ?> |
|
| 681 | + if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
| 682 | + ?> |
|
| 683 | 683 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 684 | 684 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 685 | 685 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -689,21 +689,21 @@ discard block |
||
| 689 | 689 | </select> |
| 690 | 690 | </li> |
| 691 | 691 | <?php |
| 692 | - } |
|
| 693 | - ?> |
|
| 692 | + } |
|
| 693 | + ?> |
|
| 694 | 694 | <?php |
| 695 | 695 | } |
| 696 | - ?> |
|
| 696 | + ?> |
|
| 697 | 697 | <?php |
| 698 | 698 | if (isset($globalMarine) && $globalMarine) { |
| 699 | - ?> |
|
| 699 | + ?> |
|
| 700 | 700 | <li> |
| 701 | 701 | <?php echo _("Display vessels with MMSI:"); ?> |
| 702 | 702 | <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
| 703 | 703 | </li> |
| 704 | 704 | <?php |
| 705 | 705 | } |
| 706 | - ?> |
|
| 706 | + ?> |
|
| 707 | 707 | <li> |
| 708 | 708 | <?php echo _("Display with ident:"); ?> |
| 709 | 709 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | </form> |
| 717 | 717 | </div> |
| 718 | 718 | <?php |
| 719 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 719 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 720 | 720 | ?> |
| 721 | 721 | <div class="sidebar-pane" id="satellites"> |
| 722 | 722 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -756,14 +756,14 @@ discard block |
||
| 756 | 756 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
| 757 | 757 | } |
| 758 | 758 | } |
| 759 | - ?> |
|
| 759 | + ?> |
|
| 760 | 760 | </select> |
| 761 | 761 | </li> |
| 762 | 762 | </ul> |
| 763 | 763 | </form> |
| 764 | 764 | </div> |
| 765 | 765 | <?php |
| 766 | - } |
|
| 766 | + } |
|
| 767 | 767 | ?> |
| 768 | 768 | </div> |
| 769 | 769 | </div> |
@@ -52,7 +52,10 @@ discard block |
||
| 52 | 52 | <?php |
| 53 | 53 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
| 54 | 54 | ?> |
| 55 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
| 55 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
| 56 | + print '?tsk='.$tsk; |
|
| 57 | +} |
|
| 58 | +?>"></script> |
|
| 56 | 59 | <?php |
| 57 | 60 | if (!isset($globalAircraft) || $globalAircraft) { |
| 58 | 61 | ?> |
@@ -142,8 +145,14 @@ discard block |
||
| 142 | 145 | ?> |
| 143 | 146 | <form> |
| 144 | 147 | <ul> |
| 145 | - <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> |
|
| 146 | - <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> |
|
| 148 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 149 | + print 'checked'; |
|
| 150 | +} |
|
| 151 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
| 152 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 153 | + print 'checked'; |
|
| 154 | +} |
|
| 155 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
| 147 | 156 | </ul> |
| 148 | 157 | </form> |
| 149 | 158 | <?php |
@@ -151,8 +160,14 @@ discard block |
||
| 151 | 160 | ?> |
| 152 | 161 | <form> |
| 153 | 162 | <ul> |
| 154 | - <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> |
|
| 155 | - <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> |
|
| 163 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 164 | + print 'checked'; |
|
| 165 | +} |
|
| 166 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
| 167 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 168 | + print 'checked'; |
|
| 169 | +} |
|
| 170 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
| 156 | 171 | </ul> |
| 157 | 172 | <p>This layers are in Beta, this can and will crash.</p> |
| 158 | 173 | </form> |
@@ -163,14 +178,32 @@ discard block |
||
| 163 | 178 | <h1>NOTAM</h1> |
| 164 | 179 | <form> |
| 165 | 180 | <ul> |
| 166 | - <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> |
|
| 181 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
| 182 | + print 'checked'; |
|
| 183 | +} |
|
| 184 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
| 167 | 185 | <li><?php echo _("NOTAM scope:"); ?> |
| 168 | 186 | <select class="selectpicker" onchange="notamscope(this);"> |
| 169 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 170 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 171 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 172 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 173 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 187 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 188 | + print ' selected'; |
|
| 189 | +} |
|
| 190 | +?>>All</option> |
|
| 191 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 192 | + print ' selected'; |
|
| 193 | +} |
|
| 194 | +?>>Airport/Enroute warning</option> |
|
| 195 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 196 | + print ' selected'; |
|
| 197 | +} |
|
| 198 | +?>>Airport warning</option> |
|
| 199 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 200 | + print ' selected'; |
|
| 201 | +} |
|
| 202 | +?>>Navigation warning</option> |
|
| 203 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 204 | + print ' selected'; |
|
| 205 | +} |
|
| 206 | +?>>Enroute warning</option> |
|
| 174 | 207 | </select |
| 175 | 208 | </li> |
| 176 | 209 | </ul> |
@@ -198,7 +231,10 @@ discard block |
||
| 198 | 231 | <div class="form-group"> |
| 199 | 232 | <label><?php echo _("From:"); ?></label> |
| 200 | 233 | <div class='input-group date' id='datetimepicker1'> |
| 201 | - <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 /> |
|
| 234 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
| 235 | + print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; |
|
| 236 | +} |
|
| 237 | +?>" required /> |
|
| 202 | 238 | <span class="input-group-addon"> |
| 203 | 239 | <span class="glyphicon glyphicon-calendar"></span> |
| 204 | 240 | </span> |
@@ -207,7 +243,10 @@ discard block |
||
| 207 | 243 | <div class="form-group"> |
| 208 | 244 | <label><?php echo _("To:"); ?></label> |
| 209 | 245 | <div class='input-group date' id='datetimepicker2'> |
| 210 | - <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'; ?>" /> |
|
| 246 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') { |
|
| 247 | + print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; |
|
| 248 | +} |
|
| 249 | +?>" /> |
|
| 211 | 250 | <span class="input-group-addon"> |
| 212 | 251 | <span class="glyphicon glyphicon-calendar"></span> |
| 213 | 252 | </span> |
@@ -239,8 +278,20 @@ discard block |
||
| 239 | 278 | </script> |
| 240 | 279 | <li><?php echo _("Playback speed:"); ?> |
| 241 | 280 | <div class="range"> |
| 242 | - <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'; ?>"> |
|
| 243 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 281 | + <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
| 282 | + print $_POST['archivespeed']; |
|
| 283 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
| 284 | + print $_COOKIE['archive_speed']; |
|
| 285 | +} else { |
|
| 286 | + print '1'; |
|
| 287 | +} |
|
| 288 | +?>"> |
|
| 289 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 290 | + print $_COOKIE['archive_speed']; |
|
| 291 | +} else { |
|
| 292 | + print '1'; |
|
| 293 | +} |
|
| 294 | +?></output> |
|
| 244 | 295 | </div> |
| 245 | 296 | </li> |
| 246 | 297 | <?php |
@@ -269,29 +320,53 @@ discard block |
||
| 269 | 320 | <li><?php echo _("Type of Map:"); ?> |
| 270 | 321 | <select class="selectpicker" onchange="mapType(this);"> |
| 271 | 322 | <?php |
| 272 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 273 | - else $MapType = $_COOKIE['MapType']; |
|
| 323 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 324 | + $MapType = $globalMapProvider; |
|
| 325 | + } else { |
|
| 326 | + $MapType = $_COOKIE['MapType']; |
|
| 327 | + } |
|
| 274 | 328 | ?> |
| 275 | 329 | <?php |
| 276 | 330 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
| 277 | 331 | ?> |
| 278 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 332 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 333 | + print ' selected'; |
|
| 334 | +} |
|
| 335 | +?>>Natural Earth (local)</option> |
|
| 279 | 336 | <?php |
| 280 | 337 | } else { |
| 281 | 338 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
| 282 | 339 | ?> |
| 283 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 340 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 341 | + print ' selected'; |
|
| 342 | +} |
|
| 343 | +?>>Natural Earth (local)</option> |
|
| 284 | 344 | <?php |
| 285 | 345 | } |
| 286 | 346 | ?> |
| 287 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
| 288 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
| 347 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
| 348 | + print ' selected'; |
|
| 349 | +} |
|
| 350 | +?>>ArcGIS Streetmap</option> |
|
| 351 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
| 352 | + print ' selected'; |
|
| 353 | +} |
|
| 354 | +?>>ArcGIS Satellite</option> |
|
| 289 | 355 | <?php |
| 290 | 356 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 291 | 357 | ?> |
| 292 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 293 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 294 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 358 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 359 | + print ' selected'; |
|
| 360 | +} |
|
| 361 | +?>>Bing-Aerial</option> |
|
| 362 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 363 | + print ' selected'; |
|
| 364 | +} |
|
| 365 | +?>>Bing-Hybrid</option> |
|
| 366 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 367 | + print ' selected'; |
|
| 368 | +} |
|
| 369 | +?>>Bing-Road</option> |
|
| 295 | 370 | <?php |
| 296 | 371 | } |
| 297 | 372 | ?> |
@@ -301,59 +376,143 @@ discard block |
||
| 301 | 376 | <?php |
| 302 | 377 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 303 | 378 | ?> |
| 304 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 305 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 306 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 379 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 380 | + print ' selected'; |
|
| 381 | +} |
|
| 382 | +?>>Here-Aerial</option> |
|
| 383 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 384 | + print ' selected'; |
|
| 385 | +} |
|
| 386 | +?>>Here-Hybrid</option> |
|
| 387 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 388 | + print ' selected'; |
|
| 389 | +} |
|
| 390 | +?>>Here-Road</option> |
|
| 307 | 391 | <?php |
| 308 | 392 | } |
| 309 | 393 | ?> |
| 310 | 394 | <?php |
| 311 | 395 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 312 | 396 | ?> |
| 313 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 314 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 315 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 316 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 397 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 398 | + print ' selected'; |
|
| 399 | +} |
|
| 400 | +?>>Google Roadmap</option> |
|
| 401 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 402 | + print ' selected'; |
|
| 403 | +} |
|
| 404 | +?>>Google Satellite</option> |
|
| 405 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 406 | + print ' selected'; |
|
| 407 | +} |
|
| 408 | +?>>Google Hybrid</option> |
|
| 409 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 410 | + print ' selected'; |
|
| 411 | +} |
|
| 412 | +?>>Google Terrain</option> |
|
| 317 | 413 | <?php |
| 318 | 414 | } |
| 319 | 415 | ?> |
| 320 | 416 | <?php |
| 321 | 417 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 322 | 418 | ?> |
| 323 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 324 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 325 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 419 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 420 | + print ' selected'; |
|
| 421 | +} |
|
| 422 | +?>>MapQuest-OSM</option> |
|
| 423 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 424 | + print ' selected'; |
|
| 425 | +} |
|
| 426 | +?>>MapQuest-Aerial</option> |
|
| 427 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 428 | + print ' selected'; |
|
| 429 | +} |
|
| 430 | +?>>MapQuest-Hybrid</option> |
|
| 326 | 431 | <?php |
| 327 | 432 | } |
| 328 | 433 | ?> |
| 329 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 330 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
| 434 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 435 | + print ' selected'; |
|
| 436 | +} |
|
| 437 | +?>>Yandex</option> |
|
| 438 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 439 | + print ' selected'; |
|
| 440 | +} |
|
| 441 | +?>>Natural Earth</option> |
|
| 331 | 442 | <?php |
| 332 | 443 | } |
| 333 | 444 | ?> |
| 334 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
| 445 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
| 446 | + print ' selected'; |
|
| 447 | +} |
|
| 448 | +?>>National Geographic Street</option> |
|
| 335 | 449 | <?php |
| 336 | 450 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 337 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 338 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 451 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 452 | + $MapBoxId = 'default'; |
|
| 453 | + } else { |
|
| 454 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 455 | + } |
|
| 339 | 456 | ?> |
| 340 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
| 341 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 342 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 343 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 344 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 345 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 346 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 347 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 348 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 349 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 350 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 351 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 352 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 457 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
| 458 | + print ' selected'; |
|
| 459 | +} |
|
| 460 | +?>>Mapbox GL</option> |
|
| 461 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 462 | + print ' selected'; |
|
| 463 | +} |
|
| 464 | +?>>Mapbox default</option> |
|
| 465 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 466 | + print ' selected'; |
|
| 467 | +} |
|
| 468 | +?>>Mapbox streets</option> |
|
| 469 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 470 | + print ' selected'; |
|
| 471 | +} |
|
| 472 | +?>>Mapbox light</option> |
|
| 473 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 474 | + print ' selected'; |
|
| 475 | +} |
|
| 476 | +?>>Mapbox dark</option> |
|
| 477 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 478 | + print ' selected'; |
|
| 479 | +} |
|
| 480 | +?>>Mapbox satellite</option> |
|
| 481 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 482 | + print ' selected'; |
|
| 483 | +} |
|
| 484 | +?>>Mapbox streets-satellite</option> |
|
| 485 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 486 | + print ' selected'; |
|
| 487 | +} |
|
| 488 | +?>>Mapbox streets-basic</option> |
|
| 489 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 490 | + print ' selected'; |
|
| 491 | +} |
|
| 492 | +?>>Mapbox comic</option> |
|
| 493 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 494 | + print ' selected'; |
|
| 495 | +} |
|
| 496 | +?>>Mapbox outdoors</option> |
|
| 497 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 498 | + print ' selected'; |
|
| 499 | +} |
|
| 500 | +?>>Mapbox pencil</option> |
|
| 501 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 502 | + print ' selected'; |
|
| 503 | +} |
|
| 504 | +?>>Mapbox pirates</option> |
|
| 505 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 506 | + print ' selected'; |
|
| 507 | +} |
|
| 508 | +?>>Mapbox emerald</option> |
|
| 353 | 509 | <?php |
| 354 | 510 | } |
| 355 | 511 | ?> |
| 356 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 512 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 513 | + print ' selected'; |
|
| 514 | +} |
|
| 515 | +?>>OpenStreetMap</option> |
|
| 357 | 516 | <?php |
| 358 | 517 | } |
| 359 | 518 | ?> |
@@ -364,10 +523,22 @@ discard block |
||
| 364 | 523 | ?> |
| 365 | 524 | <li><?php echo _("Type of Terrain:"); ?> |
| 366 | 525 | <select class="selectpicker" onchange="terrainType(this);"> |
| 367 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 368 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 369 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 370 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 526 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 527 | + print ' selected'; |
|
| 528 | +} |
|
| 529 | +?>>stk terrain</option> |
|
| 530 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 531 | + print ' selected'; |
|
| 532 | +} |
|
| 533 | +?>>ellipsoid</option> |
|
| 534 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 535 | + print ' selected'; |
|
| 536 | +} |
|
| 537 | +?>>vr terrain</option> |
|
| 538 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
| 539 | + print ' selected'; |
|
| 540 | +} |
|
| 541 | +?>>ArticDEM</option> |
|
| 371 | 542 | </select> |
| 372 | 543 | </li> |
| 373 | 544 | <?php |
@@ -376,50 +547,98 @@ discard block |
||
| 376 | 547 | <?php |
| 377 | 548 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
| 378 | 549 | ?> |
| 379 | - <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> |
|
| 550 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
| 551 | + print 'checked'; |
|
| 552 | +} |
|
| 553 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
| 380 | 554 | |
| 381 | 555 | <?php |
| 382 | 556 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 383 | 557 | ?> |
| 384 | - <!--<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>--> |
|
| 385 | - <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> |
|
| 386 | - <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> |
|
| 387 | - <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> |
|
| 388 | - <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> |
|
| 558 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 559 | + print 'checked'; |
|
| 560 | +} |
|
| 561 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
| 562 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
| 563 | + print 'checked'; |
|
| 564 | +} |
|
| 565 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 566 | + <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)) { |
|
| 567 | + print 'checked'; |
|
| 568 | +} |
|
| 569 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 570 | + <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)) { |
|
| 571 | + print 'checked'; |
|
| 572 | +} |
|
| 573 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 574 | + <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)) { |
|
| 575 | + print 'checked'; |
|
| 576 | +} |
|
| 577 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 389 | 578 | <?php |
| 390 | 579 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
| 391 | 580 | ?> |
| 392 | - <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> |
|
| 581 | + <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)) { |
|
| 582 | + print 'checked'; |
|
| 583 | +} |
|
| 584 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
| 393 | 585 | <?php |
| 394 | 586 | } |
| 395 | 587 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
| 396 | 588 | ?> |
| 397 | - <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> |
|
| 589 | + <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)) { |
|
| 590 | + print 'checked'; |
|
| 591 | +} |
|
| 592 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 398 | 593 | <?php |
| 399 | 594 | } |
| 400 | 595 | } |
| 401 | 596 | ?> |
| 402 | - <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> |
|
| 403 | - <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> |
|
| 404 | - <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> |
|
| 405 | - <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> |
|
| 597 | + <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'])) { |
|
| 598 | + print 'checked'; |
|
| 599 | +} |
|
| 600 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 601 | + <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))) { |
|
| 602 | + print 'checked'; |
|
| 603 | +} |
|
| 604 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 605 | + <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))) { |
|
| 606 | + print 'checked'; |
|
| 607 | +} |
|
| 608 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 609 | + <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))) { |
|
| 610 | + print 'checked'; |
|
| 611 | +} |
|
| 612 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 406 | 613 | <?php |
| 407 | 614 | if (isset($globalFires)) { |
| 408 | 615 | ?> |
| 409 | - <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> |
|
| 616 | + <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))) { |
|
| 617 | + print 'checked'; |
|
| 618 | +} |
|
| 619 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
| 410 | 620 | <?php |
| 411 | 621 | } |
| 412 | 622 | if (isset($globalMap3D) && $globalMap3D) { |
| 413 | 623 | ?> |
| 414 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 624 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') { |
|
| 625 | + print 'checked'; |
|
| 626 | +} |
|
| 627 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 415 | 628 | <?php |
| 416 | 629 | } |
| 417 | 630 | ?> |
| 418 | 631 | <?php |
| 419 | 632 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 420 | 633 | ?> |
| 421 | - <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> |
|
| 422 | - <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> |
|
| 634 | + <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')) { |
|
| 635 | + print 'checked'; |
|
| 636 | +} |
|
| 637 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 638 | + <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)) { |
|
| 639 | + print 'checked'; |
|
| 640 | +} |
|
| 641 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
| 423 | 642 | <?php |
| 424 | 643 | } |
| 425 | 644 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -432,17 +651,25 @@ discard block |
||
| 432 | 651 | if (function_exists('array_column')) { |
| 433 | 652 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 434 | 653 | ?> |
| 435 | - <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> |
|
| 654 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 655 | + print 'checked'; |
|
| 656 | +} |
|
| 657 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 436 | 658 | <?php |
| 437 | 659 | } |
| 438 | 660 | } elseif (isset($globalSources)) { |
| 439 | 661 | $dispolar = false; |
| 440 | 662 | foreach ($globalSources as $testsource) { |
| 441 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 663 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 664 | + $dispolar = true; |
|
| 665 | + } |
|
| 442 | 666 | } |
| 443 | 667 | if ($dispolar) { |
| 444 | 668 | ?> |
| 445 | - <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> |
|
| 669 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 670 | + print 'checked'; |
|
| 671 | +} |
|
| 672 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 446 | 673 | <?php |
| 447 | 674 | } |
| 448 | 675 | } |
@@ -455,11 +682,21 @@ discard block |
||
| 455 | 682 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 456 | 683 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 457 | 684 | ?> |
| 458 | - <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> |
|
| 685 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 686 | + print 'checked'; |
|
| 687 | +} |
|
| 688 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 459 | 689 | <?php |
| 460 | 690 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 461 | 691 | ?> |
| 462 | - <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li> |
|
| 692 | + <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 693 | + print $_COOKIE['IconColor']; |
|
| 694 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 695 | + print $globalAircraftIconColor; |
|
| 696 | +} else { |
|
| 697 | + print '1a3151'; |
|
| 698 | +} |
|
| 699 | +?>"></li> |
|
| 463 | 700 | <?php |
| 464 | 701 | } |
| 465 | 702 | } |
@@ -470,7 +707,14 @@ discard block |
||
| 470 | 707 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 471 | 708 | ?> |
| 472 | 709 | <li><?php echo _("Marine icon color:"); ?> |
| 473 | - <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'; ?>"> |
|
| 710 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 711 | + print $_COOKIE['MarineIconColor']; |
|
| 712 | +} elseif (isset($globalMarineIconColor)) { |
|
| 713 | + print $globalMarineIconColor; |
|
| 714 | +} else { |
|
| 715 | + print '1a3151'; |
|
| 716 | +} |
|
| 717 | +?>"> |
|
| 474 | 718 | </li> |
| 475 | 719 | <?php |
| 476 | 720 | } |
@@ -481,7 +725,14 @@ discard block |
||
| 481 | 725 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 482 | 726 | ?> |
| 483 | 727 | <li><?php echo _("Tracker icon color:"); ?> |
| 484 | - <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'; ?>"> |
|
| 728 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 729 | + print $_COOKIE['TrackerIconColor']; |
|
| 730 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 731 | + print $globalTrackerIconColor; |
|
| 732 | +} else { |
|
| 733 | + print '1a3151'; |
|
| 734 | +} |
|
| 735 | +?>"> |
|
| 485 | 736 | </li> |
| 486 | 737 | <?php |
| 487 | 738 | } |
@@ -492,8 +743,22 @@ discard block |
||
| 492 | 743 | ?> |
| 493 | 744 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 494 | 745 | <div class="range"> |
| 495 | - <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'; ?>"> |
|
| 496 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 746 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 747 | + print $_COOKIE['AirportZoom']; |
|
| 748 | +} elseif (isset($globalAirportZoom)) { |
|
| 749 | + print $globalAirportZoom; |
|
| 750 | +} else { |
|
| 751 | + print '7'; |
|
| 752 | +} |
|
| 753 | +?>"> |
|
| 754 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 755 | + print $_COOKIE['AirportZoom']; |
|
| 756 | +} elseif (isset($globalAirportZoom)) { |
|
| 757 | + print $globalAirportZoom; |
|
| 758 | +} else { |
|
| 759 | + print '7'; |
|
| 760 | +} |
|
| 761 | +?></output> |
|
| 497 | 762 | </div> |
| 498 | 763 | </li> |
| 499 | 764 | <?php |
@@ -504,17 +769,40 @@ discard block |
||
| 504 | 769 | ?> |
| 505 | 770 | <li><?php echo _("Set scaling factor for rendering resolution:"); ?> |
| 506 | 771 | <div class="range"> |
| 507 | - <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'; ?>"> |
|
| 508 | - <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output> |
|
| 772 | + <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'])) { |
|
| 773 | + print $_COOKIE['resolutionScale']; |
|
| 774 | +} else { |
|
| 775 | + print '1'; |
|
| 776 | +} |
|
| 777 | +?>"> |
|
| 778 | + <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) { |
|
| 779 | + print $_COOKIE['resolutionScale']; |
|
| 780 | +} else { |
|
| 781 | + print '1'; |
|
| 782 | +} |
|
| 783 | +?></output> |
|
| 509 | 784 | </div> |
| 510 | 785 | </li> |
| 511 | 786 | <?php |
| 512 | 787 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 513 | 788 | ?> |
| 514 | - <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> |
|
| 515 | - <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"); ?> |
|
| 789 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
| 790 | + print 'checked'; |
|
| 791 | +} |
|
| 792 | +?> > <?php echo _("Use airlines liveries"); ?></li> |
|
| 793 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
| 794 | + print 'checked'; |
|
| 795 | +} |
|
| 796 | +?> > <?php echo _("Force Aircraft color"); ?> |
|
| 516 | 797 | <!--<li><?php echo _("Aircraft icon color:"); ?>--> |
| 517 | - <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'; ?>"> |
|
| 798 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 799 | + print $_COOKIE['IconColor']; |
|
| 800 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 801 | + print $globalAircraftIconColor; |
|
| 802 | +} else { |
|
| 803 | + print 'ff0000'; |
|
| 804 | +} |
|
| 805 | +?>"> |
|
| 518 | 806 | </li> |
| 519 | 807 | <?php |
| 520 | 808 | } |
@@ -522,9 +810,19 @@ discard block |
||
| 522 | 810 | <?php |
| 523 | 811 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 524 | 812 | ?> |
| 525 | - <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"); ?> |
|
| 813 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
| 814 | + print 'checked'; |
|
| 815 | +} |
|
| 816 | +?> ><?php echo _("Force Marine color"); ?> |
|
| 526 | 817 | <!--<li><?php echo _("Marine icon color:"); ?>--> |
| 527 | - <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'; ?>"> |
|
| 818 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 819 | + print $_COOKIE['MarineIconColor']; |
|
| 820 | +} elseif (isset($globalMarineIconColor)) { |
|
| 821 | + print $globalMarineIconColor; |
|
| 822 | +} else { |
|
| 823 | + print 'ff0000'; |
|
| 824 | +} |
|
| 825 | +?>"> |
|
| 528 | 826 | </li> |
| 529 | 827 | <?php |
| 530 | 828 | } |
@@ -532,9 +830,19 @@ discard block |
||
| 532 | 830 | <?php |
| 533 | 831 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 534 | 832 | ?> |
| 535 | - <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"); ?> |
|
| 833 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
| 834 | + print 'checked'; |
|
| 835 | +} |
|
| 836 | +?> ><?php echo _("Force Tracker color"); ?> |
|
| 536 | 837 | <!--<li><?php echo _("Tracker icon color:"); ?>--> |
| 537 | - <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'; ?>"> |
|
| 838 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 839 | + print $_COOKIE['TrackerIconColor']; |
|
| 840 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 841 | + print $globalTrackerIconColor; |
|
| 842 | +} else { |
|
| 843 | + print 'ff0000'; |
|
| 844 | +} |
|
| 845 | +?>"> |
|
| 538 | 846 | </li> |
| 539 | 847 | <?php |
| 540 | 848 | } |
@@ -542,22 +850,46 @@ discard block |
||
| 542 | 850 | ?> |
| 543 | 851 | <li><?php echo _("Distance unit:"); ?> |
| 544 | 852 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 545 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 546 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 547 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 853 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 854 | + echo ' selected'; |
|
| 855 | +} |
|
| 856 | +?>>km</option> |
|
| 857 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 858 | + echo ' selected'; |
|
| 859 | +} |
|
| 860 | +?>>nm</option> |
|
| 861 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 862 | + echo ' selected'; |
|
| 863 | +} |
|
| 864 | +?>>mi</option> |
|
| 548 | 865 | </select> |
| 549 | 866 | </li> |
| 550 | 867 | <li><?php echo _("Altitude unit:"); ?> |
| 551 | 868 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 552 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 553 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 869 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 870 | + echo ' selected'; |
|
| 871 | +} |
|
| 872 | +?>>m</option> |
|
| 873 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 874 | + echo ' selected'; |
|
| 875 | +} |
|
| 876 | +?>>feet</option> |
|
| 554 | 877 | </select> |
| 555 | 878 | </li> |
| 556 | 879 | <li><?php echo _("Speed unit:"); ?> |
| 557 | 880 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 558 | - <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> |
|
| 559 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 560 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 881 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 882 | + echo ' selected'; |
|
| 883 | +} |
|
| 884 | +?>>km/h</option> |
|
| 885 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 886 | + echo ' selected'; |
|
| 887 | +} |
|
| 888 | +?>>mph</option> |
|
| 889 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 890 | + echo ' selected'; |
|
| 891 | +} |
|
| 892 | +?>>knots</option> |
|
| 561 | 893 | </select> |
| 562 | 894 | </li> |
| 563 | 895 | |
@@ -575,9 +907,18 @@ discard block |
||
| 575 | 907 | <?php |
| 576 | 908 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 577 | 909 | ?> |
| 578 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 579 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 580 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 910 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
| 911 | + print 'checked'; |
|
| 912 | +} |
|
| 913 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 914 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
| 915 | + print 'checked'; |
|
| 916 | +} |
|
| 917 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 918 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
| 919 | + print 'checked'; |
|
| 920 | +} |
|
| 921 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 581 | 922 | <?php |
| 582 | 923 | } |
| 583 | 924 | ?> |
@@ -585,10 +926,16 @@ discard block |
||
| 585 | 926 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 586 | 927 | ?> |
| 587 | 928 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 588 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 929 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
| 930 | + print 'checked'; |
|
| 931 | +} |
|
| 932 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 589 | 933 | <?php } ?> |
| 590 | 934 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 591 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 935 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
| 936 | + print 'checked'; |
|
| 937 | +} |
|
| 938 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 592 | 939 | <?php } ?> |
| 593 | 940 | <?php |
| 594 | 941 | } |
@@ -605,7 +952,9 @@ discard block |
||
| 605 | 952 | } |
| 606 | 953 | foreach($allairlinenames as $airline) { |
| 607 | 954 | $airline_name = $airline['airline_name']; |
| 608 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 955 | + if (strlen($airline_name) > 30) { |
|
| 956 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 957 | + } |
|
| 609 | 958 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
| 610 | 959 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 611 | 960 | } else { |
@@ -623,7 +972,10 @@ discard block |
||
| 623 | 972 | <li><?php echo _("Display alliance:"); ?> |
| 624 | 973 | <br/> |
| 625 | 974 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 626 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 975 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
| 976 | + echo ' selected'; |
|
| 977 | +} |
|
| 978 | +?>><?php echo _("All"); ?></option> |
|
| 627 | 979 | <?php |
| 628 | 980 | foreach($allalliancenames as $alliance) { |
| 629 | 981 | $alliance_name = $alliance['alliance']; |
@@ -682,10 +1034,22 @@ discard block |
||
| 682 | 1034 | ?> |
| 683 | 1035 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 684 | 1036 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 685 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 686 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 687 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 688 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 1037 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
| 1038 | + echo ' selected'; |
|
| 1039 | +} |
|
| 1040 | +?>><?php echo _("All"); ?></option> |
|
| 1041 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
| 1042 | + echo ' selected'; |
|
| 1043 | +} |
|
| 1044 | +?>><?php echo _("Passenger"); ?></option> |
|
| 1045 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
| 1046 | + echo ' selected'; |
|
| 1047 | +} |
|
| 1048 | +?>><?php echo _("Cargo"); ?></option> |
|
| 1049 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
| 1050 | + echo ' selected'; |
|
| 1051 | +} |
|
| 1052 | +?>><?php echo _("Military"); ?></option> |
|
| 689 | 1053 | </select> |
| 690 | 1054 | </li> |
| 691 | 1055 | <?php |
@@ -699,14 +1063,20 @@ discard block |
||
| 699 | 1063 | ?> |
| 700 | 1064 | <li> |
| 701 | 1065 | <?php echo _("Display vessels with MMSI:"); ?> |
| 702 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
| 1066 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
| 1067 | + print $_COOKIE['filter_mmsi']; |
|
| 1068 | +} |
|
| 1069 | +?>" /> |
|
| 703 | 1070 | </li> |
| 704 | 1071 | <?php |
| 705 | 1072 | } |
| 706 | 1073 | ?> |
| 707 | 1074 | <li> |
| 708 | 1075 | <?php echo _("Display with ident:"); ?> |
| 709 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
| 1076 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
| 1077 | + print $_COOKIE['filter_ident']; |
|
| 1078 | +} |
|
| 1079 | +?>" /> |
|
| 710 | 1080 | </li> |
| 711 | 1081 | </ul> |
| 712 | 1082 | </form> |
@@ -722,7 +1092,10 @@ discard block |
||
| 722 | 1092 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 723 | 1093 | <form> |
| 724 | 1094 | <ul> |
| 725 | - <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> |
|
| 1095 | + <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'])) { |
|
| 1096 | + print 'checked'; |
|
| 1097 | +} |
|
| 1098 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 726 | 1099 | <li><?php echo _("Type:"); ?> |
| 727 | 1100 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 728 | 1101 | <?php |
@@ -730,25 +1103,45 @@ discard block |
||
| 730 | 1103 | $types = $Satellite->get_tle_types(); |
| 731 | 1104 | foreach ($types as $type) { |
| 732 | 1105 | $type_name = $type['tle_type']; |
| 733 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 734 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 735 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 736 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 737 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 738 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 739 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 740 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 741 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 742 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 743 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 744 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 745 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 746 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 747 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 748 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 749 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 750 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 751 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 1106 | + if ($type_name == 'musson') { |
|
| 1107 | + $type_name = 'Russian LEO Navigation'; |
|
| 1108 | + } else if ($type_name == 'nnss') { |
|
| 1109 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 1110 | + } else if ($type_name == 'sbas') { |
|
| 1111 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 1112 | + } else if ($type_name == 'glo-ops') { |
|
| 1113 | + $type_name = 'Glonass Operational'; |
|
| 1114 | + } else if ($type_name == 'gps-ops') { |
|
| 1115 | + $type_name = 'GPS Operational'; |
|
| 1116 | + } else if ($type_name == 'argos') { |
|
| 1117 | + $type_name = 'ARGOS Data Collection System'; |
|
| 1118 | + } else if ($type_name == 'tdrss') { |
|
| 1119 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 1120 | + } else if ($type_name == 'sarsat') { |
|
| 1121 | + $type_name = 'Search & Rescue'; |
|
| 1122 | + } else if ($type_name == 'dmc') { |
|
| 1123 | + $type_name = 'Disaster Monitoring'; |
|
| 1124 | + } else if ($type_name == 'resource') { |
|
| 1125 | + $type_name = 'Earth Resources'; |
|
| 1126 | + } else if ($type_name == 'stations') { |
|
| 1127 | + $type_name = 'Space Stations'; |
|
| 1128 | + } else if ($type_name == 'geo') { |
|
| 1129 | + $type_name = 'Geostationary'; |
|
| 1130 | + } else if ($type_name == 'amateur') { |
|
| 1131 | + $type_name = 'Amateur Radio'; |
|
| 1132 | + } else if ($type_name == 'x-comm') { |
|
| 1133 | + $type_name = 'Experimental'; |
|
| 1134 | + } else if ($type_name == 'other-comm') { |
|
| 1135 | + $type_name = 'Other Comm'; |
|
| 1136 | + } else if ($type_name == 'science') { |
|
| 1137 | + $type_name = 'Space & Earth Science'; |
|
| 1138 | + } else if ($type_name == 'military') { |
|
| 1139 | + $type_name = 'Miscellaneous Military'; |
|
| 1140 | + } else if ($type_name == 'radar') { |
|
| 1141 | + $type_name = 'Radar Calibration'; |
|
| 1142 | + } else if ($type_name == 'tle-new') { |
|
| 1143 | + $type_name = 'Last 30 days launches'; |
|
| 1144 | + } |
|
| 752 | 1145 | |
| 753 | 1146 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 754 | 1147 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | require_once('../require/settings.php'); |
| 3 | 3 | require_once('../require/class.Language.php'); |
| 4 | 4 | |
| 5 | -setcookie("MapFormat",'2d'); |
|
| 5 | +setcookie("MapFormat", '2d'); |
|
| 6 | 6 | |
| 7 | 7 | if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = ''; |
| 8 | 8 | // Compressed GeoJson is used if true |
@@ -56,16 +56,16 @@ discard block |
||
| 56 | 56 | <?php |
| 57 | 57 | } |
| 58 | 58 | if (isset($_GET['ident'])) { |
| 59 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 59 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 60 | 60 | } |
| 61 | 61 | if (isset($_GET['flightaware_id'])) { |
| 62 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 62 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 63 | 63 | } |
| 64 | 64 | if (isset($_GET['latitude'])) { |
| 65 | - $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING); |
|
| 65 | + $latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING); |
|
| 66 | 66 | } |
| 67 | 67 | if (isset($_GET['longitude'])) { |
| 68 | - $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING); |
|
| 68 | + $longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING); |
|
| 69 | 69 | } |
| 70 | 70 | ?> |
| 71 | 71 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } else { |
| 94 | 94 | if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) { |
| 95 | 95 | if (isset($_COOKIE['lastcentercoord'])) { |
| 96 | - $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
|
| 96 | + $lastcentercoord = explode(',', $_COOKIE['lastcentercoord']); |
|
| 97 | 97 | $viewcenterlatitude = $lastcentercoord[0]; |
| 98 | 98 | $viewcenterlongitude = $lastcentercoord[1]; |
| 99 | 99 | $viewzoom = $lastcentercoord[2]; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | || navigator.userAgent.match(/BlackBerry/i) |
| 115 | 115 | || navigator.userAgent.match(/Windows Phone/i)) |
| 116 | 116 | { |
| 117 | - var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
| 117 | + var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom - 1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
| 118 | 118 | } else { |
| 119 | 119 | var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>; |
| 120 | 120 | } |
@@ -240,19 +240,19 @@ discard block |
||
| 240 | 240 | map.addLayer(yandexLayer); |
| 241 | 241 | <?php |
| 242 | 242 | } elseif ($MapType == 'Bing-Aerial') { |
| 243 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 243 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 244 | 244 | ?> |
| 245 | 245 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
| 246 | 246 | map.addLayer(bingLayer); |
| 247 | 247 | <?php |
| 248 | 248 | } elseif ($MapType == 'Bing-Hybrid') { |
| 249 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 249 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 250 | 250 | ?> |
| 251 | 251 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
| 252 | 252 | map.addLayer(bingLayer); |
| 253 | 253 | <?php |
| 254 | 254 | } elseif ($MapType == 'Bing-Road') { |
| 255 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 255 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 256 | 256 | ?> |
| 257 | 257 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
| 258 | 258 | map.addLayer(bingLayer); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | |
| 391 | 391 | function update_tsk() { |
| 392 | 392 | var bbox = map.getBounds().toBBoxString(); |
| 393 | - var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>",function (data) { |
|
| 393 | + var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>",function (data) { |
|
| 394 | 394 | tskLayer = L.geoJson(data,{ |
| 395 | 395 | onEachFeature: function (feature, layer) { |
| 396 | 396 | tskPopup(feature, layer); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | }; |
| 386 | 386 | |
| 387 | 387 | <?php |
| 388 | - if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
| 388 | + if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
| 389 | 389 | ?> |
| 390 | 390 | function tskPopup (feature, layer) { |
| 391 | 391 | var output = ''; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | }; |
| 421 | 421 | update_tsk(); |
| 422 | 422 | <?php |
| 423 | - } |
|
| 423 | + } |
|
| 424 | 424 | ?> |
| 425 | 425 | map.on('moveend', function() { |
| 426 | 426 | if (map.hasLayer(locationsLayer) == true) { |
@@ -434,10 +434,10 @@ discard block |
||
| 434 | 434 | setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
| 435 | 435 | } |
| 436 | 436 | <?php |
| 437 | - // Add support for custom json via $globalMapJson |
|
| 438 | - if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
| 437 | + // Add support for custom json via $globalMapJson |
|
| 438 | + if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
| 439 | 439 | foreach ($globalMapJson as $json) { |
| 440 | - if (isset($json['url'])) { |
|
| 440 | + if (isset($json['url'])) { |
|
| 441 | 441 | ?> |
| 442 | 442 | update_genLayer('<?php print $json['url']; ?>'); |
| 443 | 443 | <?php |
@@ -446,9 +446,9 @@ discard block |
||
| 446 | 446 | setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>); |
| 447 | 447 | <?php |
| 448 | 448 | } |
| 449 | - } |
|
| 449 | + } |
|
| 450 | + } |
|
| 450 | 451 | } |
| 451 | - } |
|
| 452 | 452 | |
| 453 | 453 | ?> |
| 454 | 454 | //adds the bootstrap tooltip to the map icons |
@@ -4,10 +4,15 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | -if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = ''; |
|
| 7 | +if (!isset($globalOpenWeatherMapKey)) { |
|
| 8 | + $globalOpenWeatherMapKey = ''; |
|
| 9 | +} |
|
| 8 | 10 | // Compressed GeoJson is used if true |
| 9 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 10 | -else $compress = $globalJsonCompress; |
|
| 11 | +if (!isset($globalJsonCompress)) { |
|
| 12 | + $compress = true; |
|
| 13 | +} else { |
|
| 14 | + $compress = $globalJsonCompress; |
|
| 15 | +} |
|
| 11 | 16 | |
| 12 | 17 | /* |
| 13 | 18 | if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
@@ -97,7 +102,17 @@ discard block |
||
| 97 | 102 | } |
| 98 | 103 | |
| 99 | 104 | //create the map |
| 100 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
| 105 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
| 106 | + print $latitude; |
|
| 107 | +} else { |
|
| 108 | + print $globalCenterLatitude; |
|
| 109 | +} |
|
| 110 | +?>,<?php if (isset($longitude)) { |
|
| 111 | + print $longitude; |
|
| 112 | +} else { |
|
| 113 | + print $globalCenterLongitude; |
|
| 114 | +} |
|
| 115 | +?>], zoom); |
|
| 101 | 116 | <?php |
| 102 | 117 | } else { |
| 103 | 118 | if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) { |
@@ -123,9 +138,21 @@ discard block |
||
| 123 | 138 | || navigator.userAgent.match(/BlackBerry/i) |
| 124 | 139 | || navigator.userAgent.match(/Windows Phone/i)) |
| 125 | 140 | { |
| 126 | - var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
| 141 | + var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) { |
|
| 142 | + print $viewzoom-1; |
|
| 143 | +} elseif (isset($viewzoom)) { |
|
| 144 | + print $viewzoom; |
|
| 145 | +} else { |
|
| 146 | + print '8'; |
|
| 147 | +} |
|
| 148 | +?>; |
|
| 127 | 149 | } else { |
| 128 | - var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>; |
|
| 150 | + var zoom = <?php if (isset($viewzoom)) { |
|
| 151 | + print $viewzoom; |
|
| 152 | +} else { |
|
| 153 | + print '9'; |
|
| 154 | +} |
|
| 155 | +?>; |
|
| 129 | 156 | } |
| 130 | 157 | |
| 131 | 158 | //create the map |
@@ -151,16 +178,27 @@ discard block |
||
| 151 | 178 | bounds = L.latLngBounds(southWest,northEast); |
| 152 | 179 | //a few title layers |
| 153 | 180 | <?php |
| 154 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
| 155 | - else $MapType = $globalMapProvider; |
|
| 181 | + if (isset($_COOKIE['MapType'])) { |
|
| 182 | + $MapType = $_COOKIE['MapType']; |
|
| 183 | + } else { |
|
| 184 | + $MapType = $globalMapProvider; |
|
| 185 | + } |
|
| 156 | 186 | |
| 157 | 187 | if ($MapType == 'Mapbox') { |
| 158 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 159 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 160 | -?> |
|
| 188 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 189 | + $MapBoxId = $globalMapboxId; |
|
| 190 | + } else { |
|
| 191 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 192 | + } |
|
| 193 | + ?> |
|
| 161 | 194 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 162 | 195 | maxZoom: 18, |
| 163 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 196 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 197 | + print 'false'; |
|
| 198 | +} else { |
|
| 199 | + print 'true'; |
|
| 200 | +} |
|
| 201 | +?>, |
|
| 164 | 202 | attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>', |
| 165 | 203 | id: '<?php print $MapBoxId; ?>', |
| 166 | 204 | token: '<?php print $globalMapboxToken; ?>' |
@@ -179,7 +217,12 @@ discard block |
||
| 179 | 217 | ?> |
| 180 | 218 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 181 | 219 | maxZoom: 18, |
| 182 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 220 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 221 | + print 'false'; |
|
| 222 | +} else { |
|
| 223 | + print 'true'; |
|
| 224 | +} |
|
| 225 | +?>, |
|
| 183 | 226 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
| 184 | 227 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
| 185 | 228 | }).addTo(map); |
@@ -188,7 +231,12 @@ discard block |
||
| 188 | 231 | ?> |
| 189 | 232 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { |
| 190 | 233 | maxZoom: 18, |
| 191 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 234 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 235 | + print 'false'; |
|
| 236 | +} else { |
|
| 237 | + print 'true'; |
|
| 238 | +} |
|
| 239 | +?>, |
|
| 192 | 240 | attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' |
| 193 | 241 | }).addTo(map); |
| 194 | 242 | <?php |
@@ -196,7 +244,12 @@ discard block |
||
| 196 | 244 | ?> |
| 197 | 245 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', { |
| 198 | 246 | maxZoom: 18, |
| 199 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 247 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 248 | + print 'false'; |
|
| 249 | +} else { |
|
| 250 | + print 'true'; |
|
| 251 | +} |
|
| 252 | +?>, |
|
| 200 | 253 | attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' |
| 201 | 254 | }).addTo(map); |
| 202 | 255 | <?php |
@@ -204,7 +257,12 @@ discard block |
||
| 204 | 257 | ?> |
| 205 | 258 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', { |
| 206 | 259 | maxZoom: 18, |
| 207 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 260 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 261 | + print 'false'; |
|
| 262 | +} else { |
|
| 263 | + print 'true'; |
|
| 264 | +} |
|
| 265 | +?>, |
|
| 208 | 266 | attribution: 'Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC' |
| 209 | 267 | }).addTo(map); |
| 210 | 268 | <?php |
@@ -249,20 +307,26 @@ discard block |
||
| 249 | 307 | map.addLayer(yandexLayer); |
| 250 | 308 | <?php |
| 251 | 309 | } elseif ($MapType == 'Bing-Aerial') { |
| 252 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 253 | -?> |
|
| 310 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 311 | + setcookie('MapType','OpenStreetMap'); |
|
| 312 | + } |
|
| 313 | + ?> |
|
| 254 | 314 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
| 255 | 315 | map.addLayer(bingLayer); |
| 256 | 316 | <?php |
| 257 | 317 | } elseif ($MapType == 'Bing-Hybrid') { |
| 258 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 259 | -?> |
|
| 318 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 319 | + setcookie('MapType','OpenStreetMap'); |
|
| 320 | + } |
|
| 321 | + ?> |
|
| 260 | 322 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
| 261 | 323 | map.addLayer(bingLayer); |
| 262 | 324 | <?php |
| 263 | 325 | } elseif ($MapType == 'Bing-Road') { |
| 264 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 265 | -?> |
|
| 326 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 327 | + setcookie('MapType','OpenStreetMap'); |
|
| 328 | + } |
|
| 329 | + ?> |
|
| 266 | 330 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
| 267 | 331 | map.addLayer(bingLayer); |
| 268 | 332 | <?php |
@@ -291,7 +355,12 @@ discard block |
||
| 291 | 355 | maxZoom: 5, |
| 292 | 356 | tms : true, |
| 293 | 357 | zindex : 3, |
| 294 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 358 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 359 | + print 'false'; |
|
| 360 | +} else { |
|
| 361 | + print 'true'; |
|
| 362 | +} |
|
| 363 | +?>, |
|
| 295 | 364 | attribution: 'Natural Earth' |
| 296 | 365 | }).addTo(map); |
| 297 | 366 | <?php |
@@ -299,9 +368,24 @@ discard block |
||
| 299 | 368 | $customid = $MapType; |
| 300 | 369 | ?> |
| 301 | 370 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
| 302 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
| 303 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 304 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 371 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 372 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 373 | +} else { |
|
| 374 | + print '18'; |
|
| 375 | +} |
|
| 376 | +?>, |
|
| 377 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 378 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 379 | +} else { |
|
| 380 | + print '0'; |
|
| 381 | +} |
|
| 382 | +?>, |
|
| 383 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 384 | + print 'false'; |
|
| 385 | +} else { |
|
| 386 | + print 'true'; |
|
| 387 | +} |
|
| 388 | +?>, |
|
| 305 | 389 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 306 | 390 | }).addTo(map); |
| 307 | 391 | |
@@ -341,7 +425,12 @@ discard block |
||
| 341 | 425 | } |
| 342 | 426 | } elseif ($globalBounding == 'circle') { |
| 343 | 427 | ?> |
| 344 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
| 428 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
| 429 | + print $globalBoundingCircleSize; |
|
| 430 | +} else { |
|
| 431 | + print '70000'; |
|
| 432 | +} |
|
| 433 | +?>,{ |
|
| 345 | 434 | color: '#92C7D1', |
| 346 | 435 | fillColor: '#92C7D1', |
| 347 | 436 | fillOpacity: 0.3, |
@@ -431,7 +520,12 @@ discard block |
||
| 431 | 520 | }); |
| 432 | 521 | if (archive === false) { |
| 433 | 522 | update_locationsLayer(); |
| 434 | - setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 523 | + setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) { |
|
| 524 | + print $globalMapRefresh*1000*2; |
|
| 525 | +} else { |
|
| 526 | + print '60000'; |
|
| 527 | +} |
|
| 528 | +?>); |
|
| 435 | 529 | } |
| 436 | 530 | <?php |
| 437 | 531 | // Add support for custom json via $globalMapJson |
@@ -50,30 +50,30 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | function quaternionrotate($heading, $attitude = 0, $bank = 0) { |
| 53 | - // Assuming the angles are in radians. |
|
| 54 | - $c1 = cos($heading/2); |
|
| 55 | - $s1 = sin($heading/2); |
|
| 56 | - $c2 = cos($attitude/2); |
|
| 57 | - $s2 = sin($attitude/2); |
|
| 58 | - $c3 = cos($bank/2); |
|
| 59 | - $s3 = sin($bank/2); |
|
| 60 | - $c1c2 = $c1*$c2; |
|
| 61 | - $s1s2 = $s1*$s2; |
|
| 62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
| 63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
| 64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
| 53 | + // Assuming the angles are in radians. |
|
| 54 | + $c1 = cos($heading/2); |
|
| 55 | + $s1 = sin($heading/2); |
|
| 56 | + $c2 = cos($attitude/2); |
|
| 57 | + $s2 = sin($attitude/2); |
|
| 58 | + $c3 = cos($bank/2); |
|
| 59 | + $s3 = sin($bank/2); |
|
| 60 | + $c1c2 = $c1*$c2; |
|
| 61 | + $s1s2 = $s1*$s2; |
|
| 62 | + $w =$c1c2*$c3 - $s1s2*$s3; |
|
| 63 | + $x =$c1c2*$s3 + $s1s2*$c3; |
|
| 64 | + $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 65 | + $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 66 | + return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
| 67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
| 68 | 68 | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | |
| 72 | 72 | if (isset($_GET['download'])) { |
| 73 | - if ($_GET['download'] == "true") |
|
| 74 | - { |
|
| 73 | + if ($_GET['download'] == "true") |
|
| 74 | + { |
|
| 75 | 75 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
| 76 | - } |
|
| 76 | + } |
|
| 77 | 77 | } |
| 78 | 78 | header('Content-Type: text/javascript'); |
| 79 | 79 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 173 | 173 | $coord = explode(',',$_GET['coord']); |
| 174 | 174 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
| 175 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 175 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 176 | 176 | $coord = array(); |
| 177 | 177 | } |
| 178 | 178 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 183 | 183 | $coord = explode(',',$_GET['coord']); |
| 184 | 184 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
| 185 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 185 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 186 | 186 | $coord = array(); |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
| 193 | 193 | $coord = explode(',',$_GET['coord']); |
| 194 | 194 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
| 195 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 195 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
| 196 | 196 | $coord = array(); |
| 197 | 197 | } |
| 198 | 198 | } |
@@ -301,10 +301,10 @@ discard block |
||
| 301 | 301 | $image = "images/placeholder_thumb.png"; |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
| 305 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
| 306 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
| 307 | - if ($prev_flightaware_id != $id) { |
|
| 304 | + if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
| 305 | + elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
| 306 | + elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
| 307 | + if ($prev_flightaware_id != $id) { |
|
| 308 | 308 | if ($prev_flightaware_id != '') { |
| 309 | 309 | /* |
| 310 | 310 | if ($nblatlong == 1) { |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
| 385 | 385 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
| 386 | 386 | } else $aircraft_shadow = ''; |
| 387 | - $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
| 387 | + $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
| 388 | 388 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
| 389 | 389 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
| 390 | 390 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
| 416 | 416 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
| 417 | 417 | } |
| 418 | - $output .= '},'; |
|
| 418 | + $output .= '},'; |
|
| 419 | 419 | } elseif (isset($modelsdb[$aircraft_icao]) && $aircraft_icao != '') { |
| 420 | 420 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_icao].'","scale" : '.$scale.',"minimumPixelSize": '.$minimumpixelsize.''; |
| 421 | 421 | $output .= ',"heightReference": "'.$heightrelative.'"'; |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
| 424 | 424 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
| 425 | 425 | } |
| 426 | - $output .= '},'; |
|
| 426 | + $output .= '},'; |
|
| 427 | 427 | } elseif ($aircraft_icao != '') { |
| 428 | 428 | $aircraft_info = $Spotter->getAllAircraftInfo($aircraft_icao); |
| 429 | 429 | if (isset($aircraft_info[0]['engine_type'])) { |
@@ -19,8 +19,12 @@ discard block |
||
| 19 | 19 | } |
| 20 | 20 | $tracker = false; |
| 21 | 21 | $marine = false; |
| 22 | -if (isset($_GET['tracker'])) $tracker = true; |
|
| 23 | -if (isset($_GET['marine'])) $marine = true; |
|
| 22 | +if (isset($_GET['tracker'])) { |
|
| 23 | + $tracker = true; |
|
| 24 | +} |
|
| 25 | +if (isset($_GET['marine'])) { |
|
| 26 | + $marine = true; |
|
| 27 | +} |
|
| 24 | 28 | if ($tracker) { |
| 25 | 29 | require_once('require/class.Tracker.php'); |
| 26 | 30 | require_once('require/class.TrackerLive.php'); |
@@ -77,24 +81,49 @@ discard block |
||
| 77 | 81 | } |
| 78 | 82 | header('Content-Type: text/javascript'); |
| 79 | 83 | |
| 80 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 81 | -else $compress = $globalJsonCompress; |
|
| 84 | +if (!isset($globalJsonCompress)) { |
|
| 85 | + $compress = true; |
|
| 86 | +} else { |
|
| 87 | + $compress = $globalJsonCompress; |
|
| 88 | +} |
|
| 82 | 89 | |
| 83 | 90 | $from_archive = false; |
| 84 | 91 | $min = false; |
| 85 | 92 | $allhistory = false; |
| 86 | 93 | $filter['source'] = array(); |
| 87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 94 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
| 95 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 96 | +} |
|
| 97 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
| 98 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 99 | +} |
|
| 100 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
| 101 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 102 | +} |
|
| 103 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
| 104 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 105 | +} |
|
| 106 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
| 107 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 108 | +} |
|
| 109 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
| 110 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 111 | +} |
|
| 112 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
| 113 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 114 | +} |
|
| 115 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
| 116 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 117 | +} |
|
| 118 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
| 119 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 120 | +} |
|
| 121 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
| 122 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 123 | +} |
|
| 124 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
| 125 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 126 | +} |
|
| 98 | 127 | /* |
| 99 | 128 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 100 | 129 | $min = true; |
@@ -268,8 +297,12 @@ discard block |
||
| 268 | 297 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 269 | 298 | } |
| 270 | 299 | } |
| 271 | - if ($flightcnt == '') $flightcnt = 0; |
|
| 272 | -} else $flightcnt = 0; |
|
| 300 | + if ($flightcnt == '') { |
|
| 301 | + $flightcnt = 0; |
|
| 302 | + } |
|
| 303 | + } else { |
|
| 304 | + $flightcnt = 0; |
|
| 305 | +} |
|
| 273 | 306 | |
| 274 | 307 | $sqltime = round(microtime(true)-$begintime,2); |
| 275 | 308 | $minitime = time(); |
@@ -315,7 +348,9 @@ discard block |
||
| 315 | 348 | $gltf2 = false; |
| 316 | 349 | $scale = 1.0; |
| 317 | 350 | $minimumpixelsize = 20; |
| 318 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
| 351 | +if (isset($archivespeed)) { |
|
| 352 | + $speed = $archivespeed; |
|
| 353 | +} |
|
| 319 | 354 | $output = '['; |
| 320 | 355 | if ($tracker) { |
| 321 | 356 | $output .= '{"id" : "document", "name" : "tracker","version" : "1.0"'; |
@@ -351,9 +386,13 @@ discard block |
||
| 351 | 386 | $image = "images/placeholder_thumb.png"; |
| 352 | 387 | } |
| 353 | 388 | |
| 354 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
| 355 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
| 356 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
| 389 | + if (isset($spotter_item['flightaware_id'])) { |
|
| 390 | + $id = $spotter_item['flightaware_id']; |
|
| 391 | + } elseif (isset($spotter_item['famtrackid'])) { |
|
| 392 | + $id = $spotter_item['famtrackid']; |
|
| 393 | + } elseif (isset($spotter_item['fammarine_id'])) { |
|
| 394 | + $id = $spotter_item['fammarine_id']; |
|
| 395 | + } |
|
| 357 | 396 | if ($prev_flightaware_id != $id) { |
| 358 | 397 | if ($prev_flightaware_id != '') { |
| 359 | 398 | /* |
@@ -391,14 +430,24 @@ discard block |
||
| 391 | 430 | if (isset($spotter_item['squawk'])) { |
| 392 | 431 | $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
| 393 | 432 | } |
| 394 | - if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 395 | - if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
| 396 | - if (isset($spotter_item['ident'])) $output.= '"ident": "'.$spotter_item['ident'].'",'; |
|
| 433 | + if (isset($spotter_item['registration'])) { |
|
| 434 | + $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 435 | + } |
|
| 436 | + if (isset($spotter_item['format_source'])) { |
|
| 437 | + $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
| 438 | + } |
|
| 439 | + if (isset($spotter_item['ident'])) { |
|
| 440 | + $output.= '"ident": "'.$spotter_item['ident'].'",'; |
|
| 441 | + } |
|
| 397 | 442 | if ($tracker) { |
| 398 | - if (isset($spotter_item['type'])) $output .= '"tracker_type": "'.$spotter_item['type'].'",'; |
|
| 443 | + if (isset($spotter_item['type'])) { |
|
| 444 | + $output .= '"tracker_type": "'.$spotter_item['type'].'",'; |
|
| 445 | + } |
|
| 399 | 446 | $output.= '"type": "tracker"'; |
| 400 | 447 | } elseif ($marine) { |
| 401 | - if (isset($spotter_item['type'])) $output .= '"marine_type": "'.$spotter_item['type'].'",'; |
|
| 448 | + if (isset($spotter_item['type'])) { |
|
| 449 | + $output .= '"marine_type": "'.$spotter_item['type'].'",'; |
|
| 450 | + } |
|
| 402 | 451 | $output.= '"type": "marine"'; |
| 403 | 452 | } else { |
| 404 | 453 | if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
@@ -449,7 +498,9 @@ discard block |
||
| 449 | 498 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
| 450 | 499 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
| 451 | 500 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
| 452 | - } else $aircraft_shadow = ''; |
|
| 501 | + } else { |
|
| 502 | + $aircraft_shadow = ''; |
|
| 503 | + } |
|
| 453 | 504 | $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
| 454 | 505 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
| 455 | 506 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
@@ -457,7 +508,9 @@ discard block |
||
| 457 | 508 | } |
| 458 | 509 | $output .= '},'; |
| 459 | 510 | } |
| 460 | - } else $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA7VJREFUeNrEl2uIlWUQx39nXUu0m2uQbZYrbabdLKMs/VBkmHQjioqFIhBS+hKEQpQRgVAf2u5RQkGBRUllRH4I2e5ZUBJlEZVt5i0tTfHStrZ6fn35L70d9n7Obg88vOedmWfmf2bmmZkXlRrtq9V16mZ1iVqqhd5agXvQf1c5zw/V8dXqrqO6dQKwBrgdWApsCb0VqAc2AnOrMVANwIsD4BLgTOBPYB2wHJgEzAG+ANqAu4ZsZYiuX5QwfqI2hvaNulA9J7zLQn8o76vUuuHOwXHqSzH4aIF+TWjnBkSH+nCBf716SP1KPWO4AJ6ltgfIjRW8p9U/1KPz/ry6RT2mIDNF3Zjz19Ya4G1R/J16dgWvQd2pPlXhMdVZPUTgxfCW1wJgXUJpQlvfg8zs8K8r0Caom9QHetG7NGfa1ElDBThRXRtFd/Qh16puKIS3e7+clBjdy7kL1b3q4fzJQQGck5z6Nb97kxujblWf64HXov7Vl/E4YXWccP9AAd6dAx+ox/WTArNzY1t64B0f8K0DyLXuUvRGZfcpCo1VX4tg6wB76WMB0dALf526foAX8cqUot2pGP8B2Kz+krBeNYjS8636dh/8Beo2deoA9TWp76pd6g0q9cDNwKvAD8A84EfglLRBe2g+JWAfcEF68bPABOCoAl/gIPA5MA64FVgGnNhP292W3r0SeB1YVlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
| 511 | + } else { |
|
| 512 | + $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA7VJREFUeNrEl2uIlWUQx39nXUu0m2uQbZYrbabdLKMs/VBkmHQjioqFIhBS+hKEQpQRgVAf2u5RQkGBRUllRH4I2e5ZUBJlEZVt5i0tTfHStrZ6fn35L70d9n7Obg88vOedmWfmf2bmmZkXlRrtq9V16mZ1iVqqhd5agXvQf1c5zw/V8dXqrqO6dQKwBrgdWApsCb0VqAc2AnOrMVANwIsD4BLgTOBPYB2wHJgEzAG+ANqAu4ZsZYiuX5QwfqI2hvaNulA9J7zLQn8o76vUuuHOwXHqSzH4aIF+TWjnBkSH+nCBf716SP1KPWO4AJ6ltgfIjRW8p9U/1KPz/ry6RT2mIDNF3Zjz19Ya4G1R/J16dgWvQd2pPlXhMdVZPUTgxfCW1wJgXUJpQlvfg8zs8K8r0Caom9QHetG7NGfa1ElDBThRXRtFd/Qh16puKIS3e7+clBjdy7kL1b3q4fzJQQGck5z6Nb97kxujblWf64HXov7Vl/E4YXWccP9AAd6dAx+ox/WTArNzY1t64B0f8K0DyLXuUvRGZfcpCo1VX4tg6wB76WMB0dALf526foAX8cqUot2pGP8B2Kz+krBeNYjS8636dh/8Beo2deoA9TWp76pd6g0q9cDNwKvAD8A84EfglLRBe2g+JWAfcEF68bPABOCoAl/gIPA5MA64FVgGnNhP292W3r0SeB1YVlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
| 513 | + } |
|
| 461 | 514 | } elseif ($one3dmodel) { |
| 462 | 515 | if (isset($globalMap3DForceModel) && $globalMap3DForceModel != '') { |
| 463 | 516 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$globalMap3DForceModel.'","scale" : '.$scale.',"minimumPixelSize": '.$minimumpixelsize.''; |
@@ -497,7 +550,9 @@ discard block |
||
| 497 | 550 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
| 498 | 551 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
| 499 | 552 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
| 500 | - } else $aircraft_shadow = ''; |
|
| 553 | + } else { |
|
| 554 | + $aircraft_shadow = ''; |
|
| 555 | + } |
|
| 501 | 556 | if ($aircraft_shadow != '') { |
| 502 | 557 | if (isset($modelsdb2[$aircraft_shadow])) { |
| 503 | 558 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/gltf2/'.$modelsdb2[$aircraft_shadow]['glb'].'","scale" : '.$scale.',"minimumPixelSize": '.$modelsdb2[$aircraft_shadow]['size']; |
@@ -652,7 +707,9 @@ discard block |
||
| 652 | 707 | } |
| 653 | 708 | $output .= '},'; |
| 654 | 709 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
| 655 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 710 | + if ($spotter_item['aircraft_icao'] != '') { |
|
| 711 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 712 | + } |
|
| 656 | 713 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
| 657 | 714 | } |
| 658 | 715 | } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
@@ -674,7 +731,9 @@ discard block |
||
| 674 | 731 | } |
| 675 | 732 | $output .= '},'; |
| 676 | 733 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
| 677 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 734 | + if ($spotter_item['aircraft_icao'] != '') { |
|
| 735 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 736 | + } |
|
| 678 | 737 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
| 679 | 738 | } |
| 680 | 739 | } else { |
@@ -687,7 +746,9 @@ discard block |
||
| 687 | 746 | } |
| 688 | 747 | $output .= '},'; |
| 689 | 748 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
| 690 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 749 | + if ($spotter_item['aircraft_icao'] != '') { |
|
| 750 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
| 751 | + } |
|
| 691 | 752 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
| 692 | 753 | } |
| 693 | 754 | } elseif ($tracker && isset($spotter_item['type'])) { |
@@ -791,8 +852,11 @@ discard block |
||
| 791 | 852 | $output .= '},'; |
| 792 | 853 | } |
| 793 | 854 | } |
| 794 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
| 795 | - else $output = str_replace('%onground%','false',$output); |
|
| 855 | + if (isset($onground) && $onground) { |
|
| 856 | + $output = str_replace('%onground%','true',$output); |
|
| 857 | + } else { |
|
| 858 | + $output = str_replace('%onground%','false',$output); |
|
| 859 | + } |
|
| 796 | 860 | |
| 797 | 861 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
| 798 | 862 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -805,9 +869,15 @@ discard block |
||
| 805 | 869 | // $output .= '"interpolationDegree" : 5,'; |
| 806 | 870 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
| 807 | 871 | $output .= '"cartographicDegrees": ['; |
| 808 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
| 809 | - if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
|
| 810 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
| 872 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
| 873 | + $minitime = strtotime($spotter_item['date']); |
|
| 874 | + } |
|
| 875 | + if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) { |
|
| 876 | + $minitracktime = strtotime($spotter_item['date']); |
|
| 877 | + } |
|
| 878 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
| 879 | + $maxitime = strtotime($spotter_item['date']); |
|
| 880 | + } |
|
| 811 | 881 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
| 812 | 882 | $output .= $spotter_item['longitude'].', '; |
| 813 | 883 | $output .= $spotter_item['latitude']; |
@@ -830,7 +900,9 @@ discard block |
||
| 830 | 900 | $output .= ', '.round($spotter_item['altitude']*30.48); |
| 831 | 901 | $prevalt = round($spotter_item['altitude']*30.48); |
| 832 | 902 | } |
| 833 | - } else $output .= ', 0'; |
|
| 903 | + } else { |
|
| 904 | + $output .= ', 0'; |
|
| 905 | + } |
|
| 834 | 906 | //$orientation = '"orientation" : { '; |
| 835 | 907 | //$orientation .= '"unitQuaternion": ['; |
| 836 | 908 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
@@ -838,13 +910,18 @@ discard block |
||
| 838 | 910 | } else { |
| 839 | 911 | $nblatlong = $nblatlong+1; |
| 840 | 912 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
| 841 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
| 913 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
| 914 | + $maxitime = strtotime($spotter_item['date']); |
|
| 915 | + } |
|
| 842 | 916 | if ($spotter_item['ground_speed'] == 0) { |
| 843 | 917 | $output .= $prevlong.', '; |
| 844 | 918 | $output .= $prevlat; |
| 845 | 919 | //if (!$marine && (!isset($onground) || !$onground)) $output .= ', '.$prevalt; |
| 846 | - if (!$marine) $output .= ', '.$prevalt; |
|
| 847 | - else $output .= ', 0'; |
|
| 920 | + if (!$marine) { |
|
| 921 | + $output .= ', '.$prevalt; |
|
| 922 | + } else { |
|
| 923 | + $output .= ', 0'; |
|
| 924 | + } |
|
| 848 | 925 | } else { |
| 849 | 926 | $output .= $spotter_item['longitude'].', '; |
| 850 | 927 | $output .= $spotter_item['latitude']; |
@@ -857,14 +934,17 @@ discard block |
||
| 857 | 934 | $output .= ', 0'; |
| 858 | 935 | } |
| 859 | 936 | } else { |
| 860 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
| 861 | - elseif ($tracker) { |
|
| 937 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
| 938 | + $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
| 939 | + } elseif ($tracker) { |
|
| 862 | 940 | $output .= ', '.round($spotter_item['altitude']*0.3048); |
| 863 | 941 | } else { |
| 864 | 942 | $output .= ', '.round($spotter_item['altitude']*30.48); |
| 865 | 943 | } |
| 866 | 944 | } |
| 867 | - } else $output .= ', 0'; |
|
| 945 | + } else { |
|
| 946 | + $output .= ', 0'; |
|
| 947 | + } |
|
| 868 | 948 | } |
| 869 | 949 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
| 870 | 950 | //$orientation .= ',"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
@@ -885,9 +965,10 @@ discard block |
||
| 885 | 965 | } else { |
| 886 | 966 | $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
| 887 | 967 | } |
| 968 | + } else { |
|
| 969 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 888 | 970 | } |
| 889 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 890 | -} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
| 971 | + } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
| 891 | 972 | $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
| 892 | 973 | } else { |
| 893 | 974 | $output = str_replace('%minitime%',date("c",$minitime),$output); |
@@ -897,7 +978,10 @@ discard block |
||
| 897 | 978 | } else { |
| 898 | 979 | $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
| 899 | 980 | } |
| 900 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
| 901 | -else $output = str_replace('%gltf2%','false',$output); |
|
| 981 | +if ($gltf2) { |
|
| 982 | + $output = str_replace('%gltf2%','true',$output); |
|
| 983 | +} else { |
|
| 984 | + $output = str_replace('%gltf2%','false',$output); |
|
| 985 | +} |
|
| 902 | 986 | print $output; |
| 903 | 987 | ?> |
@@ -59,11 +59,11 @@ discard block |
||
| 59 | 59 | $s3 = sin($bank/2); |
| 60 | 60 | $c1c2 = $c1*$c2; |
| 61 | 61 | $s1s2 = $s1*$s2; |
| 62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
| 63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
| 64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
| 62 | + $w = $c1c2*$c3 - $s1s2*$s3; |
|
| 63 | + $x = $c1c2*$s3 + $s1s2*$c3; |
|
| 64 | + $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 65 | + $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 66 | + return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
| 67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
| 68 | 68 | |
| 69 | 69 | } |
@@ -84,17 +84,17 @@ discard block |
||
| 84 | 84 | $min = false; |
| 85 | 85 | $allhistory = false; |
| 86 | 86 | $filter['source'] = array(); |
| 87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 87 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 88 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 89 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 90 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
| 91 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 92 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
| 93 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
| 94 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
| 95 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
| 96 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
| 97 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
| 98 | 98 | /* |
| 99 | 99 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 100 | 100 | $min = true; |
@@ -141,17 +141,17 @@ discard block |
||
| 141 | 141 | $from_archive = true; |
| 142 | 142 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 143 | 143 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 144 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 145 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 146 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 147 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 148 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 144 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 145 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 146 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 147 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 148 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 149 | 149 | if ($tracker) { |
| 150 | - $spotter_array = $TrackerArchive->getMinLiveTrackerDataPlayback($begindate,$enddate,$filter); |
|
| 150 | + $spotter_array = $TrackerArchive->getMinLiveTrackerDataPlayback($begindate, $enddate, $filter); |
|
| 151 | 151 | } elseif ($marine) { |
| 152 | - $spotter_array = $MarineArchive->getMinLiveMarineDataPlayback($begindate,$enddate,$filter); |
|
| 152 | + $spotter_array = $MarineArchive->getMinLiveMarineDataPlayback($begindate, $enddate, $filter); |
|
| 153 | 153 | } else { |
| 154 | - $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
| 154 | + $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
| 155 | 155 | } |
| 156 | 156 | } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
| 157 | 157 | $from_archive = true; |
@@ -168,36 +168,36 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | $enddate = $_COOKIE['archive_end']; |
| 170 | 170 | $enddateinitial = $_COOKIE['archive_end']; |
| 171 | - $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
| 172 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 173 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 171 | + $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
| 172 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 173 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 174 | 174 | //echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
| 175 | 175 | if ($tracker) { |
| 176 | - $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate,$enddate,$filter); |
|
| 176 | + $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate, $enddate, $filter); |
|
| 177 | 177 | } elseif ($marine) { |
| 178 | - $spotter_array = $MarineArchive->getMinLiveMarineData($begindate,$enddate,$filter); |
|
| 178 | + $spotter_array = $MarineArchive->getMinLiveMarineData($begindate, $enddate, $filter); |
|
| 179 | 179 | } else { |
| 180 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
| 180 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
| 181 | 181 | } |
| 182 | 182 | } elseif ($tracker) { |
| 183 | 183 | $coord = array(); |
| 184 | 184 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 185 | - $coord = explode(',',$_GET['coord']); |
|
| 186 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 185 | + $coord = explode(',', $_GET['coord']); |
|
| 186 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 187 | 187 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 188 | 188 | $coord = array(); |
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | $previous_filter = $filter; |
| 192 | 192 | if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrackTracker']) && $_COOKIE['MapTrackTracker'] != '')) { |
| 193 | - $filter = array_merge($filter,array('id' => $_COOKIE['MapTrackTracker'])); |
|
| 194 | - $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
| 193 | + $filter = array_merge($filter, array('id' => $_COOKIE['MapTrackTracker'])); |
|
| 194 | + $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
| 195 | 195 | /* |
| 196 | 196 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
| 197 | 197 | $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true,$_COOKIE['MapTrack']); |
| 198 | 198 | */ |
| 199 | 199 | } elseif (!isset($_COOKIE['singlemodel']) || $_COOKIE['singlemodel'] == 'false') { |
| 200 | - $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
| 200 | + $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
| 201 | 201 | } else { |
| 202 | 202 | $spotter_array = array(); |
| 203 | 203 | } |
@@ -205,22 +205,22 @@ discard block |
||
| 205 | 205 | } elseif ($marine) { |
| 206 | 206 | $coord = array(); |
| 207 | 207 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 208 | - $coord = explode(',',$_GET['coord']); |
|
| 209 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 208 | + $coord = explode(',', $_GET['coord']); |
|
| 209 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 210 | 210 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 211 | 211 | $coord = array(); |
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | $previous_filter = $filter; |
| 215 | 215 | if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrackMarine']) && $_COOKIE['MapTrackMarine'] != '')) { |
| 216 | - $filter = array_merge($filter,array('id' => $_COOKIE['MapTrackMarine'])); |
|
| 217 | - $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
| 216 | + $filter = array_merge($filter, array('id' => $_COOKIE['MapTrackMarine'])); |
|
| 217 | + $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
| 218 | 218 | /* |
| 219 | 219 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
| 220 | 220 | $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true,$_COOKIE['MapTrack']); |
| 221 | 221 | */ |
| 222 | 222 | } elseif (!isset($_COOKIE['singlemodel']) || $_COOKIE['singlemodel'] == 'false') { |
| 223 | - $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
| 223 | + $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
| 224 | 224 | } else { |
| 225 | 225 | $spotter_array = array(); |
| 226 | 226 | } |
@@ -228,20 +228,20 @@ discard block |
||
| 228 | 228 | } else { |
| 229 | 229 | $coord = array(); |
| 230 | 230 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
| 231 | - $coord = explode(',',$_GET['coord']); |
|
| 232 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 231 | + $coord = explode(',', $_GET['coord']); |
|
| 232 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 233 | 233 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 234 | 234 | $coord = array(); |
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | $previous_filter = $filter; |
| 238 | 238 | if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) { |
| 239 | - $filter = array_merge($filter,array('id' => $_COOKIE['MapTrack'])); |
|
| 240 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
| 239 | + $filter = array_merge($filter, array('id' => $_COOKIE['MapTrack'])); |
|
| 240 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
| 241 | 241 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
| 242 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true,$_COOKIE['MapTrack']); |
|
| 242 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true, $_COOKIE['MapTrack']); |
|
| 243 | 243 | } elseif (!isset($_COOKIE['singlemodel']) || $_COOKIE['singlemodel'] == 'false') { |
| 244 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
| 244 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
| 245 | 245 | } else { |
| 246 | 246 | $spotter_array = array(); |
| 247 | 247 | } |
@@ -251,19 +251,19 @@ discard block |
||
| 251 | 251 | if (!empty($spotter_array) && isset($coord)) { |
| 252 | 252 | if ($tracker) { |
| 253 | 253 | if (isset($_GET['archive'])) { |
| 254 | - $flightcnt = $TrackerArchive->getLiveTrackerCount($begindate,$enddate,$filter); |
|
| 254 | + $flightcnt = $TrackerArchive->getLiveTrackerCount($begindate, $enddate, $filter); |
|
| 255 | 255 | } else { |
| 256 | 256 | $flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
| 257 | 257 | } |
| 258 | 258 | } elseif ($marine) { |
| 259 | 259 | if (isset($_GET['archive'])) { |
| 260 | - $flightcnt = $MarineArchive->getLiveMarineCount($begindate,$enddate,$filter); |
|
| 260 | + $flightcnt = $MarineArchive->getLiveMarineCount($begindate, $enddate, $filter); |
|
| 261 | 261 | } else { |
| 262 | 262 | $flightcnt = $MarineLive->getLiveMarineCount($filter); |
| 263 | 263 | } |
| 264 | 264 | } else { |
| 265 | 265 | if (isset($_GET['archive'])) { |
| 266 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
| 266 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
| 267 | 267 | } else { |
| 268 | 268 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 269 | 269 | } |
@@ -271,17 +271,17 @@ discard block |
||
| 271 | 271 | if ($flightcnt == '') $flightcnt = 0; |
| 272 | 272 | } else $flightcnt = 0; |
| 273 | 273 | |
| 274 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 274 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 275 | 275 | $minitime = time(); |
| 276 | 276 | $minitracktime_begin = time(); |
| 277 | 277 | $minitracktime = $minitracktime_begin; |
| 278 | 278 | $maxitime = 0; |
| 279 | -$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
| 279 | +$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
| 280 | 280 | $modelsdb = array(); |
| 281 | 281 | if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
| 282 | - if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
| 283 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
| 284 | - if (isset($row[1]) ){ |
|
| 282 | + if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
| 283 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
| 284 | + if (isset($row[1])) { |
|
| 285 | 285 | $model = $row[0]; |
| 286 | 286 | $modelsdb[$model] = $row[1]; |
| 287 | 287 | } |
@@ -291,9 +291,9 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | $modelsdb2 = array(); |
| 293 | 293 | if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
| 294 | - if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
| 295 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
| 296 | - if (isset($row[1]) ){ |
|
| 294 | + if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
| 295 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
| 296 | + if (isset($row[1])) { |
|
| 297 | 297 | $model = $row[0]; |
| 298 | 298 | $glb = $row[1]; |
| 299 | 299 | if (isset($row[2])) { |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | if (!empty($spotter_array) && is_array($spotter_array)) |
| 340 | 340 | { |
| 341 | 341 | $nblatlong = 0; |
| 342 | - foreach($spotter_array as $spotter_item) |
|
| 342 | + foreach ($spotter_array as $spotter_item) |
|
| 343 | 343 | { |
| 344 | 344 | $j++; |
| 345 | 345 | //if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
@@ -393,13 +393,13 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
| 395 | 395 | if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
| 396 | - if (isset($spotter_item['ident'])) $output.= '"ident": "'.$spotter_item['ident'].'",'; |
|
| 396 | + if (isset($spotter_item['ident'])) $output .= '"ident": "'.$spotter_item['ident'].'",'; |
|
| 397 | 397 | if ($tracker) { |
| 398 | 398 | if (isset($spotter_item['type'])) $output .= '"tracker_type": "'.$spotter_item['type'].'",'; |
| 399 | - $output.= '"type": "tracker"'; |
|
| 399 | + $output .= '"type": "tracker"'; |
|
| 400 | 400 | } elseif ($marine) { |
| 401 | 401 | if (isset($spotter_item['type'])) $output .= '"marine_type": "'.$spotter_item['type'].'",'; |
| 402 | - $output.= '"type": "marine"'; |
|
| 402 | + $output .= '"type": "marine"'; |
|
| 403 | 403 | } else { |
| 404 | 404 | if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
| 405 | 405 | $aircraft_icao = $spotter_item['aircraft_icao']; |
@@ -413,14 +413,14 @@ discard block |
||
| 413 | 413 | if (isset($airline_icao)) { |
| 414 | 414 | $imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
| 415 | 415 | if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
| 416 | - $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
| 416 | + $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
| 417 | 417 | } |
| 418 | 418 | } |
| 419 | 419 | } |
| 420 | 420 | //if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
| 421 | 421 | } |
| 422 | - $output.= '"gltf2": %gltf2%,'; |
|
| 423 | - $output.= '"type": "flight"'; |
|
| 422 | + $output .= '"gltf2": %gltf2%,'; |
|
| 423 | + $output .= '"type": "flight"'; |
|
| 424 | 424 | } |
| 425 | 425 | $output .= '},'; |
| 426 | 426 | |
@@ -791,8 +791,8 @@ discard block |
||
| 791 | 791 | $output .= '},'; |
| 792 | 792 | } |
| 793 | 793 | } |
| 794 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
| 795 | - else $output = str_replace('%onground%','false',$output); |
|
| 794 | + if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
| 795 | + else $output = str_replace('%onground%', 'false', $output); |
|
| 796 | 796 | |
| 797 | 797 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
| 798 | 798 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -808,7 +808,7 @@ discard block |
||
| 808 | 808 | if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
| 809 | 809 | if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
| 810 | 810 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
| 811 | - $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
| 811 | + $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
| 812 | 812 | $output .= $spotter_item['longitude'].', '; |
| 813 | 813 | $output .= $spotter_item['latitude']; |
| 814 | 814 | $prevlong = $spotter_item['longitude']; |
@@ -836,8 +836,8 @@ discard block |
||
| 836 | 836 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
| 837 | 837 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
| 838 | 838 | } else { |
| 839 | - $nblatlong = $nblatlong+1; |
|
| 840 | - $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
| 839 | + $nblatlong = $nblatlong + 1; |
|
| 840 | + $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
| 841 | 841 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
| 842 | 842 | if ($spotter_item['ground_speed'] == 0) { |
| 843 | 843 | $output .= $prevlong.', '; |
@@ -878,26 +878,26 @@ discard block |
||
| 878 | 878 | $output .= ']'; |
| 879 | 879 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 880 | 880 | if (isset($begindateinitial)) { |
| 881 | - $output = str_replace('%minitime%',date("c",$begindateinitial),$output); |
|
| 882 | - } elseif ((time()-$globalLiveInterval) > $minitime) { |
|
| 883 | - if (time()-$globalLiveInterval > $maxitime) { |
|
| 884 | - $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
| 881 | + $output = str_replace('%minitime%', date("c", $begindateinitial), $output); |
|
| 882 | + } elseif ((time() - $globalLiveInterval) > $minitime) { |
|
| 883 | + if (time() - $globalLiveInterval > $maxitime) { |
|
| 884 | + $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
| 885 | 885 | } else { |
| 886 | - $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
| 886 | + $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
| 887 | 887 | } |
| 888 | 888 | } |
| 889 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 889 | + else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
| 890 | 890 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
| 891 | - $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
|
| 891 | + $output = str_replace('%minitime%', date("c", $minitracktime), $output); |
|
| 892 | 892 | } else { |
| 893 | - $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 893 | + $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
| 894 | 894 | } |
| 895 | 895 | if (isset($enddateinitial)) { |
| 896 | - $output = str_replace('%maxitime%',date("c",$enddateinitial),$output); |
|
| 896 | + $output = str_replace('%maxitime%', date("c", $enddateinitial), $output); |
|
| 897 | 897 | } else { |
| 898 | - $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
| 898 | + $output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
| 899 | 899 | } |
| 900 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
| 901 | -else $output = str_replace('%gltf2%','false',$output); |
|
| 900 | +if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
| 901 | +else $output = str_replace('%gltf2%', 'false', $output); |
|
| 902 | 902 | print $output; |
| 903 | 903 | ?> |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | // This script can be slow... |
| 3 | 3 | set_time_limit(0); |
| 4 | -ini_set('max_execution_time',6000); |
|
| 4 | +ini_set('max_execution_time', 6000); |
|
| 5 | 5 | require_once('require/class.Connection.php'); |
| 6 | 6 | require_once('require/class.Common.php'); |
| 7 | 7 | |
@@ -63,24 +63,24 @@ discard block |
||
| 63 | 63 | $min = false; |
| 64 | 64 | $allhistory = false; |
| 65 | 65 | $filter['source'] = array(); |
| 66 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 67 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 68 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 69 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 70 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 71 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 72 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 73 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 74 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 75 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 76 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 66 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 67 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 68 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 69 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
| 70 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 71 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
| 72 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
| 73 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
| 74 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
| 75 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
| 76 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
| 77 | 77 | |
| 78 | 78 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 79 | 79 | $min = true; |
| 80 | 80 | } else $min = false; |
| 81 | 81 | |
| 82 | 82 | if (isset($_GET['ident'])) { |
| 83 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 83 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 84 | 84 | $from_archive = true; |
| 85 | 85 | if ($tracker) { |
| 86 | 86 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataByIdent($ident); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $allhistory = true; |
| 95 | 95 | } |
| 96 | 96 | elseif (isset($_GET['flightaware_id'])) { |
| 97 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 97 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 98 | 98 | $from_archive = true; |
| 99 | 99 | if ($tracker) { |
| 100 | 100 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataById($flightaware_id); |
@@ -109,26 +109,26 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed'])) { |
| 111 | 111 | $from_archive = true; |
| 112 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 112 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 113 | 113 | if (isset($globalAircraftMaxUpdate)) $begindate = $begindate - $globalAircraftMaxUpdate; |
| 114 | 114 | else $begindate = $begindate - 3000; |
| 115 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 116 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 117 | - $part = filter_input(INPUT_GET,'part',FILTER_SANITIZE_NUMBER_INT); |
|
| 115 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 116 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 117 | + $part = filter_input(INPUT_GET, 'part', FILTER_SANITIZE_NUMBER_INT); |
|
| 118 | 118 | if ($part == '') $part = 0; |
| 119 | 119 | |
| 120 | 120 | if ($begindate != '' && $enddate != '') { |
| 121 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 122 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 121 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 122 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 123 | 123 | //$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
| 124 | 124 | if ($tracker) { |
| 125 | - $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate,$enddate,$filter); |
|
| 125 | + $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate, $enddate, $filter); |
|
| 126 | 126 | } |
| 127 | 127 | elseif ($marine) { |
| 128 | - $spotter_array = $MarineArchive->getMinLiveMarineData($begindate,$enddate,$filter); |
|
| 128 | + $spotter_array = $MarineArchive->getMinLiveMarineData($begindate, $enddate, $filter); |
|
| 129 | 129 | } |
| 130 | 130 | else { |
| 131 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter,$part); |
|
| 131 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter, $part); |
|
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | if ($flightcnt == '') $flightcnt = 0; |
| 140 | 140 | } else $flightcnt = 0; |
| 141 | 141 | |
| 142 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 142 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 143 | 143 | |
| 144 | 144 | $pfi = ''; |
| 145 | 145 | //var_dump($spotter_array); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $begin = true; |
| 155 | 155 | if (!empty($spotter_array) && is_array($spotter_array)) { |
| 156 | 156 | $output .= '"features": ['; |
| 157 | - foreach($spotter_array as $spotter_item) { |
|
| 157 | + foreach ($spotter_array as $spotter_item) { |
|
| 158 | 158 | $j++; |
| 159 | 159 | date_default_timezone_set('UTC'); |
| 160 | 160 | if ($tracker) { |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | if ($begin) { |
| 179 | 179 | if ($j > 1) { |
| 180 | 180 | if (isset($output_time)) { |
| 181 | - $output_time = substr($output_time, 0, -1); |
|
| 181 | + $output_time = substr($output_time, 0, -1); |
|
| 182 | 182 | $output .= '"time": ['.$output_time.']'; |
| 183 | 183 | } |
| 184 | 184 | $output .= '},'; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $output .= '"type": "LineString",'; |
| 188 | 188 | $output .= '"coordinates": ['; |
| 189 | 189 | if (isset($output_history)) { |
| 190 | - $output_history = substr($output_history, 0, -1); |
|
| 190 | + $output_history = substr($output_history, 0, -1); |
|
| 191 | 191 | $output .= $output_history; |
| 192 | 192 | } |
| 193 | 193 | $output .= ']}},'; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $output .= '"fi": "'.$pfi.'",'; |
| 219 | 219 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
| 220 | 220 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 221 | - $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 221 | + $output .= '"c": "'.str_replace('\\', '', $spotter_item['ident']).'",'; |
|
| 222 | 222 | //" |
| 223 | 223 | } else { |
| 224 | 224 | $output .= '"c": "NA",'; |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | if ($j > 1) { |
| 354 | 354 | if (isset($output_time)) { |
| 355 | - $output_time = substr($output_time, 0, -1); |
|
| 355 | + $output_time = substr($output_time, 0, -1); |
|
| 356 | 356 | $output .= '"time": ['.$output_time.']'; |
| 357 | 357 | } |
| 358 | 358 | $output .= '},'; |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $output .= '"type": "LineString",'; |
| 362 | 362 | $output .= '"coordinates": ['; |
| 363 | 363 | if (isset($output_history)) { |
| 364 | - $output_history = substr($output_history, 0, -1); |
|
| 364 | + $output_history = substr($output_history, 0, -1); |
|
| 365 | 365 | $output .= $output_history; |
| 366 | 366 | } |
| 367 | 367 | $output .= ']'; |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $output = substr($output, 0, -1); |
| 373 | 373 | $output .= ']'; |
| 374 | 374 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 375 | - $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
| 375 | + $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
| 376 | 376 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
| 377 | 377 | $output .= '"fc": "'.$flightcnt.'"'; |
| 378 | 378 | } else { |
@@ -25,12 +25,10 @@ discard block |
||
| 25 | 25 | if ($tracker) { |
| 26 | 26 | require_once('require/class.Tracker.php'); |
| 27 | 27 | require_once('require/class.TrackerArchive.php'); |
| 28 | -} |
|
| 29 | -elseif ($marine) { |
|
| 28 | +} elseif ($marine) { |
|
| 30 | 29 | require_once('require/class.Marine.php'); |
| 31 | 30 | require_once('require/class.MarineArchive.php'); |
| 32 | -} |
|
| 33 | -else { |
|
| 31 | +} else { |
|
| 34 | 32 | require_once('require/class.Spotter.php'); |
| 35 | 33 | require_once('require/class.SpotterArchive.php'); |
| 36 | 34 | } |
@@ -38,12 +36,10 @@ discard block |
||
| 38 | 36 | if ($tracker) { |
| 39 | 37 | $Tracker = new Tracker(); |
| 40 | 38 | $TrackerArchive = new TrackerArchive(); |
| 41 | -} |
|
| 42 | -elseif ($marine) { |
|
| 39 | +} elseif ($marine) { |
|
| 43 | 40 | $Marine = new Marine(); |
| 44 | 41 | $MarineArchive = new MarineArchive(); |
| 45 | -} |
|
| 46 | -else { |
|
| 42 | +} else { |
|
| 47 | 43 | $Spotter = new Spotter(); |
| 48 | 44 | $SpotterArchive = new SpotterArchive(); |
| 49 | 45 | } |
@@ -56,66 +52,92 @@ discard block |
||
| 56 | 52 | } |
| 57 | 53 | header('Content-Type: text/javascript'); |
| 58 | 54 | |
| 59 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 60 | -else $compress = $globalJsonCompress; |
|
| 55 | +if (!isset($globalJsonCompress)) { |
|
| 56 | + $compress = true; |
|
| 57 | +} else { |
|
| 58 | + $compress = $globalJsonCompress; |
|
| 59 | +} |
|
| 61 | 60 | |
| 62 | 61 | $from_archive = false; |
| 63 | 62 | $min = false; |
| 64 | 63 | $allhistory = false; |
| 65 | 64 | $filter['source'] = array(); |
| 66 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 67 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 68 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 69 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 70 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 71 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 72 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 73 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 74 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 75 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 76 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 65 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
| 66 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 67 | +} |
|
| 68 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
| 69 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 70 | +} |
|
| 71 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
| 72 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 73 | +} |
|
| 74 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
| 75 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 76 | +} |
|
| 77 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
| 78 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 79 | +} |
|
| 80 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
| 81 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 82 | +} |
|
| 83 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
| 84 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 85 | +} |
|
| 86 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
| 87 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 88 | +} |
|
| 89 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
| 90 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 91 | +} |
|
| 92 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
| 93 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 94 | +} |
|
| 95 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
| 96 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 97 | +} |
|
| 77 | 98 | |
| 78 | 99 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 79 | 100 | $min = true; |
| 80 | -} else $min = false; |
|
| 101 | +} else { |
|
| 102 | + $min = false; |
|
| 103 | +} |
|
| 81 | 104 | |
| 82 | 105 | if (isset($_GET['ident'])) { |
| 83 | 106 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
| 84 | 107 | $from_archive = true; |
| 85 | 108 | if ($tracker) { |
| 86 | 109 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataByIdent($ident); |
| 87 | - } |
|
| 88 | - elseif ($marine) { |
|
| 110 | + } elseif ($marine) { |
|
| 89 | 111 | $spotter_array = $MarineArchive->getLastArchiveMarineDataByIdent($ident); |
| 90 | - } |
|
| 91 | - else { |
|
| 112 | + } else { |
|
| 92 | 113 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataByIdent($ident); |
| 93 | 114 | } |
| 94 | 115 | $allhistory = true; |
| 95 | -} |
|
| 96 | -elseif (isset($_GET['flightaware_id'])) { |
|
| 116 | +} elseif (isset($_GET['flightaware_id'])) { |
|
| 97 | 117 | $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
| 98 | 118 | $from_archive = true; |
| 99 | 119 | if ($tracker) { |
| 100 | 120 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataById($flightaware_id); |
| 101 | - } |
|
| 102 | - elseif ($marine) { |
|
| 121 | + } elseif ($marine) { |
|
| 103 | 122 | $spotter_array = $MarineArchive->getLastArchiveMarineDataById($flightaware_id); |
| 104 | - } |
|
| 105 | - else { |
|
| 123 | + } else { |
|
| 106 | 124 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
| 107 | 125 | } |
| 108 | 126 | $allhistory = true; |
| 109 | -} |
|
| 110 | -elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed'])) { |
|
| 127 | +} elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed'])) { |
|
| 111 | 128 | $from_archive = true; |
| 112 | 129 | $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
| 113 | - if (isset($globalAircraftMaxUpdate)) $begindate = $begindate - $globalAircraftMaxUpdate; |
|
| 114 | - else $begindate = $begindate - 3000; |
|
| 130 | + if (isset($globalAircraftMaxUpdate)) { |
|
| 131 | + $begindate = $begindate - $globalAircraftMaxUpdate; |
|
| 132 | + } else { |
|
| 133 | + $begindate = $begindate - 3000; |
|
| 134 | + } |
|
| 115 | 135 | $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
| 116 | 136 | $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
| 117 | 137 | $part = filter_input(INPUT_GET,'part',FILTER_SANITIZE_NUMBER_INT); |
| 118 | - if ($part == '') $part = 0; |
|
| 138 | + if ($part == '') { |
|
| 139 | + $part = 0; |
|
| 140 | + } |
|
| 119 | 141 | |
| 120 | 142 | if ($begindate != '' && $enddate != '') { |
| 121 | 143 | $begindate = date('Y-m-d H:i:s',$begindate); |
@@ -123,11 +145,9 @@ discard block |
||
| 123 | 145 | //$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
| 124 | 146 | if ($tracker) { |
| 125 | 147 | $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate,$enddate,$filter); |
| 126 | - } |
|
| 127 | - elseif ($marine) { |
|
| 148 | + } elseif ($marine) { |
|
| 128 | 149 | $spotter_array = $MarineArchive->getMinLiveMarineData($begindate,$enddate,$filter); |
| 129 | - } |
|
| 130 | - else { |
|
| 150 | + } else { |
|
| 131 | 151 | $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter,$part); |
| 132 | 152 | } |
| 133 | 153 | } |
@@ -136,8 +156,12 @@ discard block |
||
| 136 | 156 | if (!empty($spotter_array)) { |
| 137 | 157 | //$flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
| 138 | 158 | $flightcnt = 0; |
| 139 | - if ($flightcnt == '') $flightcnt = 0; |
|
| 140 | -} else $flightcnt = 0; |
|
| 159 | + if ($flightcnt == '') { |
|
| 160 | + $flightcnt = 0; |
|
| 161 | + } |
|
| 162 | + } else { |
|
| 163 | + $flightcnt = 0; |
|
| 164 | +} |
|
| 141 | 165 | |
| 142 | 166 | $sqltime = round(microtime(true)-$begintime,2); |
| 143 | 167 | |
@@ -147,8 +171,11 @@ discard block |
||
| 147 | 171 | $aircrafts_shadow = array(); |
| 148 | 172 | $output = '{'; |
| 149 | 173 | $output .= '"type": "FeatureCollection",'; |
| 150 | -if ($min) $output .= '"minimal": "true",'; |
|
| 151 | -else $output .= '"minimal": "false",'; |
|
| 174 | +if ($min) { |
|
| 175 | + $output .= '"minimal": "true",'; |
|
| 176 | +} else { |
|
| 177 | + $output .= '"minimal": "false",'; |
|
| 178 | +} |
|
| 152 | 179 | $output .= '"fc": "'.$flightcnt.'",'; |
| 153 | 180 | $output .= '"sqt": "'.$sqltime.'",'; |
| 154 | 181 | $begin = true; |
@@ -161,15 +188,17 @@ discard block |
||
| 161 | 188 | if ($pfi != $spotter_item['famtrackid']) { |
| 162 | 189 | $pfi = $spotter_item['famtrackid']; |
| 163 | 190 | $begin = true; |
| 164 | - } else $spotter_history_array = 0; |
|
| 165 | - } |
|
| 166 | - elseif ($marine) { |
|
| 191 | + } else { |
|
| 192 | + $spotter_history_array = 0; |
|
| 193 | + } |
|
| 194 | + } elseif ($marine) { |
|
| 167 | 195 | if ($pfi != $spotter_item['fammarine_d']) { |
| 168 | 196 | $pfi = $spotter_item['fammarine_id']; |
| 169 | 197 | $begin = true; |
| 170 | - } else $spotter_history_array = 0; |
|
| 171 | - } |
|
| 172 | - else { |
|
| 198 | + } else { |
|
| 199 | + $spotter_history_array = 0; |
|
| 200 | + } |
|
| 201 | + } else { |
|
| 173 | 202 | if ($pfi != $spotter_item['flightaware_id']) { |
| 174 | 203 | $pfi = $spotter_item['flightaware_id']; |
| 175 | 204 | $begin = true; |
@@ -206,7 +235,9 @@ discard block |
||
| 206 | 235 | $output_history .= '['.$spotter_item['longitude'].', '.$spotter_item['latitude'].'],'; |
| 207 | 236 | $output_time .= (strtotime($spotter_item['date'])*1000).','; |
| 208 | 237 | $previousts = strtotime($spotter_item['date']); |
| 209 | - if ($k > 1 && (strtotime($spotter_item['date'])*1000 > $enddate)) $end = true; |
|
| 238 | + if ($k > 1 && (strtotime($spotter_item['date'])*1000 > $enddate)) { |
|
| 239 | + $end = true; |
|
| 240 | + } |
|
| 210 | 241 | } |
| 211 | 242 | |
| 212 | 243 | if ($begin) { |
@@ -216,7 +247,9 @@ discard block |
||
| 216 | 247 | $output .= '"type": "Feature",'; |
| 217 | 248 | $output .= '"properties": {'; |
| 218 | 249 | $output .= '"fi": "'.$pfi.'",'; |
| 219 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 250 | + if (isset($begindate)) { |
|
| 251 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 252 | + } |
|
| 220 | 253 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 221 | 254 | $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
| 222 | 255 | //" |
@@ -224,14 +257,20 @@ discard block |
||
| 224 | 257 | $output .= '"c": "NA",'; |
| 225 | 258 | } |
| 226 | 259 | if (!isset($spotter_item['aircraft_shadow']) && !$tracker && !$marine) { |
| 227 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
| 228 | - else { |
|
| 260 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
| 261 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 262 | + } else { |
|
| 229 | 263 | $aircraft_icao = $spotter_item['aircraft_icao']; |
| 230 | 264 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
| 231 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 232 | - elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 233 | - elseif ($aircraft_icao == 'PARAGLIDER') $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 234 | - else $spotter_item['aircraft_shadow'] = ''; |
|
| 265 | + if (count($aircraft_info) > 0) { |
|
| 266 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 267 | + } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
|
| 268 | + $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 269 | + } elseif ($aircraft_icao == 'PARAGLIDER') { |
|
| 270 | + $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 271 | + } else { |
|
| 272 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 273 | + } |
|
| 235 | 274 | $aircrafts_shadow[$aircraft_icao] = $spotter_item['aircraft_shadow']; |
| 236 | 275 | } |
| 237 | 276 | } |
@@ -239,93 +278,139 @@ discard block |
||
| 239 | 278 | if (!isset($spotter_item['aircraft_shadow']) || $spotter_item['aircraft_shadow'] == '') { |
| 240 | 279 | if ($tracker) { |
| 241 | 280 | if (isset($spotter_item['type']) && $spotter_item['type'] == 'Ambulance') { |
| 242 | - if ($compress) $output .= '"as": "ambulance.png",'; |
|
| 243 | - else $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 244 | - } |
|
| 245 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Police') { |
|
| 246 | - if ($compress) $output .= '"as": "police.png",'; |
|
| 247 | - else $output .= '"aircraft_shadow": "police.png",'; |
|
| 248 | - } |
|
| 249 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Yacht (Sail)') { |
|
| 250 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 251 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 252 | - } |
|
| 253 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Ship (Power Boat)') { |
|
| 254 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 255 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 256 | - } |
|
| 257 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Shuttle') { |
|
| 258 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 259 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 281 | + if ($compress) { |
|
| 282 | + $output .= '"as": "ambulance.png",'; |
|
| 283 | + } else { |
|
| 284 | + $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 285 | + } |
|
| 286 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Police') { |
|
| 287 | + if ($compress) { |
|
| 288 | + $output .= '"as": "police.png",'; |
|
| 289 | + } else { |
|
| 290 | + $output .= '"aircraft_shadow": "police.png",'; |
|
| 291 | + } |
|
| 292 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Yacht (Sail)') { |
|
| 293 | + if ($compress) { |
|
| 294 | + $output .= '"as": "ship.png",'; |
|
| 295 | + } else { |
|
| 296 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 297 | + } |
|
| 298 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Ship (Power Boat)') { |
|
| 299 | + if ($compress) { |
|
| 300 | + $output .= '"as": "ship.png",'; |
|
| 301 | + } else { |
|
| 302 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 303 | + } |
|
| 304 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Shuttle') { |
|
| 305 | + if ($compress) { |
|
| 306 | + $output .= '"as": "ship.png",'; |
|
| 307 | + } else { |
|
| 308 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 309 | + } |
|
| 310 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck') { |
|
| 311 | + if ($compress) { |
|
| 312 | + $output .= '"as": "truck.png",'; |
|
| 313 | + } else { |
|
| 314 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 315 | + } |
|
| 316 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck (18 Wheeler)') { |
|
| 317 | + if ($compress) { |
|
| 318 | + $output .= '"as": "truck.png",'; |
|
| 319 | + } else { |
|
| 320 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 321 | + } |
|
| 322 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Aircraft (small)') { |
|
| 323 | + if ($compress) { |
|
| 324 | + $output .= '"as": "aircraft.png",'; |
|
| 325 | + } else { |
|
| 326 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 327 | + } |
|
| 328 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Large Aircraft') { |
|
| 329 | + if ($compress) { |
|
| 330 | + $output .= '"as": "aircraft.png",'; |
|
| 331 | + } else { |
|
| 332 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 333 | + } |
|
| 334 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Helicopter') { |
|
| 335 | + if ($compress) { |
|
| 336 | + $output .= '"as": "helico.png",'; |
|
| 337 | + } else { |
|
| 338 | + $output .= '"aircraft_shadow": "helico.png",'; |
|
| 339 | + } |
|
| 340 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Railroad Engine') { |
|
| 341 | + if ($compress) { |
|
| 342 | + $output .= '"as": "rail.png",'; |
|
| 343 | + } else { |
|
| 344 | + $output .= '"aircraft_shadow": "rail.png",'; |
|
| 345 | + } |
|
| 346 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Firetruck') { |
|
| 347 | + if ($compress) { |
|
| 348 | + $output .= '"as": "firetruck.png",'; |
|
| 349 | + } else { |
|
| 350 | + $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 351 | + } |
|
| 352 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bus') { |
|
| 353 | + if ($compress) { |
|
| 354 | + $output .= '"as": "bus.png",'; |
|
| 355 | + } else { |
|
| 356 | + $output .= '"aircraft_shadow": "bus.png",'; |
|
| 357 | + } |
|
| 358 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Phone') { |
|
| 359 | + if ($compress) { |
|
| 360 | + $output .= '"as": "phone.png",'; |
|
| 361 | + } else { |
|
| 362 | + $output .= '"aircraft_shadow": "phone.png",'; |
|
| 363 | + } |
|
| 364 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Jogger') { |
|
| 365 | + if ($compress) { |
|
| 366 | + $output .= '"as": "jogger.png",'; |
|
| 367 | + } else { |
|
| 368 | + $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 369 | + } |
|
| 370 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bike') { |
|
| 371 | + if ($compress) { |
|
| 372 | + $output .= '"as": "bike.png",'; |
|
| 373 | + } else { |
|
| 374 | + $output .= '"aircraft_shadow": "bike.png",'; |
|
| 375 | + } |
|
| 376 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Motorcycle') { |
|
| 377 | + if ($compress) { |
|
| 378 | + $output .= '"as": "motorcycle.png",'; |
|
| 379 | + } else { |
|
| 380 | + $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 381 | + } |
|
| 382 | + } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Balloon') { |
|
| 383 | + if ($compress) { |
|
| 384 | + $output .= '"as": "balloon.png",'; |
|
| 385 | + } else { |
|
| 386 | + $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 387 | + } |
|
| 388 | + } else { |
|
| 389 | + if ($compress) { |
|
| 390 | + $output .= '"as": "car.png",'; |
|
| 391 | + } else { |
|
| 392 | + $output .= '"aircraft_shadow": "car.png",'; |
|
| 393 | + } |
|
| 260 | 394 | } |
| 261 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck') { |
|
| 262 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 263 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 395 | + } elseif ($marine) { |
|
| 396 | + if ($compress) { |
|
| 397 | + $output .= '"as": "ship.png",'; |
|
| 398 | + } else { |
|
| 399 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 264 | 400 | } |
| 265 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck (18 Wheeler)') { |
|
| 266 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 267 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 268 | - } |
|
| 269 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Aircraft (small)') { |
|
| 270 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 271 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 272 | - } |
|
| 273 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Large Aircraft') { |
|
| 274 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 275 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 276 | - } |
|
| 277 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Helicopter') { |
|
| 278 | - if ($compress) $output .= '"as": "helico.png",'; |
|
| 279 | - else $output .= '"aircraft_shadow": "helico.png",'; |
|
| 280 | - } |
|
| 281 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Railroad Engine') { |
|
| 282 | - if ($compress) $output .= '"as": "rail.png",'; |
|
| 283 | - else $output .= '"aircraft_shadow": "rail.png",'; |
|
| 284 | - } |
|
| 285 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Firetruck') { |
|
| 286 | - if ($compress) $output .= '"as": "firetruck.png",'; |
|
| 287 | - else $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 288 | - } |
|
| 289 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bus') { |
|
| 290 | - if ($compress) $output .= '"as": "bus.png",'; |
|
| 291 | - else $output .= '"aircraft_shadow": "bus.png",'; |
|
| 292 | - } |
|
| 293 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Phone') { |
|
| 294 | - if ($compress) $output .= '"as": "phone.png",'; |
|
| 295 | - else $output .= '"aircraft_shadow": "phone.png",'; |
|
| 296 | - } |
|
| 297 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Jogger') { |
|
| 298 | - if ($compress) $output .= '"as": "jogger.png",'; |
|
| 299 | - else $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 300 | - } |
|
| 301 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bike') { |
|
| 302 | - if ($compress) $output .= '"as": "bike.png",'; |
|
| 303 | - else $output .= '"aircraft_shadow": "bike.png",'; |
|
| 304 | - } |
|
| 305 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Motorcycle') { |
|
| 306 | - if ($compress) $output .= '"as": "motorcycle.png",'; |
|
| 307 | - else $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 308 | - } |
|
| 309 | - elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Balloon') { |
|
| 310 | - if ($compress) $output .= '"as": "balloon.png",'; |
|
| 311 | - else $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 312 | - } |
|
| 313 | - else { |
|
| 314 | - if ($compress) $output .= '"as": "car.png",'; |
|
| 315 | - else $output .= '"aircraft_shadow": "car.png",'; |
|
| 401 | + } else { |
|
| 402 | + if ($compress) { |
|
| 403 | + $output .= '"as": "default.png",'; |
|
| 404 | + } else { |
|
| 405 | + $output .= '"aircraft_shadow": "default.png",'; |
|
| 316 | 406 | } |
| 317 | 407 | } |
| 318 | - elseif ($marine) { |
|
| 319 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 320 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 321 | - } |
|
| 322 | - else { |
|
| 323 | - if ($compress) $output .= '"as": "default.png",'; |
|
| 324 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
| 325 | - } |
|
| 326 | 408 | } else { |
| 327 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 328 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 409 | + if ($compress) { |
|
| 410 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 411 | + } else { |
|
| 412 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 413 | + } |
|
| 329 | 414 | } |
| 330 | 415 | |
| 331 | 416 | if (isset($spotter_item['date_iso_8601'])) { |
@@ -373,7 +458,9 @@ discard block |
||
| 373 | 458 | $output .= ']'; |
| 374 | 459 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 375 | 460 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
| 376 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 461 | + if (isset($begindate)) { |
|
| 462 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 463 | + } |
|
| 377 | 464 | $output .= '"fc": "'.$flightcnt.'"'; |
| 378 | 465 | } else { |
| 379 | 466 | $output .= '"features": '; |