@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | if (!isset($globalJsonCompress)) $compress = true; |
| 7 | 7 | else $compress = $globalJsonCompress; |
| 8 | 8 | |
| 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); |
|
| 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); |
|
| 11 | 11 | $archive = false; |
| 12 | 12 | if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true; |
| 13 | 13 | ?> |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | if (typeof props != 'undefined') { |
| 216 | 216 | var thedate = new Date(props); |
| 217 | 217 | $("#thedate").html(thedate.toUTCString()); |
| 218 | - // $("#archivebox").html('<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'); |
|
| 218 | + // $("#archivebox").html('<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'); |
|
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | <?php |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | <?php |
| 367 | 367 | } else { |
| 368 | 368 | ?> |
| 369 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 369 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 370 | 370 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 371 | 371 | <?php |
| 372 | 372 | } |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | /* |
| 384 | 384 | shadowUrl: iconURLShadowpath, |
| 385 | 385 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
| 386 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 386 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 387 | 387 | */ |
| 388 | 388 | }) |
| 389 | 389 | }) |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | <?php |
| 417 | 417 | } else { |
| 418 | 418 | ?> |
| 419 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 419 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 420 | 420 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 421 | 421 | <?php |
| 422 | 422 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | <?php |
| 464 | 464 | } else { |
| 465 | 465 | ?> |
| 466 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 466 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 467 | 467 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 468 | 468 | <?php |
| 469 | 469 | } |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | var archivegeoJSONQuery = $.getJSON(url, function(data) { |
| 897 | 897 | $("#infobox").remove(); |
| 898 | 898 | document.getElementById('archivebox').style.display = "block"; |
| 899 | - $("#archivebox").html('<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><span id="thedate"></span></b>' + '<br/><a href="#" onClick="noarchive();"><i class="fa fa-eject" aria-hidden="true"></i></a> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a><br/><div class="range archive"><input type="range" min="1" id="archiveboxspeed" max="50" size="10" step="1" onInput="archiveboxspeedrange.value=value;" onChange="archiveboxspeedrange.value=value;archiveplayback.setSpeed(value);" value="'+getCookie('archive_speed')+'"/><output id="archiveboxspeedrange">'+getCookie('archive_speed')+'</output></div>'); |
|
| 899 | + $("#archivebox").html('<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><span id="thedate"></span></b>' + '<br/><a href="#" onClick="noarchive();"><i class="fa fa-eject" aria-hidden="true"></i></a> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a><br/><div class="range archive"><input type="range" min="1" id="archiveboxspeed" max="50" size="10" step="1" onInput="archiveboxspeedrange.value=value;" onChange="archiveboxspeedrange.value=value;archiveplayback.setSpeed(value);" value="'+getCookie('archive_speed')+'"/><output id="archiveboxspeedrange">'+getCookie('archive_speed')+'</output></div>'); |
|
| 900 | 900 | |
| 901 | 901 | var archiveLayerGroup = L.layerGroup(); |
| 902 | 902 | var archivegeoJSON = L.geoJson(data, { |
@@ -22,13 +22,13 @@ discard block |
||
| 22 | 22 | $min = false; |
| 23 | 23 | $allhistory = false; |
| 24 | 24 | $filter['source'] = array(); |
| 25 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 26 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 27 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 28 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 29 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 30 | -if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 31 | -if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 25 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 26 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 27 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 28 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs')); |
|
| 29 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 30 | +if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',', $_COOKIE['Airlines']); |
|
| 31 | +if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',', $_COOKIE['Sources']); |
|
| 32 | 32 | if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') $filter['airlinestype'] = $_COOKIE['airlinestype']; |
| 33 | 33 | |
| 34 | 34 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | if (isset($_GET['ident'])) { |
| 39 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 39 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 40 | 40 | $from_archive = true; |
| 41 | 41 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataByIdent($ident); |
| 42 | 42 | $allhistory = true; |
| 43 | 43 | } elseif (isset($_GET['flightaware_id'])) { |
| 44 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 44 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 45 | 45 | $from_archive = true; |
| 46 | 46 | $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
| 47 | 47 | $allhistory = true; |
@@ -49,15 +49,15 @@ discard block |
||
| 49 | 49 | $from_archive = true; |
| 50 | 50 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 51 | 51 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 52 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 52 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 53 | 53 | if (isset($globalAircraftMaxUpdate)) $begindate = $begindate - $globalAircraftMaxUpdate; |
| 54 | 54 | else $begindate = $begindate - 3000; |
| 55 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 56 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 57 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 58 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 55 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 56 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 57 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 58 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 59 | 59 | //$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
| 60 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
| 60 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if (!empty($spotter_array)) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($flightcnt == '') $flightcnt = 0; |
| 67 | 67 | } else $flightcnt = 0; |
| 68 | 68 | |
| 69 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 69 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 70 | 70 | |
| 71 | 71 | $pfi = ''; |
| 72 | 72 | //var_dump($spotter_array); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | if (!empty($spotter_array) && is_array($spotter_array)) |
| 83 | 83 | { |
| 84 | 84 | $output .= '"features": ['; |
| 85 | - foreach($spotter_array as $spotter_item) |
|
| 85 | + foreach ($spotter_array as $spotter_item) |
|
| 86 | 86 | { |
| 87 | 87 | $j++; |
| 88 | 88 | date_default_timezone_set('UTC'); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
| 127 | 127 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 128 | 128 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 129 | - $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
|
| 129 | + $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ', '_', $spotter_item['aircraft_name'])).'",'; |
|
| 130 | 130 | } elseif (isset($spotter_item['aircraft_type'])) { |
| 131 | 131 | $output .= '"aircraft_name": "NA ('.$spotter_item['aircraft_type'].')",'; |
| 132 | 132 | } elseif (!$min) { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | if (!$min) $output .= '"image": "'.$image.'",'; |
| 205 | 205 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 206 | - $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
|
| 206 | + $output .= '"image_copyright": "'.str_replace('"', "'", trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '', $spotter_item['image_copyright']))).'",'; |
|
| 207 | 207 | } |
| 208 | 208 | if (isset($spotter_item['image_source_website'])) { |
| 209 | 209 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $output .= '"waypoints": "'.$spotter_item['waypoints'].'",'; |
| 226 | 226 | } |
| 227 | 227 | if (isset($spotter_item['acars'])) { |
| 228 | - $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
|
| 228 | + $output .= '"acars": "'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br />', $spotter_item['acars']['message'])).'",'; |
|
| 229 | 229 | } |
| 230 | 230 | //$spotter_history_array = $SpotterArchive->getCoordArchiveSpotterDataById($spotter_item['flightaware_id']); |
| 231 | 231 | //$spotter_history_array = array(); |
@@ -241,17 +241,17 @@ discard block |
||
| 241 | 241 | $k++; |
| 242 | 242 | $output_history .= '['.$spotter_history['longitude'].', '.$spotter_history['latitude'].'],'; |
| 243 | 243 | $output_time .= (strtotime($spotter_history['date'])*1000).','; |
| 244 | - if ($previousts != 0) $output_timediff .= (strtotime($spotter_history['date'])-$previousts).','; |
|
| 244 | + if ($previousts != 0) $output_timediff .= (strtotime($spotter_history['date']) - $previousts).','; |
|
| 245 | 245 | $previousts = strtotime($spotter_history['date']); |
| 246 | 246 | if ($k > 1 && (strtotime($spotter_history['date'])*1000 > $enddate)) $end = true; |
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | if (isset($output_time)) { |
| 250 | - $output_time = substr($output_time, 0, -1); |
|
| 250 | + $output_time = substr($output_time, 0, -1); |
|
| 251 | 251 | $output .= '"time": ['.$output_time.'],'; |
| 252 | 252 | } |
| 253 | 253 | if (isset($output_timediff)) { |
| 254 | - $output_timediff = substr($output_timediff, 0, -1); |
|
| 254 | + $output_timediff = substr($output_timediff, 0, -1); |
|
| 255 | 255 | $output .= '"timediff": ['.$output_timediff.'],'; |
| 256 | 256 | } |
| 257 | 257 | // FIXME : type when not aircraft ? |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $output .= '"coordinates": ['; |
| 265 | 265 | |
| 266 | 266 | if (isset($output_history)) { |
| 267 | - $output_history = substr($output_history, 0, -1); |
|
| 267 | + $output_history = substr($output_history, 0, -1); |
|
| 268 | 268 | $output .= $output_history; |
| 269 | 269 | } |
| 270 | 270 | $output .= ']'; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $output = substr($output, 0, -1); |
| 276 | 276 | $output .= ']'; |
| 277 | 277 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 278 | - $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
| 278 | + $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
| 279 | 279 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
| 280 | 280 | $output .= '"fc": "'.$flightcnt.'"'; |
| 281 | 281 | } else { |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | require_once('require/class.Satellite.php'); |
| 6 | 6 | |
| 7 | -$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING); |
|
| 7 | +$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING); |
|
| 8 | 8 | if ($trackident != '') { |
| 9 | 9 | require_once('require/class.SpotterLive.php'); |
| 10 | 10 | $SpotterLive = new SpotterLive(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident); |
| 15 | 15 | header('Location: '.$globalURL.'/flightid/'.$spotterid); |
| 16 | 16 | } else { |
| 17 | - setcookie('MapTrack',$resulttrackident[0]['flightaware_id']); |
|
| 17 | + setcookie('MapTrack', $resulttrackident[0]['flightaware_id']); |
|
| 18 | 18 | } |
| 19 | 19 | /* |
| 20 | 20 | } else { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | <div class="form-group"> |
| 198 | 198 | <label><?php echo _("From:"); ?></label> |
| 199 | 199 | <div class='input-group date' id='datetimepicker1'> |
| 200 | - <input type='text' id="start_date" name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("Y-m-d H:i",$_COOKIE['archive_begin']); ?> UTC" required /> |
|
| 200 | + <input type='text' id="start_date" name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("Y-m-d H:i", $_COOKIE['archive_begin']); ?> UTC" required /> |
|
| 201 | 201 | <span class="input-group-addon"> |
| 202 | 202 | <span class="glyphicon glyphicon-calendar"></span> |
| 203 | 203 | </span> |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | <div class="form-group"> |
| 207 | 207 | <label><?php echo _("To:"); ?></label> |
| 208 | 208 | <div class='input-group date' id='datetimepicker2'> |
| 209 | - <input type='text' id="end_date" name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("Y-m-d H:i",$_COOKIE['archive_end']); ?> UTC" /> |
|
| 209 | + <input type='text' id="end_date" name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("Y-m-d H:i", $_COOKIE['archive_end']); ?> UTC" /> |
|
| 210 | 210 | <span class="input-group-addon"> |
| 211 | 211 | <span class="glyphicon glyphicon-calendar"></span> |
| 212 | 212 | </span> |
@@ -354,9 +354,9 @@ discard block |
||
| 354 | 354 | <li><?php echo _("Type of Terrain:"); ?> |
| 355 | 355 | <select class="selectpicker" onchange="terrainType(this);"> |
| 356 | 356 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
| 357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 357 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
| 358 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
| 359 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected'; ?>>ArticDEM</option> |
|
| 360 | 360 | </select> |
| 361 | 361 | </li> |
| 362 | 362 | <?php |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
| 412 | 412 | <?php |
| 413 | 413 | } |
| 414 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
| 414 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
| 415 | 415 | ?> |
| 416 | 416 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
| 417 | 417 | <?php |
@@ -586,10 +586,10 @@ discard block |
||
| 586 | 586 | $Spotter = new Spotter(); |
| 587 | 587 | $allairlinenames = $Spotter->getAllAirlineNames(); |
| 588 | 588 | } |
| 589 | - foreach($allairlinenames as $airline) { |
|
| 589 | + foreach ($allairlinenames as $airline) { |
|
| 590 | 590 | $airline_name = $airline['airline_name']; |
| 591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 592 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
| 591 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
| 592 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
| 593 | 593 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 594 | 594 | } else { |
| 595 | 595 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 609 | 609 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
| 610 | 610 | <?php |
| 611 | - foreach($allalliancenames as $alliance) { |
|
| 611 | + foreach ($allalliancenames as $alliance) { |
|
| 612 | 612 | $alliance_name = $alliance['alliance']; |
| 613 | 613 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
| 614 | 614 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -644,8 +644,8 @@ discard block |
||
| 644 | 644 | */ |
| 645 | 645 | $Source = new Source(); |
| 646 | 646 | $datasource = $Source->getLocationInfoByType('gs'); |
| 647 | - foreach($datasource as $src) { |
|
| 648 | - if (isset($_COOKIE['filter_Sources']) && in_array($src['name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
| 647 | + foreach ($datasource as $src) { |
|
| 648 | + if (isset($_COOKIE['filter_Sources']) && in_array($src['name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
| 649 | 649 | echo '<option value="'.$src['name'].'" selected>'.$src['name'].'</option>'; |
| 650 | 650 | } else { |
| 651 | 651 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
| 734 | 734 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
| 735 | 735 | |
| 736 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
| 736 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
| 737 | 737 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
| 738 | 738 | } else { |
| 739 | 739 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |