@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | header('Content-disposition: attachment; filename="flightairmap-sat.json"'); |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | -$history = urldecode(filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING)); |
|
| 16 | +$history = urldecode(filter_input(INPUT_GET, 'history', FILTER_SANITIZE_STRING)); |
|
| 17 | 17 | header('Content-Type: text/javascript'); |
| 18 | 18 | |
| 19 | 19 | $begintime = microtime(true); |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | $spotter_array = array(); |
| 23 | 23 | if (isset($_COOKIE['sattypes']) && $_COOKIE['sattypes'] != '') { |
| 24 | - $sattypes = explode(',',$_COOKIE['sattypes']); |
|
| 24 | + $sattypes = explode(',', $_COOKIE['sattypes']); |
|
| 25 | 25 | foreach ($sattypes as $sattype) { |
| 26 | 26 | //$spotter_array = array_merge($Satellite->position_all_type($sattype,$timeb-$globalLiveInterval,$timeb),$spotter_array); |
| 27 | - $spotter_array = array_merge($Satellite->position_all_type($sattype),$spotter_array); |
|
| 27 | + $spotter_array = array_merge($Satellite->position_all_type($sattype), $spotter_array); |
|
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | /* |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | //$spotter_array = array_unique($spotter_array,SORT_REGULAR); |
| 38 | 38 | //print_r($spotter_array); |
| 39 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 39 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 40 | 40 | |
| 41 | 41 | $output = '{"type":"FeatureCollection","features":['; |
| 42 | 42 | if (!empty($spotter_array) && is_array($spotter_array)) |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $last_name = ''; |
| 45 | 45 | $coordinatearray = ''; |
| 46 | 46 | $timearray = array(); |
| 47 | - foreach($spotter_array as $spotter_item) |
|
| 47 | + foreach ($spotter_array as $spotter_item) |
|
| 48 | 48 | { |
| 49 | 49 | $output_data = ''; |
| 50 | 50 | $output_data .= '{"type":"Feature","properties":{'; |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | $output_data .= '"logo":"default.png",'; |
| 56 | 56 | $output_data .= '"altitude":0,'; |
| 57 | 57 | $output_data .= '"sqt":'.$sqltime.','; |
| 58 | - $nextlatlon = $Satellite->position($spotter_item['name'],time()+$globalMapRefresh+20); |
|
| 58 | + $nextlatlon = $Satellite->position($spotter_item['name'], time() + $globalMapRefresh + 20); |
|
| 59 | 59 | $nextlat = $nextlatlon['latitude']; |
| 60 | - if (abs($nextlat-$spotter_item['latitude']) > 90) { |
|
| 60 | + if (abs($nextlat - $spotter_item['latitude']) > 90) { |
|
| 61 | 61 | if ($spotter_item['latitude'] < 0) $nexlat = -90; |
| 62 | 62 | else $nexlat = 90; |
| 63 | 63 | } |
| 64 | 64 | $nextlon = $nextlatlon['longitude']; |
| 65 | - if (abs($nextlon-$spotter_item['longitude']) > 180) { |
|
| 65 | + if (abs($nextlon - $spotter_item['longitude']) > 180) { |
|
| 66 | 66 | if ($spotter_item['longitude'] < 0) $nextlon = -180; |
| 67 | 67 | else $nextlon = 180; |
| 68 | 68 | } |
@@ -74,27 +74,27 @@ discard block |
||
| 74 | 74 | $output_data .= ']}},'; |
| 75 | 75 | $output .= $output_data; |
| 76 | 76 | if ($history == $spotter_item['name']) { |
| 77 | - $spotter_history_array = $Satellite->position($spotter_item['name'],time()-6000,time()); |
|
| 77 | + $spotter_history_array = $Satellite->position($spotter_item['name'], time() - 6000, time()); |
|
| 78 | 78 | $spotter_history_array = array_reverse($spotter_history_array); |
| 79 | 79 | $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['name'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
| 80 | 80 | foreach ($spotter_history_array as $key => $spotter_history) { |
| 81 | - if ((isset($previous_lon) && abs($previous_lon-$spotter_history['longitude']) > 180) || (isset($previous_lat) && abs($previous_lat-$spotter_history['latitude']) > 90)) { |
|
| 81 | + if ((isset($previous_lon) && abs($previous_lon - $spotter_history['longitude']) > 180) || (isset($previous_lat) && abs($previous_lat - $spotter_history['latitude']) > 90)) { |
|
| 82 | 82 | break; |
| 83 | 83 | } |
| 84 | 84 | $output_history .= '['; |
| 85 | - $output_history .= $spotter_history['longitude'].', '; |
|
| 86 | - $output_history .= $spotter_history['latitude']; |
|
| 85 | + $output_history .= $spotter_history['longitude'].', '; |
|
| 86 | + $output_history .= $spotter_history['latitude']; |
|
| 87 | 87 | $output_history .= '],'; |
| 88 | 88 | $previous_lon = $spotter_history['longitude']; |
| 89 | 89 | $previous_lat = $spotter_history['latitude']; |
| 90 | 90 | } |
| 91 | - $output_history = substr($output_history,0,-1); |
|
| 91 | + $output_history = substr($output_history, 0, -1); |
|
| 92 | 92 | $output_history .= ']}},'; |
| 93 | 93 | $output .= $output_history; |
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | -if (isset($output_data)) $output = substr($output,0,-1); |
|
| 97 | +if (isset($output_data)) $output = substr($output, 0, -1); |
|
| 98 | 98 | $output .= ']}'; |
| 99 | 99 | print $output; |
| 100 | 100 | ?> |
@@ -58,13 +58,19 @@ discard block |
||
| 58 | 58 | $nextlatlon = $Satellite->position($spotter_item['name'],time()+$globalMapRefresh+20); |
| 59 | 59 | $nextlat = $nextlatlon['latitude']; |
| 60 | 60 | if (abs($nextlat-$spotter_item['latitude']) > 90) { |
| 61 | - if ($spotter_item['latitude'] < 0) $nexlat = -90; |
|
| 62 | - else $nexlat = 90; |
|
| 61 | + if ($spotter_item['latitude'] < 0) { |
|
| 62 | + $nexlat = -90; |
|
| 63 | + } else { |
|
| 64 | + $nexlat = 90; |
|
| 65 | + } |
|
| 63 | 66 | } |
| 64 | 67 | $nextlon = $nextlatlon['longitude']; |
| 65 | 68 | if (abs($nextlon-$spotter_item['longitude']) > 180) { |
| 66 | - if ($spotter_item['longitude'] < 0) $nextlon = -180; |
|
| 67 | - else $nextlon = 180; |
|
| 69 | + if ($spotter_item['longitude'] < 0) { |
|
| 70 | + $nextlon = -180; |
|
| 71 | + } else { |
|
| 72 | + $nextlon = 180; |
|
| 73 | + } |
|
| 68 | 74 | } |
| 69 | 75 | $output_data .= '"nextlatlon":['.$nextlat.','.$nextlon.'],'; |
| 70 | 76 | //$output_data .= '"heading":"'.$Common->getHeading($spotter_item['latitude'],$spotter_item['longitude'],$nextlatlon['latitude'],$nextlatlon['longitude']).'",'; |
@@ -94,7 +100,9 @@ discard block |
||
| 94 | 100 | } |
| 95 | 101 | } |
| 96 | 102 | } |
| 97 | -if (isset($output_data)) $output = substr($output,0,-1); |
|
| 103 | +if (isset($output_data)) { |
|
| 104 | + $output = substr($output,0,-1); |
|
| 105 | +} |
|
| 98 | 106 | $output .= ']}'; |
| 99 | 107 | print $output; |
| 100 | 108 | ?> |
@@ -4,31 +4,31 @@ discard block |
||
| 4 | 4 | $hex = str_replace("#", "", $hex); |
| 5 | 5 | $color = array(); |
| 6 | 6 | if (strlen($hex) == 3) { |
| 7 | - $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1)); |
|
| 8 | - $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1)); |
|
| 9 | - $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1)); |
|
| 7 | + $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1)); |
|
| 8 | + $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1)); |
|
| 9 | + $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1)); |
|
| 10 | 10 | } else if (strlen($hex) == 6) { |
| 11 | - $color['r'] = hexdec(substr($hex, 0, 2)); |
|
| 12 | - $color['g'] = hexdec(substr($hex, 2, 2)); |
|
| 13 | - $color['b'] = hexdec(substr($hex, 4, 2)); |
|
| 11 | + $color['r'] = hexdec(substr($hex, 0, 2)); |
|
| 12 | + $color['g'] = hexdec(substr($hex, 2, 2)); |
|
| 13 | + $color['b'] = hexdec(substr($hex, 4, 2)); |
|
| 14 | 14 | } |
| 15 | 15 | return $color; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | if (!isset($_GET['color']) || $_GET['color'] == '' || !preg_match('/^([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/',$_GET['color'])) { |
| 20 | - exit(0); |
|
| 20 | + exit(0); |
|
| 21 | 21 | } |
| 22 | 22 | $color = $_GET['color']; |
| 23 | 23 | if (!isset($_GET['filename']) || !preg_match('/^[a-z0-9-_]+\.png$/', strtolower($_GET['filename']))) { |
| 24 | - echo "Incorrect filename"; |
|
| 25 | - exit(0); |
|
| 24 | + echo "Incorrect filename"; |
|
| 25 | + exit(0); |
|
| 26 | 26 | } |
| 27 | 27 | $filename = $_GET['filename']; |
| 28 | 28 | if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename) && is_readable(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename)) { |
| 29 | - header('Content-type: image/png'); |
|
| 30 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename); |
|
| 31 | - exit(0); |
|
| 29 | + header('Content-type: image/png'); |
|
| 30 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename); |
|
| 31 | + exit(0); |
|
| 32 | 32 | } |
| 33 | 33 | if (isset($_GET['tracker'])) { |
| 34 | 34 | $original = dirname(__FILE__).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'vehicules'.DIRECTORY_SEPARATOR.'color'.DIRECTORY_SEPARATOR.$filename; |
@@ -45,68 +45,68 @@ discard block |
||
| 45 | 45 | $original = dirname(__FILE__).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'aircrafts'.DIRECTORY_SEPARATOR.'new'.DIRECTORY_SEPARATOR.$filename; |
| 46 | 46 | } |
| 47 | 47 | if (!file_exists($original)) { |
| 48 | - echo "File not found"; |
|
| 48 | + echo "File not found"; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 52 | - $image = imagecreatefrompng($original); |
|
| 53 | - $index = imagecolorexact($image,26,49,81); |
|
| 54 | - if ($index < 0) { |
|
| 52 | + $image = imagecreatefrompng($original); |
|
| 53 | + $index = imagecolorexact($image,26,49,81); |
|
| 54 | + if ($index < 0) { |
|
| 55 | 55 | $index = imagecolorexact($image,25,49,79); |
| 56 | - } |
|
| 57 | - if ($index < 0) { |
|
| 56 | + } |
|
| 57 | + if ($index < 0) { |
|
| 58 | 58 | $index = imagecolorexact($image,0,0,0); |
| 59 | - } |
|
| 60 | - $c = hexToRGB($color); |
|
| 61 | - imagecolorset($image,$index,$c['r'],$c['g'],$c['b']); |
|
| 59 | + } |
|
| 60 | + $c = hexToRGB($color); |
|
| 61 | + imagecolorset($image,$index,$c['r'],$c['g'],$c['b']); |
|
| 62 | 62 | /* |
| 63 | 63 | $ig = imagecolorat($image, 0, 0); |
| 64 | 64 | imagecolortransparent($image, $ig); |
| 65 | 65 | */ |
| 66 | 66 | |
| 67 | - header('Content-type: image/png'); |
|
| 68 | - if (isset($_GET['resize']) && function_exists('imagecopyresampled')) { |
|
| 67 | + header('Content-type: image/png'); |
|
| 68 | + if (isset($_GET['resize']) && function_exists('imagecopyresampled')) { |
|
| 69 | 69 | $resize = filter_input(INPUT_GET,'resize',FILTER_SANITIZE_NUMBER_INT); |
| 70 | 70 | $newimg = imagecreatetruecolor($resize,$resize); |
| 71 | - imagealphablending($newimg, false); |
|
| 71 | + imagealphablending($newimg, false); |
|
| 72 | 72 | imagesavealpha($newimg, true); |
| 73 | 73 | imagecopyresampled($newimg,$image,0,0,0,0,15,15,imagesx($image),imagesy($image)); |
| 74 | 74 | if (isset($_GET['heading'])) { |
| 75 | - $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT); |
|
| 76 | - $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127)); |
|
| 77 | - imagealphablending($rotation, false); |
|
| 78 | - imagesavealpha($rotation, true); |
|
| 79 | - imagepng($rotation); |
|
| 80 | - imagedestroy($newimg); |
|
| 81 | - imagedestroy($image); |
|
| 82 | - imagedestroy($rotation); |
|
| 75 | + $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT); |
|
| 76 | + $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127)); |
|
| 77 | + imagealphablending($rotation, false); |
|
| 78 | + imagesavealpha($rotation, true); |
|
| 79 | + imagepng($rotation); |
|
| 80 | + imagedestroy($newimg); |
|
| 81 | + imagedestroy($image); |
|
| 82 | + imagedestroy($rotation); |
|
| 83 | 83 | |
| 84 | 84 | } else { |
| 85 | - imagepng($newimg); |
|
| 86 | - imagedestroy($newimg); |
|
| 87 | - imagedestroy($image); |
|
| 88 | - } |
|
| 89 | - } else { |
|
| 85 | + imagepng($newimg); |
|
| 86 | + imagedestroy($newimg); |
|
| 87 | + imagedestroy($image); |
|
| 88 | + } |
|
| 89 | + } else { |
|
| 90 | 90 | imagealphablending($image, false); |
| 91 | - imagesavealpha($image, true); |
|
| 91 | + imagesavealpha($image, true); |
|
| 92 | 92 | imagepng($image); |
| 93 | 93 | imagepng($image); |
| 94 | 94 | if (is_writable(dirname(__FILE__).'/cache')) { |
| 95 | - imagepng($image,dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 95 | + imagepng($image,dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 96 | + } |
|
| 97 | + imagedestroy($image); |
|
| 96 | 98 | } |
| 97 | - imagedestroy($image); |
|
| 98 | - } |
|
| 99 | 99 | } else { |
| 100 | - header('Content-type: image/png'); |
|
| 101 | - if (isset($_GET['tracker'])) { |
|
| 102 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 103 | - } elseif (isset($_GET['marine'])) { |
|
| 104 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 105 | - } elseif (isset($_GET['satellite'])) { |
|
| 106 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/satellites/'.$filename); |
|
| 107 | - } else { |
|
| 108 | - if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 100 | + header('Content-type: image/png'); |
|
| 101 | + if (isset($_GET['tracker'])) { |
|
| 102 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 103 | + } elseif (isset($_GET['marine'])) { |
|
| 104 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 105 | + } elseif (isset($_GET['satellite'])) { |
|
| 106 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/satellites/'.$filename); |
|
| 107 | + } else { |
|
| 108 | + if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 109 | 109 | else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
| 110 | - } |
|
| 110 | + } |
|
| 111 | 111 | } |
| 112 | 112 | ?> |
| 113 | 113 | \ No newline at end of file |
@@ -105,8 +105,11 @@ |
||
| 105 | 105 | } elseif (isset($_GET['satellite'])) { |
| 106 | 106 | readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/satellites/'.$filename); |
| 107 | 107 | } else { |
| 108 | - if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 109 | - else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
| 108 | + if ($color == 'FF0000') { |
|
| 109 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 110 | + } else { |
|
| 111 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
|
| 112 | + } |
|
| 110 | 113 | } |
| 111 | 114 | } |
| 112 | 115 | ?> |
| 113 | 116 | \ No newline at end of file |
@@ -3,11 +3,18 @@ discard block |
||
| 3 | 3 | require_once('../require/class.Language.php'); |
| 4 | 4 | |
| 5 | 5 | // Compressed GeoJson is used if true |
| 6 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 7 | -else $compress = $globalJsonCompress; |
|
| 6 | +if (!isset($globalJsonCompress)) { |
|
| 7 | + $compress = true; |
|
| 8 | +} else { |
|
| 9 | + $compress = $globalJsonCompress; |
|
| 10 | +} |
|
| 8 | 11 | |
| 9 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 10 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 12 | +if (isset($_GET['ident'])) { |
|
| 13 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 14 | +} |
|
| 15 | +if (isset($_GET['flightaware_id'])) { |
|
| 16 | + $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 17 | +} |
|
| 11 | 18 | ?> |
| 12 | 19 | |
| 13 | 20 | |
@@ -72,9 +79,12 @@ discard block |
||
| 72 | 79 | |
| 73 | 80 | function update_airportsLayer() { |
| 74 | 81 | <?php |
| 75 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
| 76 | - else $getZoom = '7'; |
|
| 77 | -?> |
|
| 82 | + if (isset($_COOKIE['AirportZoom'])) { |
|
| 83 | + $getZoom = $_COOKIE['AirportZoom']; |
|
| 84 | + } else { |
|
| 85 | + $getZoom = '7'; |
|
| 86 | + } |
|
| 87 | + ?> |
|
| 78 | 88 | if (typeof airportsLayer != 'undefined') { |
| 79 | 89 | if (map.hasLayer(airportsLayer) == true) { |
| 80 | 90 | map.removeLayer(airportsLayer); |
@@ -320,9 +330,13 @@ discard block |
||
| 320 | 330 | if (callsign != ""){ markerLabel += callsign; } |
| 321 | 331 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
| 322 | 332 | <?php |
| 323 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
| 324 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
| 325 | - else $IconColor = '1a3151'; |
|
| 333 | + if (isset($_COOKIE['IconColor'])) { |
|
| 334 | + $IconColor = $_COOKIE['IconColor']; |
|
| 335 | + } elseif (isset($globalAircraftIconColor)) { |
|
| 336 | + $IconColor = $globalAircraftIconColor; |
|
| 337 | + } else { |
|
| 338 | + $IconColor = '1a3151'; |
|
| 339 | + } |
|
| 326 | 340 | if (!isset($ident) && !isset($flightaware_id)) { |
| 327 | 341 | ?> |
| 328 | 342 | //info_update(feature.properties.fc); |
@@ -370,7 +384,12 @@ discard block |
||
| 370 | 384 | <?php |
| 371 | 385 | } else { |
| 372 | 386 | ?> |
| 373 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 387 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 388 | + print $archiveupdatetime*1000; |
|
| 389 | +} else { |
|
| 390 | + print $globalMapRefresh*1000+20000; |
|
| 391 | +} |
|
| 392 | +?>+feature.properties.sqt*1000); |
|
| 374 | 393 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 375 | 394 | <?php |
| 376 | 395 | } |
@@ -419,7 +438,12 @@ discard block |
||
| 419 | 438 | <?php |
| 420 | 439 | } else { |
| 421 | 440 | ?> |
| 422 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 441 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 442 | + print $archiveupdatetime*1000; |
|
| 443 | +} else { |
|
| 444 | + print $globalMapRefresh*1000+20000; |
|
| 445 | +} |
|
| 446 | +?>+feature.properties.sqt*1000); |
|
| 423 | 447 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 424 | 448 | <?php |
| 425 | 449 | } |
@@ -466,7 +490,12 @@ discard block |
||
| 466 | 490 | <?php |
| 467 | 491 | } else { |
| 468 | 492 | ?> |
| 469 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 493 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 494 | + print $archiveupdatetime*1000; |
|
| 495 | +} else { |
|
| 496 | + print $globalMapRefresh*1000+20000; |
|
| 497 | +} |
|
| 498 | +?>+feature.properties.sqt*1000); |
|
| 470 | 499 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 471 | 500 | <?php |
| 472 | 501 | } |
@@ -820,13 +849,23 @@ discard block |
||
| 820 | 849 | if (isset($archive) && $archive) { |
| 821 | 850 | ?> |
| 822 | 851 | //then load it again every 30 seconds |
| 823 | - // var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 852 | + // var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 853 | + print ($globalMapRefresh*1000)/2; |
|
| 854 | +} else { |
|
| 855 | + print '15000'; |
|
| 856 | +} |
|
| 857 | +?>); |
|
| 824 | 858 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 825 | 859 | <?php |
| 826 | 860 | } else { |
| 827 | 861 | ?> |
| 828 | 862 | //then load it again every 30 seconds |
| 829 | - reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 863 | + reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 864 | + print $globalMapRefresh*1000; |
|
| 865 | +} else { |
|
| 866 | + print '30000'; |
|
| 867 | +} |
|
| 868 | +?>); |
|
| 830 | 869 | var currentdate = new Date(); |
| 831 | 870 | var currentyear = new Date().getFullYear(); |
| 832 | 871 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -838,7 +877,12 @@ discard block |
||
| 838 | 877 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 839 | 878 | ?> |
| 840 | 879 | update_polarLayer(); |
| 841 | - setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 880 | + setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 881 | + print $globalMapRefresh*1000*2; |
|
| 882 | +} else { |
|
| 883 | + print '60000'; |
|
| 884 | +} |
|
| 885 | +?>); |
|
| 842 | 886 | <?php |
| 843 | 887 | } |
| 844 | 888 | ?> |
@@ -853,7 +897,12 @@ discard block |
||
| 853 | 897 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 854 | 898 | ?> |
| 855 | 899 | update_atcLayer(); |
| 856 | - setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 900 | + setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 901 | + print $globalMapRefresh*1000*2; |
|
| 902 | +} else { |
|
| 903 | + print '60000'; |
|
| 904 | +} |
|
| 905 | +?>); |
|
| 857 | 906 | <?php |
| 858 | 907 | } |
| 859 | 908 | ?> |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 9 | -else $compress = $globalJsonCompress; |
|
| 8 | +if (!isset($globalJsonCompress)) { |
|
| 9 | + $compress = true; |
|
| 10 | +} else { |
|
| 11 | + $compress = $globalJsonCompress; |
|
| 12 | +} |
|
| 10 | 13 | ?> |
| 11 | 14 | |
| 12 | 15 | |
@@ -156,9 +159,13 @@ discard block |
||
| 156 | 159 | if (callsign != ""){ markerMarineLabel += callsign; } |
| 157 | 160 | if (type != ""){ markerMarineLabel += ' - '+type; } |
| 158 | 161 | <?php |
| 159 | - if (isset($_COOKIE['MarineIconColor'])) $MarineIconColor = $_COOKIE['MarineIconColor']; |
|
| 160 | - elseif (isset($globalMarineIconColor)) $MarineIconColor = $globalMarineIconColor; |
|
| 161 | - else $MarineIconColor = '1a3151'; |
|
| 162 | + if (isset($_COOKIE['MarineIconColor'])) { |
|
| 163 | + $MarineIconColor = $_COOKIE['MarineIconColor']; |
|
| 164 | + } elseif (isset($globalMarineIconColor)) { |
|
| 165 | + $MarineIconColor = $globalMarineIconColor; |
|
| 166 | + } else { |
|
| 167 | + $MarineIconColor = '1a3151'; |
|
| 168 | + } |
|
| 162 | 169 | if (!isset($ident) && !isset($fammarine_id)) { |
| 163 | 170 | ?> |
| 164 | 171 | //info_marine_update(feature.properties.fc); |
@@ -193,7 +200,12 @@ discard block |
||
| 193 | 200 | <?php |
| 194 | 201 | } else { |
| 195 | 202 | ?> |
| 196 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 203 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 204 | + print $archiveupdatetime*1000; |
|
| 205 | +} else { |
|
| 206 | + print $globalMapRefresh*1000+20000; |
|
| 207 | +} |
|
| 208 | +?>+feature.properties.sqt*1000); |
|
| 197 | 209 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 198 | 210 | <?php |
| 199 | 211 | } |
@@ -249,7 +261,12 @@ discard block |
||
| 249 | 261 | <?php |
| 250 | 262 | } else { |
| 251 | 263 | ?> |
| 252 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 264 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 265 | + print $archiveupdatetime*1000; |
|
| 266 | +} else { |
|
| 267 | + print $globalMapRefresh*1000+20000; |
|
| 268 | +} |
|
| 269 | +?>+feature.properties.sqt*1000); |
|
| 253 | 270 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 254 | 271 | <?php |
| 255 | 272 | } |
@@ -304,7 +321,12 @@ discard block |
||
| 304 | 321 | <?php |
| 305 | 322 | } else { |
| 306 | 323 | ?> |
| 307 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 324 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 325 | + print $archiveupdatetime*1000; |
|
| 326 | +} else { |
|
| 327 | + print $globalMapRefresh*1000+20000; |
|
| 328 | +} |
|
| 329 | +?>+feature.properties.sqt*1000); |
|
| 308 | 330 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 309 | 331 | <?php |
| 310 | 332 | } |
@@ -594,14 +616,24 @@ discard block |
||
| 594 | 616 | if (isset($archive) && $archive) { |
| 595 | 617 | ?> |
| 596 | 618 | //then load it again every 30 seconds |
| 597 | -// var reload = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 619 | +// var reload = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 620 | + print ($globalMapRefresh*1000)/2; |
|
| 621 | +} else { |
|
| 622 | + print '15000'; |
|
| 623 | +} |
|
| 624 | +?>); |
|
| 598 | 625 | reloadMarinePage = setInterval(function(){if (noTimeout) getLiveMarineData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 599 | 626 | <?php |
| 600 | 627 | } else { |
| 601 | 628 | ?> |
| 602 | 629 | //then load it again every 30 seconds |
| 603 | 630 | reloadMarinePage = setInterval( |
| 604 | - function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 631 | + function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 632 | + print $globalMapRefresh*1000; |
|
| 633 | +} else { |
|
| 634 | + print '30000'; |
|
| 635 | +} |
|
| 636 | +?>); |
|
| 605 | 637 | <?php |
| 606 | 638 | } |
| 607 | 639 | ?> |
@@ -553,8 +553,8 @@ discard block |
||
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | <?php |
| 556 | - } else { |
|
| 557 | - ?> |
|
| 556 | + } else { |
|
| 557 | + ?> |
|
| 558 | 558 | if (map.getZoom() > 7) { |
| 559 | 559 | var style = { |
| 560 | 560 | "color": "#1a3151", |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | layer_satellite_data.addLayer(layer); |
| 574 | 574 | } |
| 575 | 575 | <?php |
| 576 | - } |
|
| 576 | + } |
|
| 577 | 577 | ?> |
| 578 | 578 | } |
| 579 | 579 | } |
@@ -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 | // Compressed GeoJson is used if true |
| 8 | 8 | if (!isset($globalJsonCompress)) $compress = true; |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | <?php |
| 20 | 20 | if (isset($_GET['famsatid'])) { |
| 21 | - $famsatid = filter_input(INPUT_GET,'famsatid',FILTER_SANITIZE_STRING); |
|
| 21 | + $famsatid = filter_input(INPUT_GET, 'famsatid', FILTER_SANITIZE_STRING); |
|
| 22 | 22 | } |
| 23 | 23 | if (isset($_GET['ident'])) { |
| 24 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 24 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 25 | 25 | } |
| 26 | 26 | if (!isset($ident) && !isset($famsatid)) { |
| 27 | 27 | ?> |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | <?php |
| 195 | 195 | } else { |
| 196 | 196 | ?> |
| 197 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 197 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 198 | 198 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 199 | 199 | <?php |
| 200 | 200 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | /* |
| 211 | 211 | shadowUrl: iconURLShadowpath, |
| 212 | 212 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
| 213 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 213 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 214 | 214 | */ |
| 215 | 215 | }) |
| 216 | 216 | }) |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | <?php |
| 251 | 251 | } else { |
| 252 | 252 | ?> |
| 253 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 253 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 254 | 254 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 255 | 255 | <?php |
| 256 | 256 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | <?php |
| 306 | 306 | } else { |
| 307 | 307 | ?> |
| 308 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 308 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 309 | 309 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 310 | 310 | <?php |
| 311 | 311 | } |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 9 | -else $compress = $globalJsonCompress; |
|
| 8 | +if (!isset($globalJsonCompress)) { |
|
| 9 | + $compress = true; |
|
| 10 | +} else { |
|
| 11 | + $compress = $globalJsonCompress; |
|
| 12 | +} |
|
| 10 | 13 | $compress = false; |
| 11 | 14 | ?> |
| 12 | 15 | |
@@ -158,9 +161,13 @@ discard block |
||
| 158 | 161 | if (callsign != ""){ markerSatelliteLabel += callsign; } |
| 159 | 162 | if (type != ""){ markerSatelliteLabel += ' - '+type; } |
| 160 | 163 | <?php |
| 161 | - if (isset($_COOKIE['SatelliteIconColor'])) $IconColor = $_COOKIE['SatelliteIconColor']; |
|
| 162 | - elseif (isset($globalSatelliteIconColor)) $IconColor = $globalSatelliteIconColor; |
|
| 163 | - else $IconColor = '1a3151'; |
|
| 164 | + if (isset($_COOKIE['SatelliteIconColor'])) { |
|
| 165 | + $IconColor = $_COOKIE['SatelliteIconColor']; |
|
| 166 | + } elseif (isset($globalSatelliteIconColor)) { |
|
| 167 | + $IconColor = $globalSatelliteIconColor; |
|
| 168 | + } else { |
|
| 169 | + $IconColor = '1a3151'; |
|
| 170 | + } |
|
| 164 | 171 | if (!isset($ident) && !isset($famsatid)) { |
| 165 | 172 | ?> |
| 166 | 173 | info_satellite_update(feature.properties.fc); |
@@ -194,7 +201,12 @@ discard block |
||
| 194 | 201 | <?php |
| 195 | 202 | } else { |
| 196 | 203 | ?> |
| 197 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 204 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 205 | + print $archiveupdatetime*1000; |
|
| 206 | +} else { |
|
| 207 | + print $globalMapRefresh*1000+20000; |
|
| 208 | +} |
|
| 209 | +?>+feature.properties.sqt*1000); |
|
| 198 | 210 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 199 | 211 | <?php |
| 200 | 212 | } |
@@ -250,7 +262,12 @@ discard block |
||
| 250 | 262 | <?php |
| 251 | 263 | } else { |
| 252 | 264 | ?> |
| 253 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 265 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 266 | + print $archiveupdatetime*1000; |
|
| 267 | +} else { |
|
| 268 | + print $globalMapRefresh*1000+20000; |
|
| 269 | +} |
|
| 270 | +?>+feature.properties.sqt*1000); |
|
| 254 | 271 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 255 | 272 | <?php |
| 256 | 273 | } |
@@ -305,7 +322,12 @@ discard block |
||
| 305 | 322 | <?php |
| 306 | 323 | } else { |
| 307 | 324 | ?> |
| 308 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 325 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 326 | + print $archiveupdatetime*1000; |
|
| 327 | +} else { |
|
| 328 | + print $globalMapRefresh*1000+20000; |
|
| 329 | +} |
|
| 330 | +?>+feature.properties.sqt*1000); |
|
| 309 | 331 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 310 | 332 | <?php |
| 311 | 333 | } |
@@ -600,14 +622,24 @@ discard block |
||
| 600 | 622 | if (isset($archive) && $archive) { |
| 601 | 623 | ?> |
| 602 | 624 | //then load it again every 30 seconds |
| 603 | -// var reload = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 625 | +// var reload = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 626 | + print ($globalMapRefresh*1000)/2; |
|
| 627 | +} else { |
|
| 628 | + print '15000'; |
|
| 629 | +} |
|
| 630 | +?>); |
|
| 604 | 631 | reloadSatellitePage = setInterval(function(){if (noTimeout) getLiveSatelliteData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 605 | 632 | <?php |
| 606 | 633 | } else { |
| 607 | 634 | ?> |
| 608 | 635 | //then load it again every 30 seconds |
| 609 | 636 | reloadSatellitePage = setInterval( |
| 610 | - function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 637 | + function(){if (noTimeout) getLiveSatelliteData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 638 | + print $globalMapRefresh*1000; |
|
| 639 | +} else { |
|
| 640 | + print '30000'; |
|
| 641 | +} |
|
| 642 | +?>); |
|
| 611 | 643 | <?php |
| 612 | 644 | } |
| 613 | 645 | ?> |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 9 | -else $compress = $globalJsonCompress; |
|
| 8 | +if (!isset($globalJsonCompress)) { |
|
| 9 | + $compress = true; |
|
| 10 | +} else { |
|
| 11 | + $compress = $globalJsonCompress; |
|
| 12 | +} |
|
| 10 | 13 | ?> |
| 11 | 14 | |
| 12 | 15 | |
@@ -157,9 +160,13 @@ discard block |
||
| 157 | 160 | if (callsign != ""){ markerTrackerLabel += callsign; } |
| 158 | 161 | if (type != ""){ markerTrackerLabel += ' - '+type; } |
| 159 | 162 | <?php |
| 160 | - if (isset($_COOKIE['TrackerIconColor'])) $IconColor = $_COOKIE['TrackerIconColor']; |
|
| 161 | - elseif (isset($globalTrackerIconColor)) $IconColor = $globalTrackerIconColor; |
|
| 162 | - else $IconColor = '1a3151'; |
|
| 163 | + if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 164 | + $IconColor = $_COOKIE['TrackerIconColor']; |
|
| 165 | + } elseif (isset($globalTrackerIconColor)) { |
|
| 166 | + $IconColor = $globalTrackerIconColor; |
|
| 167 | + } else { |
|
| 168 | + $IconColor = '1a3151'; |
|
| 169 | + } |
|
| 163 | 170 | if (!isset($ident) && !isset($famtrackid)) { |
| 164 | 171 | ?> |
| 165 | 172 | //info_tracker_update(feature.properties.fc); |
@@ -193,7 +200,12 @@ discard block |
||
| 193 | 200 | <?php |
| 194 | 201 | } else { |
| 195 | 202 | ?> |
| 196 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 203 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 204 | + print $archiveupdatetime*1000; |
|
| 205 | +} else { |
|
| 206 | + print $globalMapRefresh*1000+20000; |
|
| 207 | +} |
|
| 208 | +?>+feature.properties.sqt*1000); |
|
| 197 | 209 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 198 | 210 | <?php |
| 199 | 211 | } |
@@ -249,7 +261,12 @@ discard block |
||
| 249 | 261 | <?php |
| 250 | 262 | } else { |
| 251 | 263 | ?> |
| 252 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 264 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 265 | + print $archiveupdatetime*1000; |
|
| 266 | +} else { |
|
| 267 | + print $globalMapRefresh*1000+20000; |
|
| 268 | +} |
|
| 269 | +?>+feature.properties.sqt*1000); |
|
| 253 | 270 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 254 | 271 | <?php |
| 255 | 272 | } |
@@ -304,7 +321,12 @@ discard block |
||
| 304 | 321 | <?php |
| 305 | 322 | } else { |
| 306 | 323 | ?> |
| 307 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 324 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 325 | + print $archiveupdatetime*1000; |
|
| 326 | +} else { |
|
| 327 | + print $globalMapRefresh*1000+20000; |
|
| 328 | +} |
|
| 329 | +?>+feature.properties.sqt*1000); |
|
| 308 | 330 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 309 | 331 | <?php |
| 310 | 332 | } |
@@ -595,14 +617,24 @@ discard block |
||
| 595 | 617 | if (isset($archive) && $archive) { |
| 596 | 618 | ?> |
| 597 | 619 | //then load it again every 30 seconds |
| 598 | -// var reload = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 620 | +// var reload = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 621 | + print ($globalMapRefresh*1000)/2; |
|
| 622 | +} else { |
|
| 623 | + print '15000'; |
|
| 624 | +} |
|
| 625 | +?>); |
|
| 599 | 626 | reloadTrackerPage = setInterval(function(){if (noTimeout) getLiveTrackerData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 600 | 627 | <?php |
| 601 | 628 | } else { |
| 602 | 629 | ?> |
| 603 | 630 | //then load it again every 30 seconds |
| 604 | 631 | reloadTrackerPage = setInterval( |
| 605 | - function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 632 | + function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 633 | + print $globalMapRefresh*1000; |
|
| 634 | +} else { |
|
| 635 | + print '30000'; |
|
| 636 | +} |
|
| 637 | +?>); |
|
| 606 | 638 | <?php |
| 607 | 639 | } |
| 608 | 640 | ?> |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // When button "Remove all filters" is clicked |
| 29 | 29 | if (isset($_POST['removefilters'])) { |
| 30 | 30 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
| 31 | - return strpos($key,'filter_') === 0; |
|
| 31 | + return strpos($key,'filter_') === 0; |
|
| 32 | 32 | }); |
| 33 | 33 | foreach ($allfilters as $filt) { |
| 34 | 34 | unset($_COOKIE[$filt]); |
@@ -160,17 +160,17 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | ?> |
| 162 | 162 | <?php |
| 163 | - if (isset($_POST['archive'])) { |
|
| 163 | + if (isset($_POST['archive'])) { |
|
| 164 | 164 | ?> |
| 165 | 165 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 166 | 166 | <?php |
| 167 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 167 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 168 | 168 | ?> |
| 169 | 169 | |
| 170 | 170 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script> |
| 171 | 171 | <?php |
| 172 | - } |
|
| 173 | - } else { |
|
| 172 | + } |
|
| 173 | + } else { |
|
| 174 | 174 | ?> |
| 175 | 175 | <?php |
| 176 | 176 | /* if (isset($globalBeta) && $globalBeta) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | ?> |
| 184 | 184 | <?php |
| 185 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 185 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 186 | 186 | ?> |
| 187 | 187 | <?php |
| 188 | 188 | // if (isset($globalBeta) && $globalBeta) { |
@@ -213,13 +213,13 @@ discard block |
||
| 213 | 213 | <script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>"></script> |
| 214 | 214 | <?php |
| 215 | 215 | } |
| 216 | - } |
|
| 216 | + } |
|
| 217 | 217 | ?> |
| 218 | 218 | <?php |
| 219 | 219 | // } |
| 220 | 220 | ?> |
| 221 | 221 | <?php |
| 222 | - } |
|
| 222 | + } |
|
| 223 | 223 | } |
| 224 | 224 | ?> |
| 225 | 225 | <?php |
@@ -397,61 +397,61 @@ discard block |
||
| 397 | 397 | <ul class="nav navbar-nav"> |
| 398 | 398 | |
| 399 | 399 | <?php |
| 400 | - $sub = false; |
|
| 401 | - if ( |
|
| 400 | + $sub = false; |
|
| 401 | + if ( |
|
| 402 | 402 | ( |
| 403 | - (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 403 | + (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 404 | 404 | ) || |
| 405 | 405 | ( |
| 406 | - isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 406 | + isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 407 | 407 | ) || |
| 408 | 408 | ( |
| 409 | - isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 409 | + isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 410 | 410 | ) || |
| 411 | 411 | ( |
| 412 | - isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 412 | + isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 413 | 413 | ) |
| 414 | - ) { |
|
| 414 | + ) { |
|
| 415 | 415 | $sub = true; |
| 416 | - } |
|
| 416 | + } |
|
| 417 | 417 | ?> |
| 418 | 418 | <?php |
| 419 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 419 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 420 | 420 | ?> |
| 421 | 421 | <li class="dropdown"> |
| 422 | 422 | <?php |
| 423 | - if ($sub) { |
|
| 423 | + if ($sub) { |
|
| 424 | 424 | ?> |
| 425 | 425 | <li class="dropdown"> |
| 426 | 426 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircrafts"); ?> <b class="caret"></b></a> |
| 427 | 427 | <ul class="dropdown-menu multi-level"> |
| 428 | 428 | <li class="dropdown-submenu"> |
| 429 | 429 | <?php |
| 430 | - } |
|
| 430 | + } |
|
| 431 | 431 | ?> |
| 432 | 432 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
| 433 | 433 | <ul class="dropdown-menu"> |
| 434 | 434 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
| 435 | 435 | <?php |
| 436 | - if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 436 | + if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 437 | 437 | ?> |
| 438 | 438 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
| 439 | 439 | <?php |
| 440 | - } |
|
| 440 | + } |
|
| 441 | 441 | ?> |
| 442 | 442 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
| 443 | 443 | <?php |
| 444 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 444 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 445 | 445 | ?> |
| 446 | 446 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
| 447 | 447 | <?php |
| 448 | - } |
|
| 449 | - if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 448 | + } |
|
| 449 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 450 | 450 | |
| 451 | 451 | ?> |
| 452 | 452 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
| 453 | 453 | <?php |
| 454 | - } |
|
| 454 | + } |
|
| 455 | 455 | ?> |
| 456 | 456 | <li><hr /></li> |
| 457 | 457 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -459,43 +459,43 @@ discard block |
||
| 459 | 459 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 460 | 460 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 461 | 461 | <?php |
| 462 | - if ($globalACARS) { |
|
| 463 | - if (isset($globalDemo) && $globalDemo) { |
|
| 464 | - ?> |
|
| 462 | + if ($globalACARS) { |
|
| 463 | + if (isset($globalDemo) && $globalDemo) { |
|
| 464 | + ?> |
|
| 465 | 465 | <li><hr /></li> |
| 466 | 466 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
| 467 | 467 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
| 468 | 468 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
| 469 | 469 | <?php |
| 470 | - } else { |
|
| 471 | - ?> |
|
| 470 | + } else { |
|
| 471 | + ?> |
|
| 472 | 472 | <li><hr /></li> |
| 473 | 473 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 474 | 474 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 475 | 475 | <?php |
| 476 | - } |
|
| 477 | - } |
|
| 478 | - ?> |
|
| 476 | + } |
|
| 477 | + } |
|
| 478 | + ?> |
|
| 479 | 479 | <?php |
| 480 | - if (isset($globalAccidents) && $globalAccidents) { |
|
| 481 | - ?> |
|
| 480 | + if (isset($globalAccidents) && $globalAccidents) { |
|
| 481 | + ?> |
|
| 482 | 482 | <li><hr /></li> |
| 483 | 483 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
| 484 | 484 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
| 485 | 485 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
| 486 | 486 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
| 487 | 487 | <?php |
| 488 | - } |
|
| 489 | - ?> |
|
| 488 | + } |
|
| 489 | + ?> |
|
| 490 | 490 | <li><hr /></li> |
| 491 | 491 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 492 | 492 | <?php |
| 493 | 493 | if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) { |
| 494 | - ?> |
|
| 494 | + ?> |
|
| 495 | 495 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
| 496 | 496 | <?php |
| 497 | 497 | } |
| 498 | - ?> |
|
| 498 | + ?> |
|
| 499 | 499 | </ul> |
| 500 | 500 | </li> |
| 501 | 501 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
@@ -522,14 +522,14 @@ discard block |
||
| 522 | 522 | </ul> |
| 523 | 523 | <?php |
| 524 | 524 | } |
| 525 | - } |
|
| 525 | + } |
|
| 526 | 526 | ?> |
| 527 | 527 | <?php |
| 528 | - if (isset($globalMarine) && $globalMarine) { |
|
| 528 | + if (isset($globalMarine) && $globalMarine) { |
|
| 529 | 529 | ?> |
| 530 | 530 | <li class="dropdown"> |
| 531 | 531 | <?php |
| 532 | - if ($sub) { |
|
| 532 | + if ($sub) { |
|
| 533 | 533 | ?> |
| 534 | 534 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Vessels"); ?> <b class="caret"></b></a> |
| 535 | 535 | <ul class="dropdown-menu multi-level"> |
@@ -554,14 +554,14 @@ discard block |
||
| 554 | 554 | } |
| 555 | 555 | ?> |
| 556 | 556 | <?php |
| 557 | - } |
|
| 557 | + } |
|
| 558 | 558 | ?> |
| 559 | 559 | <?php |
| 560 | - if (isset($globalTracker) && $globalTracker) { |
|
| 560 | + if (isset($globalTracker) && $globalTracker) { |
|
| 561 | 561 | ?> |
| 562 | 562 | <li class="dropdown"> |
| 563 | 563 | <?php |
| 564 | - if ($sub) { |
|
| 564 | + if ($sub) { |
|
| 565 | 565 | ?> |
| 566 | 566 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
| 567 | 567 | <ul class="dropdown-menu multi-level"> |
@@ -586,14 +586,14 @@ discard block |
||
| 586 | 586 | } |
| 587 | 587 | ?> |
| 588 | 588 | <?php |
| 589 | - } |
|
| 589 | + } |
|
| 590 | 590 | ?> |
| 591 | 591 | <?php |
| 592 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 592 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 593 | 593 | ?> |
| 594 | 594 | <li class="dropdown"> |
| 595 | 595 | <?php |
| 596 | - if ($sub) { |
|
| 596 | + if ($sub) { |
|
| 597 | 597 | ?> |
| 598 | 598 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellite"); ?> <b class="caret"></b></a> |
| 599 | 599 | <ul class="dropdown-menu multi-level"> |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | } |
| 621 | 621 | ?> |
| 622 | 622 | <?php |
| 623 | - } |
|
| 623 | + } |
|
| 624 | 624 | ?> |
| 625 | 625 | |
| 626 | 626 | <li class="dropdown"> |
@@ -629,12 +629,12 @@ discard block |
||
| 629 | 629 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
| 630 | 630 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
| 631 | 631 | <?php |
| 632 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 632 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 633 | 633 | ?> |
| 634 | 634 | <li><hr /></li> |
| 635 | 635 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
| 636 | 636 | <?php |
| 637 | - } |
|
| 637 | + } |
|
| 638 | 638 | ?> |
| 639 | 639 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
| 640 | 640 | <li><hr /></li> |
@@ -655,14 +655,14 @@ discard block |
||
| 655 | 655 | <form> |
| 656 | 656 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 657 | 657 | <?php |
| 658 | - $Language = new Language(); |
|
| 659 | - $alllang = $Language->getLanguages(); |
|
| 660 | - foreach ($alllang as $key => $lang) { |
|
| 661 | - print '<option value="'.$key.'"'; |
|
| 662 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 663 | - print '>'.$lang[0].'</option>'; |
|
| 664 | - } |
|
| 665 | - ?> |
|
| 658 | + $Language = new Language(); |
|
| 659 | + $alllang = $Language->getLanguages(); |
|
| 660 | + foreach ($alllang as $key => $lang) { |
|
| 661 | + print '<option value="'.$key.'"'; |
|
| 662 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 663 | + print '>'.$lang[0].'</option>'; |
|
| 664 | + } |
|
| 665 | + ?> |
|
| 666 | 666 | </select> |
| 667 | 667 | </form> |
| 668 | 668 | </div> |
@@ -693,18 +693,18 @@ discard block |
||
| 693 | 693 | ?> |
| 694 | 694 | <div class="top-header clear" role="main"> |
| 695 | 695 | <?php |
| 696 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 696 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 697 | 697 | ?> |
| 698 | 698 | <div id="archive-map"></div> |
| 699 | 699 | <?php |
| 700 | - } |
|
| 700 | + } |
|
| 701 | 701 | ?> |
| 702 | 702 | </div> |
| 703 | 703 | <?php |
| 704 | 704 | } |
| 705 | 705 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 706 | 706 | { |
| 707 | - ?> |
|
| 707 | + ?> |
|
| 708 | 708 | <div class="top-header clear" role="main"> |
| 709 | 709 | <div id="map"></div> |
| 710 | 710 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -715,15 +715,15 @@ discard block |
||
| 715 | 715 | var zoom = 13; |
| 716 | 716 | //create the map |
| 717 | 717 | <?php |
| 718 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 718 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 719 | 719 | ?> |
| 720 | 720 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 721 | 721 | <?php |
| 722 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 722 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 723 | 723 | ?> |
| 724 | 724 | map = L.map('map', { zoomControl:true }); |
| 725 | 725 | <?php |
| 726 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 726 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 727 | 727 | ?> |
| 728 | 728 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 729 | 729 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -731,22 +731,22 @@ discard block |
||
| 731 | 731 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 732 | 732 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 733 | 733 | <?php |
| 734 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 734 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 735 | 735 | ?> |
| 736 | 736 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 737 | 737 | <?php |
| 738 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 738 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 739 | 739 | ?> |
| 740 | 740 | map = L.map('map', { zoomControl:true }); |
| 741 | 741 | <?php |
| 742 | - } |
|
| 742 | + } |
|
| 743 | 743 | ?> |
| 744 | 744 | //initialize the layer group for the aircrft markers |
| 745 | 745 | var layer_data = L.layerGroup(); |
| 746 | 746 | |
| 747 | 747 | //a few title layers |
| 748 | 748 | <?php |
| 749 | - if ($globalMapProvider == 'Mapbox') { |
|
| 749 | + if ($globalMapProvider == 'Mapbox') { |
|
| 750 | 750 | ?> |
| 751 | 751 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 752 | 752 | maxZoom: 18, |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | token : '<?php print $globalMapboxToken; ?>' |
| 758 | 758 | }).addTo(map); |
| 759 | 759 | <?php |
| 760 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 760 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 761 | 761 | ?> |
| 762 | 762 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 763 | 763 | maxZoom: 18, |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 767 | 767 | }).addTo(map); |
| 768 | 768 | <?php |
| 769 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 769 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 770 | 770 | ?> |
| 771 | 771 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 772 | 772 | maxZoom: 18, |
@@ -775,27 +775,27 @@ discard block |
||
| 775 | 775 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 776 | 776 | }).addTo(map); |
| 777 | 777 | <?php |
| 778 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 778 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 779 | 779 | ?> |
| 780 | 780 | var googleLayer = new L.Google('ROADMAP'); |
| 781 | 781 | map.addLayer(googleLayer); |
| 782 | 782 | <?php |
| 783 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 783 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 784 | 784 | ?> |
| 785 | 785 | var googleLayer = new L.Google('SATELLITE'); |
| 786 | 786 | map.addLayer(googleLayer); |
| 787 | 787 | <?php |
| 788 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 788 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 789 | 789 | ?> |
| 790 | 790 | var googleLayer = new L.Google('HYBRID'); |
| 791 | 791 | map.addLayer(googleLayer); |
| 792 | 792 | <?php |
| 793 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 793 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 794 | 794 | ?> |
| 795 | 795 | var googleLayer = new L.Google('Terrain'); |
| 796 | 796 | map.addLayer(googleLayer); |
| 797 | 797 | <?php |
| 798 | - } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 798 | + } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 799 | 799 | $customid = $globalMapProvider; |
| 800 | 800 | ?> |
| 801 | 801 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
@@ -805,8 +805,8 @@ discard block |
||
| 805 | 805 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 806 | 806 | }).addTo(map); |
| 807 | 807 | <?php |
| 808 | - //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 809 | - } else { |
|
| 808 | + //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 809 | + } else { |
|
| 810 | 810 | ?> |
| 811 | 811 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 812 | 812 | maxZoom: 18, |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | }).addTo(map); |
| 816 | 816 | |
| 817 | 817 | <?php |
| 818 | - } |
|
| 818 | + } |
|
| 819 | 819 | ?> |
| 820 | 820 | </script> |
| 821 | 821 | </div> |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | <?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 } ?> |
| 47 | 47 | </tr></table></div> |
| 48 | 48 | <?php |
| 49 | - if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
| 49 | + if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
| 50 | 50 | ?> |
| 51 | 51 | <script src="<?php echo $globalURL; ?>/js/map.3d.js.php"></script> |
| 52 | 52 | <?php |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script> |
| 71 | 71 | <?php |
| 72 | 72 | } |
| 73 | - } |
|
| 73 | + } |
|
| 74 | 74 | ?> |
| 75 | 75 | |
| 76 | 76 | <div id="sidebar" class="sidebar collapsed"> |
@@ -81,34 +81,34 @@ discard block |
||
| 81 | 81 | <li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
| 82 | 82 | <li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
| 83 | 83 | <?php |
| 84 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 84 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 85 | 85 | if (isset($globalArchive) && $globalArchive == TRUE) { |
| 86 | 86 | ?> |
| 87 | 87 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
| 88 | 88 | <?php |
| 89 | 89 | } |
| 90 | - } |
|
| 90 | + } |
|
| 91 | 91 | ?> |
| 92 | 92 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
| 93 | 93 | <li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li> |
| 94 | 94 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
| 95 | 95 | <?php |
| 96 | - if (isset($globalMap3D) && $globalMap3D) { |
|
| 96 | + if (isset($globalMap3D) && $globalMap3D) { |
|
| 97 | 97 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
| 98 | 98 | ?> |
| 99 | 99 | <li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li> |
| 100 | 100 | <?php |
| 101 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 101 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 102 | 102 | ?> |
| 103 | 103 | <li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li> |
| 104 | 104 | <?php |
| 105 | - } |
|
| 105 | + } |
|
| 106 | 106 | } else { |
| 107 | 107 | ?> |
| 108 | 108 | <li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li> |
| 109 | 109 | <?php |
| 110 | 110 | } |
| 111 | - } |
|
| 111 | + } |
|
| 112 | 112 | ?> |
| 113 | 113 | </ul> |
| 114 | 114 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | ?> |
| 184 | 184 | </div> |
| 185 | 185 | <?php |
| 186 | - if (isset($globalArchive) && $globalArchive == TRUE) { |
|
| 186 | + if (isset($globalArchive) && $globalArchive == TRUE) { |
|
| 187 | 187 | ?> |
| 188 | 188 | <div class="sidebar-pane" id="archive"> |
| 189 | 189 | <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | </form> |
| 244 | 244 | </div> |
| 245 | 245 | <?php |
| 246 | - } |
|
| 246 | + } |
|
| 247 | 247 | ?> |
| 248 | 248 | <div class="sidebar-pane" id="settings"> |
| 249 | 249 | <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -254,56 +254,56 @@ discard block |
||
| 254 | 254 | <?php |
| 255 | 255 | if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
| 256 | 256 | else $MapType = $_COOKIE['MapType']; |
| 257 | - ?> |
|
| 257 | + ?> |
|
| 258 | 258 | <?php |
| 259 | 259 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 260 | - ?> |
|
| 260 | + ?> |
|
| 261 | 261 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
| 262 | 262 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
| 263 | 263 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
| 264 | 264 | <?php |
| 265 | 265 | } |
| 266 | - ?> |
|
| 266 | + ?> |
|
| 267 | 267 | <?php |
| 268 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 269 | - ?> |
|
| 268 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 269 | + ?> |
|
| 270 | 270 | <?php |
| 271 | - if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
| 272 | - ?> |
|
| 271 | + if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
| 272 | + ?> |
|
| 273 | 273 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
| 274 | 274 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
| 275 | 275 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
| 276 | 276 | <?php |
| 277 | - } |
|
| 278 | - ?> |
|
| 277 | + } |
|
| 278 | + ?> |
|
| 279 | 279 | <?php |
| 280 | - if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
|
| 281 | - ?> |
|
| 280 | + if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
|
| 281 | + ?> |
|
| 282 | 282 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
| 283 | 283 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
| 284 | 284 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
| 285 | 285 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
| 286 | 286 | <?php |
| 287 | - } |
|
| 288 | - ?> |
|
| 287 | + } |
|
| 288 | + ?> |
|
| 289 | 289 | <?php |
| 290 | - if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
|
| 291 | - ?> |
|
| 290 | + if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
|
| 291 | + ?> |
|
| 292 | 292 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
| 293 | 293 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
| 294 | 294 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
| 295 | 295 | <?php |
| 296 | - } |
|
| 297 | - ?> |
|
| 296 | + } |
|
| 297 | + ?> |
|
| 298 | 298 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
| 299 | 299 | <?php |
| 300 | 300 | } |
| 301 | - ?> |
|
| 301 | + ?> |
|
| 302 | 302 | <?php |
| 303 | - if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
| 303 | + if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
| 304 | 304 | if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
| 305 | 305 | else $MapBoxId = $_COOKIE['MapTypeId']; |
| 306 | - ?> |
|
| 306 | + ?> |
|
| 307 | 307 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
| 308 | 308 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
| 309 | 309 | <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
@@ -317,13 +317,13 @@ discard block |
||
| 317 | 317 | <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
| 318 | 318 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
| 319 | 319 | <?php |
| 320 | - } |
|
| 321 | - ?> |
|
| 320 | + } |
|
| 321 | + ?> |
|
| 322 | 322 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
| 323 | 323 | </select> |
| 324 | 324 | </li> |
| 325 | 325 | <?php |
| 326 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 326 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 327 | 327 | ?> |
| 328 | 328 | <li><?php echo _("Type of Terrain:"); ?> |
| 329 | 329 | <select class="selectpicker" onchange="terrainType(this);"> |
@@ -334,10 +334,10 @@ discard block |
||
| 334 | 334 | </select> |
| 335 | 335 | </li> |
| 336 | 336 | <?php |
| 337 | - } |
|
| 337 | + } |
|
| 338 | 338 | ?> |
| 339 | 339 | <?php |
| 340 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 340 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 341 | 341 | ?> |
| 342 | 342 | <?php |
| 343 | 343 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
@@ -354,89 +354,89 @@ discard block |
||
| 354 | 354 | <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
| 355 | 355 | <?php |
| 356 | 356 | } |
| 357 | - } |
|
| 357 | + } |
|
| 358 | 358 | ?> |
| 359 | 359 | <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
| 360 | 360 | <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
| 361 | 361 | <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
| 362 | 362 | <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
| 363 | 363 | <?php |
| 364 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 364 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
| 365 | 365 | ?> |
| 366 | 366 | <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
| 367 | 367 | <?php |
| 368 | - } |
|
| 369 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 368 | + } |
|
| 369 | + if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 370 | 370 | ?> |
| 371 | 371 | <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> |
| 372 | 372 | <?php |
| 373 | - } |
|
| 373 | + } |
|
| 374 | 374 | ?> |
| 375 | 375 | |
| 376 | 376 | <?php |
| 377 | 377 | if (function_exists('array_column')) { |
| 378 | - if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
| 379 | - ?> |
|
| 378 | + if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
| 379 | + ?> |
|
| 380 | 380 | <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
| 381 | 381 | <?php |
| 382 | - } |
|
| 382 | + } |
|
| 383 | 383 | } elseif (isset($globalSources)) { |
| 384 | - $dispolar = false; |
|
| 385 | - foreach ($globalSources as $testsource) { |
|
| 386 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 387 | - } |
|
| 388 | - if ($dispolar) { |
|
| 389 | - ?> |
|
| 384 | + $dispolar = false; |
|
| 385 | + foreach ($globalSources as $testsource) { |
|
| 386 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 387 | + } |
|
| 388 | + if ($dispolar) { |
|
| 389 | + ?> |
|
| 390 | 390 | <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
| 391 | 391 | <?php |
| 392 | - } |
|
| 393 | - } |
|
| 394 | - ?> |
|
| 392 | + } |
|
| 393 | + } |
|
| 394 | + ?> |
|
| 395 | 395 | <?php |
| 396 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 396 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
| 397 | 397 | ?> |
| 398 | 398 | |
| 399 | 399 | <?php |
| 400 | 400 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 401 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 402 | - ?> |
|
| 401 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 402 | + ?> |
|
| 403 | 403 | <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
| 404 | 404 | <?php |
| 405 | 405 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 406 | - ?> |
|
| 406 | + ?> |
|
| 407 | 407 | <li><?php echo _("Aircraft icon color:"); ?> |
| 408 | 408 | <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
| 409 | 409 | </li> |
| 410 | 410 | <?php |
| 411 | 411 | } |
| 412 | - } |
|
| 413 | - } |
|
| 414 | - ?> |
|
| 412 | + } |
|
| 413 | + } |
|
| 414 | + ?> |
|
| 415 | 415 | <?php |
| 416 | 416 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 417 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 418 | - ?> |
|
| 417 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 418 | + ?> |
|
| 419 | 419 | <li><?php echo _("Marine icon color:"); ?> |
| 420 | 420 | <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
| 421 | 421 | </li> |
| 422 | 422 | <?php |
| 423 | - } |
|
| 424 | - } |
|
| 425 | - ?> |
|
| 423 | + } |
|
| 424 | + } |
|
| 425 | + ?> |
|
| 426 | 426 | <?php |
| 427 | 427 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 428 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 429 | - ?> |
|
| 428 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 429 | + ?> |
|
| 430 | 430 | <li><?php echo _("Tracker icon color:"); ?> |
| 431 | 431 | <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
| 432 | 432 | </li> |
| 433 | 433 | <?php |
| 434 | - } |
|
| 435 | - } |
|
| 436 | - ?> |
|
| 434 | + } |
|
| 435 | + } |
|
| 436 | + ?> |
|
| 437 | 437 | <?php |
| 438 | 438 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 439 | - ?> |
|
| 439 | + ?> |
|
| 440 | 440 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 441 | 441 | <div class="range"> |
| 442 | 442 | <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
@@ -445,9 +445,9 @@ discard block |
||
| 445 | 445 | </li> |
| 446 | 446 | <?php |
| 447 | 447 | } |
| 448 | - ?> |
|
| 448 | + ?> |
|
| 449 | 449 | <?php |
| 450 | - } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
| 450 | + } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
| 451 | 451 | ?> |
| 452 | 452 | <?php |
| 453 | 453 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | </li> |
| 479 | 479 | <?php |
| 480 | 480 | } |
| 481 | - } |
|
| 481 | + } |
|
| 482 | 482 | ?> |
| 483 | 483 | <li><?php echo _("Distance unit:"); ?> |
| 484 | 484 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -511,19 +511,19 @@ discard block |
||
| 511 | 511 | <ul> |
| 512 | 512 | <?php |
| 513 | 513 | if (!isset($globalAircraft) || $globalAircraft) { |
| 514 | - ?> |
|
| 514 | + ?> |
|
| 515 | 515 | <?php |
| 516 | 516 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 517 | - ?> |
|
| 517 | + ?> |
|
| 518 | 518 | <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
| 519 | 519 | <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
| 520 | 520 | <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
| 521 | 521 | <?php |
| 522 | 522 | } |
| 523 | - ?> |
|
| 523 | + ?> |
|
| 524 | 524 | <?php |
| 525 | 525 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 526 | - ?> |
|
| 526 | + ?> |
|
| 527 | 527 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 528 | 528 | <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
| 529 | 529 | <?php } ?> |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | <?php } ?> |
| 533 | 533 | <?php |
| 534 | 534 | } |
| 535 | - ?> |
|
| 535 | + ?> |
|
| 536 | 536 | <li><?php echo _("Display airlines:"); ?> |
| 537 | 537 | <br/> |
| 538 | 538 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -552,14 +552,14 @@ discard block |
||
| 552 | 552 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | - ?> |
|
| 555 | + ?> |
|
| 556 | 556 | </select> |
| 557 | 557 | </li> |
| 558 | 558 | <?php |
| 559 | 559 | $Spotter = new Spotter(); |
| 560 | 560 | $allalliancenames = $Spotter->getAllAllianceNames(); |
| 561 | 561 | if (!empty($allalliancenames)) { |
| 562 | - ?> |
|
| 562 | + ?> |
|
| 563 | 563 | <li><?php echo _("Display alliance:"); ?> |
| 564 | 564 | <br/> |
| 565 | 565 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -573,18 +573,18 @@ discard block |
||
| 573 | 573 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
| 574 | 574 | } |
| 575 | 575 | } |
| 576 | - ?> |
|
| 576 | + ?> |
|
| 577 | 577 | </select> |
| 578 | 578 | </li> |
| 579 | 579 | <?php |
| 580 | 580 | } |
| 581 | - ?> |
|
| 581 | + ?> |
|
| 582 | 582 | <?php |
| 583 | 583 | } |
| 584 | - ?> |
|
| 584 | + ?> |
|
| 585 | 585 | <?php |
| 586 | 586 | if (isset($globalAPRS) && $globalAPRS) { |
| 587 | - ?> |
|
| 587 | + ?> |
|
| 588 | 588 | <li><?php echo _("Display APRS sources name:"); ?> |
| 589 | 589 | <select class="selectpicker" multiple onchange="sources(this);"> |
| 590 | 590 | <?php |
@@ -596,18 +596,18 @@ discard block |
||
| 596 | 596 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
| 597 | 597 | } |
| 598 | 598 | } |
| 599 | - ?> |
|
| 599 | + ?> |
|
| 600 | 600 | </select> |
| 601 | 601 | </li> |
| 602 | 602 | <?php |
| 603 | 603 | } |
| 604 | - ?> |
|
| 604 | + ?> |
|
| 605 | 605 | <?php |
| 606 | 606 | if (!isset($globalAircraft) && $globalAircraft) { |
| 607 | - ?> |
|
| 607 | + ?> |
|
| 608 | 608 | <?php |
| 609 | 609 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
| 610 | - ?> |
|
| 610 | + ?> |
|
| 611 | 611 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 612 | 612 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 613 | 613 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -618,14 +618,14 @@ discard block |
||
| 618 | 618 | </li> |
| 619 | 619 | <?php |
| 620 | 620 | } |
| 621 | - ?> |
|
| 621 | + ?> |
|
| 622 | 622 | <li> |
| 623 | 623 | <?php echo _("Display flight with ident:"); ?> |
| 624 | 624 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
| 625 | 625 | </li> |
| 626 | 626 | <?php |
| 627 | 627 | } |
| 628 | - ?> |
|
| 628 | + ?> |
|
| 629 | 629 | </ul> |
| 630 | 630 | </form> |
| 631 | 631 | <form method="post"> |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | </form> |
| 635 | 635 | </div> |
| 636 | 636 | <?php |
| 637 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 637 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 638 | 638 | ?> |
| 639 | 639 | <div class="sidebar-pane" id="satellites"> |
| 640 | 640 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -674,14 +674,14 @@ discard block |
||
| 674 | 674 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
| 675 | 675 | } |
| 676 | 676 | } |
| 677 | - ?> |
|
| 677 | + ?> |
|
| 678 | 678 | </select> |
| 679 | 679 | </li> |
| 680 | 680 | </ul> |
| 681 | 681 | </form> |
| 682 | 682 | </div> |
| 683 | 683 | <?php |
| 684 | - } |
|
| 684 | + } |
|
| 685 | 685 | ?> |
| 686 | 686 | </div> |
| 687 | 687 | </div> |
@@ -162,11 +162,26 @@ discard block |
||
| 162 | 162 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
| 163 | 163 | <li><?php echo _("NOTAM scope:"); ?> |
| 164 | 164 | <select class="selectpicker" onchange="notamscope(this);"> |
| 165 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 166 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 167 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 168 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 169 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 165 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 166 | + print ' selected'; |
|
| 167 | +} |
|
| 168 | +?>>All</option> |
|
| 169 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 170 | + print ' selected'; |
|
| 171 | +} |
|
| 172 | +?>>Airport/Enroute warning</option> |
|
| 173 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 174 | + print ' selected'; |
|
| 175 | +} |
|
| 176 | +?>>Airport warning</option> |
|
| 177 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 178 | + print ' selected'; |
|
| 179 | +} |
|
| 180 | +?>>Navigation warning</option> |
|
| 181 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 182 | + print ' selected'; |
|
| 183 | +} |
|
| 184 | +?>>Enroute warning</option> |
|
| 170 | 185 | </select |
| 171 | 186 | </li> |
| 172 | 187 | </ul> |
@@ -194,7 +209,12 @@ discard block |
||
| 194 | 209 | <div class="form-group"> |
| 195 | 210 | <label>From (UTC):</label> |
| 196 | 211 | <div class='input-group date' id='datetimepicker1'> |
| 197 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
| 212 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
| 213 | + print $_POST['start_date']; |
|
| 214 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
| 215 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
| 216 | +} |
|
| 217 | +?>" required /> |
|
| 198 | 218 | <span class="input-group-addon"> |
| 199 | 219 | <span class="glyphicon glyphicon-calendar"></span> |
| 200 | 220 | </span> |
@@ -203,7 +223,12 @@ discard block |
||
| 203 | 223 | <div class="form-group"> |
| 204 | 224 | <label>To (UTC):</label> |
| 205 | 225 | <div class='input-group date' id='datetimepicker2'> |
| 206 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
| 226 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
| 227 | + print $_POST['end_date']; |
|
| 228 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
| 229 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
| 230 | +} |
|
| 231 | +?>" /> |
|
| 207 | 232 | <span class="input-group-addon"> |
| 208 | 233 | <span class="glyphicon glyphicon-calendar"></span> |
| 209 | 234 | </span> |
@@ -229,8 +254,20 @@ discard block |
||
| 229 | 254 | |
| 230 | 255 | <li><?php echo _("Playback speed:"); ?> |
| 231 | 256 | <div class="range"> |
| 232 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
| 233 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 257 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
| 258 | + print $_POST['archivespeed']; |
|
| 259 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
| 260 | + print $_COOKIE['archive_speed']; |
|
| 261 | +} else { |
|
| 262 | + print '1'; |
|
| 263 | +} |
|
| 264 | +?>"> |
|
| 265 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 266 | + print $_COOKIE['archive_speed']; |
|
| 267 | +} else { |
|
| 268 | + print '1'; |
|
| 269 | +} |
|
| 270 | +?></output> |
|
| 234 | 271 | </div> |
| 235 | 272 | </li> |
| 236 | 273 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -252,15 +289,27 @@ discard block |
||
| 252 | 289 | <li><?php echo _("Type of Map:"); ?> |
| 253 | 290 | <select class="selectpicker" onchange="mapType(this);"> |
| 254 | 291 | <?php |
| 255 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 256 | - else $MapType = $_COOKIE['MapType']; |
|
| 292 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 293 | + $MapType = $globalMapProvider; |
|
| 294 | + } else { |
|
| 295 | + $MapType = $_COOKIE['MapType']; |
|
| 296 | + } |
|
| 257 | 297 | ?> |
| 258 | 298 | <?php |
| 259 | 299 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 260 | 300 | ?> |
| 261 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 262 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 263 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 301 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 302 | + print ' selected'; |
|
| 303 | +} |
|
| 304 | +?>>Bing-Aerial</option> |
|
| 305 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 306 | + print ' selected'; |
|
| 307 | +} |
|
| 308 | +?>>Bing-Hybrid</option> |
|
| 309 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 310 | + print ' selected'; |
|
| 311 | +} |
|
| 312 | +?>>Bing-Road</option> |
|
| 264 | 313 | <?php |
| 265 | 314 | } |
| 266 | 315 | ?> |
@@ -270,56 +319,131 @@ discard block |
||
| 270 | 319 | <?php |
| 271 | 320 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 272 | 321 | ?> |
| 273 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 274 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 275 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 322 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 323 | + print ' selected'; |
|
| 324 | +} |
|
| 325 | +?>>Here-Aerial</option> |
|
| 326 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 327 | + print ' selected'; |
|
| 328 | +} |
|
| 329 | +?>>Here-Hybrid</option> |
|
| 330 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 331 | + print ' selected'; |
|
| 332 | +} |
|
| 333 | +?>>Here-Road</option> |
|
| 276 | 334 | <?php |
| 277 | 335 | } |
| 278 | 336 | ?> |
| 279 | 337 | <?php |
| 280 | 338 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 281 | 339 | ?> |
| 282 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 283 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 284 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 285 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 340 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 341 | + print ' selected'; |
|
| 342 | +} |
|
| 343 | +?>>Google Roadmap</option> |
|
| 344 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 345 | + print ' selected'; |
|
| 346 | +} |
|
| 347 | +?>>Google Satellite</option> |
|
| 348 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 349 | + print ' selected'; |
|
| 350 | +} |
|
| 351 | +?>>Google Hybrid</option> |
|
| 352 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 353 | + print ' selected'; |
|
| 354 | +} |
|
| 355 | +?>>Google Terrain</option> |
|
| 286 | 356 | <?php |
| 287 | 357 | } |
| 288 | 358 | ?> |
| 289 | 359 | <?php |
| 290 | 360 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 291 | 361 | ?> |
| 292 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 293 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 294 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 362 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 363 | + print ' selected'; |
|
| 364 | +} |
|
| 365 | +?>>MapQuest-OSM</option> |
|
| 366 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 367 | + print ' selected'; |
|
| 368 | +} |
|
| 369 | +?>>MapQuest-Aerial</option> |
|
| 370 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 371 | + print ' selected'; |
|
| 372 | +} |
|
| 373 | +?>>MapQuest-Hybrid</option> |
|
| 295 | 374 | <?php |
| 296 | 375 | } |
| 297 | 376 | ?> |
| 298 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 377 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 378 | + print ' selected'; |
|
| 379 | +} |
|
| 380 | +?>>Yandex</option> |
|
| 299 | 381 | <?php |
| 300 | 382 | } |
| 301 | 383 | ?> |
| 302 | 384 | <?php |
| 303 | 385 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 304 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 305 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 386 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 387 | + $MapBoxId = 'default'; |
|
| 388 | + } else { |
|
| 389 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 390 | + } |
|
| 306 | 391 | ?> |
| 307 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 308 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 309 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 310 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 311 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 312 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 313 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 314 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 315 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 316 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 317 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 318 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 392 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 393 | + print ' selected'; |
|
| 394 | +} |
|
| 395 | +?>>Mapbox default</option> |
|
| 396 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 397 | + print ' selected'; |
|
| 398 | +} |
|
| 399 | +?>>Mapbox streets</option> |
|
| 400 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 401 | + print ' selected'; |
|
| 402 | +} |
|
| 403 | +?>>Mapbox light</option> |
|
| 404 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 405 | + print ' selected'; |
|
| 406 | +} |
|
| 407 | +?>>Mapbox dark</option> |
|
| 408 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 409 | + print ' selected'; |
|
| 410 | +} |
|
| 411 | +?>>Mapbox satellite</option> |
|
| 412 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 413 | + print ' selected'; |
|
| 414 | +} |
|
| 415 | +?>>Mapbox streets-satellite</option> |
|
| 416 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 417 | + print ' selected'; |
|
| 418 | +} |
|
| 419 | +?>>Mapbox streets-basic</option> |
|
| 420 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 421 | + print ' selected'; |
|
| 422 | +} |
|
| 423 | +?>>Mapbox comic</option> |
|
| 424 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 425 | + print ' selected'; |
|
| 426 | +} |
|
| 427 | +?>>Mapbox outdoors</option> |
|
| 428 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 429 | + print ' selected'; |
|
| 430 | +} |
|
| 431 | +?>>Mapbox pencil</option> |
|
| 432 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 433 | + print ' selected'; |
|
| 434 | +} |
|
| 435 | +?>>Mapbox pirates</option> |
|
| 436 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 437 | + print ' selected'; |
|
| 438 | +} |
|
| 439 | +?>>Mapbox emerald</option> |
|
| 319 | 440 | <?php |
| 320 | 441 | } |
| 321 | 442 | ?> |
| 322 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 443 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 444 | + print ' selected'; |
|
| 445 | +} |
|
| 446 | +?>>OpenStreetMap</option> |
|
| 323 | 447 | </select> |
| 324 | 448 | </li> |
| 325 | 449 | <?php |
@@ -327,10 +451,22 @@ discard block |
||
| 327 | 451 | ?> |
| 328 | 452 | <li><?php echo _("Type of Terrain:"); ?> |
| 329 | 453 | <select class="selectpicker" onchange="terrainType(this);"> |
| 330 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 331 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 332 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 333 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 454 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 455 | + print ' selected'; |
|
| 456 | +} |
|
| 457 | +?>>stk terrain</option> |
|
| 458 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 459 | + print ' selected'; |
|
| 460 | +} |
|
| 461 | +?>>ellipsoid</option> |
|
| 462 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 463 | + print ' selected'; |
|
| 464 | +} |
|
| 465 | +?>>vr terrain</option> |
|
| 466 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
| 467 | + print ' selected'; |
|
| 468 | +} |
|
| 469 | +?>>ArticDEM</option> |
|
| 334 | 470 | </select> |
| 335 | 471 | </li> |
| 336 | 472 | <?php |
@@ -342,28 +478,61 @@ discard block |
||
| 342 | 478 | <?php |
| 343 | 479 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 344 | 480 | ?> |
| 345 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
| 346 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 347 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 348 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 349 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 481 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 482 | + print 'checked'; |
|
| 483 | +} |
|
| 484 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
| 485 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
| 486 | + print 'checked'; |
|
| 487 | +} |
|
| 488 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 489 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) { |
|
| 490 | + print 'checked'; |
|
| 491 | +} |
|
| 492 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 493 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
| 494 | + print 'checked'; |
|
| 495 | +} |
|
| 496 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 497 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
| 498 | + print 'checked'; |
|
| 499 | +} |
|
| 500 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 350 | 501 | <?php |
| 351 | 502 | } |
| 352 | 503 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
| 353 | 504 | ?> |
| 354 | - <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 505 | + <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
| 506 | + print 'checked'; |
|
| 507 | +} |
|
| 508 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 355 | 509 | <?php |
| 356 | 510 | } |
| 357 | 511 | } |
| 358 | 512 | ?> |
| 359 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 360 | - <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 361 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 362 | - <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 513 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) { |
|
| 514 | + print 'checked'; |
|
| 515 | +} |
|
| 516 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 517 | + <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
| 518 | + print 'checked'; |
|
| 519 | +} |
|
| 520 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 521 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) { |
|
| 522 | + print 'checked'; |
|
| 523 | +} |
|
| 524 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 525 | + <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) { |
|
| 526 | + print 'checked'; |
|
| 527 | +} |
|
| 528 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 363 | 529 | <?php |
| 364 | 530 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 365 | 531 | ?> |
| 366 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 532 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
| 533 | + print 'checked'; |
|
| 534 | +} |
|
| 535 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 367 | 536 | <?php |
| 368 | 537 | } |
| 369 | 538 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -377,17 +546,25 @@ discard block |
||
| 377 | 546 | if (function_exists('array_column')) { |
| 378 | 547 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 379 | 548 | ?> |
| 380 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 549 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 550 | + print 'checked'; |
|
| 551 | +} |
|
| 552 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 381 | 553 | <?php |
| 382 | 554 | } |
| 383 | 555 | } elseif (isset($globalSources)) { |
| 384 | 556 | $dispolar = false; |
| 385 | 557 | foreach ($globalSources as $testsource) { |
| 386 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 558 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 559 | + $dispolar = true; |
|
| 560 | + } |
|
| 387 | 561 | } |
| 388 | 562 | if ($dispolar) { |
| 389 | 563 | ?> |
| 390 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 564 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 565 | + print 'checked'; |
|
| 566 | +} |
|
| 567 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 391 | 568 | <?php |
| 392 | 569 | } |
| 393 | 570 | } |
@@ -400,12 +577,22 @@ discard block |
||
| 400 | 577 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 401 | 578 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 402 | 579 | ?> |
| 403 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 580 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 581 | + print 'checked'; |
|
| 582 | +} |
|
| 583 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 404 | 584 | <?php |
| 405 | 585 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 406 | 586 | ?> |
| 407 | 587 | <li><?php echo _("Aircraft icon color:"); ?> |
| 408 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
|
| 588 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 589 | + print $_COOKIE['IconColor']; |
|
| 590 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 591 | + print $globalAircraftIconColor; |
|
| 592 | +} else { |
|
| 593 | + print '1a3151'; |
|
| 594 | +} |
|
| 595 | +?>"> |
|
| 409 | 596 | </li> |
| 410 | 597 | <?php |
| 411 | 598 | } |
@@ -417,7 +604,14 @@ discard block |
||
| 417 | 604 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 418 | 605 | ?> |
| 419 | 606 | <li><?php echo _("Marine icon color:"); ?> |
| 420 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
|
| 607 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 608 | + print $_COOKIE['MarineIconColor']; |
|
| 609 | +} elseif (isset($globalMarineIconColor)) { |
|
| 610 | + print $globalMarineIconColor; |
|
| 611 | +} else { |
|
| 612 | + print '1a3151'; |
|
| 613 | +} |
|
| 614 | +?>"> |
|
| 421 | 615 | </li> |
| 422 | 616 | <?php |
| 423 | 617 | } |
@@ -428,7 +622,14 @@ discard block |
||
| 428 | 622 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 429 | 623 | ?> |
| 430 | 624 | <li><?php echo _("Tracker icon color:"); ?> |
| 431 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
|
| 625 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 626 | + print $_COOKIE['TrackerIconColor']; |
|
| 627 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 628 | + print $globalTrackerIconColor; |
|
| 629 | +} else { |
|
| 630 | + print '1a3151'; |
|
| 631 | +} |
|
| 632 | +?>"> |
|
| 432 | 633 | </li> |
| 433 | 634 | <?php |
| 434 | 635 | } |
@@ -439,8 +640,22 @@ discard block |
||
| 439 | 640 | ?> |
| 440 | 641 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 441 | 642 | <div class="range"> |
| 442 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
| 443 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 643 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 644 | + print $_COOKIE['AirportZoom']; |
|
| 645 | +} elseif (isset($globalAirportZoom)) { |
|
| 646 | + print $globalAirportZoom; |
|
| 647 | +} else { |
|
| 648 | + print '7'; |
|
| 649 | +} |
|
| 650 | +?>"> |
|
| 651 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 652 | + print $_COOKIE['AirportZoom']; |
|
| 653 | +} elseif (isset($globalAirportZoom)) { |
|
| 654 | + print $globalAirportZoom; |
|
| 655 | +} else { |
|
| 656 | + print '7'; |
|
| 657 | +} |
|
| 658 | +?></output> |
|
| 444 | 659 | </div> |
| 445 | 660 | </li> |
| 446 | 661 | <?php |
@@ -452,9 +667,19 @@ discard block |
||
| 452 | 667 | <?php |
| 453 | 668 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 454 | 669 | ?> |
| 455 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li> |
|
| 670 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
| 671 | + print 'checked'; |
|
| 672 | +} |
|
| 673 | +?> ><?php echo _("Force Aircraft color"); ?></li> |
|
| 456 | 674 | <li><?php echo _("Aircraft icon color:"); ?> |
| 457 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print 'ff0000'; ?>"> |
|
| 675 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 676 | + print $_COOKIE['IconColor']; |
|
| 677 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 678 | + print $globalAircraftIconColor; |
|
| 679 | +} else { |
|
| 680 | + print 'ff0000'; |
|
| 681 | +} |
|
| 682 | +?>"> |
|
| 458 | 683 | </li> |
| 459 | 684 | <?php |
| 460 | 685 | } |
@@ -462,9 +687,19 @@ discard block |
||
| 462 | 687 | <?php |
| 463 | 688 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 464 | 689 | ?> |
| 465 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li> |
|
| 690 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
| 691 | + print 'checked'; |
|
| 692 | +} |
|
| 693 | +?> ><?php echo _("Force Marine color"); ?></li> |
|
| 466 | 694 | <li><?php echo _("Marine icon color:"); ?> |
| 467 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>"> |
|
| 695 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 696 | + print $_COOKIE['MarineIconColor']; |
|
| 697 | +} elseif (isset($globalMarineIconColor)) { |
|
| 698 | + print $globalMarineIconColor; |
|
| 699 | +} else { |
|
| 700 | + print 'ff0000'; |
|
| 701 | +} |
|
| 702 | +?>"> |
|
| 468 | 703 | </li> |
| 469 | 704 | <?php |
| 470 | 705 | } |
@@ -472,9 +707,19 @@ discard block |
||
| 472 | 707 | <?php |
| 473 | 708 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 474 | 709 | ?> |
| 475 | - <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?></li> |
|
| 710 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
| 711 | + print 'checked'; |
|
| 712 | +} |
|
| 713 | +?> ><?php echo _("Force Tracker color"); ?></li> |
|
| 476 | 714 | <li><?php echo _("Tracker icon color:"); ?> |
| 477 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>"> |
|
| 715 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 716 | + print $_COOKIE['TrackerIconColor']; |
|
| 717 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 718 | + print $globalTrackerIconColor; |
|
| 719 | +} else { |
|
| 720 | + print 'ff0000'; |
|
| 721 | +} |
|
| 722 | +?>"> |
|
| 478 | 723 | </li> |
| 479 | 724 | <?php |
| 480 | 725 | } |
@@ -482,22 +727,46 @@ discard block |
||
| 482 | 727 | ?> |
| 483 | 728 | <li><?php echo _("Distance unit:"); ?> |
| 484 | 729 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 485 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 486 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 487 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 730 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 731 | + echo ' selected'; |
|
| 732 | +} |
|
| 733 | +?>>km</option> |
|
| 734 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 735 | + echo ' selected'; |
|
| 736 | +} |
|
| 737 | +?>>nm</option> |
|
| 738 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 739 | + echo ' selected'; |
|
| 740 | +} |
|
| 741 | +?>>mi</option> |
|
| 488 | 742 | </select> |
| 489 | 743 | </li> |
| 490 | 744 | <li><?php echo _("Altitude unit:"); ?> |
| 491 | 745 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 492 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 493 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 746 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 747 | + echo ' selected'; |
|
| 748 | +} |
|
| 749 | +?>>m</option> |
|
| 750 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 751 | + echo ' selected'; |
|
| 752 | +} |
|
| 753 | +?>>feet</option> |
|
| 494 | 754 | </select> |
| 495 | 755 | </li> |
| 496 | 756 | <li><?php echo _("Speed unit:"); ?> |
| 497 | 757 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 498 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
| 499 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 500 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 758 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 759 | + echo ' selected'; |
|
| 760 | +} |
|
| 761 | +?>>km/h</option> |
|
| 762 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 763 | + echo ' selected'; |
|
| 764 | +} |
|
| 765 | +?>>mph</option> |
|
| 766 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 767 | + echo ' selected'; |
|
| 768 | +} |
|
| 769 | +?>>knots</option> |
|
| 501 | 770 | </select> |
| 502 | 771 | </li> |
| 503 | 772 | |
@@ -515,9 +784,18 @@ discard block |
||
| 515 | 784 | <?php |
| 516 | 785 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 517 | 786 | ?> |
| 518 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 519 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 520 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 787 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
| 788 | + print 'checked'; |
|
| 789 | +} |
|
| 790 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 791 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
| 792 | + print 'checked'; |
|
| 793 | +} |
|
| 794 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 795 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
| 796 | + print 'checked'; |
|
| 797 | +} |
|
| 798 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 521 | 799 | <?php |
| 522 | 800 | } |
| 523 | 801 | ?> |
@@ -525,10 +803,16 @@ discard block |
||
| 525 | 803 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 526 | 804 | ?> |
| 527 | 805 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 528 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 806 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
| 807 | + print 'checked'; |
|
| 808 | +} |
|
| 809 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 529 | 810 | <?php } ?> |
| 530 | 811 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 531 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 812 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
| 813 | + print 'checked'; |
|
| 814 | +} |
|
| 815 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 532 | 816 | <?php } ?> |
| 533 | 817 | <?php |
| 534 | 818 | } |
@@ -545,7 +829,9 @@ discard block |
||
| 545 | 829 | } |
| 546 | 830 | foreach($allairlinenames as $airline) { |
| 547 | 831 | $airline_name = $airline['airline_name']; |
| 548 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 832 | + if (strlen($airline_name) > 30) { |
|
| 833 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 834 | + } |
|
| 549 | 835 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
| 550 | 836 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 551 | 837 | } else { |
@@ -563,7 +849,10 @@ discard block |
||
| 563 | 849 | <li><?php echo _("Display alliance:"); ?> |
| 564 | 850 | <br/> |
| 565 | 851 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 566 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 852 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
| 853 | + echo ' selected'; |
|
| 854 | +} |
|
| 855 | +?>><?php echo _("All"); ?></option> |
|
| 567 | 856 | <?php |
| 568 | 857 | foreach($allalliancenames as $alliance) { |
| 569 | 858 | $alliance_name = $alliance['alliance']; |
@@ -610,10 +899,22 @@ discard block |
||
| 610 | 899 | ?> |
| 611 | 900 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 612 | 901 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 613 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 614 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 615 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 616 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 902 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
| 903 | + echo ' selected'; |
|
| 904 | +} |
|
| 905 | +?>><?php echo _("All"); ?></option> |
|
| 906 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
| 907 | + echo ' selected'; |
|
| 908 | +} |
|
| 909 | +?>><?php echo _("Passenger"); ?></option> |
|
| 910 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
| 911 | + echo ' selected'; |
|
| 912 | +} |
|
| 913 | +?>><?php echo _("Cargo"); ?></option> |
|
| 914 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
| 915 | + echo ' selected'; |
|
| 916 | +} |
|
| 917 | +?>><?php echo _("Military"); ?></option> |
|
| 617 | 918 | </select> |
| 618 | 919 | </li> |
| 619 | 920 | <?php |
@@ -621,7 +922,10 @@ discard block |
||
| 621 | 922 | ?> |
| 622 | 923 | <li> |
| 623 | 924 | <?php echo _("Display flight with ident:"); ?> |
| 624 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
| 925 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
| 926 | + print $_COOKIE['filter_ident']; |
|
| 927 | +} |
|
| 928 | +?>" /> |
|
| 625 | 929 | </li> |
| 626 | 930 | <?php |
| 627 | 931 | } |
@@ -640,7 +944,10 @@ discard block |
||
| 640 | 944 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 641 | 945 | <form> |
| 642 | 946 | <ul> |
| 643 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 947 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
| 948 | + print 'checked'; |
|
| 949 | +} |
|
| 950 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 644 | 951 | <li><?php echo _("Type:"); ?> |
| 645 | 952 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 646 | 953 | <?php |
@@ -648,25 +955,45 @@ discard block |
||
| 648 | 955 | $types = $Satellite->get_tle_types(); |
| 649 | 956 | foreach ($types as $type) { |
| 650 | 957 | $type_name = $type['tle_type']; |
| 651 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 652 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 653 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 654 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 655 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 656 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 657 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 658 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 659 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 660 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 661 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 662 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 663 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 664 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 665 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 666 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 667 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 668 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 669 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 958 | + if ($type_name == 'musson') { |
|
| 959 | + $type_name = 'Russian LEO Navigation'; |
|
| 960 | + } else if ($type_name == 'nnss') { |
|
| 961 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 962 | + } else if ($type_name == 'sbas') { |
|
| 963 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 964 | + } else if ($type_name == 'glo-ops') { |
|
| 965 | + $type_name = 'Glonass Operational'; |
|
| 966 | + } else if ($type_name == 'gps-ops') { |
|
| 967 | + $type_name = 'GPS Operational'; |
|
| 968 | + } else if ($type_name == 'argos') { |
|
| 969 | + $type_name = 'ARGOS Data Collection System'; |
|
| 970 | + } else if ($type_name == 'tdrss') { |
|
| 971 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 972 | + } else if ($type_name == 'sarsat') { |
|
| 973 | + $type_name = 'Search & Rescue'; |
|
| 974 | + } else if ($type_name == 'dmc') { |
|
| 975 | + $type_name = 'Disaster Monitoring'; |
|
| 976 | + } else if ($type_name == 'resource') { |
|
| 977 | + $type_name = 'Earth Resources'; |
|
| 978 | + } else if ($type_name == 'stations') { |
|
| 979 | + $type_name = 'Space Stations'; |
|
| 980 | + } else if ($type_name == 'geo') { |
|
| 981 | + $type_name = 'Geostationary'; |
|
| 982 | + } else if ($type_name == 'amateur') { |
|
| 983 | + $type_name = 'Amateur Radio'; |
|
| 984 | + } else if ($type_name == 'x-comm') { |
|
| 985 | + $type_name = 'Experimental'; |
|
| 986 | + } else if ($type_name == 'other-comm') { |
|
| 987 | + $type_name = 'Other Comm'; |
|
| 988 | + } else if ($type_name == 'science') { |
|
| 989 | + $type_name = 'Space & Earth Science'; |
|
| 990 | + } else if ($type_name == 'military') { |
|
| 991 | + $type_name = 'Miscellaneous Military'; |
|
| 992 | + } else if ($type_name == 'radar') { |
|
| 993 | + $type_name = 'Radar Calibration'; |
|
| 994 | + } else if ($type_name == 'tle-new') { |
|
| 995 | + $type_name = 'Last 30 days launches'; |
|
| 996 | + } |
|
| 670 | 997 | |
| 671 | 998 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 672 | 999 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -55,23 +55,23 @@ discard block |
||
| 55 | 55 | $min = true; |
| 56 | 56 | $allhistory = false; |
| 57 | 57 | $filter['source'] = array(); |
| 58 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 59 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 60 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 61 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 62 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 63 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 64 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 65 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 66 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 67 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 58 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 59 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 60 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 61 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
| 62 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 63 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
| 64 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
| 65 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
| 66 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
| 67 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
| 68 | 68 | |
| 69 | 69 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 70 | 70 | $min = true; |
| 71 | 71 | } else $min = false; |
| 72 | 72 | |
| 73 | 73 | if (isset($_GET['ident'])) { |
| 74 | - $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
| 74 | + $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
| 75 | 75 | if ($tracker) { |
| 76 | 76 | $spotter_array = $TrackerLive->getLastLiveTrackerDataByIdent($ident); |
| 77 | 77 | } elseif ($marine) { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | $allhistory = true; |
| 87 | 87 | } elseif (isset($_GET['flightaware_id'])) { |
| 88 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 88 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 89 | 89 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
| 90 | 90 | if (empty($spotter_array)) { |
| 91 | 91 | $from_archive = true; |
@@ -93,44 +93,44 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | $allhistory = true; |
| 95 | 95 | } elseif (isset($_GET['famtrack_id'])) { |
| 96 | - $famtrack_id = urldecode(filter_input(INPUT_GET,'famtrack_id',FILTER_SANITIZE_STRING)); |
|
| 96 | + $famtrack_id = urldecode(filter_input(INPUT_GET, 'famtrack_id', FILTER_SANITIZE_STRING)); |
|
| 97 | 97 | $spotter_array = $TrackerLive->getLastLiveTrackerDataById($famtrack_id); |
| 98 | 98 | $allhistory = true; |
| 99 | 99 | } elseif (isset($_GET['fammarine_id'])) { |
| 100 | - $fammarine_id = urldecode(filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING)); |
|
| 100 | + $fammarine_id = urldecode(filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING)); |
|
| 101 | 101 | $spotter_array = $MarineLive->getLastLiveMarineDataById($fammarine_id); |
| 102 | 102 | $allhistory = true; |
| 103 | 103 | } elseif (isset($_GET['coord']) && (!isset($globalMapPopup) || $globalMapPopup || (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true'))) { |
| 104 | 104 | //} elseif (isset($_GET['coord'])) { |
| 105 | 105 | $usecoord = true; |
| 106 | - $coord = explode(',',$_GET['coord']); |
|
| 106 | + $coord = explode(',', $_GET['coord']); |
|
| 107 | 107 | if ($tracker) { |
| 108 | - $spotter_array = $TrackerLive->getLiveTrackerDatabyCoord($coord,$filter); |
|
| 108 | + $spotter_array = $TrackerLive->getLiveTrackerDatabyCoord($coord, $filter); |
|
| 109 | 109 | } elseif ($marine) { |
| 110 | - $spotter_array = $MarineLive->getLiveMarineDatabyCoord($coord,$filter); |
|
| 110 | + $spotter_array = $MarineLive->getLiveMarineDatabyCoord($coord, $filter); |
|
| 111 | 111 | } else { |
| 112 | - $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord,$filter); |
|
| 112 | + $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord, $filter); |
|
| 113 | 113 | } |
| 114 | 114 | } elseif (isset($globalMapUseBbox) && $globalMapUseBbox && isset($_GET['coord']) && $min) { |
| 115 | 115 | $usecoord = true; |
| 116 | - $coord = explode(',',$_GET['coord']); |
|
| 116 | + $coord = explode(',', $_GET['coord']); |
|
| 117 | 117 | if ($tracker) { |
| 118 | - $spotter_array = $TrackerLive->getMinLiveTrackerDatabyCoord($coord,$filter); |
|
| 118 | + $spotter_array = $TrackerLive->getMinLiveTrackerDatabyCoord($coord, $filter); |
|
| 119 | 119 | } elseif ($marine) { |
| 120 | - $spotter_array = $MarineLive->getMinLiveMarineDatabyCoord($coord,$filter); |
|
| 120 | + $spotter_array = $MarineLive->getMinLiveMarineDatabyCoord($coord, $filter); |
|
| 121 | 121 | } else { |
| 122 | - $spotter_array = $SpotterLive->getMinLiveSpotterDatabyCoord($coord,$filter); |
|
| 122 | + $spotter_array = $SpotterLive->getMinLiveSpotterDatabyCoord($coord, $filter); |
|
| 123 | 123 | } |
| 124 | 124 | } elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed']) && !isset($_GET['tracker']) && !isset($_GET['marine'])) { |
| 125 | 125 | $from_archive = true; |
| 126 | 126 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 127 | 127 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 128 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 129 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 130 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 131 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 132 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 133 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
| 128 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 129 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 130 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 131 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 132 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 133 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
| 134 | 134 | } elseif ($min) { |
| 135 | 135 | if ($tracker) { |
| 136 | 136 | $spotter_array = $TrackerLive->getMinLiveTrackerData($filter); |
@@ -142,11 +142,11 @@ discard block |
||
| 142 | 142 | # $min = true; |
| 143 | 143 | } else { |
| 144 | 144 | if ($tracker) { |
| 145 | - $spotter_array = $TrackerLive->getLiveTrackerData('','',$filter); |
|
| 145 | + $spotter_array = $TrackerLive->getLiveTrackerData('', '', $filter); |
|
| 146 | 146 | } elseif ($marine) { |
| 147 | - $spotter_array = $marineLive->getLiveMarineData('','',$filter); |
|
| 147 | + $spotter_array = $marineLive->getLiveMarineData('', '', $filter); |
|
| 148 | 148 | } else { |
| 149 | - $spotter_array = $SpotterLive->getLiveSpotterData('','',$filter); |
|
| 149 | + $spotter_array = $SpotterLive->getLiveSpotterData('', '', $filter); |
|
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | } else $flightcnt = 0; |
| 164 | 164 | */ |
| 165 | 165 | $flightcnt = 0; |
| 166 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 166 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 167 | 167 | |
| 168 | 168 | if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) $usenextlatlon = false; |
| 169 | 169 | else $usenextlatlon = true; |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | if (!empty($spotter_array) && is_array($spotter_array)) |
| 181 | 181 | { |
| 182 | 182 | $output .= '"features": ['; |
| 183 | - foreach($spotter_array as $spotter_item) |
|
| 183 | + foreach ($spotter_array as $spotter_item) |
|
| 184 | 184 | { |
| 185 | 185 | $j++; |
| 186 | 186 | date_default_timezone_set('UTC'); |
@@ -236,8 +236,8 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
| 238 | 238 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 239 | - if ($compress) $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 240 | - else $output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 239 | + if ($compress) $output .= '"c": "'.str_replace('\\', '', $spotter_item['ident']).'",'; |
|
| 240 | + else $output .= '"callsign": "'.str_replace('\\', '', $spotter_item['ident']).'",'; |
|
| 241 | 241 | //" |
| 242 | 242 | } else { |
| 243 | 243 | if ($compress) $output .= '"c": "NA",'; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
| 247 | 247 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 248 | 248 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 249 | - $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
|
| 249 | + $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ', '_', $spotter_item['aircraft_name'])).'",'; |
|
| 250 | 250 | } elseif (isset($spotter_item['aircraft_type'])) { |
| 251 | 251 | $output .= '"aircraft_name": "NA ('.$spotter_item['aircraft_type'].')",'; |
| 252 | 252 | } elseif (!$min) { |
@@ -387,16 +387,16 @@ discard block |
||
| 387 | 387 | else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
| 388 | 388 | |
| 389 | 389 | if (isset($archivespeed)) { |
| 390 | - $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 390 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading'], $archivespeed); |
|
| 391 | 391 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 392 | 392 | } elseif ($usenextlatlon) { |
| 393 | - $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 393 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading']); |
|
| 394 | 394 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | if (!$min) $output .= '"image": "'.$image.'",'; |
| 398 | 398 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 399 | - $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
|
| 399 | + $output .= '"image_copyright": "'.str_replace('"', "'", trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '', $spotter_item['image_copyright']))).'",'; |
|
| 400 | 400 | } |
| 401 | 401 | if (isset($spotter_item['image_source_website'])) { |
| 402 | 402 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | $output .= '"waypoints": "'.$spotter_item['waypoints'].'",'; |
| 419 | 419 | } |
| 420 | 420 | if (isset($spotter_item['acars'])) { |
| 421 | - $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
|
| 421 | + $output .= '"acars": "'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br />', $spotter_item['acars']['message'])).'",'; |
|
| 422 | 422 | } |
| 423 | 423 | // type when not aircraft ? |
| 424 | 424 | if (isset($spotter_item['type'])) { |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | } |
| 498 | 498 | */ |
| 499 | - $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
|
| 499 | + $history = filter_input(INPUT_GET, 'history', FILTER_SANITIZE_STRING); |
|
| 500 | 500 | if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
| 501 | 501 | |
| 502 | 502 | if ( |
@@ -504,11 +504,11 @@ discard block |
||
| 504 | 504 | || ((isset($globalMapHistory) && $globalMapHistory) || $allhistory) |
| 505 | 505 | // || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id'])) |
| 506 | 506 | // || (isset($history) && $history != '' && $history != 'NA' && $history == $spotter_item['ident']) |
| 507 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
| 507 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
| 508 | 508 | || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']) |
| 509 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id'])) |
|
| 509 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['fammarine_id'])) |
|
| 510 | 510 | || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id']) |
| 511 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid'])) |
|
| 511 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['famtrackid'])) |
|
| 512 | 512 | || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid']) |
| 513 | 513 | ) { |
| 514 | 514 | if ($tracker) { |
@@ -545,9 +545,9 @@ discard block |
||
| 545 | 545 | else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
| 546 | 546 | } |
| 547 | 547 | $output_history .= '['; |
| 548 | - $output_history .= $spotter_history['longitude'].', '; |
|
| 549 | - $output_history .= $spotter_history['latitude'].', '; |
|
| 550 | - $output_history .= $spotter_history['altitude']*30.48; |
|
| 548 | + $output_history .= $spotter_history['longitude'].', '; |
|
| 549 | + $output_history .= $spotter_history['latitude'].', '; |
|
| 550 | + $output_history .= $spotter_history['altitude']*30.48; |
|
| 551 | 551 | $output_history .= '],'; |
| 552 | 552 | /* |
| 553 | 553 | if ($from_archive === false) { |
@@ -565,8 +565,8 @@ discard block |
||
| 565 | 565 | else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
| 566 | 566 | } else $d = true; |
| 567 | 567 | $output_history .= '['; |
| 568 | - $output_history .= $spotter_history['longitude'].', '; |
|
| 569 | - $output_history .= $spotter_history['latitude']; |
|
| 568 | + $output_history .= $spotter_history['longitude'].', '; |
|
| 569 | + $output_history .= $spotter_history['latitude']; |
|
| 570 | 570 | $output_history .= '],'; |
| 571 | 571 | /* |
| 572 | 572 | if ($from_archive === false) { |
@@ -582,9 +582,9 @@ discard block |
||
| 582 | 582 | |
| 583 | 583 | if ($from_archive === false) { |
| 584 | 584 | $output_historyd = '['; |
| 585 | - $output_historyd .= $spotter_item['longitude'].', '; |
|
| 586 | - $output_historyd .= $spotter_item['latitude']; |
|
| 587 | - if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 585 | + $output_historyd .= $spotter_item['longitude'].', '; |
|
| 586 | + $output_historyd .= $spotter_item['latitude']; |
|
| 587 | + if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 588 | 588 | $output_historyd .= '],'; |
| 589 | 589 | //$output_history = $output_historyd.$output_history; |
| 590 | 590 | $output_history = $output_history.$output_historyd; |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | } |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | - if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
| 601 | + if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
| 602 | 602 | || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
| 603 | 603 | && (isset($spotter_item['departure_airport']) |
| 604 | 604 | && $spotter_item['departure_airport'] != 'NA' |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | |
| 633 | 633 | //if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA' && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
| 634 | 634 | //if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
| 635 | - if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
| 635 | + if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
| 636 | 636 | || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
| 637 | 637 | && (isset($spotter_item['arrival_airport']) |
| 638 | 638 | && $spotter_item['arrival_airport'] != 'NA' |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | $output = substr($output, 0, -1); |
| 664 | 664 | $output .= ']'; |
| 665 | 665 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 666 | - $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
| 666 | + $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
| 667 | 667 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
| 668 | 668 | $output .= '"fc": "'.$j.'"'; |
| 669 | 669 | } else { |
@@ -48,27 +48,52 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | header('Content-Type: text/javascript'); |
| 50 | 50 | |
| 51 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 52 | -else $compress = $globalJsonCompress; |
|
| 51 | +if (!isset($globalJsonCompress)) { |
|
| 52 | + $compress = true; |
|
| 53 | +} else { |
|
| 54 | + $compress = $globalJsonCompress; |
|
| 55 | +} |
|
| 53 | 56 | |
| 54 | 57 | $from_archive = false; |
| 55 | 58 | $min = true; |
| 56 | 59 | $allhistory = false; |
| 57 | 60 | $filter['source'] = array(); |
| 58 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 59 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 60 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 61 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 62 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 63 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 64 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 65 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 66 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 67 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 61 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
| 62 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 63 | +} |
|
| 64 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
| 65 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 66 | +} |
|
| 67 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
| 68 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 69 | +} |
|
| 70 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
| 71 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 72 | +} |
|
| 73 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
| 74 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 75 | +} |
|
| 76 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
| 77 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 78 | +} |
|
| 79 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
| 80 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 81 | +} |
|
| 82 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
| 83 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 84 | +} |
|
| 85 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
| 86 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 87 | +} |
|
| 88 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
| 89 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 90 | +} |
|
| 68 | 91 | |
| 69 | 92 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 70 | 93 | $min = true; |
| 71 | -} else $min = false; |
|
| 94 | +} else { |
|
| 95 | + $min = false; |
|
| 96 | +} |
|
| 72 | 97 | |
| 73 | 98 | if (isset($_GET['ident'])) { |
| 74 | 99 | $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
@@ -165,15 +190,21 @@ discard block |
||
| 165 | 190 | $flightcnt = 0; |
| 166 | 191 | $sqltime = round(microtime(true)-$begintime,2); |
| 167 | 192 | |
| 168 | -if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) $usenextlatlon = false; |
|
| 169 | -else $usenextlatlon = true; |
|
| 193 | +if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) { |
|
| 194 | + $usenextlatlon = false; |
|
| 195 | +} else { |
|
| 196 | + $usenextlatlon = true; |
|
| 197 | +} |
|
| 170 | 198 | $j = 0; |
| 171 | 199 | $prev_flightaware_id = ''; |
| 172 | 200 | $aircrafts_shadow = array(); |
| 173 | 201 | $output = '{'; |
| 174 | 202 | $output .= '"type": "FeatureCollection",'; |
| 175 | - if ($min) $output .= '"minimal": "true",'; |
|
| 176 | - else $output .= '"minimal": "false",'; |
|
| 203 | + if ($min) { |
|
| 204 | + $output .= '"minimal": "true",'; |
|
| 205 | + } else { |
|
| 206 | + $output .= '"minimal": "false",'; |
|
| 207 | + } |
|
| 177 | 208 | //$output .= '"fc": "'.$flightcnt.'",'; |
| 178 | 209 | $output .= '"sqt": "'.$sqltime.'",'; |
| 179 | 210 | |
@@ -217,18 +248,29 @@ discard block |
||
| 217 | 248 | } |
| 218 | 249 | $output .= '"properties": {'; |
| 219 | 250 | if (isset($spotter_item['flightaware_id'])) { |
| 220 | - if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 221 | - else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 251 | + if ($compress) { |
|
| 252 | + $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 253 | + } else { |
|
| 254 | + $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 255 | + } |
|
| 222 | 256 | } elseif (isset($spotter_item['famtrackid'])) { |
| 223 | - if ($compress) $output .= '"fti": "'.$spotter_item['famtrackid'].'",'; |
|
| 224 | - else $output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",'; |
|
| 257 | + if ($compress) { |
|
| 258 | + $output .= '"fti": "'.$spotter_item['famtrackid'].'",'; |
|
| 259 | + } else { |
|
| 260 | + $output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",'; |
|
| 261 | + } |
|
| 225 | 262 | } elseif (isset($spotter_item['fammarine_id'])) { |
| 226 | - if ($compress) $output .= '"fmi": "'.$spotter_item['fammarine_id'].'",'; |
|
| 227 | - else $output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",'; |
|
| 263 | + if ($compress) { |
|
| 264 | + $output .= '"fmi": "'.$spotter_item['fammarine_id'].'",'; |
|
| 265 | + } else { |
|
| 266 | + $output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",'; |
|
| 267 | + } |
|
| 228 | 268 | } |
| 229 | 269 | $output .= '"fc": "'.$flightcnt.'",'; |
| 230 | 270 | $output .= '"sqt": "'.$sqltime.'",'; |
| 231 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 271 | + if (isset($begindate)) { |
|
| 272 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 273 | + } |
|
| 232 | 274 | |
| 233 | 275 | /* |
| 234 | 276 | if ($min) $output .= '"minimal": "true",'; |
@@ -236,14 +278,22 @@ discard block |
||
| 236 | 278 | */ |
| 237 | 279 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
| 238 | 280 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 239 | - if ($compress) $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 240 | - else $output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 281 | + if ($compress) { |
|
| 282 | + $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 283 | + } else { |
|
| 284 | + $output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
| 285 | + } |
|
| 241 | 286 | //" |
| 242 | 287 | } else { |
| 243 | - if ($compress) $output .= '"c": "NA",'; |
|
| 244 | - else $output .= '"callsign": "NA",'; |
|
| 288 | + if ($compress) { |
|
| 289 | + $output .= '"c": "NA",'; |
|
| 290 | + } else { |
|
| 291 | + $output .= '"callsign": "NA",'; |
|
| 292 | + } |
|
| 293 | + } |
|
| 294 | + if (isset($spotter_item['registration'])) { |
|
| 295 | + $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 245 | 296 | } |
| 246 | - if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 247 | 297 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 248 | 298 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 249 | 299 | $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
@@ -256,16 +306,23 @@ discard block |
||
| 256 | 306 | $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
| 257 | 307 | } |
| 258 | 308 | if (!isset($spotter_item['aircraft_shadow']) && !$tracker) { |
| 259 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
| 260 | - else { |
|
| 309 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
| 310 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 311 | + } else { |
|
| 261 | 312 | $aircraft_icao = $spotter_item['aircraft_icao']; |
| 262 | - if (isset($aircrafts_shadow[$aircraft_icao])) $spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao]; |
|
| 263 | - else { |
|
| 313 | + if (isset($aircrafts_shadow[$aircraft_icao])) { |
|
| 314 | + $spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao]; |
|
| 315 | + } else { |
|
| 264 | 316 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
| 265 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 266 | - elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 267 | - elseif ($aircraft_icao == 'PARAGLIDER') $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 268 | - else $spotter_item['aircraft_shadow'] = ''; |
|
| 317 | + if (count($aircraft_info) > 0) { |
|
| 318 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 319 | + } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
|
| 320 | + $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
| 321 | + } elseif ($aircraft_icao == 'PARAGLIDER') { |
|
| 322 | + $spotter_item['aircraft_shadow'] = 'PARAGLIDER.png'; |
|
| 323 | + } else { |
|
| 324 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 325 | + } |
|
| 269 | 326 | $aircrafts_shadow[$aircraft_icao] = $spotter_item['aircraft_shadow']; |
| 270 | 327 | } |
| 271 | 328 | } |
@@ -273,73 +330,139 @@ discard block |
||
| 273 | 330 | if (!isset($spotter_item['aircraft_shadow']) || $spotter_item['aircraft_shadow'] == '') { |
| 274 | 331 | if ($tracker) { |
| 275 | 332 | if (isset($spotter_item['type']) && $spotter_item['type'] == 'Ambulance') { |
| 276 | - if ($compress) $output .= '"as": "ambulance.png",'; |
|
| 277 | - else $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 333 | + if ($compress) { |
|
| 334 | + $output .= '"as": "ambulance.png",'; |
|
| 335 | + } else { |
|
| 336 | + $output .= '"aircraft_shadow": "ambulance.png",'; |
|
| 337 | + } |
|
| 278 | 338 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Police') { |
| 279 | - if ($compress) $output .= '"as": "police.png",'; |
|
| 280 | - else $output .= '"aircraft_shadow": "police.png",'; |
|
| 339 | + if ($compress) { |
|
| 340 | + $output .= '"as": "police.png",'; |
|
| 341 | + } else { |
|
| 342 | + $output .= '"aircraft_shadow": "police.png",'; |
|
| 343 | + } |
|
| 281 | 344 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Yacht (Sail)') { |
| 282 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 283 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 345 | + if ($compress) { |
|
| 346 | + $output .= '"as": "ship.png",'; |
|
| 347 | + } else { |
|
| 348 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 349 | + } |
|
| 284 | 350 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Ship (Power Boat)') { |
| 285 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 286 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 351 | + if ($compress) { |
|
| 352 | + $output .= '"as": "ship.png",'; |
|
| 353 | + } else { |
|
| 354 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 355 | + } |
|
| 287 | 356 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Shuttle') { |
| 288 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 289 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 357 | + if ($compress) { |
|
| 358 | + $output .= '"as": "ship.png",'; |
|
| 359 | + } else { |
|
| 360 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 361 | + } |
|
| 290 | 362 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck') { |
| 291 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 292 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 363 | + if ($compress) { |
|
| 364 | + $output .= '"as": "truck.png",'; |
|
| 365 | + } else { |
|
| 366 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 367 | + } |
|
| 293 | 368 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck (18 Wheeler)') { |
| 294 | - if ($compress) $output .= '"as": "truck.png",'; |
|
| 295 | - else $output .= '"aircraft_shadow": "truck.png",'; |
|
| 369 | + if ($compress) { |
|
| 370 | + $output .= '"as": "truck.png",'; |
|
| 371 | + } else { |
|
| 372 | + $output .= '"aircraft_shadow": "truck.png",'; |
|
| 373 | + } |
|
| 296 | 374 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Aircraft (small)') { |
| 297 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 298 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 375 | + if ($compress) { |
|
| 376 | + $output .= '"as": "aircraft.png",'; |
|
| 377 | + } else { |
|
| 378 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 379 | + } |
|
| 299 | 380 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Large Aircraft') { |
| 300 | - if ($compress) $output .= '"as": "aircraft.png",'; |
|
| 301 | - else $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 381 | + if ($compress) { |
|
| 382 | + $output .= '"as": "aircraft.png",'; |
|
| 383 | + } else { |
|
| 384 | + $output .= '"aircraft_shadow": "aircraft.png",'; |
|
| 385 | + } |
|
| 302 | 386 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Helicopter') { |
| 303 | - if ($compress) $output .= '"as": "helico.png",'; |
|
| 304 | - else $output .= '"aircraft_shadow": "helico.png",'; |
|
| 387 | + if ($compress) { |
|
| 388 | + $output .= '"as": "helico.png",'; |
|
| 389 | + } else { |
|
| 390 | + $output .= '"aircraft_shadow": "helico.png",'; |
|
| 391 | + } |
|
| 305 | 392 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Railroad Engine') { |
| 306 | - if ($compress) $output .= '"as": "rail.png",'; |
|
| 307 | - else $output .= '"aircraft_shadow": "rail.png",'; |
|
| 393 | + if ($compress) { |
|
| 394 | + $output .= '"as": "rail.png",'; |
|
| 395 | + } else { |
|
| 396 | + $output .= '"aircraft_shadow": "rail.png",'; |
|
| 397 | + } |
|
| 308 | 398 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Firetruck') { |
| 309 | - if ($compress) $output .= '"as": "firetruck.png",'; |
|
| 310 | - else $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 399 | + if ($compress) { |
|
| 400 | + $output .= '"as": "firetruck.png",'; |
|
| 401 | + } else { |
|
| 402 | + $output .= '"aircraft_shadow": "firetruck.png",'; |
|
| 403 | + } |
|
| 311 | 404 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bus') { |
| 312 | - if ($compress) $output .= '"as": "bus.png",'; |
|
| 313 | - else $output .= '"aircraft_shadow": "bus.png",'; |
|
| 405 | + if ($compress) { |
|
| 406 | + $output .= '"as": "bus.png",'; |
|
| 407 | + } else { |
|
| 408 | + $output .= '"aircraft_shadow": "bus.png",'; |
|
| 409 | + } |
|
| 314 | 410 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Phone') { |
| 315 | - if ($compress) $output .= '"as": "phone.png",'; |
|
| 316 | - else $output .= '"aircraft_shadow": "phone.png",'; |
|
| 411 | + if ($compress) { |
|
| 412 | + $output .= '"as": "phone.png",'; |
|
| 413 | + } else { |
|
| 414 | + $output .= '"aircraft_shadow": "phone.png",'; |
|
| 415 | + } |
|
| 317 | 416 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Jogger') { |
| 318 | - if ($compress) $output .= '"as": "jogger.png",'; |
|
| 319 | - else $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 417 | + if ($compress) { |
|
| 418 | + $output .= '"as": "jogger.png",'; |
|
| 419 | + } else { |
|
| 420 | + $output .= '"aircraft_shadow": "jogger.png",'; |
|
| 421 | + } |
|
| 320 | 422 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bike') { |
| 321 | - if ($compress) $output .= '"as": "bike.png",'; |
|
| 322 | - else $output .= '"aircraft_shadow": "bike.png",'; |
|
| 423 | + if ($compress) { |
|
| 424 | + $output .= '"as": "bike.png",'; |
|
| 425 | + } else { |
|
| 426 | + $output .= '"aircraft_shadow": "bike.png",'; |
|
| 427 | + } |
|
| 323 | 428 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Motorcycle') { |
| 324 | - if ($compress) $output .= '"as": "motorcycle.png",'; |
|
| 325 | - else $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 429 | + if ($compress) { |
|
| 430 | + $output .= '"as": "motorcycle.png",'; |
|
| 431 | + } else { |
|
| 432 | + $output .= '"aircraft_shadow": "motorcycle.png",'; |
|
| 433 | + } |
|
| 326 | 434 | } elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Balloon') { |
| 327 | - if ($compress) $output .= '"as": "balloon.png",'; |
|
| 328 | - else $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 435 | + if ($compress) { |
|
| 436 | + $output .= '"as": "balloon.png",'; |
|
| 437 | + } else { |
|
| 438 | + $output .= '"aircraft_shadow": "balloon.png",'; |
|
| 439 | + } |
|
| 329 | 440 | } else { |
| 330 | - if ($compress) $output .= '"as": "car.png",'; |
|
| 331 | - else $output .= '"aircraft_shadow": "car.png",'; |
|
| 441 | + if ($compress) { |
|
| 442 | + $output .= '"as": "car.png",'; |
|
| 443 | + } else { |
|
| 444 | + $output .= '"aircraft_shadow": "car.png",'; |
|
| 445 | + } |
|
| 332 | 446 | } |
| 333 | 447 | } elseif ($marine) { |
| 334 | - if ($compress) $output .= '"as": "ship.png",'; |
|
| 335 | - else $output .= '"aircraft_shadow": "ship.png",'; |
|
| 448 | + if ($compress) { |
|
| 449 | + $output .= '"as": "ship.png",'; |
|
| 450 | + } else { |
|
| 451 | + $output .= '"aircraft_shadow": "ship.png",'; |
|
| 452 | + } |
|
| 336 | 453 | } else { |
| 337 | - if ($compress) $output .= '"as": "default.png",'; |
|
| 338 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
| 454 | + if ($compress) { |
|
| 455 | + $output .= '"as": "default.png",'; |
|
| 456 | + } else { |
|
| 457 | + $output .= '"aircraft_shadow": "default.png",'; |
|
| 458 | + } |
|
| 339 | 459 | } |
| 340 | 460 | } else { |
| 341 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 342 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 461 | + if ($compress) { |
|
| 462 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 463 | + } else { |
|
| 464 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 465 | + } |
|
| 343 | 466 | } |
| 344 | 467 | if (isset($spotter_item['airline_name'])) { |
| 345 | 468 | $output .= '"airline_name": "'.$spotter_item['airline_name'].'",'; |
@@ -347,8 +470,11 @@ discard block |
||
| 347 | 470 | $output .= '"airline_name": "NA",'; |
| 348 | 471 | } |
| 349 | 472 | if (isset($spotter_item['departure_airport'])) { |
| 350 | - if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 351 | - else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 473 | + if ($compress) { |
|
| 474 | + $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 475 | + } else { |
|
| 476 | + $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 477 | + } |
|
| 352 | 478 | } |
| 353 | 479 | if (isset($spotter_item['departure_airport_city'])) { |
| 354 | 480 | $output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",'; |
@@ -360,8 +486,11 @@ discard block |
||
| 360 | 486 | $output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",'; |
| 361 | 487 | } |
| 362 | 488 | if (isset($spotter_item['arrival_airport'])) { |
| 363 | - if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 364 | - else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 489 | + if ($compress) { |
|
| 490 | + $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 491 | + } else { |
|
| 492 | + $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 493 | + } |
|
| 365 | 494 | } |
| 366 | 495 | if (isset($spotter_item['arrival_airport_city'])) { |
| 367 | 496 | $output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",'; |
@@ -380,11 +509,17 @@ discard block |
||
| 380 | 509 | } |
| 381 | 510 | |
| 382 | 511 | if (isset($spotter_item['altitude'])) { |
| 383 | - if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 384 | - else $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 512 | + if ($compress) { |
|
| 513 | + $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 514 | + } else { |
|
| 515 | + $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 516 | + } |
|
| 517 | + } |
|
| 518 | + if ($compress) { |
|
| 519 | + $output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 520 | + } else { |
|
| 521 | + $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 385 | 522 | } |
| 386 | - if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 387 | - else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 388 | 523 | |
| 389 | 524 | if (isset($archivespeed)) { |
| 390 | 525 | $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
@@ -394,7 +529,9 @@ discard block |
||
| 394 | 529 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 395 | 530 | } |
| 396 | 531 | |
| 397 | - if (!$min) $output .= '"image": "'.$image.'",'; |
|
| 532 | + if (!$min) { |
|
| 533 | + $output .= '"image": "'.$image.'",'; |
|
| 534 | + } |
|
| 398 | 535 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 399 | 536 | $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
| 400 | 537 | } |
@@ -402,8 +539,11 @@ discard block |
||
| 402 | 539 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
| 403 | 540 | } |
| 404 | 541 | if (isset($spotter_item['squawk'])) { |
| 405 | - if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 406 | - else $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 542 | + if ($compress) { |
|
| 543 | + $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 544 | + } else { |
|
| 545 | + $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 546 | + } |
|
| 407 | 547 | } |
| 408 | 548 | if (isset($spotter_item['squawk_usage'])) { |
| 409 | 549 | $output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",'; |
@@ -422,14 +562,23 @@ discard block |
||
| 422 | 562 | } |
| 423 | 563 | // type when not aircraft ? |
| 424 | 564 | if (isset($spotter_item['type'])) { |
| 425 | - if ($compress) $output .= '"t": "'.$spotter_item['type'].'"'; |
|
| 426 | - else $output .= '"type": "'.$spotter_item['type'].'"'; |
|
| 565 | + if ($compress) { |
|
| 566 | + $output .= '"t": "'.$spotter_item['type'].'"'; |
|
| 567 | + } else { |
|
| 568 | + $output .= '"type": "'.$spotter_item['type'].'"'; |
|
| 569 | + } |
|
| 427 | 570 | } elseif ($marine) { |
| 428 | - if ($compress) $output .= '"t": "ship"'; |
|
| 429 | - else $output .= '"type": "ship"'; |
|
| 571 | + if ($compress) { |
|
| 572 | + $output .= '"t": "ship"'; |
|
| 573 | + } else { |
|
| 574 | + $output .= '"type": "ship"'; |
|
| 575 | + } |
|
| 430 | 576 | } else { |
| 431 | - if ($compress) $output .= '"t": "aircraft"'; |
|
| 432 | - else $output .= '"type": "aircraft"'; |
|
| 577 | + if ($compress) { |
|
| 578 | + $output .= '"t": "aircraft"'; |
|
| 579 | + } else { |
|
| 580 | + $output .= '"type": "aircraft"'; |
|
| 581 | + } |
|
| 433 | 582 | } |
| 434 | 583 | $output .= '},'; |
| 435 | 584 | $output .= '"geometry": {'; |
@@ -497,7 +646,9 @@ discard block |
||
| 497 | 646 | } |
| 498 | 647 | */ |
| 499 | 648 | $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
| 500 | - if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
| 649 | + if ($history == '' && isset($_COOKIE['history'])) { |
|
| 650 | + $history = $_COOKIE['history']; |
|
| 651 | + } |
|
| 501 | 652 | |
| 502 | 653 | if ( |
| 503 | 654 | (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') |
@@ -541,8 +692,11 @@ discard block |
||
| 541 | 692 | $output_history .= ']}},'; |
| 542 | 693 | $output .= $output_history; |
| 543 | 694 | } |
| 544 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 545 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 695 | + if ($compress) { |
|
| 696 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 697 | + } else { |
|
| 698 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 699 | + } |
|
| 546 | 700 | } |
| 547 | 701 | $output_history .= '['; |
| 548 | 702 | $output_history .= $spotter_history['longitude'].', '; |
@@ -561,9 +715,14 @@ discard block |
||
| 561 | 715 | $prev_alt = $alt; |
| 562 | 716 | } else { |
| 563 | 717 | if ($d == false) { |
| 564 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 565 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 566 | - } else $d = true; |
|
| 718 | + if ($compress) { |
|
| 719 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 720 | + } else { |
|
| 721 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 722 | + } |
|
| 723 | + } else { |
|
| 724 | + $d = true; |
|
| 725 | + } |
|
| 567 | 726 | $output_history .= '['; |
| 568 | 727 | $output_history .= $spotter_history['longitude'].', '; |
| 569 | 728 | $output_history .= $spotter_history['latitude']; |
@@ -584,7 +743,9 @@ discard block |
||
| 584 | 743 | $output_historyd = '['; |
| 585 | 744 | $output_historyd .= $spotter_item['longitude'].', '; |
| 586 | 745 | $output_historyd .= $spotter_item['latitude']; |
| 587 | - if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 746 | + if (isset($spotter_history['altitude'])) { |
|
| 747 | + $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
| 748 | + } |
|
| 588 | 749 | $output_historyd .= '],'; |
| 589 | 750 | //$output_history = $output_historyd.$output_history; |
| 590 | 751 | $output_history = $output_history.$output_historyd; |
@@ -606,8 +767,11 @@ discard block |
||
| 606 | 767 | && $spotter_item['arrival_airport'] != 'NA' |
| 607 | 768 | && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") |
| 608 | 769 | || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)))) { |
| 609 | - if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 610 | - else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 770 | + if ($compress) { |
|
| 771 | + $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 772 | + } else { |
|
| 773 | + $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 774 | + } |
|
| 611 | 775 | if (isset($spotter_item['departure_airport_latitude'])) { |
| 612 | 776 | $output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],'; |
| 613 | 777 | } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
@@ -640,8 +804,11 @@ discard block |
||
| 640 | 804 | || (!isset($_COOKIE['MapRemainaingRoute']) && (!isset($globalMapRemainingRoute) |
| 641 | 805 | || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) { |
| 642 | 806 | $havedata = false; |
| 643 | - if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 644 | - else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 807 | + if ($compress) { |
|
| 808 | + $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 809 | + } else { |
|
| 810 | + $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 811 | + } |
|
| 645 | 812 | $output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],'; |
| 646 | 813 | |
| 647 | 814 | if (isset($spotter_item['arrival_airport_latitude'])) { |
@@ -656,7 +823,9 @@ discard block |
||
| 656 | 823 | } |
| 657 | 824 | //$output_dest = substr($output_dest, 0, -1); |
| 658 | 825 | $output_dest .= ']}},'; |
| 659 | - if ($havedata) $output .= $output_dest; |
|
| 826 | + if ($havedata) { |
|
| 827 | + $output .= $output_dest; |
|
| 828 | + } |
|
| 660 | 829 | unset($output_dest); |
| 661 | 830 | } |
| 662 | 831 | } |
@@ -664,7 +833,9 @@ discard block |
||
| 664 | 833 | $output .= ']'; |
| 665 | 834 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 666 | 835 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
| 667 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 836 | + if (isset($begindate)) { |
|
| 837 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 838 | + } |
|
| 668 | 839 | $output .= '"fc": "'.$j.'"'; |
| 669 | 840 | } else { |
| 670 | 841 | $output .= '"features": '; |