@@ -28,7 +28,9 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
| 30 | 30 | $output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"'; |
| 31 | -if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
| 31 | +if (!isset($_GET['now'])) { |
|
| 32 | + $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
| 33 | +} |
|
| 32 | 34 | $output .= '}'; |
| 33 | 35 | //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}'; |
| 34 | 36 | //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
@@ -37,7 +39,9 @@ discard block |
||
| 37 | 39 | $output .= '},'; |
| 38 | 40 | $output .= '{'; |
| 39 | 41 | $output .= '"id": "santaclaus",'; |
| 40 | -if (!isset($_GET['now'])) $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
| 42 | +if (!isset($_GET['now'])) { |
|
| 43 | + $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
| 44 | +} |
|
| 41 | 45 | $output .= '"properties": {'; |
| 42 | 46 | // Not yet supported in CZML with Cesium |
| 43 | 47 | $output .= '},'; |
@@ -36,8 +36,12 @@ |
||
| 36 | 36 | if (!empty($spotter_array)) { |
| 37 | 37 | include('table-output.php'); |
| 38 | 38 | print '<div class="pagination">'; |
| 39 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 40 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 39 | + if ($limit_previous_1 >= 0) { |
|
| 40 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 41 | + } |
|
| 42 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 43 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 44 | + } |
|
| 41 | 45 | print '</div>'; |
| 42 | 46 | } |
| 43 | 47 | print '</div>'; |
@@ -38,8 +38,12 @@ |
||
| 38 | 38 | if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) { |
| 39 | 39 | include('table-output.php'); |
| 40 | 40 | print '<div class="pagination">'; |
| 41 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 42 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 41 | + if ($limit_previous_1 >= 0) { |
|
| 42 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 43 | + } |
|
| 44 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 45 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 46 | + } |
|
| 43 | 47 | print '</div>'; |
| 44 | 48 | } |
| 45 | 49 | print '</div>'; |
@@ -6,8 +6,11 @@ |
||
| 6 | 6 | $Spotter = new Spotter(); |
| 7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
| 8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
| 9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 10 | -else $spotter_array = ''; |
|
| 9 | +if (isset($_GET['date'])) { |
|
| 10 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 11 | +} else { |
|
| 12 | + $spotter_array = ''; |
|
| 13 | +} |
|
| 11 | 14 | |
| 12 | 15 | if (!empty($spotter_array)) |
| 13 | 16 | { |
@@ -8,8 +8,11 @@ |
||
| 8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
| 9 | 9 | |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 12 | -else $spotter_array = array(); |
|
| 11 | +if (isset($_GET['date'])) { |
|
| 12 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 13 | +} else { |
|
| 14 | + $spotter_array = array(); |
|
| 15 | +} |
|
| 13 | 16 | |
| 14 | 17 | if (!empty($spotter_array)) |
| 15 | 18 | { |
@@ -38,8 +38,12 @@ |
||
| 38 | 38 | if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) { |
| 39 | 39 | include('table-output.php'); |
| 40 | 40 | print '<div class="pagination">'; |
| 41 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 42 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 41 | + if ($limit_previous_1 >= 0) { |
|
| 42 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 43 | + } |
|
| 44 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 45 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 46 | + } |
|
| 43 | 47 | print '</div>'; |
| 44 | 48 | } |
| 45 | 49 | print '</div>'; |
@@ -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, "update_db.php") && !strpos($line, "sh ")) $j++; |
|
| 12 | + foreach ($output as $line) { |
|
| 13 | + if(strpos($line, "update_db.php") && !strpos($line, "sh ")) $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($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($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($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(); |
@@ -51,7 +57,9 @@ discard block |
||
| 51 | 57 | $update_db->delete_duplicateowner(); |
| 52 | 58 | } |
| 53 | 59 | $update_db->insert_last_owner_update(); |
| 54 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Owner are only updated every 15 days.\n"; |
|
| 60 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
| 61 | + echo "Owner are only updated every 15 days.\n"; |
|
| 62 | + } |
|
| 55 | 63 | |
| 56 | 64 | if (isset($globalAccidents) && $globalAccidents && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
| 57 | 65 | require_once(dirname(__FILE__).'/../require/class.Accident.php'); |
@@ -60,7 +68,9 @@ discard block |
||
| 60 | 68 | if ($Accident->check_last_accidents_update()) { |
| 61 | 69 | $Accident->download_update(); |
| 62 | 70 | $Accident->insert_last_accidents_update(); |
| 63 | - } else echo "Accidents are updated once a day.\n"; |
|
| 71 | + } else { |
|
| 72 | + echo "Accidents are updated once a day.\n"; |
|
| 73 | + } |
|
| 64 | 74 | } |
| 65 | 75 | |
| 66 | 76 | } |
@@ -73,15 +83,19 @@ discard block |
||
| 73 | 83 | if ($METAR->check_last_update()) { |
| 74 | 84 | $METAR->addMETARCycle(); |
| 75 | 85 | $METAR->insert_last_update(); |
| 76 | - } else echo "METAR are only updated every 30 minutes.\n"; |
|
| 77 | -} |
|
| 86 | + } else { |
|
| 87 | + echo "METAR are only updated every 30 minutes.\n"; |
|
| 88 | + } |
|
| 89 | + } |
|
| 78 | 90 | |
| 79 | 91 | if (isset($globalSchedules) && $globalSchedules && $update_db->check_last_schedules_update() && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
| 80 | 92 | echo "Updating schedules..."; |
| 81 | 93 | //$update_db->update_oneworld(); |
| 82 | 94 | $update_db->update_skyteam(); |
| 83 | 95 | $update_db->insert_last_schedules_update(); |
| 84 | -} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Schedules are only updated every 15 days.\n"; |
|
| 96 | +} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
| 97 | + echo "Schedules are only updated every 15 days.\n"; |
|
| 98 | +} |
|
| 85 | 99 | |
| 86 | 100 | if (isset($globalArchiveMonths) && $globalArchiveMonths > 0) { |
| 87 | 101 | echo "Updating statistics and archive old data..."; |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 9 | -else $compress = $globalJsonCompress; |
|
| 8 | +if (!isset($globalJsonCompress)) { |
|
| 9 | + $compress = true; |
|
| 10 | +} else { |
|
| 11 | + $compress = $globalJsonCompress; |
|
| 12 | +} |
|
| 10 | 13 | if (isset($_GET['archive'])) { |
| 11 | 14 | //$archiveupdatetime = 50; |
| 12 | 15 | $archiveupdatetime = $globalMapRefresh; |
@@ -16,8 +19,11 @@ discard block |
||
| 16 | 19 | //$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10)); |
| 17 | 20 | //$lastupd = 20; |
| 18 | 21 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
| 19 | - if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
|
| 20 | - else $enddate = time(); |
|
| 22 | + if (isset($_GET['enddate']) && $_GET['enddate'] != '') { |
|
| 23 | + $enddate = $_GET['enddate']; |
|
| 24 | + } else { |
|
| 25 | + $enddate = time(); |
|
| 26 | + } |
|
| 21 | 27 | setcookie("archive_begin",$begindate); |
| 22 | 28 | setcookie("archive_end",$enddate); |
| 23 | 29 | setcookie("archive_update",$lastupd); |
@@ -123,7 +129,17 @@ discard block |
||
| 123 | 129 | } |
| 124 | 130 | |
| 125 | 131 | //create the map |
| 126 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
| 132 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
| 133 | + print $latitude; |
|
| 134 | +} else { |
|
| 135 | + print $globalCenterLatitude; |
|
| 136 | +} |
|
| 137 | +?>,<?php if (isset($longitude)) { |
|
| 138 | + print $longitude; |
|
| 139 | +} else { |
|
| 140 | + print $globalCenterLongitude; |
|
| 141 | +} |
|
| 142 | +?>], zoom); |
|
| 127 | 143 | <?php |
| 128 | 144 | } else { |
| 129 | 145 | ?> |
@@ -136,9 +152,19 @@ discard block |
||
| 136 | 152 | || navigator.userAgent.match(/BlackBerry/i) |
| 137 | 153 | || navigator.userAgent.match(/Windows Phone/i)) |
| 138 | 154 | { |
| 139 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
| 155 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
| 156 | + print $globalLiveZoom-1; |
|
| 157 | +} else { |
|
| 158 | + print '8'; |
|
| 159 | +} |
|
| 160 | +?>; |
|
| 140 | 161 | } else { |
| 141 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
|
| 162 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
| 163 | + print $globalLiveZoom; |
|
| 164 | +} else { |
|
| 165 | + print '9'; |
|
| 166 | +} |
|
| 167 | +?>; |
|
| 142 | 168 | } |
| 143 | 169 | |
| 144 | 170 | //create the map |
@@ -163,16 +189,27 @@ discard block |
||
| 163 | 189 | bounds = L.latLngBounds(southWest,northEast); |
| 164 | 190 | //a few title layers |
| 165 | 191 | <?php |
| 166 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
| 167 | - else $MapType = $globalMapProvider; |
|
| 192 | + if (isset($_COOKIE['MapType'])) { |
|
| 193 | + $MapType = $_COOKIE['MapType']; |
|
| 194 | + } else { |
|
| 195 | + $MapType = $globalMapProvider; |
|
| 196 | + } |
|
| 168 | 197 | |
| 169 | 198 | if ($MapType == 'Mapbox') { |
| 170 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 171 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 172 | -?> |
|
| 199 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 200 | + $MapBoxId = $globalMapboxId; |
|
| 201 | + } else { |
|
| 202 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 203 | + } |
|
| 204 | + ?> |
|
| 173 | 205 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 174 | 206 | maxZoom: 18, |
| 175 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 207 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 208 | + print 'false'; |
|
| 209 | +} else { |
|
| 210 | + print 'true'; |
|
| 211 | +} |
|
| 212 | +?>, |
|
| 176 | 213 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
| 177 | 214 | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + |
| 178 | 215 | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', |
@@ -184,7 +221,12 @@ discard block |
||
| 184 | 221 | ?> |
| 185 | 222 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 186 | 223 | maxZoom: 18, |
| 187 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 224 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 225 | + print 'false'; |
|
| 226 | +} else { |
|
| 227 | + print 'true'; |
|
| 228 | +} |
|
| 229 | +?>, |
|
| 188 | 230 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
| 189 | 231 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
| 190 | 232 | }).addTo(map); |
@@ -230,20 +272,26 @@ discard block |
||
| 230 | 272 | map.addLayer(yandexLayer); |
| 231 | 273 | <?php |
| 232 | 274 | } elseif ($MapType == 'Bing-Aerial') { |
| 233 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 234 | -?> |
|
| 275 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 276 | + setcookie('MapType','OpenStreetMap'); |
|
| 277 | + } |
|
| 278 | + ?> |
|
| 235 | 279 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
| 236 | 280 | map.addLayer(bingLayer); |
| 237 | 281 | <?php |
| 238 | 282 | } elseif ($MapType == 'Bing-Hybrid') { |
| 239 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 240 | -?> |
|
| 283 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 284 | + setcookie('MapType','OpenStreetMap'); |
|
| 285 | + } |
|
| 286 | + ?> |
|
| 241 | 287 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
| 242 | 288 | map.addLayer(bingLayer); |
| 243 | 289 | <?php |
| 244 | 290 | } elseif ($MapType == 'Bing-Road') { |
| 245 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 246 | -?> |
|
| 291 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 292 | + setcookie('MapType','OpenStreetMap'); |
|
| 293 | + } |
|
| 294 | + ?> |
|
| 247 | 295 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
| 248 | 296 | map.addLayer(bingLayer); |
| 249 | 297 | <?php |
@@ -291,7 +339,12 @@ discard block |
||
| 291 | 339 | } |
| 292 | 340 | } elseif ($globalBounding == 'circle') { |
| 293 | 341 | ?> |
| 294 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
| 342 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
| 343 | + print $globalBoundingCircleSize; |
|
| 344 | +} else { |
|
| 345 | + print '70000'; |
|
| 346 | +} |
|
| 347 | +?>,{ |
|
| 295 | 348 | color: '#92C7D1', |
| 296 | 349 | fillColor: '#92C7D1', |
| 297 | 350 | fillOpacity: 0.3, |
@@ -350,8 +403,11 @@ discard block |
||
| 350 | 403 | |
| 351 | 404 | function update_airportsLayer() { |
| 352 | 405 | <?php |
| 353 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
| 354 | - else $getZoom = '7'; |
|
| 406 | + if (isset($_COOKIE['AirportZoom'])) { |
|
| 407 | + $getZoom = $_COOKIE['AirportZoom']; |
|
| 408 | + } else { |
|
| 409 | + $getZoom = '7'; |
|
| 410 | + } |
|
| 355 | 411 | ?> |
| 356 | 412 | //if (map.getZoom() <= <?php print $getZoom; ?>) { |
| 357 | 413 | if (typeof airportsLayer != 'undefined') { |
@@ -687,9 +743,13 @@ discard block |
||
| 687 | 743 | if (callsign != ""){ markerLabel += callsign; } |
| 688 | 744 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
| 689 | 745 | <?php |
| 690 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
| 691 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
| 692 | - else $IconColor = '1a3151'; |
|
| 746 | + if (isset($_COOKIE['IconColor'])) { |
|
| 747 | + $IconColor = $_COOKIE['IconColor']; |
|
| 748 | + } elseif (isset($globalAircraftIconColor)) { |
|
| 749 | + $IconColor = $globalAircraftIconColor; |
|
| 750 | + } else { |
|
| 751 | + $IconColor = '1a3151'; |
|
| 752 | + } |
|
| 693 | 753 | if (!isset($ident) && !isset($flightaware_id)) { |
| 694 | 754 | ?> |
| 695 | 755 | info_update(feature.properties.fc); |
@@ -737,7 +797,12 @@ discard block |
||
| 737 | 797 | <?php |
| 738 | 798 | } else { |
| 739 | 799 | ?> |
| 740 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 800 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 801 | + print $archiveupdatetime*1000; |
|
| 802 | +} else { |
|
| 803 | + print $globalMapRefresh*1000+20000; |
|
| 804 | +} |
|
| 805 | +?>+feature.properties.sqt*1000); |
|
| 741 | 806 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 742 | 807 | <?php |
| 743 | 808 | } |
@@ -786,7 +851,12 @@ discard block |
||
| 786 | 851 | <?php |
| 787 | 852 | } else { |
| 788 | 853 | ?> |
| 789 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 854 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 855 | + print $archiveupdatetime*1000; |
|
| 856 | +} else { |
|
| 857 | + print $globalMapRefresh*1000+20000; |
|
| 858 | +} |
|
| 859 | +?>+feature.properties.sqt*1000); |
|
| 790 | 860 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 791 | 861 | <?php |
| 792 | 862 | } |
@@ -834,7 +904,12 @@ discard block |
||
| 834 | 904 | <?php |
| 835 | 905 | } else { |
| 836 | 906 | ?> |
| 837 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 907 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 908 | + print $archiveupdatetime*1000; |
|
| 909 | +} else { |
|
| 910 | + print $globalMapRefresh*1000+20000; |
|
| 911 | +} |
|
| 912 | +?>+feature.properties.sqt*1000); |
|
| 838 | 913 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 839 | 914 | <?php |
| 840 | 915 | } |
@@ -1177,14 +1252,24 @@ discard block |
||
| 1177 | 1252 | if (isset($_GET['archive'])) { |
| 1178 | 1253 | ?> |
| 1179 | 1254 | //then load it again every 30 seconds |
| 1180 | -// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 1255 | +// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 1256 | + print ($globalMapRefresh*1000)/2; |
|
| 1257 | +} else { |
|
| 1258 | + print '15000'; |
|
| 1259 | +} |
|
| 1260 | +?>); |
|
| 1181 | 1261 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 1182 | 1262 | <?php |
| 1183 | 1263 | } else { |
| 1184 | 1264 | ?> |
| 1185 | 1265 | //then load it again every 30 seconds |
| 1186 | 1266 | reloadPage = setInterval( |
| 1187 | - function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 1267 | + function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 1268 | + print $globalMapRefresh*1000; |
|
| 1269 | +} else { |
|
| 1270 | + print '30000'; |
|
| 1271 | +} |
|
| 1272 | +?>); |
|
| 1188 | 1273 | var currentdate = new Date(); |
| 1189 | 1274 | var currentyear = new Date().getFullYear(); |
| 1190 | 1275 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -1196,7 +1281,12 @@ discard block |
||
| 1196 | 1281 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 1197 | 1282 | ?> |
| 1198 | 1283 | update_polarLayer(); |
| 1199 | -setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 1284 | +setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 1285 | + print $globalMapRefresh*1000*2; |
|
| 1286 | +} else { |
|
| 1287 | + print '60000'; |
|
| 1288 | +} |
|
| 1289 | +?>); |
|
| 1200 | 1290 | <?php |
| 1201 | 1291 | } |
| 1202 | 1292 | ?> |
@@ -1212,7 +1302,12 @@ discard block |
||
| 1212 | 1302 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 1213 | 1303 | ?> |
| 1214 | 1304 | update_atcLayer(); |
| 1215 | -setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 1305 | +setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 1306 | + print $globalMapRefresh*1000*2; |
|
| 1307 | +} else { |
|
| 1308 | + print '60000'; |
|
| 1309 | +} |
|
| 1310 | +?>); |
|
| 1216 | 1311 | <?php |
| 1217 | 1312 | } |
| 1218 | 1313 | ?> |
@@ -135,11 +135,26 @@ discard block |
||
| 135 | 135 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
| 136 | 136 | <li><?php echo _("NOTAM scope:"); ?> |
| 137 | 137 | <select class="selectpicker" onchange="notamscope(this);"> |
| 138 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 139 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 140 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 141 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 142 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 138 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 139 | + print ' selected'; |
|
| 140 | +} |
|
| 141 | +?>>All</option> |
|
| 142 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 143 | + print ' selected'; |
|
| 144 | +} |
|
| 145 | +?>>Airport/Enroute warning</option> |
|
| 146 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 147 | + print ' selected'; |
|
| 148 | +} |
|
| 149 | +?>>Airport warning</option> |
|
| 150 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 151 | + print ' selected'; |
|
| 152 | +} |
|
| 153 | +?>>Navigation warning</option> |
|
| 154 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 155 | + print ' selected'; |
|
| 156 | +} |
|
| 157 | +?>>Enroute warning</option> |
|
| 143 | 158 | </select |
| 144 | 159 | </li> |
| 145 | 160 | </ul> |
@@ -167,7 +182,12 @@ discard block |
||
| 167 | 182 | <div class="form-group"> |
| 168 | 183 | <label>From (UTC):</label> |
| 169 | 184 | <div class='input-group date' id='datetimepicker1'> |
| 170 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
| 185 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
| 186 | + print $_POST['start_date']; |
|
| 187 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
| 188 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
| 189 | +} |
|
| 190 | +?>" required /> |
|
| 171 | 191 | <span class="input-group-addon"> |
| 172 | 192 | <span class="glyphicon glyphicon-calendar"></span> |
| 173 | 193 | </span> |
@@ -176,7 +196,12 @@ discard block |
||
| 176 | 196 | <div class="form-group"> |
| 177 | 197 | <label>To (UTC):</label> |
| 178 | 198 | <div class='input-group date' id='datetimepicker2'> |
| 179 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
| 199 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
| 200 | + print $_POST['end_date']; |
|
| 201 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
| 202 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
| 203 | +} |
|
| 204 | +?>" /> |
|
| 180 | 205 | <span class="input-group-addon"> |
| 181 | 206 | <span class="glyphicon glyphicon-calendar"></span> |
| 182 | 207 | </span> |
@@ -202,8 +227,20 @@ discard block |
||
| 202 | 227 | |
| 203 | 228 | <li><?php echo _("Playback speed:"); ?> |
| 204 | 229 | <div class="range"> |
| 205 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
| 206 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 230 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
| 231 | + print $_POST['archivespeed']; |
|
| 232 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
| 233 | + print $_COOKIE['archive_speed']; |
|
| 234 | +} else { |
|
| 235 | + print '1'; |
|
| 236 | +} |
|
| 237 | +?>"> |
|
| 238 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 239 | + print $_COOKIE['archive_speed']; |
|
| 240 | +} else { |
|
| 241 | + print '1'; |
|
| 242 | +} |
|
| 243 | +?></output> |
|
| 207 | 244 | </div> |
| 208 | 245 | </li> |
| 209 | 246 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -225,15 +262,27 @@ discard block |
||
| 225 | 262 | <li><?php echo _("Type of Map:"); ?> |
| 226 | 263 | <select class="selectpicker" onchange="mapType(this);"> |
| 227 | 264 | <?php |
| 228 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 229 | - else $MapType = $_COOKIE['MapType']; |
|
| 265 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 266 | + $MapType = $globalMapProvider; |
|
| 267 | + } else { |
|
| 268 | + $MapType = $_COOKIE['MapType']; |
|
| 269 | + } |
|
| 230 | 270 | ?> |
| 231 | 271 | <?php |
| 232 | 272 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 233 | 273 | ?> |
| 234 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 235 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 236 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 274 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 275 | + print ' selected'; |
|
| 276 | +} |
|
| 277 | +?>>Bing-Aerial</option> |
|
| 278 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 279 | + print ' selected'; |
|
| 280 | +} |
|
| 281 | +?>>Bing-Hybrid</option> |
|
| 282 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 283 | + print ' selected'; |
|
| 284 | +} |
|
| 285 | +?>>Bing-Road</option> |
|
| 237 | 286 | <?php |
| 238 | 287 | } |
| 239 | 288 | ?> |
@@ -243,56 +292,131 @@ discard block |
||
| 243 | 292 | <?php |
| 244 | 293 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 245 | 294 | ?> |
| 246 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 247 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 248 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 295 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 296 | + print ' selected'; |
|
| 297 | +} |
|
| 298 | +?>>Here-Aerial</option> |
|
| 299 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 300 | + print ' selected'; |
|
| 301 | +} |
|
| 302 | +?>>Here-Hybrid</option> |
|
| 303 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 304 | + print ' selected'; |
|
| 305 | +} |
|
| 306 | +?>>Here-Road</option> |
|
| 249 | 307 | <?php |
| 250 | 308 | } |
| 251 | 309 | ?> |
| 252 | 310 | <?php |
| 253 | 311 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 254 | 312 | ?> |
| 255 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 256 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 257 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 258 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 313 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 314 | + print ' selected'; |
|
| 315 | +} |
|
| 316 | +?>>Google Roadmap</option> |
|
| 317 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 318 | + print ' selected'; |
|
| 319 | +} |
|
| 320 | +?>>Google Satellite</option> |
|
| 321 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 322 | + print ' selected'; |
|
| 323 | +} |
|
| 324 | +?>>Google Hybrid</option> |
|
| 325 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 326 | + print ' selected'; |
|
| 327 | +} |
|
| 328 | +?>>Google Terrain</option> |
|
| 259 | 329 | <?php |
| 260 | 330 | } |
| 261 | 331 | ?> |
| 262 | 332 | <?php |
| 263 | 333 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 264 | 334 | ?> |
| 265 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 266 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 267 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 335 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 336 | + print ' selected'; |
|
| 337 | +} |
|
| 338 | +?>>MapQuest-OSM</option> |
|
| 339 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 340 | + print ' selected'; |
|
| 341 | +} |
|
| 342 | +?>>MapQuest-Aerial</option> |
|
| 343 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 344 | + print ' selected'; |
|
| 345 | +} |
|
| 346 | +?>>MapQuest-Hybrid</option> |
|
| 268 | 347 | <?php |
| 269 | 348 | } |
| 270 | 349 | ?> |
| 271 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 350 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 351 | + print ' selected'; |
|
| 352 | +} |
|
| 353 | +?>>Yandex</option> |
|
| 272 | 354 | <?php |
| 273 | 355 | } |
| 274 | 356 | ?> |
| 275 | 357 | <?php |
| 276 | 358 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 277 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 278 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 359 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 360 | + $MapBoxId = 'default'; |
|
| 361 | + } else { |
|
| 362 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 363 | + } |
|
| 279 | 364 | ?> |
| 280 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 281 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 282 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 283 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 284 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 285 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 286 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 287 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 288 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 289 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 290 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 291 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 365 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 366 | + print ' selected'; |
|
| 367 | +} |
|
| 368 | +?>>Mapbox default</option> |
|
| 369 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 370 | + print ' selected'; |
|
| 371 | +} |
|
| 372 | +?>>Mapbox streets</option> |
|
| 373 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 374 | + print ' selected'; |
|
| 375 | +} |
|
| 376 | +?>>Mapbox light</option> |
|
| 377 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 378 | + print ' selected'; |
|
| 379 | +} |
|
| 380 | +?>>Mapbox dark</option> |
|
| 381 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 382 | + print ' selected'; |
|
| 383 | +} |
|
| 384 | +?>>Mapbox satellite</option> |
|
| 385 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 386 | + print ' selected'; |
|
| 387 | +} |
|
| 388 | +?>>Mapbox streets-satellite</option> |
|
| 389 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 390 | + print ' selected'; |
|
| 391 | +} |
|
| 392 | +?>>Mapbox streets-basic</option> |
|
| 393 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 394 | + print ' selected'; |
|
| 395 | +} |
|
| 396 | +?>>Mapbox comic</option> |
|
| 397 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 398 | + print ' selected'; |
|
| 399 | +} |
|
| 400 | +?>>Mapbox outdoors</option> |
|
| 401 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 402 | + print ' selected'; |
|
| 403 | +} |
|
| 404 | +?>>Mapbox pencil</option> |
|
| 405 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 406 | + print ' selected'; |
|
| 407 | +} |
|
| 408 | +?>>Mapbox pirates</option> |
|
| 409 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 410 | + print ' selected'; |
|
| 411 | +} |
|
| 412 | +?>>Mapbox emerald</option> |
|
| 292 | 413 | <?php |
| 293 | 414 | } |
| 294 | 415 | ?> |
| 295 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 416 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 417 | + print ' selected'; |
|
| 418 | +} |
|
| 419 | +?>>OpenStreetMap</option> |
|
| 296 | 420 | </select> |
| 297 | 421 | </li> |
| 298 | 422 | <?php |
@@ -300,9 +424,18 @@ discard block |
||
| 300 | 424 | ?> |
| 301 | 425 | <li><?php echo _("Type of Terrain:"); ?> |
| 302 | 426 | <select class="selectpicker" onchange="terrainType(this);"> |
| 303 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 427 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 428 | + print ' selected'; |
|
| 429 | +} |
|
| 430 | +?>>stk terrain</option> |
|
| 431 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 432 | + print ' selected'; |
|
| 433 | +} |
|
| 434 | +?>>ellipsoid</option> |
|
| 435 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 436 | + print ' selected'; |
|
| 437 | +} |
|
| 438 | +?>>vr terrain</option> |
|
| 306 | 439 | </select> |
| 307 | 440 | </li> |
| 308 | 441 | <?php |
@@ -312,18 +445,36 @@ discard block |
||
| 312 | 445 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
| 313 | 446 | ?> |
| 314 | 447 | |
| 315 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
| 316 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 317 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 318 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 448 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 449 | + print 'checked'; |
|
| 450 | +} |
|
| 451 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
| 452 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
| 453 | + print 'checked'; |
|
| 454 | +} |
|
| 455 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 456 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
| 457 | + print 'checked'; |
|
| 458 | +} |
|
| 459 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 460 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
| 461 | + print 'checked'; |
|
| 462 | +} |
|
| 463 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 319 | 464 | <?php |
| 320 | 465 | } |
| 321 | 466 | ?> |
| 322 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 467 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
| 468 | + print 'checked'; |
|
| 469 | +} |
|
| 470 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 323 | 471 | <?php |
| 324 | 472 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 325 | 473 | ?> |
| 326 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 474 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
| 475 | + print 'checked'; |
|
| 476 | +} |
|
| 477 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 327 | 478 | <?php |
| 328 | 479 | } |
| 329 | 480 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -337,17 +488,25 @@ discard block |
||
| 337 | 488 | if (function_exists('array_column')) { |
| 338 | 489 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 339 | 490 | ?> |
| 340 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 491 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 492 | + print 'checked'; |
|
| 493 | +} |
|
| 494 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 341 | 495 | <?php |
| 342 | 496 | } |
| 343 | 497 | } elseif (isset($globalSources)) { |
| 344 | 498 | $dispolar = false; |
| 345 | 499 | foreach ($globalSources as $testsource) { |
| 346 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 500 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 501 | + $dispolar = true; |
|
| 502 | + } |
|
| 347 | 503 | } |
| 348 | 504 | if ($dispolar) { |
| 349 | 505 | ?> |
| 350 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 506 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 507 | + print 'checked'; |
|
| 508 | +} |
|
| 509 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 351 | 510 | <?php |
| 352 | 511 | } |
| 353 | 512 | } |
@@ -359,12 +518,22 @@ discard block |
||
| 359 | 518 | <?php |
| 360 | 519 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 361 | 520 | ?> |
| 362 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 521 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 522 | + print 'checked'; |
|
| 523 | +} |
|
| 524 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 363 | 525 | <?php |
| 364 | 526 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 365 | 527 | ?> |
| 366 | 528 | <li><?php echo _("Aircraft icon color:"); ?> |
| 367 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
|
| 529 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 530 | + print $_COOKIE['IconColor']; |
|
| 531 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 532 | + print $globalAircraftIconColor; |
|
| 533 | +} else { |
|
| 534 | + print '1a3151'; |
|
| 535 | +} |
|
| 536 | +?>"> |
|
| 368 | 537 | </li> |
| 369 | 538 | <?php |
| 370 | 539 | } |
@@ -372,8 +541,22 @@ discard block |
||
| 372 | 541 | ?> |
| 373 | 542 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 374 | 543 | <div class="range"> |
| 375 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
| 376 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 544 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 545 | + print $_COOKIE['AirportZoom']; |
|
| 546 | +} elseif (isset($globalAirportZoom)) { |
|
| 547 | + print $globalAirportZoom; |
|
| 548 | +} else { |
|
| 549 | + print '7'; |
|
| 550 | +} |
|
| 551 | +?>"> |
|
| 552 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 553 | + print $_COOKIE['AirportZoom']; |
|
| 554 | +} elseif (isset($globalAirportZoom)) { |
|
| 555 | + print $globalAirportZoom; |
|
| 556 | +} else { |
|
| 557 | + print '7'; |
|
| 558 | +} |
|
| 559 | +?></output> |
|
| 377 | 560 | </div> |
| 378 | 561 | </li> |
| 379 | 562 | <?php |
@@ -381,22 +564,46 @@ discard block |
||
| 381 | 564 | ?> |
| 382 | 565 | <li><?php echo _("Distance unit:"); ?> |
| 383 | 566 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 384 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 385 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 386 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 567 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 568 | + echo ' selected'; |
|
| 569 | +} |
|
| 570 | +?>>km</option> |
|
| 571 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 572 | + echo ' selected'; |
|
| 573 | +} |
|
| 574 | +?>>nm</option> |
|
| 575 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 576 | + echo ' selected'; |
|
| 577 | +} |
|
| 578 | +?>>mi</option> |
|
| 387 | 579 | </select> |
| 388 | 580 | </li> |
| 389 | 581 | <li><?php echo _("Altitude unit:"); ?> |
| 390 | 582 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 391 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 392 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 583 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 584 | + echo ' selected'; |
|
| 585 | +} |
|
| 586 | +?>>m</option> |
|
| 587 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 588 | + echo ' selected'; |
|
| 589 | +} |
|
| 590 | +?>>feet</option> |
|
| 393 | 591 | </select> |
| 394 | 592 | </li> |
| 395 | 593 | <li><?php echo _("Speed unit:"); ?> |
| 396 | 594 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 397 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
| 398 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 399 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 595 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 596 | + echo ' selected'; |
|
| 597 | +} |
|
| 598 | +?>>km/h</option> |
|
| 599 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 600 | + echo ' selected'; |
|
| 601 | +} |
|
| 602 | +?>>mph</option> |
|
| 603 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 604 | + echo ' selected'; |
|
| 605 | +} |
|
| 606 | +?>>knots</option> |
|
| 400 | 607 | </select> |
| 401 | 608 | </li> |
| 402 | 609 | |
@@ -411,9 +618,18 @@ discard block |
||
| 411 | 618 | <?php |
| 412 | 619 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 413 | 620 | ?> |
| 414 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 415 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 416 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 621 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
| 622 | + print 'checked'; |
|
| 623 | +} |
|
| 624 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 625 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
| 626 | + print 'checked'; |
|
| 627 | +} |
|
| 628 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 629 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
| 630 | + print 'checked'; |
|
| 631 | +} |
|
| 632 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 417 | 633 | <?php |
| 418 | 634 | } |
| 419 | 635 | ?> |
@@ -421,10 +637,16 @@ discard block |
||
| 421 | 637 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 422 | 638 | ?> |
| 423 | 639 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 424 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 640 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
| 641 | + print 'checked'; |
|
| 642 | +} |
|
| 643 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 425 | 644 | <?php } ?> |
| 426 | 645 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 427 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 646 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
| 647 | + print 'checked'; |
|
| 648 | +} |
|
| 649 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 428 | 650 | <?php } ?> |
| 429 | 651 | <?php |
| 430 | 652 | } |
@@ -441,7 +663,9 @@ discard block |
||
| 441 | 663 | } |
| 442 | 664 | foreach($allairlinenames as $airline) { |
| 443 | 665 | $airline_name = $airline['airline_name']; |
| 444 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 666 | + if (strlen($airline_name) > 30) { |
|
| 667 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 668 | + } |
|
| 445 | 669 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
| 446 | 670 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 447 | 671 | } else { |
@@ -459,7 +683,10 @@ discard block |
||
| 459 | 683 | <li><?php echo _("Display alliance:"); ?> |
| 460 | 684 | <br/> |
| 461 | 685 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 462 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 686 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
| 687 | + echo ' selected'; |
|
| 688 | +} |
|
| 689 | +?>><?php echo _("All"); ?></option> |
|
| 463 | 690 | <?php |
| 464 | 691 | foreach($allalliancenames as $alliance) { |
| 465 | 692 | $alliance_name = $alliance['alliance']; |
@@ -500,10 +727,22 @@ discard block |
||
| 500 | 727 | ?> |
| 501 | 728 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 502 | 729 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 503 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 504 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 505 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 506 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 730 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
| 731 | + echo ' selected'; |
|
| 732 | +} |
|
| 733 | +?>><?php echo _("All"); ?></option> |
|
| 734 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
| 735 | + echo ' selected'; |
|
| 736 | +} |
|
| 737 | +?>><?php echo _("Passenger"); ?></option> |
|
| 738 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
| 739 | + echo ' selected'; |
|
| 740 | +} |
|
| 741 | +?>><?php echo _("Cargo"); ?></option> |
|
| 742 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
| 743 | + echo ' selected'; |
|
| 744 | +} |
|
| 745 | +?>><?php echo _("Military"); ?></option> |
|
| 507 | 746 | </select> |
| 508 | 747 | </li> |
| 509 | 748 | <?php |
@@ -511,7 +750,10 @@ discard block |
||
| 511 | 750 | ?> |
| 512 | 751 | <li> |
| 513 | 752 | <?php echo _("Display flight with ident:"); ?> |
| 514 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
| 753 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
| 754 | + print $_COOKIE['filter_ident']; |
|
| 755 | +} |
|
| 756 | +?>" /> |
|
| 515 | 757 | </li> |
| 516 | 758 | </ul> |
| 517 | 759 | </form> |
@@ -527,7 +769,10 @@ discard block |
||
| 527 | 769 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 528 | 770 | <form> |
| 529 | 771 | <ul> |
| 530 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 772 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
| 773 | + print 'checked'; |
|
| 774 | +} |
|
| 775 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 531 | 776 | <li><?php echo _("Type:"); ?> |
| 532 | 777 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 533 | 778 | <?php |
@@ -535,25 +780,45 @@ discard block |
||
| 535 | 780 | $types = $Satellite->get_tle_types(); |
| 536 | 781 | foreach ($types as $type) { |
| 537 | 782 | $type_name = $type['tle_type']; |
| 538 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 539 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 540 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 541 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 542 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 543 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 544 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 545 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 546 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 547 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 548 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 549 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 550 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 551 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 552 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 553 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 554 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 555 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 556 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 783 | + if ($type_name == 'musson') { |
|
| 784 | + $type_name = 'Russian LEO Navigation'; |
|
| 785 | + } else if ($type_name == 'nnss') { |
|
| 786 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 787 | + } else if ($type_name == 'sbas') { |
|
| 788 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 789 | + } else if ($type_name == 'glo-ops') { |
|
| 790 | + $type_name = 'Glonass Operational'; |
|
| 791 | + } else if ($type_name == 'gps-ops') { |
|
| 792 | + $type_name = 'GPS Operational'; |
|
| 793 | + } else if ($type_name == 'argos') { |
|
| 794 | + $type_name = 'ARGOS Data Collection System'; |
|
| 795 | + } else if ($type_name == 'tdrss') { |
|
| 796 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 797 | + } else if ($type_name == 'sarsat') { |
|
| 798 | + $type_name = 'Search & Rescue'; |
|
| 799 | + } else if ($type_name == 'dmc') { |
|
| 800 | + $type_name = 'Disaster Monitoring'; |
|
| 801 | + } else if ($type_name == 'resource') { |
|
| 802 | + $type_name = 'Earth Resources'; |
|
| 803 | + } else if ($type_name == 'stations') { |
|
| 804 | + $type_name = 'Space Stations'; |
|
| 805 | + } else if ($type_name == 'geo') { |
|
| 806 | + $type_name = 'Geostationary'; |
|
| 807 | + } else if ($type_name == 'amateur') { |
|
| 808 | + $type_name = 'Amateur Radio'; |
|
| 809 | + } else if ($type_name == 'x-comm') { |
|
| 810 | + $type_name = 'Experimental'; |
|
| 811 | + } else if ($type_name == 'other-comm') { |
|
| 812 | + $type_name = 'Other Comm'; |
|
| 813 | + } else if ($type_name == 'science') { |
|
| 814 | + $type_name = 'Space & Earth Science'; |
|
| 815 | + } else if ($type_name == 'military') { |
|
| 816 | + $type_name = 'Miscellaneous Military'; |
|
| 817 | + } else if ($type_name == 'radar') { |
|
| 818 | + $type_name = 'Radar Calibration'; |
|
| 819 | + } else if ($type_name == 'tle-new') { |
|
| 820 | + $type_name = 'Last 30 days launches'; |
|
| 821 | + } |
|
| 557 | 822 | |
| 558 | 823 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 559 | 824 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |