@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | $s3 = sin($bank/2); |
49 | 49 | $c1c2 = $c1*$c2; |
50 | 50 | $s1s2 = $s1*$s2; |
51 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
52 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
53 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
54 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
55 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
51 | + $w = $c1c2*$c3 - $s1s2*$s3; |
|
52 | + $x = $c1c2*$s3 + $s1s2*$c3; |
|
53 | + $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
54 | + $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
55 | + return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
56 | 56 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
57 | 57 | |
58 | 58 | } |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | $min = false; |
74 | 74 | $allhistory = false; |
75 | 75 | $filter['source'] = array(); |
76 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
77 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
78 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
79 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
80 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
81 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
82 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
83 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
84 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
85 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
76 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
77 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
78 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
79 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
80 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
81 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
82 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
83 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
84 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
85 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
86 | 86 | /* |
87 | 87 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
88 | 88 | $min = true; |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | $from_archive = true; |
130 | 130 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
131 | 131 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
132 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
133 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
134 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
135 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
136 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
137 | - $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
132 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
133 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
134 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
135 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
136 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
137 | + $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
138 | 138 | } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
139 | 139 | $from_archive = true; |
140 | 140 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | $begindate = $_COOKIE['archive_begin']; |
145 | 145 | $enddate = $_COOKIE['archive_end']; |
146 | 146 | |
147 | - $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
148 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
149 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
147 | + $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
148 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
149 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
150 | 150 | // echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
151 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
151 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
152 | 152 | } elseif ($tracker) { |
153 | 153 | $spotter_array = $TrackerLive->getMinLastLiveTrackerData($filter); |
154 | 154 | } elseif ($marine) { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | //print_r($spotter_array); |
160 | 160 | if (!empty($spotter_array)) { |
161 | 161 | if (isset($_GET['archive'])) { |
162 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
162 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
163 | 163 | } elseif ($tracker) { |
164 | 164 | $flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
165 | 165 | } elseif ($marine) { |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | if ($flightcnt == '') $flightcnt = 0; |
171 | 171 | } else $flightcnt = 0; |
172 | 172 | |
173 | -$sqltime = round(microtime(true)-$begintime,2); |
|
173 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
174 | 174 | $minitime = time(); |
175 | 175 | $maxitime = 0; |
176 | 176 | |
177 | 177 | |
178 | 178 | $modelsdb = array(); |
179 | 179 | if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
180 | - if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
181 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
182 | - if (isset($row[1]) ){ |
|
180 | + if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
181 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
182 | + if (isset($row[1])) { |
|
183 | 183 | $model = $row[0]; |
184 | 184 | $modelsdb[$model] = $row[1]; |
185 | 185 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $output .= '},'; |
216 | 216 | if (!empty($spotter_array) && is_array($spotter_array)) |
217 | 217 | { |
218 | - foreach($spotter_array as $spotter_item) |
|
218 | + foreach ($spotter_array as $spotter_item) |
|
219 | 219 | { |
220 | 220 | $j++; |
221 | 221 | if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | $output .= '"cartographicDegrees": ['; |
541 | 541 | if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
542 | 542 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
543 | - $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
543 | + $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
544 | 544 | $output .= $spotter_item['longitude'].', '; |
545 | 545 | $output .= $spotter_item['latitude']; |
546 | 546 | $prevlong = $spotter_item['longitude']; |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
560 | 560 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
561 | 561 | } else { |
562 | - $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
562 | + $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
563 | 563 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
564 | 564 | if ($spotter_item['ground_speed'] == 0) { |
565 | 565 | $output .= $prevlong.', '; |
@@ -593,9 +593,9 @@ discard block |
||
593 | 593 | } |
594 | 594 | $output .= ']'; |
595 | 595 | if (isset($globalArchive) && $globalArchive === TRUE) { |
596 | - if (time()-$globalLiveInterval < $minitime) $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
597 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
598 | -} else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
599 | -$output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
596 | + if (time() - $globalLiveInterval < $minitime) $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
597 | + else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
598 | +} else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
599 | +$output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
600 | 600 | print $output; |
601 | 601 | ?> |
@@ -8,8 +8,12 @@ discard block |
||
8 | 8 | } |
9 | 9 | $tracker = false; |
10 | 10 | $marine = false; |
11 | -if (isset($_GET['tracker'])) $tracker = true; |
|
12 | -if (isset($_GET['marine'])) $marine = true; |
|
11 | +if (isset($_GET['tracker'])) { |
|
12 | + $tracker = true; |
|
13 | +} |
|
14 | +if (isset($_GET['marine'])) { |
|
15 | + $marine = true; |
|
16 | +} |
|
13 | 17 | if ($tracker) { |
14 | 18 | require_once('require/class.Tracker.php'); |
15 | 19 | require_once('require/class.TrackerLive.php'); |
@@ -66,23 +70,46 @@ discard block |
||
66 | 70 | } |
67 | 71 | header('Content-Type: text/javascript'); |
68 | 72 | |
69 | -if (!isset($globalJsonCompress)) $compress = true; |
|
70 | -else $compress = $globalJsonCompress; |
|
73 | +if (!isset($globalJsonCompress)) { |
|
74 | + $compress = true; |
|
75 | +} else { |
|
76 | + $compress = $globalJsonCompress; |
|
77 | +} |
|
71 | 78 | |
72 | 79 | $from_archive = false; |
73 | 80 | $min = false; |
74 | 81 | $allhistory = false; |
75 | 82 | $filter['source'] = array(); |
76 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
77 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
78 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
79 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
80 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
81 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
82 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
83 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
84 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
85 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
83 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
84 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
85 | +} |
|
86 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
87 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
88 | +} |
|
89 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
90 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
91 | +} |
|
92 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
93 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
94 | +} |
|
95 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
96 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
97 | +} |
|
98 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
99 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
100 | +} |
|
101 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
102 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
103 | +} |
|
104 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
105 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
106 | +} |
|
107 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
108 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
109 | +} |
|
110 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
111 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
112 | +} |
|
86 | 113 | /* |
87 | 114 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
88 | 115 | $min = true; |
@@ -167,8 +194,12 @@ discard block |
||
167 | 194 | } else { |
168 | 195 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
169 | 196 | } |
170 | - if ($flightcnt == '') $flightcnt = 0; |
|
171 | -} else $flightcnt = 0; |
|
197 | + if ($flightcnt == '') { |
|
198 | + $flightcnt = 0; |
|
199 | + } |
|
200 | + } else { |
|
201 | + $flightcnt = 0; |
|
202 | +} |
|
172 | 203 | |
173 | 204 | $sqltime = round(microtime(true)-$begintime,2); |
174 | 205 | $minitime = time(); |
@@ -192,7 +223,9 @@ discard block |
||
192 | 223 | $j = 0; |
193 | 224 | $prev_flightaware_id = ''; |
194 | 225 | $speed = 1; |
195 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
226 | +if (isset($archivespeed)) { |
|
227 | + $speed = $archivespeed; |
|
228 | +} |
|
196 | 229 | $output = '['; |
197 | 230 | if ($tracker) { |
198 | 231 | $output .= '{"id" : "document", "name" : "tracker","version" : "1.0"'; |
@@ -218,7 +251,9 @@ discard block |
||
218 | 251 | foreach($spotter_array as $spotter_item) |
219 | 252 | { |
220 | 253 | $j++; |
221 | - if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
|
254 | + if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') { |
|
255 | + $heightrelative = 'RELATIVE_TO_GROUND'; |
|
256 | + } |
|
222 | 257 | date_default_timezone_set('UTC'); |
223 | 258 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
224 | 259 | { |
@@ -227,9 +262,13 @@ discard block |
||
227 | 262 | $image = "images/placeholder_thumb.png"; |
228 | 263 | } |
229 | 264 | |
230 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
231 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
232 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
265 | + if (isset($spotter_item['flightaware_id'])) { |
|
266 | + $id = $spotter_item['flightaware_id']; |
|
267 | + } elseif (isset($spotter_item['famtrackid'])) { |
|
268 | + $id = $spotter_item['famtrackid']; |
|
269 | + } elseif (isset($spotter_item['fammarine_id'])) { |
|
270 | + $id = $spotter_item['fammarine_id']; |
|
271 | + } |
|
233 | 272 | if ($prev_flightaware_id != $id) { |
234 | 273 | if ($prev_flightaware_id != '') { |
235 | 274 | $output .= ']'; |
@@ -271,7 +310,9 @@ discard block |
||
271 | 310 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
272 | 311 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
273 | 312 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
274 | - } else $aircraft_shadow = ''; |
|
313 | + } else { |
|
314 | + $aircraft_shadow = ''; |
|
315 | + } |
|
275 | 316 | $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
276 | 317 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] && isset($_COOKIE['IconColor'])) { |
277 | 318 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
@@ -279,7 +320,9 @@ discard block |
||
279 | 320 | } |
280 | 321 | $output .= '},'; |
281 | 322 | } |
282 | - } else $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41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8p9U/1KPz/ry6RT2mIDNF3Zjz19Ya4G1R/J16dgWvQd2pPlXhMdVZPUTgxfCW1wJgXUJpQlvfg8zs8K8r0Caom9QHetG7NGfa1ElDBThRXRtFd/Qh16puKIS3e7+clBjdy7kL1b3q4fzJQQGck5z6Nb97kxujblWf64HXov7Vl/E4YXWccP9AAd6dAx+ox/WTArNzY1t64B0f8K0DyLXuUvRGZfcpCo1VX4tg6wB76WMB0dALf526foAX8cqUot2pGP8B2Kz+krBeNYjS8636dh/8Beo2deoA9TWp76pd6g0q9cDNwKvAD8A84EfglLRBe2g+JWAfcEF68bPABOCoAl/gIPA5MA64FVgGnNhP292W3r0SeB1YVlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
323 | + } else { |
|
324 | + $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC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VlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
325 | + } |
|
283 | 326 | } elseif ($one3dmodel) { |
284 | 327 | if (isset($globalMap3DForceModel) && $globalMap3DForceModel != '') { |
285 | 328 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$globalMap3DForceModel.'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -310,7 +353,9 @@ discard block |
||
310 | 353 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
311 | 354 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
312 | 355 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
313 | - } else $aircraft_shadow = ''; |
|
356 | + } else { |
|
357 | + $aircraft_shadow = ''; |
|
358 | + } |
|
314 | 359 | if ($aircraft_shadow != '') { |
315 | 360 | if (isset($modelsdb[$aircraft_shadow])) { |
316 | 361 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_shadow].'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -447,7 +492,9 @@ discard block |
||
447 | 492 | } |
448 | 493 | $output .= '},'; |
449 | 494 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
450 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
495 | + if ($spotter_item['aircraft_icao'] != '') { |
|
496 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
497 | + } |
|
451 | 498 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
452 | 499 | } |
453 | 500 | } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
@@ -469,7 +516,9 @@ discard block |
||
469 | 516 | } |
470 | 517 | $output .= '},'; |
471 | 518 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
472 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
519 | + if ($spotter_item['aircraft_icao'] != '') { |
|
520 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
521 | + } |
|
473 | 522 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
474 | 523 | } |
475 | 524 | } else { |
@@ -482,7 +531,9 @@ discard block |
||
482 | 531 | } |
483 | 532 | $output .= '},'; |
484 | 533 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
485 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
534 | + if ($spotter_item['aircraft_icao'] != '') { |
|
535 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
536 | + } |
|
486 | 537 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
487 | 538 | } |
488 | 539 | } elseif ($tracker && isset($spotter_item['type'])) { |
@@ -538,8 +589,12 @@ discard block |
||
538 | 589 | // $output .= '"interpolationDegree" : 5,'; |
539 | 590 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
540 | 591 | $output .= '"cartographicDegrees": ['; |
541 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
542 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
592 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
593 | + $minitime = strtotime($spotter_item['date']); |
|
594 | + } |
|
595 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
596 | + $maxitime = strtotime($spotter_item['date']); |
|
597 | + } |
|
543 | 598 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
544 | 599 | $output .= $spotter_item['longitude'].', '; |
545 | 600 | $output .= $spotter_item['latitude']; |
@@ -553,19 +608,26 @@ discard block |
||
553 | 608 | $output .= ', '.round($spotter_item['altitude']*30.48); |
554 | 609 | $prevalt = round($spotter_item['altitude']*30.48); |
555 | 610 | } |
556 | - } else $output .= ', 0'; |
|
611 | + } else { |
|
612 | + $output .= ', 0'; |
|
613 | + } |
|
557 | 614 | //$orientation = '"orientation" : { '; |
558 | 615 | //$orientation .= '"unitQuaternion": ['; |
559 | 616 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
560 | 617 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
561 | 618 | } else { |
562 | 619 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
563 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
620 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
621 | + $maxitime = strtotime($spotter_item['date']); |
|
622 | + } |
|
564 | 623 | if ($spotter_item['ground_speed'] == 0) { |
565 | 624 | $output .= $prevlong.', '; |
566 | 625 | $output .= $prevlat; |
567 | - if (!$tracker && !$marine) $output .= ', '.$prevalt; |
|
568 | - else $output .= ', 0'; |
|
626 | + if (!$tracker && !$marine) { |
|
627 | + $output .= ', '.$prevalt; |
|
628 | + } else { |
|
629 | + $output .= ', 0'; |
|
630 | + } |
|
569 | 631 | } else { |
570 | 632 | $output .= $spotter_item['longitude'].', '; |
571 | 633 | $output .= $spotter_item['latitude']; |
@@ -577,10 +639,15 @@ discard block |
||
577 | 639 | $output .= ', 0'; |
578 | 640 | } |
579 | 641 | } else { |
580 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
581 | - else $output .= ', '.round($spotter_item['altitude']*30.48); |
|
642 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
643 | + $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
644 | + } else { |
|
645 | + $output .= ', '.round($spotter_item['altitude']*30.48); |
|
646 | + } |
|
582 | 647 | } |
583 | - } else $output .= ', 0'; |
|
648 | + } else { |
|
649 | + $output .= ', 0'; |
|
650 | + } |
|
584 | 651 | } |
585 | 652 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
586 | 653 | //$orientation .= ',"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
@@ -593,9 +660,14 @@ discard block |
||
593 | 660 | } |
594 | 661 | $output .= ']'; |
595 | 662 | if (isset($globalArchive) && $globalArchive === TRUE) { |
596 | - if (time()-$globalLiveInterval < $minitime) $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
597 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
598 | -} else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
663 | + if (time()-$globalLiveInterval < $minitime) { |
|
664 | + $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
665 | + } else { |
|
666 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
667 | + } |
|
668 | + } else { |
|
669 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
670 | +} |
|
599 | 671 | $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
600 | 672 | print $output; |
601 | 673 | ?> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | <?php }; if (isset($globalTracker) && $globalTracker) { ?><td><div id="ibxtracker"><h4><?php echo _("Trackers Detected"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?> |
41 | 41 | </tr></table></div> |
42 | 42 | <?php |
43 | - if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
43 | + if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
44 | 44 | |
45 | 45 | ?> |
46 | 46 | <script src="<?php echo $globalURL; ?>/js/map.3d.js.php"></script> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script> |
61 | 61 | <?php |
62 | 62 | } |
63 | - } |
|
63 | + } |
|
64 | 64 | ?> |
65 | 65 | <div id="dialog" title="<?php echo _("Session has timed-out"); ?>"> |
66 | 66 | <p><?php echo _("In order to save data consumption web page times out after 30 minutes. Close this dialog to continue."); ?></p> |
@@ -74,34 +74,34 @@ discard block |
||
74 | 74 | <li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
75 | 75 | <li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
76 | 76 | <?php |
77 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
77 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
78 | 78 | if (isset($globalArchive) && $globalArchive == TRUE) { |
79 | 79 | ?> |
80 | 80 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
81 | 81 | <?php |
82 | 82 | } |
83 | - } |
|
83 | + } |
|
84 | 84 | ?> |
85 | 85 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
86 | 86 | <li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li> |
87 | 87 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
88 | 88 | <?php |
89 | - if (isset($globalMap3D) && $globalMap3D) { |
|
89 | + if (isset($globalMap3D) && $globalMap3D) { |
|
90 | 90 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
91 | 91 | ?> |
92 | 92 | <li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li> |
93 | 93 | <?php |
94 | - } else { |
|
95 | - if (isset($globalMapSatellites) && $globalMapSatellites) { |
|
94 | + } else { |
|
95 | + if (isset($globalMapSatellites) && $globalMapSatellites) { |
|
96 | 96 | ?> |
97 | 97 | <li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li> |
98 | 98 | <?php |
99 | - } |
|
99 | + } |
|
100 | 100 | ?> |
101 | 101 | <li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li> |
102 | 102 | <?php |
103 | 103 | } |
104 | - } |
|
104 | + } |
|
105 | 105 | ?> |
106 | 106 | </ul> |
107 | 107 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | ?> |
176 | 176 | </div> |
177 | 177 | <?php |
178 | - if (isset($globalArchive) && $globalArchive == TRUE) { |
|
178 | + if (isset($globalArchive) && $globalArchive == TRUE) { |
|
179 | 179 | ?> |
180 | 180 | <div class="sidebar-pane" id="archive"> |
181 | 181 | <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | </form> |
236 | 236 | </div> |
237 | 237 | <?php |
238 | - } |
|
238 | + } |
|
239 | 239 | ?> |
240 | 240 | <div class="sidebar-pane" id="settings"> |
241 | 241 | <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -246,56 +246,56 @@ discard block |
||
246 | 246 | <?php |
247 | 247 | if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
248 | 248 | else $MapType = $_COOKIE['MapType']; |
249 | - ?> |
|
249 | + ?> |
|
250 | 250 | <?php |
251 | 251 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
252 | - ?> |
|
252 | + ?> |
|
253 | 253 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
254 | 254 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
255 | 255 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
256 | 256 | <?php |
257 | 257 | } |
258 | - ?> |
|
258 | + ?> |
|
259 | 259 | <?php |
260 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
261 | - ?> |
|
260 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
261 | + ?> |
|
262 | 262 | <?php |
263 | - if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
264 | - ?> |
|
263 | + if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
264 | + ?> |
|
265 | 265 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
266 | 266 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
267 | 267 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
268 | 268 | <?php |
269 | - } |
|
270 | - ?> |
|
269 | + } |
|
270 | + ?> |
|
271 | 271 | <?php |
272 | - if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
|
273 | - ?> |
|
272 | + if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
|
273 | + ?> |
|
274 | 274 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
275 | 275 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
276 | 276 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
277 | 277 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
278 | 278 | <?php |
279 | - } |
|
280 | - ?> |
|
279 | + } |
|
280 | + ?> |
|
281 | 281 | <?php |
282 | - if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
|
283 | - ?> |
|
282 | + if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
|
283 | + ?> |
|
284 | 284 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
285 | 285 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
286 | 286 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
287 | 287 | <?php |
288 | - } |
|
289 | - ?> |
|
288 | + } |
|
289 | + ?> |
|
290 | 290 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
291 | 291 | <?php |
292 | 292 | } |
293 | - ?> |
|
293 | + ?> |
|
294 | 294 | <?php |
295 | - if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
295 | + if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
296 | 296 | if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
297 | 297 | else $MapBoxId = $_COOKIE['MapTypeId']; |
298 | - ?> |
|
298 | + ?> |
|
299 | 299 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
300 | 300 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
301 | 301 | <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
@@ -309,13 +309,13 @@ discard block |
||
309 | 309 | <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
310 | 310 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
311 | 311 | <?php |
312 | - } |
|
313 | - ?> |
|
312 | + } |
|
313 | + ?> |
|
314 | 314 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
315 | 315 | </select> |
316 | 316 | </li> |
317 | 317 | <?php |
318 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
318 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
319 | 319 | ?> |
320 | 320 | <li><?php echo _("Type of Terrain:"); ?> |
321 | 321 | <select class="selectpicker" onchange="terrainType(this);"> |
@@ -325,10 +325,10 @@ discard block |
||
325 | 325 | </select> |
326 | 326 | </li> |
327 | 327 | <?php |
328 | - } |
|
328 | + } |
|
329 | 329 | ?> |
330 | 330 | <?php |
331 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
331 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
332 | 332 | ?> |
333 | 333 | |
334 | 334 | <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> |
@@ -337,76 +337,76 @@ discard block |
||
337 | 337 | <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
338 | 338 | <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> |
339 | 339 | <?php |
340 | - } |
|
340 | + } |
|
341 | 341 | ?> |
342 | 342 | <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> |
343 | 343 | <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
344 | 344 | <?php |
345 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
345 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
346 | 346 | ?> |
347 | 347 | <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> |
348 | 348 | <?php |
349 | - } |
|
350 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
349 | + } |
|
350 | + if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
351 | 351 | ?> |
352 | 352 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
353 | 353 | <?php |
354 | - } |
|
354 | + } |
|
355 | 355 | ?> |
356 | 356 | |
357 | 357 | <?php |
358 | 358 | if (function_exists('array_column')) { |
359 | - if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
360 | - ?> |
|
359 | + if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
360 | + ?> |
|
361 | 361 | <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> |
362 | 362 | <?php |
363 | - } |
|
363 | + } |
|
364 | 364 | } elseif (isset($globalSources)) { |
365 | - $dispolar = false; |
|
366 | - foreach ($globalSources as $testsource) { |
|
367 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
368 | - } |
|
369 | - if ($dispolar) { |
|
370 | - ?> |
|
365 | + $dispolar = false; |
|
366 | + foreach ($globalSources as $testsource) { |
|
367 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
368 | + } |
|
369 | + if ($dispolar) { |
|
370 | + ?> |
|
371 | 371 | <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> |
372 | 372 | <?php |
373 | - } |
|
374 | - } |
|
375 | - ?> |
|
373 | + } |
|
374 | + } |
|
375 | + ?> |
|
376 | 376 | <?php |
377 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
377 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
378 | 378 | ?> |
379 | 379 | |
380 | 380 | <?php |
381 | 381 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
382 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
383 | - ?> |
|
382 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
383 | + ?> |
|
384 | 384 | <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> |
385 | 385 | <?php |
386 | 386 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
387 | - ?> |
|
387 | + ?> |
|
388 | 388 | <li><?php echo _("Aircraft icon color:"); ?> |
389 | 389 | <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'; ?>"> |
390 | 390 | </li> |
391 | 391 | <?php |
392 | 392 | } |
393 | - } |
|
394 | - } |
|
395 | - ?> |
|
393 | + } |
|
394 | + } |
|
395 | + ?> |
|
396 | 396 | <?php |
397 | 397 | if (isset($globalMarine) && $globalMarine === TRUE) { |
398 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
399 | - ?> |
|
398 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
399 | + ?> |
|
400 | 400 | <li><?php echo _("Marine icon color:"); ?> |
401 | 401 | <input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
402 | 402 | </li> |
403 | 403 | <?php |
404 | - } |
|
405 | - } |
|
406 | - ?> |
|
404 | + } |
|
405 | + } |
|
406 | + ?> |
|
407 | 407 | <?php |
408 | 408 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
409 | - ?> |
|
409 | + ?> |
|
410 | 410 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
411 | 411 | <div class="range"> |
412 | 412 | <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'; ?>"> |
@@ -415,9 +415,9 @@ discard block |
||
415 | 415 | </li> |
416 | 416 | <?php |
417 | 417 | } |
418 | - ?> |
|
418 | + ?> |
|
419 | 419 | <?php |
420 | - } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
420 | + } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
421 | 421 | ?> |
422 | 422 | <?php |
423 | 423 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | </li> |
439 | 439 | <?php |
440 | 440 | } |
441 | - } |
|
441 | + } |
|
442 | 442 | ?> |
443 | 443 | <li><?php echo _("Distance unit:"); ?> |
444 | 444 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -471,19 +471,19 @@ discard block |
||
471 | 471 | <ul> |
472 | 472 | <?php |
473 | 473 | if (!isset($globalAircraft) || $globalAircraft) { |
474 | - ?> |
|
474 | + ?> |
|
475 | 475 | <?php |
476 | 476 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
477 | - ?> |
|
477 | + ?> |
|
478 | 478 | <?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 } ?> |
479 | 479 | <?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 } ?> |
480 | 480 | <?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 } ?> |
481 | 481 | <?php |
482 | 482 | } |
483 | - ?> |
|
483 | + ?> |
|
484 | 484 | <?php |
485 | 485 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
486 | - ?> |
|
486 | + ?> |
|
487 | 487 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
488 | 488 | <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> |
489 | 489 | <?php } ?> |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | <?php } ?> |
493 | 493 | <?php |
494 | 494 | } |
495 | - ?> |
|
495 | + ?> |
|
496 | 496 | <li><?php echo _("Display airlines:"); ?> |
497 | 497 | <br/> |
498 | 498 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -512,14 +512,14 @@ discard block |
||
512 | 512 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
513 | 513 | } |
514 | 514 | } |
515 | - ?> |
|
515 | + ?> |
|
516 | 516 | </select> |
517 | 517 | </li> |
518 | 518 | <?php |
519 | 519 | $Spotter = new Spotter(); |
520 | 520 | $allalliancenames = $Spotter->getAllAllianceNames(); |
521 | 521 | if (!empty($allalliancenames)) { |
522 | - ?> |
|
522 | + ?> |
|
523 | 523 | <li><?php echo _("Display alliance:"); ?> |
524 | 524 | <br/> |
525 | 525 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -533,18 +533,18 @@ discard block |
||
533 | 533 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
534 | 534 | } |
535 | 535 | } |
536 | - ?> |
|
536 | + ?> |
|
537 | 537 | </select> |
538 | 538 | </li> |
539 | 539 | <?php |
540 | 540 | } |
541 | - ?> |
|
541 | + ?> |
|
542 | 542 | <?php |
543 | 543 | } |
544 | - ?> |
|
544 | + ?> |
|
545 | 545 | <?php |
546 | 546 | if (isset($globalAPRS) && $globalAPRS) { |
547 | - ?> |
|
547 | + ?> |
|
548 | 548 | <li><?php echo _("Display APRS sources name:"); ?> |
549 | 549 | <select class="selectpicker" multiple onchange="sources(this);"> |
550 | 550 | <?php |
@@ -556,18 +556,18 @@ discard block |
||
556 | 556 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
557 | 557 | } |
558 | 558 | } |
559 | - ?> |
|
559 | + ?> |
|
560 | 560 | </select> |
561 | 561 | </li> |
562 | 562 | <?php |
563 | 563 | } |
564 | - ?> |
|
564 | + ?> |
|
565 | 565 | <?php |
566 | 566 | if (!isset($globalAircraft) && $globalAircraft) { |
567 | - ?> |
|
567 | + ?> |
|
568 | 568 | <?php |
569 | 569 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
570 | - ?> |
|
570 | + ?> |
|
571 | 571 | <li><?php echo _("Display airlines of type:"); ?><br/> |
572 | 572 | <select class="selectpicker" onchange="airlinestype(this);"> |
573 | 573 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -578,14 +578,14 @@ discard block |
||
578 | 578 | </li> |
579 | 579 | <?php |
580 | 580 | } |
581 | - ?> |
|
581 | + ?> |
|
582 | 582 | <li> |
583 | 583 | <?php echo _("Display flight with ident:"); ?> |
584 | 584 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
585 | 585 | </li> |
586 | 586 | <?php |
587 | 587 | } |
588 | - ?> |
|
588 | + ?> |
|
589 | 589 | </ul> |
590 | 590 | </form> |
591 | 591 | <form method="post"> |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | </form> |
595 | 595 | </div> |
596 | 596 | <?php |
597 | - if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
597 | + if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
598 | 598 | ?> |
599 | 599 | <div class="sidebar-pane" id="satellites"> |
600 | 600 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -634,14 +634,14 @@ discard block |
||
634 | 634 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
635 | 635 | } |
636 | 636 | } |
637 | - ?> |
|
637 | + ?> |
|
638 | 638 | </select> |
639 | 639 | </li> |
640 | 640 | </ul> |
641 | 641 | </form> |
642 | 642 | </div> |
643 | 643 | <?php |
644 | - } |
|
644 | + } |
|
645 | 645 | ?> |
646 | 646 | </div> |
647 | 647 | </div> |
@@ -154,11 +154,26 @@ discard block |
||
154 | 154 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
155 | 155 | <li><?php echo _("NOTAM scope:"); ?> |
156 | 156 | <select class="selectpicker" onchange="notamscope(this);"> |
157 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
158 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
159 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
160 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
161 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
157 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
158 | + print ' selected'; |
|
159 | +} |
|
160 | +?>>All</option> |
|
161 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
162 | + print ' selected'; |
|
163 | +} |
|
164 | +?>>Airport/Enroute warning</option> |
|
165 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
166 | + print ' selected'; |
|
167 | +} |
|
168 | +?>>Airport warning</option> |
|
169 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
170 | + print ' selected'; |
|
171 | +} |
|
172 | +?>>Navigation warning</option> |
|
173 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
174 | + print ' selected'; |
|
175 | +} |
|
176 | +?>>Enroute warning</option> |
|
162 | 177 | </select |
163 | 178 | </li> |
164 | 179 | </ul> |
@@ -186,7 +201,12 @@ discard block |
||
186 | 201 | <div class="form-group"> |
187 | 202 | <label>From (UTC):</label> |
188 | 203 | <div class='input-group date' id='datetimepicker1'> |
189 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
204 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
205 | + print $_POST['start_date']; |
|
206 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
207 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
208 | +} |
|
209 | +?>" required /> |
|
190 | 210 | <span class="input-group-addon"> |
191 | 211 | <span class="glyphicon glyphicon-calendar"></span> |
192 | 212 | </span> |
@@ -195,7 +215,12 @@ discard block |
||
195 | 215 | <div class="form-group"> |
196 | 216 | <label>To (UTC):</label> |
197 | 217 | <div class='input-group date' id='datetimepicker2'> |
198 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
218 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
219 | + print $_POST['end_date']; |
|
220 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
221 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
222 | +} |
|
223 | +?>" /> |
|
199 | 224 | <span class="input-group-addon"> |
200 | 225 | <span class="glyphicon glyphicon-calendar"></span> |
201 | 226 | </span> |
@@ -221,8 +246,20 @@ discard block |
||
221 | 246 | |
222 | 247 | <li><?php echo _("Playback speed:"); ?> |
223 | 248 | <div class="range"> |
224 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
225 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
249 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
250 | + print $_POST['archivespeed']; |
|
251 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
252 | + print $_COOKIE['archive_speed']; |
|
253 | +} else { |
|
254 | + print '1'; |
|
255 | +} |
|
256 | +?>"> |
|
257 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
258 | + print $_COOKIE['archive_speed']; |
|
259 | +} else { |
|
260 | + print '1'; |
|
261 | +} |
|
262 | +?></output> |
|
226 | 263 | </div> |
227 | 264 | </li> |
228 | 265 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -244,15 +281,27 @@ discard block |
||
244 | 281 | <li><?php echo _("Type of Map:"); ?> |
245 | 282 | <select class="selectpicker" onchange="mapType(this);"> |
246 | 283 | <?php |
247 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
248 | - else $MapType = $_COOKIE['MapType']; |
|
284 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
285 | + $MapType = $globalMapProvider; |
|
286 | + } else { |
|
287 | + $MapType = $_COOKIE['MapType']; |
|
288 | + } |
|
249 | 289 | ?> |
250 | 290 | <?php |
251 | 291 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
252 | 292 | ?> |
253 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
254 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
255 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
293 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
294 | + print ' selected'; |
|
295 | +} |
|
296 | +?>>Bing-Aerial</option> |
|
297 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
298 | + print ' selected'; |
|
299 | +} |
|
300 | +?>>Bing-Hybrid</option> |
|
301 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
302 | + print ' selected'; |
|
303 | +} |
|
304 | +?>>Bing-Road</option> |
|
256 | 305 | <?php |
257 | 306 | } |
258 | 307 | ?> |
@@ -262,56 +311,131 @@ discard block |
||
262 | 311 | <?php |
263 | 312 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
264 | 313 | ?> |
265 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
266 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
267 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
314 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
315 | + print ' selected'; |
|
316 | +} |
|
317 | +?>>Here-Aerial</option> |
|
318 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
319 | + print ' selected'; |
|
320 | +} |
|
321 | +?>>Here-Hybrid</option> |
|
322 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
323 | + print ' selected'; |
|
324 | +} |
|
325 | +?>>Here-Road</option> |
|
268 | 326 | <?php |
269 | 327 | } |
270 | 328 | ?> |
271 | 329 | <?php |
272 | 330 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
273 | 331 | ?> |
274 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
275 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
276 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
277 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
332 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
333 | + print ' selected'; |
|
334 | +} |
|
335 | +?>>Google Roadmap</option> |
|
336 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
337 | + print ' selected'; |
|
338 | +} |
|
339 | +?>>Google Satellite</option> |
|
340 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
341 | + print ' selected'; |
|
342 | +} |
|
343 | +?>>Google Hybrid</option> |
|
344 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
345 | + print ' selected'; |
|
346 | +} |
|
347 | +?>>Google Terrain</option> |
|
278 | 348 | <?php |
279 | 349 | } |
280 | 350 | ?> |
281 | 351 | <?php |
282 | 352 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
283 | 353 | ?> |
284 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
285 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
286 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
354 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
355 | + print ' selected'; |
|
356 | +} |
|
357 | +?>>MapQuest-OSM</option> |
|
358 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
359 | + print ' selected'; |
|
360 | +} |
|
361 | +?>>MapQuest-Aerial</option> |
|
362 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
363 | + print ' selected'; |
|
364 | +} |
|
365 | +?>>MapQuest-Hybrid</option> |
|
287 | 366 | <?php |
288 | 367 | } |
289 | 368 | ?> |
290 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
369 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
370 | + print ' selected'; |
|
371 | +} |
|
372 | +?>>Yandex</option> |
|
291 | 373 | <?php |
292 | 374 | } |
293 | 375 | ?> |
294 | 376 | <?php |
295 | 377 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
296 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
297 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
378 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
379 | + $MapBoxId = 'default'; |
|
380 | + } else { |
|
381 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
382 | + } |
|
298 | 383 | ?> |
299 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
300 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
301 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
302 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
303 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
304 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
305 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
306 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
307 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
308 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
309 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
310 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
384 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
385 | + print ' selected'; |
|
386 | +} |
|
387 | +?>>Mapbox default</option> |
|
388 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
389 | + print ' selected'; |
|
390 | +} |
|
391 | +?>>Mapbox streets</option> |
|
392 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
393 | + print ' selected'; |
|
394 | +} |
|
395 | +?>>Mapbox light</option> |
|
396 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
397 | + print ' selected'; |
|
398 | +} |
|
399 | +?>>Mapbox dark</option> |
|
400 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
401 | + print ' selected'; |
|
402 | +} |
|
403 | +?>>Mapbox satellite</option> |
|
404 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
405 | + print ' selected'; |
|
406 | +} |
|
407 | +?>>Mapbox streets-satellite</option> |
|
408 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
409 | + print ' selected'; |
|
410 | +} |
|
411 | +?>>Mapbox streets-basic</option> |
|
412 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
413 | + print ' selected'; |
|
414 | +} |
|
415 | +?>>Mapbox comic</option> |
|
416 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>Mapbox outdoors</option> |
|
420 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
421 | + print ' selected'; |
|
422 | +} |
|
423 | +?>>Mapbox pencil</option> |
|
424 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
425 | + print ' selected'; |
|
426 | +} |
|
427 | +?>>Mapbox pirates</option> |
|
428 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
429 | + print ' selected'; |
|
430 | +} |
|
431 | +?>>Mapbox emerald</option> |
|
311 | 432 | <?php |
312 | 433 | } |
313 | 434 | ?> |
314 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
435 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
436 | + print ' selected'; |
|
437 | +} |
|
438 | +?>>OpenStreetMap</option> |
|
315 | 439 | </select> |
316 | 440 | </li> |
317 | 441 | <?php |
@@ -319,9 +443,18 @@ discard block |
||
319 | 443 | ?> |
320 | 444 | <li><?php echo _("Type of Terrain:"); ?> |
321 | 445 | <select class="selectpicker" onchange="terrainType(this);"> |
322 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
323 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
324 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
446 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
447 | + print ' selected'; |
|
448 | +} |
|
449 | +?>>stk terrain</option> |
|
450 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
451 | + print ' selected'; |
|
452 | +} |
|
453 | +?>>ellipsoid</option> |
|
454 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
455 | + print ' selected'; |
|
456 | +} |
|
457 | +?>>vr terrain</option> |
|
325 | 458 | </select> |
326 | 459 | </li> |
327 | 460 | <?php |
@@ -331,20 +464,44 @@ discard block |
||
331 | 464 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
332 | 465 | ?> |
333 | 466 | |
334 | - <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> |
|
335 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
336 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
337 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
338 | - <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> |
|
467 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
468 | + print 'checked'; |
|
469 | +} |
|
470 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
471 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
472 | + print 'checked'; |
|
473 | +} |
|
474 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
475 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) { |
|
476 | + print 'checked'; |
|
477 | +} |
|
478 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
479 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || !isset($_COOKIE['MapRemainingRoute']) || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
480 | + print 'checked'; |
|
481 | +} |
|
482 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
483 | + <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)) { |
|
484 | + print 'checked'; |
|
485 | +} |
|
486 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
339 | 487 | <?php |
340 | 488 | } |
341 | 489 | ?> |
342 | - <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> |
|
343 | - <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
490 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
491 | + print 'checked'; |
|
492 | +} |
|
493 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
494 | + <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
495 | + print 'checked'; |
|
496 | +} |
|
497 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
344 | 498 | <?php |
345 | 499 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
346 | 500 | ?> |
347 | - <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> |
|
501 | + <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')) { |
|
502 | + print 'checked'; |
|
503 | +} |
|
504 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
348 | 505 | <?php |
349 | 506 | } |
350 | 507 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -358,17 +515,25 @@ discard block |
||
358 | 515 | if (function_exists('array_column')) { |
359 | 516 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
360 | 517 | ?> |
361 | - <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> |
|
518 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
519 | + print 'checked'; |
|
520 | +} |
|
521 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
362 | 522 | <?php |
363 | 523 | } |
364 | 524 | } elseif (isset($globalSources)) { |
365 | 525 | $dispolar = false; |
366 | 526 | foreach ($globalSources as $testsource) { |
367 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
527 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
528 | + $dispolar = true; |
|
529 | + } |
|
368 | 530 | } |
369 | 531 | if ($dispolar) { |
370 | 532 | ?> |
371 | - <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> |
|
533 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
534 | + print 'checked'; |
|
535 | +} |
|
536 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
372 | 537 | <?php |
373 | 538 | } |
374 | 539 | } |
@@ -381,12 +546,22 @@ discard block |
||
381 | 546 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
382 | 547 | if (extension_loaded('gd') && function_exists('gd_info')) { |
383 | 548 | ?> |
384 | - <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> |
|
549 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
550 | + print 'checked'; |
|
551 | +} |
|
552 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
385 | 553 | <?php |
386 | 554 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
387 | 555 | ?> |
388 | 556 | <li><?php echo _("Aircraft icon color:"); ?> |
389 | - <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'; ?>"> |
|
557 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
558 | + print $_COOKIE['IconColor']; |
|
559 | +} elseif (isset($globalAircraftIconColor)) { |
|
560 | + print $globalAircraftIconColor; |
|
561 | +} else { |
|
562 | + print '1a3151'; |
|
563 | +} |
|
564 | +?>"> |
|
390 | 565 | </li> |
391 | 566 | <?php |
392 | 567 | } |
@@ -398,7 +573,14 @@ discard block |
||
398 | 573 | if (extension_loaded('gd') && function_exists('gd_info')) { |
399 | 574 | ?> |
400 | 575 | <li><?php echo _("Marine icon color:"); ?> |
401 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
|
576 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
577 | + print $_COOKIE['MarineIconColor']; |
|
578 | +} elseif (isset($globalMarineIconColor)) { |
|
579 | + print $globalMarineIconColor; |
|
580 | +} else { |
|
581 | + print '1a3151'; |
|
582 | +} |
|
583 | +?>"> |
|
402 | 584 | </li> |
403 | 585 | <?php |
404 | 586 | } |
@@ -409,8 +591,22 @@ discard block |
||
409 | 591 | ?> |
410 | 592 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
411 | 593 | <div class="range"> |
412 | - <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'; ?>"> |
|
413 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
594 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
595 | + print $_COOKIE['AirportZoom']; |
|
596 | +} elseif (isset($globalAirportZoom)) { |
|
597 | + print $globalAirportZoom; |
|
598 | +} else { |
|
599 | + print '7'; |
|
600 | +} |
|
601 | +?>"> |
|
602 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
603 | + print $_COOKIE['AirportZoom']; |
|
604 | +} elseif (isset($globalAirportZoom)) { |
|
605 | + print $globalAirportZoom; |
|
606 | +} else { |
|
607 | + print '7'; |
|
608 | +} |
|
609 | +?></output> |
|
414 | 610 | </div> |
415 | 611 | </li> |
416 | 612 | <?php |
@@ -422,9 +618,19 @@ discard block |
||
422 | 618 | <?php |
423 | 619 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
424 | 620 | ?> |
425 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li> |
|
621 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
622 | + print 'checked'; |
|
623 | +} |
|
624 | +?> ><?php echo _("Force Aircraft color"); ?></li> |
|
426 | 625 | <li><?php echo _("Aircraft icon color:"); ?> |
427 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print 'ff0000'; ?>"> |
|
626 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
627 | + print $_COOKIE['IconColor']; |
|
628 | +} elseif (isset($globalAircraftIconColor)) { |
|
629 | + print $globalAircraftIconColor; |
|
630 | +} else { |
|
631 | + print 'ff0000'; |
|
632 | +} |
|
633 | +?>"> |
|
428 | 634 | </li> |
429 | 635 | <?php |
430 | 636 | } |
@@ -432,9 +638,19 @@ discard block |
||
432 | 638 | <?php |
433 | 639 | if (isset($globalMarine) && $globalMarine === TRUE) { |
434 | 640 | ?> |
435 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li> |
|
641 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
642 | + print 'checked'; |
|
643 | +} |
|
644 | +?> ><?php echo _("Force Marine color"); ?></li> |
|
436 | 645 | <li><?php echo _("Marine icon color:"); ?> |
437 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>"> |
|
646 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
647 | + print $_COOKIE['MarineIconColor']; |
|
648 | +} elseif (isset($globalMarineIconColor)) { |
|
649 | + print $globalMarineIconColor; |
|
650 | +} else { |
|
651 | + print 'ff0000'; |
|
652 | +} |
|
653 | +?>"> |
|
438 | 654 | </li> |
439 | 655 | <?php |
440 | 656 | } |
@@ -442,22 +658,46 @@ discard block |
||
442 | 658 | ?> |
443 | 659 | <li><?php echo _("Distance unit:"); ?> |
444 | 660 | <select class="selectpicker" onchange="unitdistance(this);"> |
445 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
446 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
447 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
661 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
662 | + echo ' selected'; |
|
663 | +} |
|
664 | +?>>km</option> |
|
665 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
666 | + echo ' selected'; |
|
667 | +} |
|
668 | +?>>nm</option> |
|
669 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
670 | + echo ' selected'; |
|
671 | +} |
|
672 | +?>>mi</option> |
|
448 | 673 | </select> |
449 | 674 | </li> |
450 | 675 | <li><?php echo _("Altitude unit:"); ?> |
451 | 676 | <select class="selectpicker" onchange="unitaltitude(this);"> |
452 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
453 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
677 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
678 | + echo ' selected'; |
|
679 | +} |
|
680 | +?>>m</option> |
|
681 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
682 | + echo ' selected'; |
|
683 | +} |
|
684 | +?>>feet</option> |
|
454 | 685 | </select> |
455 | 686 | </li> |
456 | 687 | <li><?php echo _("Speed unit:"); ?> |
457 | 688 | <select class="selectpicker" onchange="unitspeed(this);"> |
458 | - <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> |
|
459 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
460 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
689 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
690 | + echo ' selected'; |
|
691 | +} |
|
692 | +?>>km/h</option> |
|
693 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
694 | + echo ' selected'; |
|
695 | +} |
|
696 | +?>>mph</option> |
|
697 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
698 | + echo ' selected'; |
|
699 | +} |
|
700 | +?>>knots</option> |
|
461 | 701 | </select> |
462 | 702 | </li> |
463 | 703 | |
@@ -475,9 +715,18 @@ discard block |
||
475 | 715 | <?php |
476 | 716 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
477 | 717 | ?> |
478 | - <?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 } ?> |
|
479 | - <?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 } ?> |
|
480 | - <?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 } ?> |
|
718 | + <?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'])) { |
|
719 | + print 'checked'; |
|
720 | +} |
|
721 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
722 | + <?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'])) { |
|
723 | + print 'checked'; |
|
724 | +} |
|
725 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
726 | + <?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'])) { |
|
727 | + print 'checked'; |
|
728 | +} |
|
729 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
481 | 730 | <?php |
482 | 731 | } |
483 | 732 | ?> |
@@ -485,10 +734,16 @@ discard block |
||
485 | 734 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
486 | 735 | ?> |
487 | 736 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
488 | - <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> |
|
737 | + <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'])) { |
|
738 | + print 'checked'; |
|
739 | +} |
|
740 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
489 | 741 | <?php } ?> |
490 | 742 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
491 | - <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> |
|
743 | + <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'])) { |
|
744 | + print 'checked'; |
|
745 | +} |
|
746 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
492 | 747 | <?php } ?> |
493 | 748 | <?php |
494 | 749 | } |
@@ -505,7 +760,9 @@ discard block |
||
505 | 760 | } |
506 | 761 | foreach($allairlinenames as $airline) { |
507 | 762 | $airline_name = $airline['airline_name']; |
508 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
763 | + if (strlen($airline_name) > 30) { |
|
764 | + $airline_name = substr($airline_name,0,30).'...'; |
|
765 | + } |
|
509 | 766 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
510 | 767 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
511 | 768 | } else { |
@@ -523,7 +780,10 @@ discard block |
||
523 | 780 | <li><?php echo _("Display alliance:"); ?> |
524 | 781 | <br/> |
525 | 782 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
526 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
783 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
784 | + echo ' selected'; |
|
785 | +} |
|
786 | +?>><?php echo _("All"); ?></option> |
|
527 | 787 | <?php |
528 | 788 | foreach($allalliancenames as $alliance) { |
529 | 789 | $alliance_name = $alliance['alliance']; |
@@ -570,10 +830,22 @@ discard block |
||
570 | 830 | ?> |
571 | 831 | <li><?php echo _("Display airlines of type:"); ?><br/> |
572 | 832 | <select class="selectpicker" onchange="airlinestype(this);"> |
573 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
574 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
575 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
576 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
833 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
834 | + echo ' selected'; |
|
835 | +} |
|
836 | +?>><?php echo _("All"); ?></option> |
|
837 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
838 | + echo ' selected'; |
|
839 | +} |
|
840 | +?>><?php echo _("Passenger"); ?></option> |
|
841 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
842 | + echo ' selected'; |
|
843 | +} |
|
844 | +?>><?php echo _("Cargo"); ?></option> |
|
845 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
846 | + echo ' selected'; |
|
847 | +} |
|
848 | +?>><?php echo _("Military"); ?></option> |
|
577 | 849 | </select> |
578 | 850 | </li> |
579 | 851 | <?php |
@@ -581,7 +853,10 @@ discard block |
||
581 | 853 | ?> |
582 | 854 | <li> |
583 | 855 | <?php echo _("Display flight with ident:"); ?> |
584 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
856 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
857 | + print $_COOKIE['filter_ident']; |
|
858 | +} |
|
859 | +?>" /> |
|
585 | 860 | </li> |
586 | 861 | <?php |
587 | 862 | } |
@@ -600,7 +875,10 @@ discard block |
||
600 | 875 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
601 | 876 | <form> |
602 | 877 | <ul> |
603 | - <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> |
|
878 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
879 | + print 'checked'; |
|
880 | +} |
|
881 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
604 | 882 | <li><?php echo _("Type:"); ?> |
605 | 883 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
606 | 884 | <?php |
@@ -608,25 +886,45 @@ discard block |
||
608 | 886 | $types = $Satellite->get_tle_types(); |
609 | 887 | foreach ($types as $type) { |
610 | 888 | $type_name = $type['tle_type']; |
611 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
612 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
613 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
614 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
615 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
616 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
617 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
618 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
619 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
620 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
621 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
622 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
623 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
624 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
625 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
626 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
627 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
628 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
629 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
889 | + if ($type_name == 'musson') { |
|
890 | + $type_name = 'Russian LEO Navigation'; |
|
891 | + } else if ($type_name == 'nnss') { |
|
892 | + $type_name = 'Navi Navigation Satellite System'; |
|
893 | + } else if ($type_name == 'sbas') { |
|
894 | + $type_name = 'Satellite-Based Augmentation System'; |
|
895 | + } else if ($type_name == 'glo-ops') { |
|
896 | + $type_name = 'Glonass Operational'; |
|
897 | + } else if ($type_name == 'gps-ops') { |
|
898 | + $type_name = 'GPS Operational'; |
|
899 | + } else if ($type_name == 'argos') { |
|
900 | + $type_name = 'ARGOS Data Collection System'; |
|
901 | + } else if ($type_name == 'tdrss') { |
|
902 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
903 | + } else if ($type_name == 'sarsat') { |
|
904 | + $type_name = 'Search & Rescue'; |
|
905 | + } else if ($type_name == 'dmc') { |
|
906 | + $type_name = 'Disaster Monitoring'; |
|
907 | + } else if ($type_name == 'resource') { |
|
908 | + $type_name = 'Earth Resources'; |
|
909 | + } else if ($type_name == 'stations') { |
|
910 | + $type_name = 'Space Stations'; |
|
911 | + } else if ($type_name == 'geo') { |
|
912 | + $type_name = 'Geostationary'; |
|
913 | + } else if ($type_name == 'amateur') { |
|
914 | + $type_name = 'Amateur Radio'; |
|
915 | + } else if ($type_name == 'x-comm') { |
|
916 | + $type_name = 'Experimental'; |
|
917 | + } else if ($type_name == 'other-comm') { |
|
918 | + $type_name = 'Other Comm'; |
|
919 | + } else if ($type_name == 'science') { |
|
920 | + $type_name = 'Space & Earth Science'; |
|
921 | + } else if ($type_name == 'military') { |
|
922 | + $type_name = 'Miscellaneous Military'; |
|
923 | + } else if ($type_name == 'radar') { |
|
924 | + $type_name = 'Radar Calibration'; |
|
925 | + } else if ($type_name == 'tle-new') { |
|
926 | + $type_name = 'Last 30 days launches'; |
|
927 | + } |
|
630 | 928 | |
631 | 929 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
632 | 930 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | $coords = explode(',',$_GET['coord']); |
17 | 17 | // $spotter_array = Source::getAllLocationInfobyCoord($coords); |
18 | 18 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
19 | - || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
19 | + || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
20 | 20 | $spotter_array = $Source->getAllLocationInfo(); |
21 | 21 | } else { |
22 | 22 | $spotter_array = $Source->getLocationInfoByType(''); |
23 | 23 | } |
24 | 24 | } else { |
25 | 25 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
26 | - || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
26 | + || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
|
27 | 27 | $spotter_array = $Source->getAllLocationInfo(); |
28 | 28 | } else { |
29 | 29 | $spotter_array = $Source->getLocationInfoByType(''); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | date_default_timezone_set('UTC'); |
40 | 40 | //waypoint plotting |
41 | 41 | $output .= '{"type": "Feature",'; |
42 | - $output .= '"properties": {'; |
|
42 | + $output .= '"properties": {'; |
|
43 | 43 | $output .= '"id": "'.$spotter_item['id'].'",'; |
44 | 44 | $output .= '"location_id": "'.$spotter_item['location_id'].'",'; |
45 | 45 | $output .= '"name": "'.$spotter_item['name'].'",'; |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | $output .= '"icon": "'.$globalURL.'/images/'.$spotter_item['logo'].'",'; |
54 | 54 | $output .= '"type": "'.$spotter_item['type'].'",'; |
55 | 55 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
56 | - $output .= '},'; |
|
57 | - $output .= '"geometry": {'; |
|
56 | + $output .= '},'; |
|
57 | + $output .= '"geometry": {'; |
|
58 | 58 | $output .= '"type": "Point",'; |
59 | 59 | $output .= '"coordinates": ['; |
60 | - $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
60 | + $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
61 | 61 | $output .= ']'; |
62 | - $output .= '}'; |
|
62 | + $output .= '}'; |
|
63 | 63 | $output .= '},'; |
64 | 64 | } |
65 | 65 | $output = substr($output, 0, -1); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | if (!isset($globalDemo)) { |
14 | 14 | if (isset($_GET['coord'])) |
15 | 15 | { |
16 | - $coords = explode(',',$_GET['coord']); |
|
16 | + $coords = explode(',', $_GET['coord']); |
|
17 | 17 | // $spotter_array = Source::getAllLocationInfobyCoord($coords); |
18 | 18 | if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') |
19 | 19 | || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $output = '{"type": "FeatureCollection","features": ['; |
35 | 35 | if (!empty($spotter_array) && count($spotter_array) > 0) |
36 | 36 | { |
37 | - foreach($spotter_array as $spotter_item) |
|
37 | + foreach ($spotter_array as $spotter_item) |
|
38 | 38 | { |
39 | 39 | date_default_timezone_set('UTC'); |
40 | 40 | //waypoint plotting |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $output .= '}'; |
63 | 63 | $output .= '},'; |
64 | 64 | } |
65 | - $output = substr($output, 0, -1); |
|
65 | + $output = substr($output, 0, -1); |
|
66 | 66 | } |
67 | 67 | $output .= ']}'; |
68 | 68 |