@@ -146,8 +146,7 @@ |
||
| 146 | 146 | $obs_geodetic->lat = $qth->lat * Predict::de2ra; |
| 147 | 147 | $obs_geodetic->alt = $qth->alt / 1000.0; |
| 148 | 148 | $obs_geodetic->theta = 0; |
| 149 | - } |
|
| 150 | - else { |
|
| 149 | + } else { |
|
| 151 | 150 | $obs_geodetic->lon = 0.0; |
| 152 | 151 | $obs_geodetic->lat = 0.0; |
| 153 | 152 | $obs_geodetic->alt = 0.0; |
@@ -23,8 +23,11 @@ discard block |
||
| 23 | 23 | echo $e->getMessage(); |
| 24 | 24 | } |
| 25 | 25 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 26 | - if (isset($result[0])) return $result[0]; |
|
| 27 | - else return array(); |
|
| 26 | + if (isset($result[0])) { |
|
| 27 | + return $result[0]; |
|
| 28 | + } else { |
|
| 29 | + return array(); |
|
| 30 | + } |
|
| 28 | 31 | } |
| 29 | 32 | public function get_tle_types() { |
| 30 | 33 | $query = 'SELECT DISTINCT tle_type FROM tle ORDER BY tle_type'; |
@@ -35,8 +38,11 @@ discard block |
||
| 35 | 38 | echo $e->getMessage(); |
| 36 | 39 | } |
| 37 | 40 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 38 | - if (isset($result[0])) return $result; |
|
| 39 | - else return array(); |
|
| 41 | + if (isset($result[0])) { |
|
| 42 | + return $result; |
|
| 43 | + } else { |
|
| 44 | + return array(); |
|
| 45 | + } |
|
| 40 | 46 | } |
| 41 | 47 | public function get_tle_names() { |
| 42 | 48 | $query = 'SELECT DISTINCT tle_name, tle_type FROM tle'; |
@@ -47,8 +53,11 @@ discard block |
||
| 47 | 53 | echo $e->getMessage(); |
| 48 | 54 | } |
| 49 | 55 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 50 | - if (isset($result[0])) return $result; |
|
| 51 | - else return array(); |
|
| 56 | + if (isset($result[0])) { |
|
| 57 | + return $result; |
|
| 58 | + } else { |
|
| 59 | + return array(); |
|
| 60 | + } |
|
| 52 | 61 | } |
| 53 | 62 | public function get_tle_names_type($type) { |
| 54 | 63 | $query = 'SELECT tle_name, tle_type FROM tle WHERE tle_type = :type ORDER BY tle_name'; |
@@ -59,8 +68,11 @@ discard block |
||
| 59 | 68 | echo $e->getMessage(); |
| 60 | 69 | } |
| 61 | 70 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 62 | - if (isset($result[0])) return $result; |
|
| 63 | - else return array(); |
|
| 71 | + if (isset($result[0])) { |
|
| 72 | + return $result; |
|
| 73 | + } else { |
|
| 74 | + return array(); |
|
| 75 | + } |
|
| 64 | 76 | } |
| 65 | 77 | |
| 66 | 78 | public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) { |
@@ -95,7 +107,9 @@ discard block |
||
| 95 | 107 | $sat = new Predict_Sat($tle); |
| 96 | 108 | $predict = new Predict(); |
| 97 | 109 | //if ($timestamp == '') $now = Predict_Time::get_current_daynum(); |
| 98 | - if ($timestamp_begin == '') $timestamp_begin = time(); |
|
| 110 | + if ($timestamp_begin == '') { |
|
| 111 | + $timestamp_begin = time(); |
|
| 112 | + } |
|
| 99 | 113 | if ($timestamp_end == '') { |
| 100 | 114 | $now = Predict_Time::unix2daynum($timestamp_begin); |
| 101 | 115 | //echo $now; |
@@ -54,7 +54,9 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | if (!isset($array_value)) { |
| 57 | - if (!isset($arrayd_value)) $arrayd_value = ''; |
|
| 57 | + if (!isset($arrayd_value)) { |
|
| 58 | + $arrayd_value = ''; |
|
| 59 | + } |
|
| 58 | 60 | //$array_value = "'".$key."' => array(".$arrayd_value.")"; |
| 59 | 61 | $array_value = "array(".$arrayd_value.")"; |
| 60 | 62 | } elseif (isset($arrayd_value)) { |
@@ -71,7 +73,9 @@ discard block |
||
| 71 | 73 | } |
| 72 | 74 | } |
| 73 | 75 | } |
| 74 | - if (!isset($array_value)) $array_value = ''; |
|
| 76 | + if (!isset($array_value)) { |
|
| 77 | + $array_value = ''; |
|
| 78 | + } |
|
| 75 | 79 | $replace = "\n".'\$'.$settingname." = array(".$array_value.")"; |
| 76 | 80 | unset($array_value); |
| 77 | 81 | } else { |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
| 6 | 6 | $current_page = $file_path['filename']; |
| 7 | 7 | date_default_timezone_set($globalTimezone); |
| 8 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
| 9 | -else $MapType = $globalMapProvider; |
|
| 8 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
| 9 | + $MapType = $_COOKIE['MapType']; |
|
| 10 | +} else { |
|
| 11 | + $MapType = $globalMapProvider; |
|
| 12 | +} |
|
| 10 | 13 | ?> |
| 11 | 14 | <!DOCTYPE html> |
| 12 | 15 | <html> |
@@ -181,7 +184,13 @@ discard block |
||
| 181 | 184 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 182 | 185 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 183 | 186 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 184 | -<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 187 | +<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
| 188 | + print '&latitude='.$latitude; |
|
| 189 | +} |
|
| 190 | +?><?php if(isset($longitude)) { |
|
| 191 | + print '&longitude='.$longitude; |
|
| 192 | +} |
|
| 193 | +?>&<?php print time(); ?>"></script> |
|
| 185 | 194 | <?php |
| 186 | 195 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 187 | 196 | ?> |
@@ -235,7 +244,13 @@ discard block |
||
| 235 | 244 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 236 | 245 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 237 | 246 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 238 | -<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 247 | +<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
| 248 | + print '&latitude='.$latitude; |
|
| 249 | +} |
|
| 250 | +?><?php if(isset($longitude)) { |
|
| 251 | + print '&longitude='.$longitude; |
|
| 252 | +} |
|
| 253 | +?>&<?php print time(); ?>"></script> |
|
| 239 | 254 | <?php |
| 240 | 255 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 241 | 256 | ?> |
@@ -308,7 +323,12 @@ discard block |
||
| 308 | 323 | <span class="icon-bar"></span> |
| 309 | 324 | </button> |
| 310 | 325 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
| 311 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 326 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
| 327 | + print '/'; |
|
| 328 | +} else { |
|
| 329 | + print $globalURL; |
|
| 330 | +} |
|
| 331 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 312 | 332 | </div> |
| 313 | 333 | <div class="collapse navbar-collapse"> |
| 314 | 334 | <ul class="nav navbar-nav"> |
@@ -386,7 +406,9 @@ discard block |
||
| 386 | 406 | $alllang = $Language->getLanguages(); |
| 387 | 407 | foreach ($alllang as $key => $lang) { |
| 388 | 408 | print '<option value="'.$key.'"'; |
| 389 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 409 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
| 410 | + print ' selected '; |
|
| 411 | + } |
|
| 390 | 412 | print '>'.$lang[0].'</option>'; |
| 391 | 413 | } |
| 392 | 414 | ?> |
@@ -533,4 +555,7 @@ discard block |
||
| 533 | 555 | |
| 534 | 556 | ?> |
| 535 | 557 | |
| 536 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
| 558 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
| 559 | + print 'index '; |
|
| 560 | +} |
|
| 561 | +?>clear"> |
|
@@ -16,7 +16,9 @@ discard block |
||
| 16 | 16 | print '<h1>'._("Aircrafts Types").'</h1>'; |
| 17 | 17 | |
| 18 | 18 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 19 | - if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 19 | + if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') { |
|
| 20 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 21 | + } |
|
| 20 | 22 | $previous = null; |
| 21 | 23 | print '<div class="alphabet-legend">'; |
| 22 | 24 | foreach($aircraft_types as $value) { |
@@ -24,7 +26,9 @@ discard block |
||
| 24 | 26 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
| 25 | 27 | if($previous !== $firstLetter) |
| 26 | 28 | { |
| 27 | - if ($previous !== null) print ' | '; |
|
| 29 | + if ($previous !== null) { |
|
| 30 | + print ' | '; |
|
| 31 | + } |
|
| 28 | 32 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
| 29 | 33 | } |
| 30 | 34 | $previous = $firstLetter; |
@@ -38,7 +42,9 @@ discard block |
||
| 38 | 42 | { |
| 39 | 43 | if($previous !== $firstLetter) |
| 40 | 44 | { |
| 41 | - if ($previous !== null) print '</div>'; |
|
| 45 | + if ($previous !== null) { |
|
| 46 | + print '</div>'; |
|
| 47 | + } |
|
| 42 | 48 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
| 43 | 49 | } |
| 44 | 50 | $previous = $firstLetter; |
@@ -339,7 +339,9 @@ discard block |
||
| 339 | 339 | if (isset($globalTimezone)) |
| 340 | 340 | { |
| 341 | 341 | date_default_timezone_set($globalTimezone); |
| 342 | - } else date_default_timezone_set('UTC'); |
|
| 342 | + } else { |
|
| 343 | + date_default_timezone_set('UTC'); |
|
| 344 | + } |
|
| 343 | 345 | if ($showSpecial === true) |
| 344 | 346 | { |
| 345 | 347 | print '<tr class="special">'."\n"; |
@@ -358,8 +360,9 @@ discard block |
||
| 358 | 360 | print '<td class="aircraft_thumbnail">'."\n"; |
| 359 | 361 | |
| 360 | 362 | if ($spotter_item['image_source'] == 'planespotters') { |
| 361 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
| 362 | - else { |
|
| 363 | + if ($spotter_item['image_source_website'] != '') { |
|
| 364 | + $image_src = $spotter_item['image_source_website']; |
|
| 365 | + } else { |
|
| 363 | 366 | $planespotter_url_array = explode("_", $spotter_item['image']); |
| 364 | 367 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 365 | 368 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -372,7 +375,9 @@ discard block |
||
| 372 | 375 | } else { |
| 373 | 376 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 374 | 377 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
| 375 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 378 | + } else { |
|
| 379 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 380 | + } |
|
| 376 | 381 | if (isset($spotter_item['airline_name'])) { |
| 377 | 382 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 378 | 383 | } else { |
@@ -395,8 +400,9 @@ discard block |
||
| 395 | 400 | print '<td class="aircraft_thumbnail">'."\n"; |
| 396 | 401 | //print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
| 397 | 402 | if ($spotter_item['image_source'] == 'planespotters') { |
| 398 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
| 399 | - else { |
|
| 403 | + if ($spotter_item['image_source_website'] != '') { |
|
| 404 | + $image_src = $spotter_item['image_source_website']; |
|
| 405 | + } else { |
|
| 400 | 406 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
| 401 | 407 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 402 | 408 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -413,7 +419,9 @@ discard block |
||
| 413 | 419 | } else { |
| 414 | 420 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 415 | 421 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
| 416 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 422 | + } else { |
|
| 423 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 424 | + } |
|
| 417 | 425 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 418 | 426 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 419 | 427 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -494,15 +502,21 @@ discard block |
||
| 494 | 502 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
| 495 | 503 | if ($spotter_item['departure_airport_time'] > 2460) { |
| 496 | 504 | $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
| 497 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
| 505 | + } else { |
|
| 506 | + $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
| 507 | + } |
|
| 498 | 508 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
| 499 | 509 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
| 500 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
| 510 | + } else { |
|
| 511 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
| 512 | + } |
|
| 501 | 513 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
| 502 | 514 | } elseif (isset($spotter_item['real_departure_airport_time'])) { |
| 503 | 515 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
| 504 | 516 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
| 505 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
| 517 | + } else { |
|
| 518 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
| 519 | + } |
|
| 506 | 520 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
| 507 | 521 | } elseif (isset($spotter_item['departure_airport_time'])) { |
| 508 | 522 | if ($spotter_item['departure_airport_time'] > 2460) { |
@@ -524,7 +538,9 @@ discard block |
||
| 524 | 538 | $longitude = $spotter_item['longitude']; |
| 525 | 539 | } |
| 526 | 540 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
| 527 | - } else $distance = ''; |
|
| 541 | + } else { |
|
| 542 | + $distance = ''; |
|
| 543 | + } |
|
| 528 | 544 | if ($distance != '') { |
| 529 | 545 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 530 | 546 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -549,7 +565,9 @@ discard block |
||
| 549 | 565 | } else { |
| 550 | 566 | if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) { |
| 551 | 567 | print '<span class="nomobile">Scheduled : <a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a></span>'."\n"; |
| 552 | - if (!isset($Spotter)) $Spotter = new Spotter(); |
|
| 568 | + if (!isset($Spotter)) { |
|
| 569 | + $Spotter = new Spotter(); |
|
| 570 | + } |
|
| 553 | 571 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
| 554 | 572 | print '<br /><span class="nomobile">'._("Real:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$arrival_airport_info[0]['city'].','.$arrival_airport_info[0]['country'].' ('.$spotter_item['real_arrival_airport'].')</a></span>'."\n"; |
| 555 | 573 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
@@ -565,20 +583,28 @@ discard block |
||
| 565 | 583 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
| 566 | 584 | if ($spotter_item['arrival_airport_time'] > 2460) { |
| 567 | 585 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
| 568 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
| 586 | + } else { |
|
| 587 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
| 588 | + } |
|
| 569 | 589 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
| 570 | 590 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
| 571 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
| 591 | + } else { |
|
| 592 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
| 593 | + } |
|
| 572 | 594 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
| 573 | 595 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
| 574 | 596 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
| 575 | 597 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
| 576 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
| 598 | + } else { |
|
| 599 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
| 600 | + } |
|
| 577 | 601 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
| 578 | 602 | } elseif (isset($spotter_item['arrival_airport_time'])) { |
| 579 | 603 | if ($spotter_item['arrival_airport_time'] > 2460) { |
| 580 | 604 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
| 581 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
| 605 | + } else { |
|
| 606 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
| 607 | + } |
|
| 582 | 608 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
| 583 | 609 | } |
| 584 | 610 | if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
@@ -591,7 +617,9 @@ discard block |
||
| 591 | 617 | $longitude = $spotter_item['longitude']; |
| 592 | 618 | } |
| 593 | 619 | $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
| 594 | - } else $distance = ''; |
|
| 620 | + } else { |
|
| 621 | + $distance = ''; |
|
| 622 | + } |
|
| 595 | 623 | if ($distance != '') { |
| 596 | 624 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 597 | 625 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -9,7 +9,10 @@ |
||
| 9 | 9 | <?php |
| 10 | 10 | } |
| 11 | 11 | ?> |
| 12 | - <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
| 12 | + <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) { |
|
| 13 | + print $globalURL; |
|
| 14 | +} |
|
| 15 | +?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
| 13 | 16 | </footer> |
| 14 | 17 | |
| 15 | 18 | <div class="notifications bottom-left"></div> |
@@ -258,7 +258,9 @@ discard block |
||
| 258 | 258 | // Update table countries |
| 259 | 259 | if ($Connection->tableExists('airspace')) { |
| 260 | 260 | $error .= update_db::update_countries(); |
| 261 | - if ($error != '') return $error; |
|
| 261 | + if ($error != '') { |
|
| 262 | + return $error; |
|
| 263 | + } |
|
| 262 | 264 | } |
| 263 | 265 | // Update schema_version to 7 |
| 264 | 266 | $query = "UPDATE `config` SET `value` = '7' WHERE `name` = 'schema_version'"; |
@@ -314,7 +316,9 @@ discard block |
||
| 314 | 316 | $error = ''; |
| 315 | 317 | // Update table aircraft |
| 316 | 318 | $error .= create_db::import_file('../db/source_location.sql'); |
| 317 | - if ($error != '') return $error; |
|
| 319 | + if ($error != '') { |
|
| 320 | + return $error; |
|
| 321 | + } |
|
| 318 | 322 | // Update schema_version to 6 |
| 319 | 323 | $query = "UPDATE `config` SET `value` = '8' WHERE `name` = 'schema_version'"; |
| 320 | 324 | try { |
@@ -331,7 +335,9 @@ discard block |
||
| 331 | 335 | $error = ''; |
| 332 | 336 | // Update table aircraft |
| 333 | 337 | $error .= create_db::import_file('../db/notam.sql'); |
| 334 | - if ($error != '') return $error; |
|
| 338 | + if ($error != '') { |
|
| 339 | + return $error; |
|
| 340 | + } |
|
| 335 | 341 | $query = "DELETE FROM config WHERE name = 'last_update_db'; |
| 336 | 342 | INSERT INTO config (name,value) VALUES ('last_update_db',NOW()); |
| 337 | 343 | DELETE FROM config WHERE name = 'last_update_notam_db'; |
@@ -365,7 +371,9 @@ discard block |
||
| 365 | 371 | $error = ''; |
| 366 | 372 | // Update table atc |
| 367 | 373 | $error .= create_db::import_file('../db/atc.sql'); |
| 368 | - if ($error != '') return $error; |
|
| 374 | + if ($error != '') { |
|
| 375 | + return $error; |
|
| 376 | + } |
|
| 369 | 377 | |
| 370 | 378 | $query = "UPDATE `config` SET `value` = '10' WHERE `name` = 'schema_version'"; |
| 371 | 379 | try { |
@@ -389,13 +397,21 @@ discard block |
||
| 389 | 397 | $error = ''; |
| 390 | 398 | // Add tables |
| 391 | 399 | $error .= create_db::import_file('../db/aircraft_owner.sql'); |
| 392 | - if ($error != '') return $error; |
|
| 400 | + if ($error != '') { |
|
| 401 | + return $error; |
|
| 402 | + } |
|
| 393 | 403 | $error .= create_db::import_file('../db/metar.sql'); |
| 394 | - if ($error != '') return $error; |
|
| 404 | + if ($error != '') { |
|
| 405 | + return $error; |
|
| 406 | + } |
|
| 395 | 407 | $error .= create_db::import_file('../db/taf.sql'); |
| 396 | - if ($error != '') return $error; |
|
| 408 | + if ($error != '') { |
|
| 409 | + return $error; |
|
| 410 | + } |
|
| 397 | 411 | $error .= create_db::import_file('../db/airport.sql'); |
| 398 | - if ($error != '') return $error; |
|
| 412 | + if ($error != '') { |
|
| 413 | + return $error; |
|
| 414 | + } |
|
| 399 | 415 | |
| 400 | 416 | $query = "UPDATE `config` SET `value` = '11' WHERE `name` = 'schema_version'"; |
| 401 | 417 | try { |
@@ -469,19 +485,33 @@ discard block |
||
| 469 | 485 | $error = ''; |
| 470 | 486 | // Add tables |
| 471 | 487 | $error .= create_db::import_file('../db/stats.sql'); |
| 472 | - if ($error != '') return $error; |
|
| 488 | + if ($error != '') { |
|
| 489 | + return $error; |
|
| 490 | + } |
|
| 473 | 491 | $error .= create_db::import_file('../db/stats_aircraft.sql'); |
| 474 | - if ($error != '') return $error; |
|
| 492 | + if ($error != '') { |
|
| 493 | + return $error; |
|
| 494 | + } |
|
| 475 | 495 | $error .= create_db::import_file('../db/stats_airline.sql'); |
| 476 | - if ($error != '') return $error; |
|
| 496 | + if ($error != '') { |
|
| 497 | + return $error; |
|
| 498 | + } |
|
| 477 | 499 | $error .= create_db::import_file('../db/stats_airport.sql'); |
| 478 | - if ($error != '') return $error; |
|
| 500 | + if ($error != '') { |
|
| 501 | + return $error; |
|
| 502 | + } |
|
| 479 | 503 | $error .= create_db::import_file('../db/stats_owner.sql'); |
| 480 | - if ($error != '') return $error; |
|
| 504 | + if ($error != '') { |
|
| 505 | + return $error; |
|
| 506 | + } |
|
| 481 | 507 | $error .= create_db::import_file('../db/stats_pilot.sql'); |
| 482 | - if ($error != '') return $error; |
|
| 508 | + if ($error != '') { |
|
| 509 | + return $error; |
|
| 510 | + } |
|
| 483 | 511 | $error .= create_db::import_file('../db/spotter_archive_output.sql'); |
| 484 | - if ($error != '') return $error; |
|
| 512 | + if ($error != '') { |
|
| 513 | + return $error; |
|
| 514 | + } |
|
| 485 | 515 | |
| 486 | 516 | $query = "UPDATE `config` SET `value` = '13' WHERE `name` = 'schema_version'"; |
| 487 | 517 | try { |
@@ -521,7 +551,9 @@ discard block |
||
| 521 | 551 | // Add tables |
| 522 | 552 | if (!$Connection->tableExists('stats_flight')) { |
| 523 | 553 | $error .= create_db::import_file('../db/stats_flight.sql'); |
| 524 | - if ($error != '') return $error; |
|
| 554 | + if ($error != '') { |
|
| 555 | + return $error; |
|
| 556 | + } |
|
| 525 | 557 | } |
| 526 | 558 | $query = "UPDATE `config` SET `value` = '15' WHERE `name` = 'schema_version'"; |
| 527 | 559 | try { |
@@ -545,7 +577,9 @@ discard block |
||
| 545 | 577 | } catch(PDOException $e) { |
| 546 | 578 | return "error (update stats) : ".$e->getMessage()."\n"; |
| 547 | 579 | } |
| 548 | - if ($error != '') return $error; |
|
| 580 | + if ($error != '') { |
|
| 581 | + return $error; |
|
| 582 | + } |
|
| 549 | 583 | $query = "UPDATE `config` SET `value` = '16' WHERE `name` = 'schema_version'"; |
| 550 | 584 | try { |
| 551 | 585 | $sth = $Connection->db->prepare($query); |
@@ -566,7 +600,9 @@ discard block |
||
| 566 | 600 | if (!$Connection->tableExists('stats_callsign')) { |
| 567 | 601 | $error .= create_db::import_file('../db/stats_callsign.sql'); |
| 568 | 602 | } |
| 569 | - if ($error != '') return $error; |
|
| 603 | + if ($error != '') { |
|
| 604 | + return $error; |
|
| 605 | + } |
|
| 570 | 606 | $query = "UPDATE `config` SET `value` = '17' WHERE `name` = 'schema_version'"; |
| 571 | 607 | try { |
| 572 | 608 | $sth = $Connection->db->prepare($query); |
@@ -584,7 +620,9 @@ discard block |
||
| 584 | 620 | if (!$Connection->tableExists('stats_country')) { |
| 585 | 621 | $error .= create_db::import_file('../db/stats_country.sql'); |
| 586 | 622 | } |
| 587 | - if ($error != '') return $error; |
|
| 623 | + if ($error != '') { |
|
| 624 | + return $error; |
|
| 625 | + } |
|
| 588 | 626 | $query = "UPDATE `config` SET `value` = '18' WHERE `name` = 'schema_version'"; |
| 589 | 627 | try { |
| 590 | 628 | $sth = $Connection->db->prepare($query); |
@@ -607,7 +645,9 @@ discard block |
||
| 607 | 645 | return "error (update stats) : ".$e->getMessage()."\n"; |
| 608 | 646 | } |
| 609 | 647 | } |
| 610 | - if ($error != '') return $error; |
|
| 648 | + if ($error != '') { |
|
| 649 | + return $error; |
|
| 650 | + } |
|
| 611 | 651 | $query = "UPDATE `config` SET `value` = '19' WHERE `name` = 'schema_version'"; |
| 612 | 652 | try { |
| 613 | 653 | $sth = $Connection->db->prepare($query); |
@@ -623,7 +663,9 @@ discard block |
||
| 623 | 663 | $error = ''; |
| 624 | 664 | // Update airport table |
| 625 | 665 | $error .= create_db::import_file('../db/airport.sql'); |
| 626 | - if ($error != '') return 'Import airport.sql : '.$error; |
|
| 666 | + if ($error != '') { |
|
| 667 | + return 'Import airport.sql : '.$error; |
|
| 668 | + } |
|
| 627 | 669 | // Remove primary key on Spotter_Archive |
| 628 | 670 | $query = "alter table spotter_archive drop spotter_archive_id"; |
| 629 | 671 | try { |
@@ -699,7 +741,9 @@ discard block |
||
| 699 | 741 | return "error (add source_name column) : ".$e->getMessage()."\n"; |
| 700 | 742 | } |
| 701 | 743 | } |
| 702 | - if ($error != '') return $error; |
|
| 744 | + if ($error != '') { |
|
| 745 | + return $error; |
|
| 746 | + } |
|
| 703 | 747 | $query = "UPDATE `config` SET `value` = '20' WHERE `name` = 'schema_version'"; |
| 704 | 748 | try { |
| 705 | 749 | $sth = $Connection->db->prepare($query); |
@@ -717,7 +761,9 @@ discard block |
||
| 717 | 761 | // Update airline table |
| 718 | 762 | if (!$globalIVAO && !$globalVATSIM && !$globalphpVMS) { |
| 719 | 763 | $error .= create_db::import_file('../db/airlines.sql'); |
| 720 | - if ($error != '') return 'Import airlines.sql : '.$error; |
|
| 764 | + if ($error != '') { |
|
| 765 | + return 'Import airlines.sql : '.$error; |
|
| 766 | + } |
|
| 721 | 767 | } |
| 722 | 768 | if (!$Connection->checkColumnName('aircraft_modes','type_flight')) { |
| 723 | 769 | // Add column over_country |
@@ -729,7 +775,9 @@ discard block |
||
| 729 | 775 | return "error (add over_country) : ".$e->getMessage()."\n"; |
| 730 | 776 | } |
| 731 | 777 | } |
| 732 | - if ($error != '') return $error; |
|
| 778 | + if ($error != '') { |
|
| 779 | + return $error; |
|
| 780 | + } |
|
| 733 | 781 | /* |
| 734 | 782 | if (!$globalIVAO && !$globalVATSIM && !$globalphpVMS) { |
| 735 | 783 | // Force update ModeS (this will put type_flight data |
@@ -759,7 +807,9 @@ discard block |
||
| 759 | 807 | } catch(PDOException $e) { |
| 760 | 808 | return "error (rename type to stats_type on stats*) : ".$e->getMessage()."\n"; |
| 761 | 809 | } |
| 762 | - if ($error != '') return $error; |
|
| 810 | + if ($error != '') { |
|
| 811 | + return $error; |
|
| 812 | + } |
|
| 763 | 813 | } |
| 764 | 814 | $query = "UPDATE `config` SET `value` = '22' WHERE `name` = 'schema_version'"; |
| 765 | 815 | try { |
@@ -782,7 +832,9 @@ discard block |
||
| 782 | 832 | } else { |
| 783 | 833 | $error .= create_db::import_file('../db/pgsql/stats_source.sql'); |
| 784 | 834 | } |
| 785 | - if ($error != '') return $error; |
|
| 835 | + if ($error != '') { |
|
| 836 | + return $error; |
|
| 837 | + } |
|
| 786 | 838 | } |
| 787 | 839 | $query = "UPDATE config SET value = '23' WHERE name = 'schema_version'"; |
| 788 | 840 | try { |
@@ -804,12 +856,16 @@ discard block |
||
| 804 | 856 | if ($globalDBdriver == 'mysql') { |
| 805 | 857 | if (!$Connection->tableExists('tle')) { |
| 806 | 858 | $error .= create_db::import_file('../db/tle.sql'); |
| 807 | - if ($error != '') return $error; |
|
| 859 | + if ($error != '') { |
|
| 860 | + return $error; |
|
| 861 | + } |
|
| 808 | 862 | } |
| 809 | 863 | } else { |
| 810 | 864 | if (!$Connection->tableExists('tle')) { |
| 811 | 865 | $error .= create_db::import_file('../db/pgsql/tle.sql'); |
| 812 | - if ($error != '') return $error; |
|
| 866 | + if ($error != '') { |
|
| 867 | + return $error; |
|
| 868 | + } |
|
| 813 | 869 | } |
| 814 | 870 | $query = "create index flightaware_id_idx ON spotter_archive USING btree(flightaware_id)"; |
| 815 | 871 | try { |
@@ -849,7 +905,9 @@ discard block |
||
| 849 | 905 | } else { |
| 850 | 906 | $error .= create_db::import_file('../db/pgsql/airlines.sql'); |
| 851 | 907 | } |
| 852 | - if ($error != '') return 'Import airlines.sql : '.$error; |
|
| 908 | + if ($error != '') { |
|
| 909 | + return 'Import airlines.sql : '.$error; |
|
| 910 | + } |
|
| 853 | 911 | if (!$Connection->checkColumnName('airlines','forsource')) { |
| 854 | 912 | // Add forsource to airlines |
| 855 | 913 | $query = "ALTER TABLE airlines ADD forsource VARCHAR(255) NULL DEFAULT NULL"; |
@@ -1102,8 +1160,11 @@ discard block |
||
| 1102 | 1160 | if ($Connection->tableExists('aircraft')) { |
| 1103 | 1161 | if (!$Connection->tableExists('config')) { |
| 1104 | 1162 | $version = '1'; |
| 1105 | - if ($update) return self::update_from_1(); |
|
| 1106 | - else return $version; |
|
| 1163 | + if ($update) { |
|
| 1164 | + return self::update_from_1(); |
|
| 1165 | + } else { |
|
| 1166 | + return $version; |
|
| 1167 | + } |
|
| 1107 | 1168 | } else { |
| 1108 | 1169 | $Connection = new Connection(); |
| 1109 | 1170 | $query = "SELECT value FROM config WHERE name = 'schema_version' LIMIT 1"; |
@@ -1117,106 +1178,183 @@ discard block |
||
| 1117 | 1178 | if ($update) { |
| 1118 | 1179 | if ($result['value'] == '2') { |
| 1119 | 1180 | $error = self::update_from_2(); |
| 1120 | - if ($error != '') return $error; |
|
| 1121 | - else return self::check_version(true); |
|
| 1181 | + if ($error != '') { |
|
| 1182 | + return $error; |
|
| 1183 | + } else { |
|
| 1184 | + return self::check_version(true); |
|
| 1185 | + } |
|
| 1122 | 1186 | } elseif ($result['value'] == '3') { |
| 1123 | 1187 | $error = self::update_from_3(); |
| 1124 | - if ($error != '') return $error; |
|
| 1125 | - else return self::check_version(true); |
|
| 1188 | + if ($error != '') { |
|
| 1189 | + return $error; |
|
| 1190 | + } else { |
|
| 1191 | + return self::check_version(true); |
|
| 1192 | + } |
|
| 1126 | 1193 | } elseif ($result['value'] == '4') { |
| 1127 | 1194 | $error = self::update_from_4(); |
| 1128 | - if ($error != '') return $error; |
|
| 1129 | - else return self::check_version(true); |
|
| 1195 | + if ($error != '') { |
|
| 1196 | + return $error; |
|
| 1197 | + } else { |
|
| 1198 | + return self::check_version(true); |
|
| 1199 | + } |
|
| 1130 | 1200 | } elseif ($result['value'] == '5') { |
| 1131 | 1201 | $error = self::update_from_5(); |
| 1132 | - if ($error != '') return $error; |
|
| 1133 | - else return self::check_version(true); |
|
| 1202 | + if ($error != '') { |
|
| 1203 | + return $error; |
|
| 1204 | + } else { |
|
| 1205 | + return self::check_version(true); |
|
| 1206 | + } |
|
| 1134 | 1207 | } elseif ($result['value'] == '6') { |
| 1135 | 1208 | $error = self::update_from_6(); |
| 1136 | - if ($error != '') return $error; |
|
| 1137 | - else return self::check_version(true); |
|
| 1209 | + if ($error != '') { |
|
| 1210 | + return $error; |
|
| 1211 | + } else { |
|
| 1212 | + return self::check_version(true); |
|
| 1213 | + } |
|
| 1138 | 1214 | } elseif ($result['value'] == '7') { |
| 1139 | 1215 | $error = self::update_from_7(); |
| 1140 | - if ($error != '') return $error; |
|
| 1141 | - else return self::check_version(true); |
|
| 1216 | + if ($error != '') { |
|
| 1217 | + return $error; |
|
| 1218 | + } else { |
|
| 1219 | + return self::check_version(true); |
|
| 1220 | + } |
|
| 1142 | 1221 | } elseif ($result['value'] == '8') { |
| 1143 | 1222 | $error = self::update_from_8(); |
| 1144 | - if ($error != '') return $error; |
|
| 1145 | - else return self::check_version(true); |
|
| 1223 | + if ($error != '') { |
|
| 1224 | + return $error; |
|
| 1225 | + } else { |
|
| 1226 | + return self::check_version(true); |
|
| 1227 | + } |
|
| 1146 | 1228 | } elseif ($result['value'] == '9') { |
| 1147 | 1229 | $error = self::update_from_9(); |
| 1148 | - if ($error != '') return $error; |
|
| 1149 | - else return self::check_version(true); |
|
| 1230 | + if ($error != '') { |
|
| 1231 | + return $error; |
|
| 1232 | + } else { |
|
| 1233 | + return self::check_version(true); |
|
| 1234 | + } |
|
| 1150 | 1235 | } elseif ($result['value'] == '10') { |
| 1151 | 1236 | $error = self::update_from_10(); |
| 1152 | - if ($error != '') return $error; |
|
| 1153 | - else return self::check_version(true); |
|
| 1237 | + if ($error != '') { |
|
| 1238 | + return $error; |
|
| 1239 | + } else { |
|
| 1240 | + return self::check_version(true); |
|
| 1241 | + } |
|
| 1154 | 1242 | } elseif ($result['value'] == '11') { |
| 1155 | 1243 | $error = self::update_from_11(); |
| 1156 | - if ($error != '') return $error; |
|
| 1157 | - else return self::check_version(true); |
|
| 1244 | + if ($error != '') { |
|
| 1245 | + return $error; |
|
| 1246 | + } else { |
|
| 1247 | + return self::check_version(true); |
|
| 1248 | + } |
|
| 1158 | 1249 | } elseif ($result['value'] == '12') { |
| 1159 | 1250 | $error = self::update_from_12(); |
| 1160 | - if ($error != '') return $error; |
|
| 1161 | - else return self::check_version(true); |
|
| 1251 | + if ($error != '') { |
|
| 1252 | + return $error; |
|
| 1253 | + } else { |
|
| 1254 | + return self::check_version(true); |
|
| 1255 | + } |
|
| 1162 | 1256 | } elseif ($result['value'] == '13') { |
| 1163 | 1257 | $error = self::update_from_13(); |
| 1164 | - if ($error != '') return $error; |
|
| 1165 | - else return self::check_version(true); |
|
| 1258 | + if ($error != '') { |
|
| 1259 | + return $error; |
|
| 1260 | + } else { |
|
| 1261 | + return self::check_version(true); |
|
| 1262 | + } |
|
| 1166 | 1263 | } elseif ($result['value'] == '14') { |
| 1167 | 1264 | $error = self::update_from_14(); |
| 1168 | - if ($error != '') return $error; |
|
| 1169 | - else return self::check_version(true); |
|
| 1265 | + if ($error != '') { |
|
| 1266 | + return $error; |
|
| 1267 | + } else { |
|
| 1268 | + return self::check_version(true); |
|
| 1269 | + } |
|
| 1170 | 1270 | } elseif ($result['value'] == '15') { |
| 1171 | 1271 | $error = self::update_from_15(); |
| 1172 | - if ($error != '') return $error; |
|
| 1173 | - else return self::check_version(true); |
|
| 1272 | + if ($error != '') { |
|
| 1273 | + return $error; |
|
| 1274 | + } else { |
|
| 1275 | + return self::check_version(true); |
|
| 1276 | + } |
|
| 1174 | 1277 | } elseif ($result['value'] == '16') { |
| 1175 | 1278 | $error = self::update_from_16(); |
| 1176 | - if ($error != '') return $error; |
|
| 1177 | - else return self::check_version(true); |
|
| 1279 | + if ($error != '') { |
|
| 1280 | + return $error; |
|
| 1281 | + } else { |
|
| 1282 | + return self::check_version(true); |
|
| 1283 | + } |
|
| 1178 | 1284 | } elseif ($result['value'] == '17') { |
| 1179 | 1285 | $error = self::update_from_17(); |
| 1180 | - if ($error != '') return $error; |
|
| 1181 | - else return self::check_version(true); |
|
| 1286 | + if ($error != '') { |
|
| 1287 | + return $error; |
|
| 1288 | + } else { |
|
| 1289 | + return self::check_version(true); |
|
| 1290 | + } |
|
| 1182 | 1291 | } elseif ($result['value'] == '18') { |
| 1183 | 1292 | $error = self::update_from_18(); |
| 1184 | - if ($error != '') return $error; |
|
| 1185 | - else return self::check_version(true); |
|
| 1293 | + if ($error != '') { |
|
| 1294 | + return $error; |
|
| 1295 | + } else { |
|
| 1296 | + return self::check_version(true); |
|
| 1297 | + } |
|
| 1186 | 1298 | } elseif ($result['value'] == '19') { |
| 1187 | 1299 | $error = self::update_from_19(); |
| 1188 | - if ($error != '') return $error; |
|
| 1189 | - else return self::check_version(true); |
|
| 1300 | + if ($error != '') { |
|
| 1301 | + return $error; |
|
| 1302 | + } else { |
|
| 1303 | + return self::check_version(true); |
|
| 1304 | + } |
|
| 1190 | 1305 | } elseif ($result['value'] == '20') { |
| 1191 | 1306 | $error = self::update_from_20(); |
| 1192 | - if ($error != '') return $error; |
|
| 1193 | - else return self::check_version(true); |
|
| 1307 | + if ($error != '') { |
|
| 1308 | + return $error; |
|
| 1309 | + } else { |
|
| 1310 | + return self::check_version(true); |
|
| 1311 | + } |
|
| 1194 | 1312 | } elseif ($result['value'] == '21') { |
| 1195 | 1313 | $error = self::update_from_21(); |
| 1196 | - if ($error != '') return $error; |
|
| 1197 | - else return self::check_version(true); |
|
| 1314 | + if ($error != '') { |
|
| 1315 | + return $error; |
|
| 1316 | + } else { |
|
| 1317 | + return self::check_version(true); |
|
| 1318 | + } |
|
| 1198 | 1319 | } elseif ($result['value'] == '22') { |
| 1199 | 1320 | $error = self::update_from_22(); |
| 1200 | - if ($error != '') return $error; |
|
| 1201 | - else return self::check_version(true); |
|
| 1321 | + if ($error != '') { |
|
| 1322 | + return $error; |
|
| 1323 | + } else { |
|
| 1324 | + return self::check_version(true); |
|
| 1325 | + } |
|
| 1202 | 1326 | } elseif ($result['value'] == '23') { |
| 1203 | 1327 | $error = self::update_from_23(); |
| 1204 | - if ($error != '') return $error; |
|
| 1205 | - else return self::check_version(true); |
|
| 1328 | + if ($error != '') { |
|
| 1329 | + return $error; |
|
| 1330 | + } else { |
|
| 1331 | + return self::check_version(true); |
|
| 1332 | + } |
|
| 1206 | 1333 | } elseif ($result['value'] == '24') { |
| 1207 | 1334 | $error = self::update_from_24(); |
| 1208 | - if ($error != '') return $error; |
|
| 1209 | - else return self::check_version(true); |
|
| 1335 | + if ($error != '') { |
|
| 1336 | + return $error; |
|
| 1337 | + } else { |
|
| 1338 | + return self::check_version(true); |
|
| 1339 | + } |
|
| 1210 | 1340 | } elseif ($result['value'] == '25') { |
| 1211 | 1341 | $error = self::update_from_25(); |
| 1212 | - if ($error != '') return $error; |
|
| 1213 | - else return self::check_version(true); |
|
| 1214 | - } else return ''; |
|
| 1342 | + if ($error != '') { |
|
| 1343 | + return $error; |
|
| 1344 | + } else { |
|
| 1345 | + return self::check_version(true); |
|
| 1346 | + } |
|
| 1347 | + } else { |
|
| 1348 | + return ''; |
|
| 1349 | + } |
|
| 1350 | + } else { |
|
| 1351 | + return $result['value']; |
|
| 1215 | 1352 | } |
| 1216 | - else return $result['value']; |
|
| 1217 | 1353 | } |
| 1218 | 1354 | |
| 1219 | - } else return $version; |
|
| 1355 | + } else { |
|
| 1356 | + return $version; |
|
| 1357 | + } |
|
| 1220 | 1358 | } |
| 1221 | 1359 | |
| 1222 | 1360 | } |
@@ -108,11 +108,26 @@ discard block |
||
| 108 | 108 | <li><div class="checkbox"><label><input type="checkbox" name="notam" value="1" onclick="showNotam();" /><?php echo _("NOTAM"); ?></label></div></li> |
| 109 | 109 | <li><?php echo _("NOTAM scope:"); ?> |
| 110 | 110 | <select class="selectpicker" onchange="notamscope(this);"> |
| 111 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 112 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 113 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 114 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 115 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 111 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 112 | + print ' selected'; |
|
| 113 | +} |
|
| 114 | +?>>All</option> |
|
| 115 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 116 | + print ' selected'; |
|
| 117 | +} |
|
| 118 | +?>>Airport/Enroute warning</option> |
|
| 119 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 120 | + print ' selected'; |
|
| 121 | +} |
|
| 122 | +?>>Airport warning</option> |
|
| 123 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 124 | + print ' selected'; |
|
| 125 | +} |
|
| 126 | +?>>Navigation warning</option> |
|
| 127 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 128 | + print ' selected'; |
|
| 129 | +} |
|
| 130 | +?>>Enroute warning</option> |
|
| 116 | 131 | </select |
| 117 | 132 | </li> |
| 118 | 133 | <?php |
@@ -133,7 +148,10 @@ discard block |
||
| 133 | 148 | <div class="form-group"> |
| 134 | 149 | <label>From (UTC):</label> |
| 135 | 150 | <div class='input-group date' id='datetimepicker1'> |
| 136 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
| 151 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) { |
|
| 152 | + print date("d/m/Y h:i a",$_COOKIE['archive_begin']); |
|
| 153 | +} |
|
| 154 | +?>" required /> |
|
| 137 | 155 | <span class="input-group-addon"> |
| 138 | 156 | <span class="glyphicon glyphicon-calendar"></span> |
| 139 | 157 | </span> |
@@ -142,7 +160,10 @@ discard block |
||
| 142 | 160 | <div class="form-group"> |
| 143 | 161 | <label>To (UTC):</label> |
| 144 | 162 | <div class='input-group date' id='datetimepicker2'> |
| 145 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
| 163 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) { |
|
| 164 | + print date("d/m/Y h:i a",$_COOKIE['archive_end']); |
|
| 165 | +} |
|
| 166 | +?>" /> |
|
| 146 | 167 | <span class="input-group-addon"> |
| 147 | 168 | <span class="glyphicon glyphicon-calendar"></span> |
| 148 | 169 | </span> |
@@ -165,8 +186,18 @@ discard block |
||
| 165 | 186 | |
| 166 | 187 | <li><?php echo _("Playback speed:"); ?> |
| 167 | 188 | <div class="range"> |
| 168 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
| 169 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 189 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) { |
|
| 190 | + print $_COOKIE['archive_speed']; |
|
| 191 | +} else { |
|
| 192 | + print '1'; |
|
| 193 | +} |
|
| 194 | +?>"> |
|
| 195 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 196 | + print $_COOKIE['archive_speed']; |
|
| 197 | +} else { |
|
| 198 | + print '1'; |
|
| 199 | +} |
|
| 200 | +?></output> |
|
| 170 | 201 | </div> |
| 171 | 202 | </li> |
| 172 | 203 | |
@@ -187,15 +218,27 @@ discard block |
||
| 187 | 218 | <li><?php echo _("Type of Map:"); ?> |
| 188 | 219 | <select class="selectpicker" onchange="mapType(this);"> |
| 189 | 220 | <?php |
| 190 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 191 | - else $MapType = $_COOKIE['MapType']; |
|
| 221 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 222 | + $MapType = $globalMapProvider; |
|
| 223 | + } else { |
|
| 224 | + $MapType = $_COOKIE['MapType']; |
|
| 225 | + } |
|
| 192 | 226 | ?> |
| 193 | 227 | <?php |
| 194 | 228 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 195 | 229 | ?> |
| 196 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 197 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 198 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 230 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 231 | + print ' selected'; |
|
| 232 | +} |
|
| 233 | +?>>Bing-Aerial</option> |
|
| 234 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 235 | + print ' selected'; |
|
| 236 | +} |
|
| 237 | +?>>Bing-Hybrid</option> |
|
| 238 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 239 | + print ' selected'; |
|
| 240 | +} |
|
| 241 | +?>>Bing-Road</option> |
|
| 199 | 242 | <?php |
| 200 | 243 | } |
| 201 | 244 | ?> |
@@ -205,56 +248,131 @@ discard block |
||
| 205 | 248 | <?php |
| 206 | 249 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 207 | 250 | ?> |
| 208 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 209 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 210 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 251 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 252 | + print ' selected'; |
|
| 253 | +} |
|
| 254 | +?>>Here-Aerial</option> |
|
| 255 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 256 | + print ' selected'; |
|
| 257 | +} |
|
| 258 | +?>>Here-Hybrid</option> |
|
| 259 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 260 | + print ' selected'; |
|
| 261 | +} |
|
| 262 | +?>>Here-Road</option> |
|
| 211 | 263 | <?php |
| 212 | 264 | } |
| 213 | 265 | ?> |
| 214 | 266 | <?php |
| 215 | 267 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 216 | 268 | ?> |
| 217 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 218 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 219 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 220 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 269 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 270 | + print ' selected'; |
|
| 271 | +} |
|
| 272 | +?>>Google Roadmap</option> |
|
| 273 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 274 | + print ' selected'; |
|
| 275 | +} |
|
| 276 | +?>>Google Satellite</option> |
|
| 277 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 278 | + print ' selected'; |
|
| 279 | +} |
|
| 280 | +?>>Google Hybrid</option> |
|
| 281 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 282 | + print ' selected'; |
|
| 283 | +} |
|
| 284 | +?>>Google Terrain</option> |
|
| 221 | 285 | <?php |
| 222 | 286 | } |
| 223 | 287 | ?> |
| 224 | 288 | <?php |
| 225 | 289 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 226 | 290 | ?> |
| 227 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 228 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 229 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 291 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 292 | + print ' selected'; |
|
| 293 | +} |
|
| 294 | +?>>MapQuest-OSM</option> |
|
| 295 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 296 | + print ' selected'; |
|
| 297 | +} |
|
| 298 | +?>>MapQuest-Aerial</option> |
|
| 299 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 300 | + print ' selected'; |
|
| 301 | +} |
|
| 302 | +?>>MapQuest-Hybrid</option> |
|
| 230 | 303 | <?php |
| 231 | 304 | } |
| 232 | 305 | ?> |
| 233 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 306 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 307 | + print ' selected'; |
|
| 308 | +} |
|
| 309 | +?>>Yandex</option> |
|
| 234 | 310 | <?php |
| 235 | 311 | } |
| 236 | 312 | ?> |
| 237 | 313 | <?php |
| 238 | 314 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 239 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 240 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 315 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 316 | + $MapBoxId = 'default'; |
|
| 317 | + } else { |
|
| 318 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 319 | + } |
|
| 241 | 320 | ?> |
| 242 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 243 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 244 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 245 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 246 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 247 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 248 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 249 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 250 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 251 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 252 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 253 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 321 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 322 | + print ' selected'; |
|
| 323 | +} |
|
| 324 | +?>>Mapbox default</option> |
|
| 325 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 326 | + print ' selected'; |
|
| 327 | +} |
|
| 328 | +?>>Mapbox streets</option> |
|
| 329 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 330 | + print ' selected'; |
|
| 331 | +} |
|
| 332 | +?>>Mapbox light</option> |
|
| 333 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 334 | + print ' selected'; |
|
| 335 | +} |
|
| 336 | +?>>Mapbox dark</option> |
|
| 337 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 338 | + print ' selected'; |
|
| 339 | +} |
|
| 340 | +?>>Mapbox satellite</option> |
|
| 341 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 342 | + print ' selected'; |
|
| 343 | +} |
|
| 344 | +?>>Mapbox streets-satellite</option> |
|
| 345 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 346 | + print ' selected'; |
|
| 347 | +} |
|
| 348 | +?>>Mapbox streets-basic</option> |
|
| 349 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 350 | + print ' selected'; |
|
| 351 | +} |
|
| 352 | +?>>Mapbox comic</option> |
|
| 353 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 354 | + print ' selected'; |
|
| 355 | +} |
|
| 356 | +?>>Mapbox outdoors</option> |
|
| 357 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 358 | + print ' selected'; |
|
| 359 | +} |
|
| 360 | +?>>Mapbox pencil</option> |
|
| 361 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 362 | + print ' selected'; |
|
| 363 | +} |
|
| 364 | +?>>Mapbox pirates</option> |
|
| 365 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 366 | + print ' selected'; |
|
| 367 | +} |
|
| 368 | +?>>Mapbox emerald</option> |
|
| 254 | 369 | <?php |
| 255 | 370 | } |
| 256 | 371 | ?> |
| 257 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 372 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 373 | + print ' selected'; |
|
| 374 | +} |
|
| 375 | +?>>OpenStreetMap</option> |
|
| 258 | 376 | </select> |
| 259 | 377 | </li> |
| 260 | 378 | <?php |
@@ -262,9 +380,18 @@ discard block |
||
| 262 | 380 | ?> |
| 263 | 381 | <li><?php echo _("Type of Terrain:"); ?> |
| 264 | 382 | <select class="selectpicker" onchange="terrainType(this);"> |
| 265 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 266 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 267 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 383 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 384 | + print ' selected'; |
|
| 385 | +} |
|
| 386 | +?>>stk terrain</option> |
|
| 387 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 388 | + print ' selected'; |
|
| 389 | +} |
|
| 390 | +?>>ellipsoid</option> |
|
| 391 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 392 | + print ' selected'; |
|
| 393 | +} |
|
| 394 | +?>>vr terrain</option> |
|
| 268 | 395 | </select> |
| 269 | 396 | </li> |
| 270 | 397 | <?php |
@@ -274,18 +401,36 @@ discard block |
||
| 274 | 401 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
| 275 | 402 | ?> |
| 276 | 403 | |
| 277 | - <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> |
|
| 278 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 279 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 280 | - <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> |
|
| 404 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 405 | + print 'checked'; |
|
| 406 | +} |
|
| 407 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
| 408 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
| 409 | + print 'checked'; |
|
| 410 | +} |
|
| 411 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 412 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
| 413 | + print 'checked'; |
|
| 414 | +} |
|
| 415 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 416 | + <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)) { |
|
| 417 | + print 'checked'; |
|
| 418 | +} |
|
| 419 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 281 | 420 | <?php |
| 282 | 421 | } |
| 283 | 422 | ?> |
| 284 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 423 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
| 424 | + print 'checked'; |
|
| 425 | +} |
|
| 426 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 285 | 427 | <?php |
| 286 | 428 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 287 | 429 | ?> |
| 288 | - <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> |
|
| 430 | + <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')) { |
|
| 431 | + print 'checked'; |
|
| 432 | +} |
|
| 433 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 289 | 434 | <?php |
| 290 | 435 | } |
| 291 | 436 | ?> |
@@ -294,17 +439,25 @@ discard block |
||
| 294 | 439 | if (function_exists('array_column')) { |
| 295 | 440 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 296 | 441 | ?> |
| 297 | - <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> |
|
| 442 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 443 | + print 'checked'; |
|
| 444 | +} |
|
| 445 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 298 | 446 | <?php |
| 299 | 447 | } |
| 300 | 448 | } elseif (isset($globalSources)) { |
| 301 | 449 | $dispolar = false; |
| 302 | 450 | foreach ($globalSources as $testsource) { |
| 303 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 451 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 452 | + $dispolar = true; |
|
| 453 | + } |
|
| 304 | 454 | } |
| 305 | 455 | if ($dispolar) { |
| 306 | 456 | ?> |
| 307 | - <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> |
|
| 457 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 458 | + print 'checked'; |
|
| 459 | +} |
|
| 460 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 308 | 461 | <?php |
| 309 | 462 | } |
| 310 | 463 | } |
@@ -316,12 +469,22 @@ discard block |
||
| 316 | 469 | <?php |
| 317 | 470 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 318 | 471 | ?> |
| 319 | - <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> |
|
| 472 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 473 | + print 'checked'; |
|
| 474 | +} |
|
| 475 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 320 | 476 | <?php |
| 321 | 477 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 322 | 478 | ?> |
| 323 | 479 | <li><?php echo _("Aircraft icon color:"); ?> |
| 324 | - <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'; ?>"> |
|
| 480 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 481 | + print $_COOKIE['IconColor']; |
|
| 482 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 483 | + print $globalAircraftIconColor; |
|
| 484 | +} else { |
|
| 485 | + print '1a3151'; |
|
| 486 | +} |
|
| 487 | +?>"> |
|
| 325 | 488 | </li> |
| 326 | 489 | <?php |
| 327 | 490 | } |
@@ -329,8 +492,22 @@ discard block |
||
| 329 | 492 | ?> |
| 330 | 493 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 331 | 494 | <div class="range"> |
| 332 | - <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'; ?>"> |
|
| 333 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 495 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 496 | + print $_COOKIE['AirportZoom']; |
|
| 497 | +} elseif (isset($globalAirportZoom)) { |
|
| 498 | + print $globalAirportZoom; |
|
| 499 | +} else { |
|
| 500 | + print '7'; |
|
| 501 | +} |
|
| 502 | +?>"> |
|
| 503 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 504 | + print $_COOKIE['AirportZoom']; |
|
| 505 | +} elseif (isset($globalAirportZoom)) { |
|
| 506 | + print $globalAirportZoom; |
|
| 507 | +} else { |
|
| 508 | + print '7'; |
|
| 509 | +} |
|
| 510 | +?></output> |
|
| 334 | 511 | </div> |
| 335 | 512 | </li> |
| 336 | 513 | <?php |
@@ -339,9 +516,18 @@ discard block |
||
| 339 | 516 | <?php |
| 340 | 517 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 341 | 518 | ?> |
| 342 | - <?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 } ?> |
|
| 343 | - <?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 } ?> |
|
| 344 | - <?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 } ?> |
|
| 519 | + <?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'])) { |
|
| 520 | + print 'checked'; |
|
| 521 | +} |
|
| 522 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 523 | + <?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'])) { |
|
| 524 | + print 'checked'; |
|
| 525 | +} |
|
| 526 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 527 | + <?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'])) { |
|
| 528 | + print 'checked'; |
|
| 529 | +} |
|
| 530 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 345 | 531 | <?php |
| 346 | 532 | } |
| 347 | 533 | ?> |
@@ -349,10 +535,16 @@ discard block |
||
| 349 | 535 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 350 | 536 | ?> |
| 351 | 537 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 352 | - <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> |
|
| 538 | + <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'])) { |
|
| 539 | + print 'checked'; |
|
| 540 | +} |
|
| 541 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 353 | 542 | <?php } ?> |
| 354 | 543 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 355 | - <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> |
|
| 544 | + <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'])) { |
|
| 545 | + print 'checked'; |
|
| 546 | +} |
|
| 547 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 356 | 548 | <?php } ?> |
| 357 | 549 | <?php |
| 358 | 550 | } |
@@ -363,7 +555,9 @@ discard block |
||
| 363 | 555 | $Spotter = new Spotter(); |
| 364 | 556 | foreach($Spotter->getAllAirlineNames() as $airline) { |
| 365 | 557 | $airline_name = $airline['airline_name']; |
| 366 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 558 | + if (strlen($airline_name) > 30) { |
|
| 559 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 560 | + } |
|
| 367 | 561 | if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
| 368 | 562 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 369 | 563 | } else { |
@@ -398,10 +592,22 @@ discard block |
||
| 398 | 592 | ?> |
| 399 | 593 | <li><?php echo _("Display airlines of type:"); ?> |
| 400 | 594 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 401 | - <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 402 | - <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 403 | - <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 404 | - <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 595 | + <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') { |
|
| 596 | + echo ' selected'; |
|
| 597 | +} |
|
| 598 | +?>><?php echo _("All"); ?></option> |
|
| 599 | + <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') { |
|
| 600 | + echo ' selected'; |
|
| 601 | +} |
|
| 602 | +?>><?php echo _("Passenger"); ?></option> |
|
| 603 | + <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') { |
|
| 604 | + echo ' selected'; |
|
| 605 | +} |
|
| 606 | +?>><?php echo _("Cargo"); ?></option> |
|
| 607 | + <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') { |
|
| 608 | + echo ' selected'; |
|
| 609 | +} |
|
| 610 | +?>><?php echo _("Military"); ?></option> |
|
| 405 | 611 | </select> |
| 406 | 612 | </li> |
| 407 | 613 | <?php |
@@ -409,22 +615,46 @@ discard block |
||
| 409 | 615 | ?> |
| 410 | 616 | <li><?php echo _("Distance unit:"); ?> |
| 411 | 617 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 412 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 413 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 414 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 618 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 619 | + echo ' selected'; |
|
| 620 | +} |
|
| 621 | +?>>km</option> |
|
| 622 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 623 | + echo ' selected'; |
|
| 624 | +} |
|
| 625 | +?>>nm</option> |
|
| 626 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 627 | + echo ' selected'; |
|
| 628 | +} |
|
| 629 | +?>>mi</option> |
|
| 415 | 630 | </select> |
| 416 | 631 | </li> |
| 417 | 632 | <li><?php echo _("Altitude unit:"); ?> |
| 418 | 633 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 419 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 420 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 634 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 635 | + echo ' selected'; |
|
| 636 | +} |
|
| 637 | +?>>m</option> |
|
| 638 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 639 | + echo ' selected'; |
|
| 640 | +} |
|
| 641 | +?>>feet</option> |
|
| 421 | 642 | </select> |
| 422 | 643 | </li> |
| 423 | 644 | <li><?php echo _("Speed unit:"); ?> |
| 424 | 645 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 425 | - <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> |
|
| 426 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 427 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 646 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 647 | + echo ' selected'; |
|
| 648 | +} |
|
| 649 | +?>>km/h</option> |
|
| 650 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 651 | + echo ' selected'; |
|
| 652 | +} |
|
| 653 | +?>>mph</option> |
|
| 654 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 655 | + echo ' selected'; |
|
| 656 | +} |
|
| 657 | +?>>knots</option> |
|
| 428 | 658 | </select> |
| 429 | 659 | </li> |
| 430 | 660 | </ul> |
@@ -438,7 +668,10 @@ discard block |
||
| 438 | 668 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 439 | 669 | <form> |
| 440 | 670 | <ul> |
| 441 | - <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> |
|
| 671 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
| 672 | + print 'checked'; |
|
| 673 | +} |
|
| 674 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 442 | 675 | <li><?php echo _("Type:"); ?> |
| 443 | 676 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 444 | 677 | <?php |
@@ -446,25 +679,45 @@ discard block |
||
| 446 | 679 | $types = $Satellite->get_tle_types(); |
| 447 | 680 | foreach ($types as $type) { |
| 448 | 681 | $type_name = $type['tle_type']; |
| 449 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 450 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 451 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 452 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 453 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 454 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 455 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 456 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 457 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 458 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 459 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 460 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 461 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 462 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 463 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 464 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 465 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 466 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 467 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 682 | + if ($type_name == 'musson') { |
|
| 683 | + $type_name = 'Russian LEO Navigation'; |
|
| 684 | + } else if ($type_name == 'nnss') { |
|
| 685 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 686 | + } else if ($type_name == 'sbas') { |
|
| 687 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 688 | + } else if ($type_name == 'glo-ops') { |
|
| 689 | + $type_name = 'Glonass Operational'; |
|
| 690 | + } else if ($type_name == 'gps-ops') { |
|
| 691 | + $type_name = 'GPS Operational'; |
|
| 692 | + } else if ($type_name == 'argos') { |
|
| 693 | + $type_name = 'ARGOS Data Collection System'; |
|
| 694 | + } else if ($type_name == 'tdrss') { |
|
| 695 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 696 | + } else if ($type_name == 'sarsat') { |
|
| 697 | + $type_name = 'Search & Rescue'; |
|
| 698 | + } else if ($type_name == 'dmc') { |
|
| 699 | + $type_name = 'Disaster Monitoring'; |
|
| 700 | + } else if ($type_name == 'resource') { |
|
| 701 | + $type_name = 'Earth Resources'; |
|
| 702 | + } else if ($type_name == 'stations') { |
|
| 703 | + $type_name = 'Space Stations'; |
|
| 704 | + } else if ($type_name == 'geo') { |
|
| 705 | + $type_name = 'Geostationary'; |
|
| 706 | + } else if ($type_name == 'amateur') { |
|
| 707 | + $type_name = 'Amateur Radio'; |
|
| 708 | + } else if ($type_name == 'x-comm') { |
|
| 709 | + $type_name = 'Experimental'; |
|
| 710 | + } else if ($type_name == 'other-comm') { |
|
| 711 | + $type_name = 'Other Comm'; |
|
| 712 | + } else if ($type_name == 'science') { |
|
| 713 | + $type_name = 'Space & Earth Science'; |
|
| 714 | + } else if ($type_name == 'military') { |
|
| 715 | + $type_name = 'Miscellaneous Military'; |
|
| 716 | + } else if ($type_name == 'radar') { |
|
| 717 | + $type_name = 'Radar Calibration'; |
|
| 718 | + } else if ($type_name == 'tle-new') { |
|
| 719 | + $type_name = 'Last 30 days launches'; |
|
| 720 | + } |
|
| 468 | 721 | |
| 469 | 722 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 470 | 723 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |