@@ -304,7 +304,12 @@ discard block |
||
304 | 304 | <?php |
305 | 305 | } else { |
306 | 306 | ?> |
307 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
307 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
308 | + print $globalMapRefresh*2000; |
|
309 | +} else { |
|
310 | + print '60000'; |
|
311 | +} |
|
312 | +?>)) { |
|
308 | 313 | viewer.dataSources.get(dsn).entities.remove(entity); |
309 | 314 | czmlds.entities.removeById(entityid); |
310 | 315 | } |
@@ -588,7 +593,12 @@ discard block |
||
588 | 593 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
589 | 594 | ?> |
590 | 595 | update_polarLayer(); |
591 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
596 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
597 | + print $globalMapRefresh*1000*2; |
|
598 | +} else { |
|
599 | + print '60000'; |
|
600 | +} |
|
601 | +?>); |
|
592 | 602 | <?php |
593 | 603 | } |
594 | 604 | ?> |
@@ -700,7 +710,12 @@ discard block |
||
700 | 710 | console.log('Reload...'); |
701 | 711 | updateData(); |
702 | 712 | } |
703 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
713 | + ,<?php if (isset($globalMapRefresh)) { |
|
714 | + print $globalMapRefresh*1000; |
|
715 | +} else { |
|
716 | + print '30000'; |
|
717 | +} |
|
718 | +?>); |
|
704 | 719 | } else { |
705 | 720 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
706 | 721 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -729,7 +744,12 @@ discard block |
||
729 | 744 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
730 | 745 | ?> |
731 | 746 | update_atcLayer(); |
732 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
747 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
748 | + print $globalMapRefresh*1000*2; |
|
749 | +} else { |
|
750 | + print '60000'; |
|
751 | +} |
|
752 | +?>); |
|
733 | 753 | <?php |
734 | 754 | } |
735 | 755 | ?> |
@@ -28,7 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
30 | 30 | $output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"'; |
31 | -if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
31 | +if (!isset($_GET['now'])) { |
|
32 | + $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
33 | +} |
|
32 | 34 | $output .= '}'; |
33 | 35 | //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}'; |
34 | 36 | //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
@@ -37,7 +39,9 @@ discard block |
||
37 | 39 | $output .= '},'; |
38 | 40 | $output .= '{'; |
39 | 41 | $output .= '"id": "santaclaus",'; |
40 | -if (!isset($_GET['now'])) $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
42 | +if (!isset($_GET['now'])) { |
|
43 | + $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
44 | +} |
|
41 | 45 | $output .= '"properties": {'; |
42 | 46 | $output .= '"type": "santa"'; |
43 | 47 | $output .= '},'; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <button type="button" class="close">×</button> |
10 | 10 | <?php |
11 | 11 | |
12 | -$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING); |
|
12 | +$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING); |
|
13 | 13 | $sat = urldecode($sat); |
14 | 14 | //$info = $Satellite->get_info(str_replace(' ','-',$sat)); |
15 | 15 | //print_r($info); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $aircraft_name = 'INTEGRAL'; |
49 | 49 | // $ground_speed = 14970; |
50 | 50 | $launch_date = '17 October 2002'; |
51 | -} elseif (strpos($sat,'IRIDIUM') !== false) { |
|
51 | +} elseif (strpos($sat, 'IRIDIUM') !== false) { |
|
52 | 52 | $image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg'; |
53 | 53 | $image_copyright = 'Cliff'; |
54 | 54 | $ident = 'Iridium satellite constellation'; |
@@ -56,23 +56,23 @@ discard block |
||
56 | 56 | $aircraft_name = $sat; |
57 | 57 | // $ground_speed = 14970; |
58 | 58 | // $launch_date = '29 september 2011'; |
59 | -} elseif (strpos($sat,'ORBCOMM') !== false) { |
|
59 | +} elseif (strpos($sat, 'ORBCOMM') !== false) { |
|
60 | 60 | $ident = 'Orbcomm'; |
61 | 61 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)'; |
62 | 62 | $aircraft_name = $sat; |
63 | -} elseif (strpos($sat,'GLOBALSTAR') !== false) { |
|
63 | +} elseif (strpos($sat, 'GLOBALSTAR') !== false) { |
|
64 | 64 | $ident = 'Globalstar'; |
65 | 65 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar'; |
66 | 66 | $aircraft_name = $sat; |
67 | - $satname = str_replace(array('[+]','[-]'),'',$sat); |
|
68 | -} elseif (strpos($sat,'OSCAR 7') !== false) { |
|
67 | + $satname = str_replace(array('[+]', '[-]'), '', $sat); |
|
68 | +} elseif (strpos($sat, 'OSCAR 7') !== false) { |
|
69 | 69 | $image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg'; |
70 | 70 | $image_copyright = 'Amsat.org'; |
71 | 71 | $ident = 'AMSAT-OSCAR 7'; |
72 | 72 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7'; |
73 | 73 | $aircraft_name = $sat; |
74 | 74 | $launch_date = '15 November 1974'; |
75 | -} elseif (strpos($sat,'santaclaus') !== false) { |
|
75 | +} elseif (strpos($sat, 'santaclaus') !== false) { |
|
76 | 76 | $image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg'; |
77 | 77 | $image_copyright = 'Jonathan G Meath'; |
78 | 78 | $ident = 'Santa Claus'; |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | // $launch_date = '15 November 1974'; |
82 | 82 | } else { |
83 | 83 | $ident = $sat; |
84 | - if (strpos($sat,'(')) $satname = $sat; |
|
85 | - else $satname = str_replace(array(' '),'-',$sat); |
|
84 | + if (strpos($sat, '(')) $satname = $sat; |
|
85 | + else $satname = str_replace(array(' '), '-', $sat); |
|
86 | 86 | } |
87 | 87 | if (!isset($satname)) $satname = $sat; |
88 | 88 | if ($satname != 'santaclaus') { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | print '<div><span>'._("Orbit").'</span>'.$info['orbit'].'</div>'; |
157 | 157 | } |
158 | 158 | if ($info['launch_date'] != '') { |
159 | - print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d',strtotime($info['launch_date'])).'</div>'; |
|
159 | + print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d', strtotime($info['launch_date'])).'</div>'; |
|
160 | 160 | } |
161 | 161 | if ($info['launch_site'] != '') { |
162 | 162 | print '<div><span>'._("Launch Site").'</span>'.$info['launch_site'].'</div>'; |
@@ -81,10 +81,15 @@ |
||
81 | 81 | // $launch_date = '15 November 1974'; |
82 | 82 | } else { |
83 | 83 | $ident = $sat; |
84 | - if (strpos($sat,'(')) $satname = $sat; |
|
85 | - else $satname = str_replace(array(' '),'-',$sat); |
|
84 | + if (strpos($sat,'(')) { |
|
85 | + $satname = $sat; |
|
86 | + } else { |
|
87 | + $satname = str_replace(array(' '),'-',$sat); |
|
88 | + } |
|
89 | + } |
|
90 | +if (!isset($satname)) { |
|
91 | + $satname = $sat; |
|
86 | 92 | } |
87 | -if (!isset($satname)) $satname = $sat; |
|
88 | 93 | if ($satname != 'santaclaus') { |
89 | 94 | $info = $Satellite->get_info(strtolower(trim($satname))); |
90 | 95 | $position = $Satellite->position($sat); |