@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
26 | + if (empty($aircraft_types)) { |
|
27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
28 | + } |
|
27 | 29 | foreach($aircraft_types as $aircrafttype) |
28 | 30 | { |
29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -5,7 +5,9 @@ discard block |
||
5 | 5 | $Stats = new Stats(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Callsign"); |
7 | 7 | |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 12 | if ($airline_icao == 'all') { |
11 | 13 | unset($_COOKIE['stats_airline_icao']); |
@@ -14,8 +16,10 @@ discard block |
||
14 | 16 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
15 | 17 | $airline_icao = $_COOKIE['stats_airline_icao']; |
16 | 18 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
17 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
18 | -} |
|
19 | + if (isset($globalFilter['airline'])) { |
|
20 | + $airline_icao = $globalFilter['airline'][0]; |
|
21 | + } |
|
22 | + } |
|
19 | 23 | setcookie('stats_airline_icao',$airline_icao); |
20 | 24 | |
21 | 25 | require_once('header.php'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -40,22 +40,43 @@ discard block |
||
40 | 40 | } |
41 | 41 | header('Content-Type: text/javascript'); |
42 | 42 | |
43 | -if (!isset($globalJsonCompress)) $compress = true; |
|
44 | -else $compress = $globalJsonCompress; |
|
43 | +if (!isset($globalJsonCompress)) { |
|
44 | + $compress = true; |
|
45 | +} else { |
|
46 | + $compress = $globalJsonCompress; |
|
47 | +} |
|
45 | 48 | |
46 | 49 | $from_archive = false; |
47 | 50 | $min = false; |
48 | 51 | $allhistory = false; |
49 | 52 | $filter['source'] = array(); |
50 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
51 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
52 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
53 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
54 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
55 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
56 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
57 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
58 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
53 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
54 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
55 | +} |
|
56 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
57 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
58 | +} |
|
59 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
60 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
61 | +} |
|
62 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
63 | + $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
64 | +} |
|
65 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
66 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
67 | +} |
|
68 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
69 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
70 | +} |
|
71 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
72 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
73 | +} |
|
74 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
75 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
76 | +} |
|
77 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
78 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
79 | +} |
|
59 | 80 | /* |
60 | 81 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
61 | 82 | $min = true; |
@@ -132,8 +153,12 @@ discard block |
||
132 | 153 | } else { |
133 | 154 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
134 | 155 | } |
135 | - if ($flightcnt == '') $flightcnt = 0; |
|
136 | -} else $flightcnt = 0; |
|
156 | + if ($flightcnt == '') { |
|
157 | + $flightcnt = 0; |
|
158 | + } |
|
159 | + } else { |
|
160 | + $flightcnt = 0; |
|
161 | +} |
|
137 | 162 | |
138 | 163 | $sqltime = round(microtime(true)-$begintime,2); |
139 | 164 | $minitime = time(); |
@@ -155,7 +180,9 @@ discard block |
||
155 | 180 | $j = 0; |
156 | 181 | $prev_flightaware_id = ''; |
157 | 182 | $speed = 1; |
158 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
183 | +if (isset($archivespeed)) { |
|
184 | + $speed = $archivespeed; |
|
185 | +} |
|
159 | 186 | $output = '['; |
160 | 187 | $output .= '{"id" : "document", "name" : "fam","version" : "1.0"'; |
161 | 188 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
@@ -296,8 +323,12 @@ discard block |
||
296 | 323 | } |
297 | 324 | } else { |
298 | 325 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/Cesium_Air.glb","scale" : 1.0,"minimumPixelSize": 20 },'; |
299 | - if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
300 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
326 | + if ($spotter_item['aircraft_shadow'] != '') { |
|
327 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
328 | + } |
|
329 | + if ($spotter_item['aircraft_icao'] != '') { |
|
330 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
331 | + } |
|
301 | 332 | } |
302 | 333 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
303 | 334 | $output .= '"heightReference": "RELATIVE_TO_GROUND",'; |
@@ -308,8 +339,12 @@ discard block |
||
308 | 339 | // $output .= '"interpolationDegree" : 5,'; |
309 | 340 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
310 | 341 | $output .= '"cartographicDegrees": ['; |
311 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
312 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
342 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
343 | + $minitime = strtotime($spotter_item['date']); |
|
344 | + } |
|
345 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
346 | + $maxitime = strtotime($spotter_item['date']); |
|
347 | + } |
|
313 | 348 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
314 | 349 | $output .= $spotter_item['longitude'].', '; |
315 | 350 | $output .= $spotter_item['latitude'].', '; |
@@ -323,7 +358,9 @@ discard block |
||
323 | 358 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
324 | 359 | } else { |
325 | 360 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
326 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
361 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
362 | + $maxitime = strtotime($spotter_item['date']); |
|
363 | + } |
|
327 | 364 | if ($spotter_item['ground_speed'] == 0) { |
328 | 365 | $output .= $prevlong.', '; |
329 | 366 | $output .= $prevlat.', '; |
@@ -18,22 +18,43 @@ discard block |
||
18 | 18 | } |
19 | 19 | header('Content-Type: text/javascript'); |
20 | 20 | |
21 | -if (!isset($globalJsonCompress)) $compress = true; |
|
22 | -else $compress = $globalJsonCompress; |
|
21 | +if (!isset($globalJsonCompress)) { |
|
22 | + $compress = true; |
|
23 | +} else { |
|
24 | + $compress = $globalJsonCompress; |
|
25 | +} |
|
23 | 26 | |
24 | 27 | $from_archive = false; |
25 | 28 | $min = false; |
26 | 29 | $allhistory = false; |
27 | 30 | $filter['source'] = array(); |
28 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
29 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
30 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
31 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
32 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
33 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
34 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
35 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
36 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
31 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
32 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
33 | +} |
|
34 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
35 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
36 | +} |
|
37 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
38 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
39 | +} |
|
40 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
41 | + $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
42 | +} |
|
43 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
44 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
45 | +} |
|
46 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
47 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
48 | +} |
|
49 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
50 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
51 | +} |
|
52 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
53 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
54 | +} |
|
55 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
56 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
57 | +} |
|
37 | 58 | |
38 | 59 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
39 | 60 | $min = true; |
@@ -84,8 +105,12 @@ discard block |
||
84 | 105 | } else { |
85 | 106 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
86 | 107 | } |
87 | - if ($flightcnt == '') $flightcnt = 0; |
|
88 | -} else $flightcnt = 0; |
|
108 | + if ($flightcnt == '') { |
|
109 | + $flightcnt = 0; |
|
110 | + } |
|
111 | + } else { |
|
112 | + $flightcnt = 0; |
|
113 | +} |
|
89 | 114 | |
90 | 115 | $sqltime = round(microtime(true)-$begintime,2); |
91 | 116 | |
@@ -94,8 +119,11 @@ discard block |
||
94 | 119 | |
95 | 120 | $output = '{'; |
96 | 121 | $output .= '"type": "FeatureCollection",'; |
97 | - if ($min) $output .= '"minimal": "true",'; |
|
98 | - else $output .= '"minimal": "false",'; |
|
122 | + if ($min) { |
|
123 | + $output .= '"minimal": "true",'; |
|
124 | + } else { |
|
125 | + $output .= '"minimal": "false",'; |
|
126 | + } |
|
99 | 127 | $output .= '"fc": "'.$flightcnt.'",'; |
100 | 128 | $output .= '"sqt": "'.$sqltime.'",'; |
101 | 129 | |
@@ -132,11 +160,16 @@ discard block |
||
132 | 160 | //$output .= '"sqt": "'.$sqltime.'",'; |
133 | 161 | $output .= '"id": "'.$spotter_item['flightaware_id'].'",'; |
134 | 162 | $output .= '"properties": {'; |
135 | - if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
136 | - else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
163 | + if ($compress) { |
|
164 | + $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
165 | + } else { |
|
166 | + $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
167 | + } |
|
137 | 168 | $output .= '"fc": "'.$flightcnt.'",'; |
138 | 169 | $output .= '"sqt": "'.$sqltime.'",'; |
139 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
170 | + if (isset($begindate)) { |
|
171 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
172 | + } |
|
140 | 173 | |
141 | 174 | /* |
142 | 175 | if ($min) $output .= '"minimal": "true",'; |
@@ -144,13 +177,21 @@ discard block |
||
144 | 177 | */ |
145 | 178 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
146 | 179 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
147 | - if ($compress) $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
148 | - else $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
180 | + if ($compress) { |
|
181 | + $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
182 | + } else { |
|
183 | + $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
184 | + } |
|
149 | 185 | } else { |
150 | - if ($compress) $output .= '"c": "NA",'; |
|
151 | - else $output .= '"callsign": "NA",'; |
|
186 | + if ($compress) { |
|
187 | + $output .= '"c": "NA",'; |
|
188 | + } else { |
|
189 | + $output .= '"callsign": "NA",'; |
|
190 | + } |
|
191 | + } |
|
192 | + if (isset($spotter_item['registration'])) { |
|
193 | + $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
152 | 194 | } |
153 | - if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
154 | 195 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
155 | 196 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
156 | 197 | $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
@@ -163,20 +204,31 @@ discard block |
||
163 | 204 | $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
164 | 205 | } |
165 | 206 | if (!isset($spotter_item['aircraft_shadow'])) { |
166 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
167 | - else { |
|
207 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
208 | + $spotter_item['aircraft_shadow'] = ''; |
|
209 | + } else { |
|
168 | 210 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
169 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
170 | - elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
171 | - else $spotter_item['aircraft_shadow'] = ''; |
|
211 | + if (count($aircraft_info) > 0) { |
|
212 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
213 | + } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
|
214 | + $spotter_item['aircraft_shadow'] = 'PA18.png'; |
|
215 | + } else { |
|
216 | + $spotter_item['aircraft_shadow'] = ''; |
|
217 | + } |
|
172 | 218 | } |
173 | 219 | } |
174 | 220 | if ($spotter_item['aircraft_shadow'] == '') { |
175 | - if ($compress) $output .= '"as": "default.png",'; |
|
176 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
221 | + if ($compress) { |
|
222 | + $output .= '"as": "default.png",'; |
|
223 | + } else { |
|
224 | + $output .= '"aircraft_shadow": "default.png",'; |
|
225 | + } |
|
177 | 226 | } else { |
178 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
179 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
227 | + if ($compress) { |
|
228 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
229 | + } else { |
|
230 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
231 | + } |
|
180 | 232 | } |
181 | 233 | if (isset($spotter_item['airline_name'])) { |
182 | 234 | $output .= '"airline_name": "'.$spotter_item['airline_name'].'",'; |
@@ -184,8 +236,11 @@ discard block |
||
184 | 236 | $output .= '"airline_name": "NA",'; |
185 | 237 | } |
186 | 238 | if (isset($spotter_item['departure_airport'])) { |
187 | - if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
188 | - else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
239 | + if ($compress) { |
|
240 | + $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
241 | + } else { |
|
242 | + $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
243 | + } |
|
189 | 244 | } |
190 | 245 | if (isset($spotter_item['departure_airport_city'])) { |
191 | 246 | $output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",'; |
@@ -197,8 +252,11 @@ discard block |
||
197 | 252 | $output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",'; |
198 | 253 | } |
199 | 254 | if (isset($spotter_item['arrival_airport'])) { |
200 | - if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
201 | - else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
255 | + if ($compress) { |
|
256 | + $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
257 | + } else { |
|
258 | + $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
259 | + } |
|
202 | 260 | } |
203 | 261 | if (isset($spotter_item['arrival_airport_city'])) { |
204 | 262 | $output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",'; |
@@ -216,19 +274,30 @@ discard block |
||
216 | 274 | $output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",'; |
217 | 275 | } |
218 | 276 | |
219 | - if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
220 | - else $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
221 | - if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",'; |
|
222 | - else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
277 | + if ($compress) { |
|
278 | + $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
279 | + } else { |
|
280 | + $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
281 | + } |
|
282 | + if ($compress) { |
|
283 | + $output .= '"h": "'.$spotter_item['heading'].'",'; |
|
284 | + } else { |
|
285 | + $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
286 | + } |
|
223 | 287 | |
224 | - if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
225 | - else $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
288 | + if (isset($archivespeed)) { |
|
289 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
290 | + } else { |
|
291 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
292 | + } |
|
226 | 293 | //$output .= '"nextlatitude": "'.$nextcoord['latitude'].'",'; |
227 | 294 | //$output .= '"nextlongitude": "'.$nextcoord['longitude'].'",'; |
228 | 295 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
229 | 296 | //$output .= '"nextlatlon": ['.$nextcoord['longitude'].','.$nextcoord['latitude'].'],'; |
230 | 297 | |
231 | - if (!$min) $output .= '"image": "'.$image.'",'; |
|
298 | + if (!$min) { |
|
299 | + $output .= '"image": "'.$image.'",'; |
|
300 | + } |
|
232 | 301 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
233 | 302 | $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
234 | 303 | } |
@@ -236,8 +305,11 @@ discard block |
||
236 | 305 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
237 | 306 | } |
238 | 307 | if (isset($spotter_item['squawk'])) { |
239 | - if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
240 | - else $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
308 | + if ($compress) { |
|
309 | + $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
310 | + } else { |
|
311 | + $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
312 | + } |
|
241 | 313 | } |
242 | 314 | if (isset($spotter_item['squawk_usage'])) { |
243 | 315 | $output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",'; |
@@ -255,8 +327,11 @@ discard block |
||
255 | 327 | $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
256 | 328 | } |
257 | 329 | // type when not aircraft ? |
258 | - if ($compress) $output .= '"t": "aircraft"'; |
|
259 | - else $output .= '"type": "aircraft"'; |
|
330 | + if ($compress) { |
|
331 | + $output .= '"t": "aircraft"'; |
|
332 | + } else { |
|
333 | + $output .= '"type": "aircraft"'; |
|
334 | + } |
|
260 | 335 | $output .= '},'; |
261 | 336 | $output .= '"geometry": {'; |
262 | 337 | $output .= '"type": "Point",'; |
@@ -325,7 +400,9 @@ discard block |
||
325 | 400 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id'])))) { |
326 | 401 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id']))) || (isset($_GET['history']) && $_GET['history'] == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
327 | 402 | $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
328 | - if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
403 | + if ($history == '' && isset($_COOKIE['history'])) { |
|
404 | + $history = $_COOKIE['history']; |
|
405 | + } |
|
329 | 406 | if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) |
330 | 407 | || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))) |
331 | 408 | || (isset($history) && $history == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
@@ -350,8 +427,11 @@ discard block |
||
350 | 427 | $output_history .= ']}},'; |
351 | 428 | $output .= $output_history; |
352 | 429 | } |
353 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
354 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
430 | + if ($compress) { |
|
431 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
432 | + } else { |
|
433 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
434 | + } |
|
355 | 435 | } |
356 | 436 | $output_history .= '['; |
357 | 437 | $output_history .= $spotter_history['longitude'].', '; |
@@ -401,7 +481,9 @@ discard block |
||
401 | 481 | $output .= ']'; |
402 | 482 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
403 | 483 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
404 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
484 | + if (isset($begindate)) { |
|
485 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
486 | + } |
|
405 | 487 | $output .= '"fc": "'.$j.'"'; |
406 | 488 | } else { |
407 | 489 | $output .= '"features": '; |
@@ -135,11 +135,26 @@ discard block |
||
135 | 135 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
136 | 136 | <li><?php echo _("NOTAM scope:"); ?> |
137 | 137 | <select class="selectpicker" onchange="notamscope(this);"> |
138 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
139 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
140 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
141 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
142 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
138 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
139 | + print ' selected'; |
|
140 | +} |
|
141 | +?>>All</option> |
|
142 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
143 | + print ' selected'; |
|
144 | +} |
|
145 | +?>>Airport/Enroute warning</option> |
|
146 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
147 | + print ' selected'; |
|
148 | +} |
|
149 | +?>>Airport warning</option> |
|
150 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
151 | + print ' selected'; |
|
152 | +} |
|
153 | +?>>Navigation warning</option> |
|
154 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
155 | + print ' selected'; |
|
156 | +} |
|
157 | +?>>Enroute warning</option> |
|
143 | 158 | </select |
144 | 159 | </li> |
145 | 160 | </ul> |
@@ -167,7 +182,12 @@ discard block |
||
167 | 182 | <div class="form-group"> |
168 | 183 | <label>From (UTC):</label> |
169 | 184 | <div class='input-group date' id='datetimepicker1'> |
170 | - <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 /> |
|
185 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
186 | + print $_POST['start_date']; |
|
187 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
188 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
189 | +} |
|
190 | +?>" required /> |
|
171 | 191 | <span class="input-group-addon"> |
172 | 192 | <span class="glyphicon glyphicon-calendar"></span> |
173 | 193 | </span> |
@@ -176,7 +196,12 @@ discard block |
||
176 | 196 | <div class="form-group"> |
177 | 197 | <label>To (UTC):</label> |
178 | 198 | <div class='input-group date' id='datetimepicker2'> |
179 | - <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']); ?>" /> |
|
199 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
200 | + print $_POST['end_date']; |
|
201 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
202 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
203 | +} |
|
204 | +?>" /> |
|
180 | 205 | <span class="input-group-addon"> |
181 | 206 | <span class="glyphicon glyphicon-calendar"></span> |
182 | 207 | </span> |
@@ -202,8 +227,20 @@ discard block |
||
202 | 227 | |
203 | 228 | <li><?php echo _("Playback speed:"); ?> |
204 | 229 | <div class="range"> |
205 | - <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'; ?>"> |
|
206 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
230 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
231 | + print $_POST['archivespeed']; |
|
232 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
233 | + print $_COOKIE['archive_speed']; |
|
234 | +} else { |
|
235 | + print '1'; |
|
236 | +} |
|
237 | +?>"> |
|
238 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
239 | + print $_COOKIE['archive_speed']; |
|
240 | +} else { |
|
241 | + print '1'; |
|
242 | +} |
|
243 | +?></output> |
|
207 | 244 | </div> |
208 | 245 | </li> |
209 | 246 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -225,15 +262,27 @@ discard block |
||
225 | 262 | <li><?php echo _("Type of Map:"); ?> |
226 | 263 | <select class="selectpicker" onchange="mapType(this);"> |
227 | 264 | <?php |
228 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
229 | - else $MapType = $_COOKIE['MapType']; |
|
265 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
266 | + $MapType = $globalMapProvider; |
|
267 | + } else { |
|
268 | + $MapType = $_COOKIE['MapType']; |
|
269 | + } |
|
230 | 270 | ?> |
231 | 271 | <?php |
232 | 272 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
233 | 273 | ?> |
234 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
235 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
236 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
274 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
275 | + print ' selected'; |
|
276 | +} |
|
277 | +?>>Bing-Aerial</option> |
|
278 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
279 | + print ' selected'; |
|
280 | +} |
|
281 | +?>>Bing-Hybrid</option> |
|
282 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
283 | + print ' selected'; |
|
284 | +} |
|
285 | +?>>Bing-Road</option> |
|
237 | 286 | <?php |
238 | 287 | } |
239 | 288 | ?> |
@@ -243,56 +292,131 @@ discard block |
||
243 | 292 | <?php |
244 | 293 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
245 | 294 | ?> |
246 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
247 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
248 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
295 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
296 | + print ' selected'; |
|
297 | +} |
|
298 | +?>>Here-Aerial</option> |
|
299 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
300 | + print ' selected'; |
|
301 | +} |
|
302 | +?>>Here-Hybrid</option> |
|
303 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
304 | + print ' selected'; |
|
305 | +} |
|
306 | +?>>Here-Road</option> |
|
249 | 307 | <?php |
250 | 308 | } |
251 | 309 | ?> |
252 | 310 | <?php |
253 | 311 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
254 | 312 | ?> |
255 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
256 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
257 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
258 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
313 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
314 | + print ' selected'; |
|
315 | +} |
|
316 | +?>>Google Roadmap</option> |
|
317 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
318 | + print ' selected'; |
|
319 | +} |
|
320 | +?>>Google Satellite</option> |
|
321 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Google Hybrid</option> |
|
325 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
326 | + print ' selected'; |
|
327 | +} |
|
328 | +?>>Google Terrain</option> |
|
259 | 329 | <?php |
260 | 330 | } |
261 | 331 | ?> |
262 | 332 | <?php |
263 | 333 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
264 | 334 | ?> |
265 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
266 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
267 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
335 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
336 | + print ' selected'; |
|
337 | +} |
|
338 | +?>>MapQuest-OSM</option> |
|
339 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
340 | + print ' selected'; |
|
341 | +} |
|
342 | +?>>MapQuest-Aerial</option> |
|
343 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
344 | + print ' selected'; |
|
345 | +} |
|
346 | +?>>MapQuest-Hybrid</option> |
|
268 | 347 | <?php |
269 | 348 | } |
270 | 349 | ?> |
271 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
350 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
351 | + print ' selected'; |
|
352 | +} |
|
353 | +?>>Yandex</option> |
|
272 | 354 | <?php |
273 | 355 | } |
274 | 356 | ?> |
275 | 357 | <?php |
276 | 358 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
277 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
278 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
359 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
360 | + $MapBoxId = 'default'; |
|
361 | + } else { |
|
362 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
363 | + } |
|
279 | 364 | ?> |
280 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
281 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
282 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
283 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
284 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
285 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
286 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
287 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
288 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
289 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
290 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
291 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
365 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
366 | + print ' selected'; |
|
367 | +} |
|
368 | +?>>Mapbox default</option> |
|
369 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
370 | + print ' selected'; |
|
371 | +} |
|
372 | +?>>Mapbox streets</option> |
|
373 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
374 | + print ' selected'; |
|
375 | +} |
|
376 | +?>>Mapbox light</option> |
|
377 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
378 | + print ' selected'; |
|
379 | +} |
|
380 | +?>>Mapbox dark</option> |
|
381 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
382 | + print ' selected'; |
|
383 | +} |
|
384 | +?>>Mapbox satellite</option> |
|
385 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
386 | + print ' selected'; |
|
387 | +} |
|
388 | +?>>Mapbox streets-satellite</option> |
|
389 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
390 | + print ' selected'; |
|
391 | +} |
|
392 | +?>>Mapbox streets-basic</option> |
|
393 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
394 | + print ' selected'; |
|
395 | +} |
|
396 | +?>>Mapbox comic</option> |
|
397 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
398 | + print ' selected'; |
|
399 | +} |
|
400 | +?>>Mapbox outdoors</option> |
|
401 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
402 | + print ' selected'; |
|
403 | +} |
|
404 | +?>>Mapbox pencil</option> |
|
405 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
406 | + print ' selected'; |
|
407 | +} |
|
408 | +?>>Mapbox pirates</option> |
|
409 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
410 | + print ' selected'; |
|
411 | +} |
|
412 | +?>>Mapbox emerald</option> |
|
292 | 413 | <?php |
293 | 414 | } |
294 | 415 | ?> |
295 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
416 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>OpenStreetMap</option> |
|
296 | 420 | </select> |
297 | 421 | </li> |
298 | 422 | <?php |
@@ -300,9 +424,18 @@ discard block |
||
300 | 424 | ?> |
301 | 425 | <li><?php echo _("Type of Terrain:"); ?> |
302 | 426 | <select class="selectpicker" onchange="terrainType(this);"> |
303 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
427 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>stk terrain</option> |
|
431 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
432 | + print ' selected'; |
|
433 | +} |
|
434 | +?>>ellipsoid</option> |
|
435 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
436 | + print ' selected'; |
|
437 | +} |
|
438 | +?>>vr terrain</option> |
|
306 | 439 | </select> |
307 | 440 | </li> |
308 | 441 | <?php |
@@ -312,18 +445,36 @@ discard block |
||
312 | 445 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
313 | 446 | ?> |
314 | 447 | |
315 | - <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> |
|
316 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
317 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
318 | - <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> |
|
448 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
449 | + print 'checked'; |
|
450 | +} |
|
451 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
452 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
453 | + print 'checked'; |
|
454 | +} |
|
455 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
456 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
457 | + print 'checked'; |
|
458 | +} |
|
459 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
460 | + <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)) { |
|
461 | + print 'checked'; |
|
462 | +} |
|
463 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
319 | 464 | <?php |
320 | 465 | } |
321 | 466 | ?> |
322 | - <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> |
|
467 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
468 | + print 'checked'; |
|
469 | +} |
|
470 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
323 | 471 | <?php |
324 | 472 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
325 | 473 | ?> |
326 | - <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> |
|
474 | + <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')) { |
|
475 | + print 'checked'; |
|
476 | +} |
|
477 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
327 | 478 | <?php |
328 | 479 | } |
329 | 480 | ?> |
@@ -332,17 +483,25 @@ discard block |
||
332 | 483 | if (function_exists('array_column')) { |
333 | 484 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
334 | 485 | ?> |
335 | - <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> |
|
486 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
487 | + print 'checked'; |
|
488 | +} |
|
489 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
336 | 490 | <?php |
337 | 491 | } |
338 | 492 | } elseif (isset($globalSources)) { |
339 | 493 | $dispolar = false; |
340 | 494 | foreach ($globalSources as $testsource) { |
341 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
495 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
496 | + $dispolar = true; |
|
497 | + } |
|
342 | 498 | } |
343 | 499 | if ($dispolar) { |
344 | 500 | ?> |
345 | - <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> |
|
501 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
502 | + print 'checked'; |
|
503 | +} |
|
504 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
346 | 505 | <?php |
347 | 506 | } |
348 | 507 | } |
@@ -354,12 +513,22 @@ discard block |
||
354 | 513 | <?php |
355 | 514 | if (extension_loaded('gd') && function_exists('gd_info')) { |
356 | 515 | ?> |
357 | - <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> |
|
516 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
517 | + print 'checked'; |
|
518 | +} |
|
519 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
358 | 520 | <?php |
359 | 521 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
360 | 522 | ?> |
361 | 523 | <li><?php echo _("Aircraft icon color:"); ?> |
362 | - <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'; ?>"> |
|
524 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
525 | + print $_COOKIE['IconColor']; |
|
526 | +} elseif (isset($globalAircraftIconColor)) { |
|
527 | + print $globalAircraftIconColor; |
|
528 | +} else { |
|
529 | + print '1a3151'; |
|
530 | +} |
|
531 | +?>"> |
|
363 | 532 | </li> |
364 | 533 | <?php |
365 | 534 | } |
@@ -367,8 +536,22 @@ discard block |
||
367 | 536 | ?> |
368 | 537 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
369 | 538 | <div class="range"> |
370 | - <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'; ?>"> |
|
371 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
539 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
540 | + print $_COOKIE['AirportZoom']; |
|
541 | +} elseif (isset($globalAirportZoom)) { |
|
542 | + print $globalAirportZoom; |
|
543 | +} else { |
|
544 | + print '7'; |
|
545 | +} |
|
546 | +?>"> |
|
547 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
548 | + print $_COOKIE['AirportZoom']; |
|
549 | +} elseif (isset($globalAirportZoom)) { |
|
550 | + print $globalAirportZoom; |
|
551 | +} else { |
|
552 | + print '7'; |
|
553 | +} |
|
554 | +?></output> |
|
372 | 555 | </div> |
373 | 556 | </li> |
374 | 557 | <?php |
@@ -376,22 +559,46 @@ discard block |
||
376 | 559 | ?> |
377 | 560 | <li><?php echo _("Distance unit:"); ?> |
378 | 561 | <select class="selectpicker" onchange="unitdistance(this);"> |
379 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
380 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
381 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
562 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
563 | + echo ' selected'; |
|
564 | +} |
|
565 | +?>>km</option> |
|
566 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
567 | + echo ' selected'; |
|
568 | +} |
|
569 | +?>>nm</option> |
|
570 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
571 | + echo ' selected'; |
|
572 | +} |
|
573 | +?>>mi</option> |
|
382 | 574 | </select> |
383 | 575 | </li> |
384 | 576 | <li><?php echo _("Altitude unit:"); ?> |
385 | 577 | <select class="selectpicker" onchange="unitaltitude(this);"> |
386 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
387 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
578 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
579 | + echo ' selected'; |
|
580 | +} |
|
581 | +?>>m</option> |
|
582 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
583 | + echo ' selected'; |
|
584 | +} |
|
585 | +?>>feet</option> |
|
388 | 586 | </select> |
389 | 587 | </li> |
390 | 588 | <li><?php echo _("Speed unit:"); ?> |
391 | 589 | <select class="selectpicker" onchange="unitspeed(this);"> |
392 | - <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> |
|
393 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
394 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
590 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
591 | + echo ' selected'; |
|
592 | +} |
|
593 | +?>>km/h</option> |
|
594 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
595 | + echo ' selected'; |
|
596 | +} |
|
597 | +?>>mph</option> |
|
598 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
599 | + echo ' selected'; |
|
600 | +} |
|
601 | +?>>knots</option> |
|
395 | 602 | </select> |
396 | 603 | </li> |
397 | 604 | |
@@ -406,9 +613,18 @@ discard block |
||
406 | 613 | <?php |
407 | 614 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
408 | 615 | ?> |
409 | - <?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 } ?> |
|
410 | - <?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 } ?> |
|
411 | - <?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 } ?> |
|
616 | + <?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'])) { |
|
617 | + print 'checked'; |
|
618 | +} |
|
619 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
620 | + <?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'])) { |
|
621 | + print 'checked'; |
|
622 | +} |
|
623 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
624 | + <?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'])) { |
|
625 | + print 'checked'; |
|
626 | +} |
|
627 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
412 | 628 | <?php |
413 | 629 | } |
414 | 630 | ?> |
@@ -416,10 +632,16 @@ discard block |
||
416 | 632 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
417 | 633 | ?> |
418 | 634 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
419 | - <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> |
|
635 | + <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'])) { |
|
636 | + print 'checked'; |
|
637 | +} |
|
638 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
420 | 639 | <?php } ?> |
421 | 640 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
422 | - <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> |
|
641 | + <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'])) { |
|
642 | + print 'checked'; |
|
643 | +} |
|
644 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
423 | 645 | <?php } ?> |
424 | 646 | <?php |
425 | 647 | } |
@@ -431,7 +653,9 @@ discard block |
||
431 | 653 | $Spotter = new Spotter(); |
432 | 654 | foreach($Spotter->getAllAirlineNames() as $airline) { |
433 | 655 | $airline_name = $airline['airline_name']; |
434 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
656 | + if (strlen($airline_name) > 30) { |
|
657 | + $airline_name = substr($airline_name,0,30).'...'; |
|
658 | + } |
|
435 | 659 | if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
436 | 660 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
437 | 661 | } else { |
@@ -466,10 +690,22 @@ discard block |
||
466 | 690 | ?> |
467 | 691 | <li><?php echo _("Display airlines of type:"); ?><br/> |
468 | 692 | <select class="selectpicker" onchange="airlinestype(this);"> |
469 | - <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
470 | - <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
471 | - <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
472 | - <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
693 | + <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') { |
|
694 | + echo ' selected'; |
|
695 | +} |
|
696 | +?>><?php echo _("All"); ?></option> |
|
697 | + <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') { |
|
698 | + echo ' selected'; |
|
699 | +} |
|
700 | +?>><?php echo _("Passenger"); ?></option> |
|
701 | + <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') { |
|
702 | + echo ' selected'; |
|
703 | +} |
|
704 | +?>><?php echo _("Cargo"); ?></option> |
|
705 | + <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') { |
|
706 | + echo ' selected'; |
|
707 | +} |
|
708 | +?>><?php echo _("Military"); ?></option> |
|
473 | 709 | </select> |
474 | 710 | </li> |
475 | 711 | <?php |
@@ -477,7 +713,10 @@ discard block |
||
477 | 713 | ?> |
478 | 714 | <li> |
479 | 715 | <?php echo _("Display flight with ident:"); ?> |
480 | - <input type="text" name="identfilter" id="identfilter" value="<?php if (isset($_COOKIE['identfilter'])) print $_COOKIE['identfilter']; ?>" /> |
|
716 | + <input type="text" name="identfilter" id="identfilter" value="<?php if (isset($_COOKIE['identfilter'])) { |
|
717 | + print $_COOKIE['identfilter']; |
|
718 | +} |
|
719 | +?>" /> |
|
481 | 720 | </li> |
482 | 721 | </ul> |
483 | 722 | </form> |
@@ -493,7 +732,10 @@ discard block |
||
493 | 732 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
494 | 733 | <form> |
495 | 734 | <ul> |
496 | - <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> |
|
735 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
736 | + print 'checked'; |
|
737 | +} |
|
738 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
497 | 739 | <li><?php echo _("Type:"); ?> |
498 | 740 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
499 | 741 | <?php |
@@ -501,25 +743,45 @@ discard block |
||
501 | 743 | $types = $Satellite->get_tle_types(); |
502 | 744 | foreach ($types as $type) { |
503 | 745 | $type_name = $type['tle_type']; |
504 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
505 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
506 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
507 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
508 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
509 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
510 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
511 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
512 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
513 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
514 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
515 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
516 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
517 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
518 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
519 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
520 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
521 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
522 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
746 | + if ($type_name == 'musson') { |
|
747 | + $type_name = 'Russian LEO Navigation'; |
|
748 | + } else if ($type_name == 'nnss') { |
|
749 | + $type_name = 'Navi Navigation Satellite System'; |
|
750 | + } else if ($type_name == 'sbas') { |
|
751 | + $type_name = 'Satellite-Based Augmentation System'; |
|
752 | + } else if ($type_name == 'glo-ops') { |
|
753 | + $type_name = 'Glonass Operational'; |
|
754 | + } else if ($type_name == 'gps-ops') { |
|
755 | + $type_name = 'GPS Operational'; |
|
756 | + } else if ($type_name == 'argos') { |
|
757 | + $type_name = 'ARGOS Data Collection System'; |
|
758 | + } else if ($type_name == 'tdrss') { |
|
759 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
760 | + } else if ($type_name == 'sarsat') { |
|
761 | + $type_name = 'Search & Rescue'; |
|
762 | + } else if ($type_name == 'dmc') { |
|
763 | + $type_name = 'Disaster Monitoring'; |
|
764 | + } else if ($type_name == 'resource') { |
|
765 | + $type_name = 'Earth Resources'; |
|
766 | + } else if ($type_name == 'stations') { |
|
767 | + $type_name = 'Space Stations'; |
|
768 | + } else if ($type_name == 'geo') { |
|
769 | + $type_name = 'Geostationary'; |
|
770 | + } else if ($type_name == 'amateur') { |
|
771 | + $type_name = 'Amateur Radio'; |
|
772 | + } else if ($type_name == 'x-comm') { |
|
773 | + $type_name = 'Experimental'; |
|
774 | + } else if ($type_name == 'other-comm') { |
|
775 | + $type_name = 'Other Comm'; |
|
776 | + } else if ($type_name == 'science') { |
|
777 | + $type_name = 'Space & Earth Science'; |
|
778 | + } else if ($type_name == 'military') { |
|
779 | + $type_name = 'Miscellaneous Military'; |
|
780 | + } else if ($type_name == 'radar') { |
|
781 | + $type_name = 'Radar Calibration'; |
|
782 | + } else if ($type_name == 'tle-new') { |
|
783 | + $type_name = 'Last 30 days launches'; |
|
784 | + } |
|
523 | 785 | |
524 | 786 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
525 | 787 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -24,13 +24,21 @@ discard block |
||
24 | 24 | |
25 | 25 | print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option value="all"'; |
27 | - if ($airline_type == 'all') print 'selected="selected" '; |
|
27 | + if ($airline_type == 'all') { |
|
28 | + print 'selected="selected" '; |
|
29 | + } |
|
28 | 30 | print '>'._("All").'</option><option value="passenger"'; |
29 | - if ($airline_type == 'passenger') print 'selected="selected" '; |
|
31 | + if ($airline_type == 'passenger') { |
|
32 | + print 'selected="selected" '; |
|
33 | + } |
|
30 | 34 | print '>'._("Passenger").'</option><option value="cargo"'; |
31 | - if ($airline_type == 'cargo') print 'selected="selected" '; |
|
35 | + if ($airline_type == 'cargo') { |
|
36 | + print 'selected="selected" '; |
|
37 | + } |
|
32 | 38 | print '>'._("Cargo").'</option><option value="military"'; |
33 | - if ($airline_type == 'military') print 'selected="selected" '; |
|
39 | + if ($airline_type == 'military') { |
|
40 | + print 'selected="selected" '; |
|
41 | + } |
|
34 | 42 | print '>'._("Military").'</option></select>'; |
35 | 43 | print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>'; |
36 | 44 | |
@@ -57,7 +65,9 @@ discard block |
||
57 | 65 | $firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8'); |
58 | 66 | if($previous !== $firstLetter) |
59 | 67 | { |
60 | - if ($previous !== null) print ' | '; |
|
68 | + if ($previous !== null) { |
|
69 | + print ' | '; |
|
70 | + } |
|
61 | 71 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
62 | 72 | } |
63 | 73 | $previous = $firstLetter; |
@@ -70,7 +80,9 @@ discard block |
||
70 | 80 | { |
71 | 81 | if($previous !== $firstLetter) |
72 | 82 | { |
73 | - if ($previous !== null) print '</div>'; |
|
83 | + if ($previous !== null) { |
|
84 | + print '</div>'; |
|
85 | + } |
|
74 | 86 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
75 | 87 | } |
76 | 88 | $previous = $firstLetter; |