Completed
Push — master ( 3c8e70...140646 )
by Yannick
30:21
created
archive-geojson.php 1 patch
Braces   +129 added lines, -49 removed lines patch added patch discarded remove patch
@@ -15,21 +15,40 @@  discard block
 block discarded – undo
15 15
 }
16 16
 header('Content-Type: text/javascript');
17 17
 
18
-if (!isset($globalJsonCompress)) $compress = true;
19
-else $compress = $globalJsonCompress;
18
+if (!isset($globalJsonCompress)) {
19
+	$compress = true;
20
+} else {
21
+	$compress = $globalJsonCompress;
22
+}
20 23
 
21 24
 $from_archive = false;
22 25
 $min = false;
23 26
 $allhistory = false;
24 27
 $filter['source'] = array();
25
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt'));
26
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup'));
27
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars'));
28
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs'));
29
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs'));
30
-if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',',$_COOKIE['Airlines']);
31
-if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',',$_COOKIE['Sources']);
32
-if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') $filter['airlinestype'] = $_COOKIE['airlinestype'];
28
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') {
29
+	$filter['source'] = array_merge($filter['source'],array('vatsimtxt'));
30
+}
31
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') {
32
+	$filter['source'] = array_merge($filter['source'],array('whazzup'));
33
+}
34
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') {
35
+	$filter['source'] = array_merge($filter['source'],array('phpvmacars'));
36
+}
37
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') {
38
+	$filter['source'] = array_merge($filter['source'],array('sbs'));
39
+}
40
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') {
41
+	$filter['source'] = array_merge($filter['source'],array('aprs'));
42
+}
43
+if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') {
44
+	$filter['airlines'] = explode(',',$_COOKIE['Airlines']);
45
+}
46
+if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') {
47
+	$filter['source_aprs'] = explode(',',$_COOKIE['Sources']);
48
+}
49
+if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') {
50
+	$filter['airlinestype'] = $_COOKIE['airlinestype'];
51
+}
33 52
 
34 53
 if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) {
35 54
 	$min = true;
@@ -50,8 +69,11 @@  discard block
 block discarded – undo
50 69
 //	$begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~')));
51 70
 //	$enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~')));
52 71
 	$begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT);
53
-	if (isset($globalAircraftMaxUpdate)) $begindate = $begindate - $globalAircraftMaxUpdate;
54
-	else $begindate = $begindate - 3000;
72
+	if (isset($globalAircraftMaxUpdate)) {
73
+		$begindate = $begindate - $globalAircraftMaxUpdate;
74
+	} else {
75
+		$begindate = $begindate - 3000;
76
+	}
55 77
 	$enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT);
56 78
 	$archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT);
57 79
 	$begindate = date('Y-m-d H:i:s',$begindate);
@@ -63,8 +85,12 @@  discard block
 block discarded – undo
63 85
 if (!empty($spotter_array)) {
64 86
 	//$flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter);
65 87
 	$flightcnt = 0;
66
-	if ($flightcnt == '') $flightcnt = 0;
67
-} else $flightcnt = 0;
88
+	if ($flightcnt == '') {
89
+		$flightcnt = 0;
90
+	}
91
+	} else {
92
+	$flightcnt = 0;
93
+}
68 94
 
69 95
 $sqltime = round(microtime(true)-$begintime,2);
70 96
 
@@ -74,8 +100,11 @@  discard block
 block discarded – undo
74 100
 
75 101
 $output = '{';
76 102
 	$output .= '"type": "FeatureCollection",';
77
-	if ($min) $output .= '"minimal": "true",';
78
-	else $output .= '"minimal": "false",';
103
+	if ($min) {
104
+		$output .= '"minimal": "true",';
105
+	} else {
106
+		$output .= '"minimal": "false",';
107
+	}
79 108
 	$output .= '"fc": "'.$flightcnt.'",';
80 109
 	$output .= '"sqt": "'.$sqltime.'",';
81 110
 
@@ -89,7 +118,9 @@  discard block
 block discarded – undo
89 118
 			if ($pfi != $spotter_item['flightaware_id']) {
90 119
 				$spotter_history_array = $SpotterArchive->getCoordArchiveSpotterDataById($spotter_item['flightaware_id']);
91 120
 				$pfi = $spotter_item['flightaware_id'];
92
-			} else $spotter_history_array = 0;
121
+			} else {
122
+				$spotter_history_array = 0;
123
+			}
93 124
 			if (count($spotter_history_array) > 1) {
94 125
 				if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "")
95 126
 				{
@@ -105,11 +136,16 @@  discard block
 block discarded – undo
105 136
 						//$output .= '"fc": "'.$flightcnt.'",';
106 137
 						//$output .= '"sqt": "'.$sqltime.'",';
107 138
 						$output .= '"properties": {';
108
-							if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",';
109
-							else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",';
139
+							if ($compress) {
140
+								$output .= '"fi": "'.$spotter_item['flightaware_id'].'",';
141
+							} else {
142
+								$output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",';
143
+							}
110 144
 							$output .= '"fc": "'.$flightcnt.'",';
111 145
 							$output .= '"sqt": "'.$sqltime.'",';
112
-							if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",';
146
+							if (isset($begindate)) {
147
+								$output .= '"archive_date": "'.$begindate.'",';
148
+							}
113 149
 
114 150
 /*
115 151
 							if ($min) $output .= '"minimal": "true",';
@@ -117,13 +153,21 @@  discard block
 block discarded – undo
117 153
 */
118 154
 							//$output .= '"fc": "'.$spotter_item['nb'].'",';
119 155
 						if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') {
120
-							if ($compress) $output .= '"c": "'.$spotter_item['ident'].'",';
121
-							else $output .= '"callsign": "'.$spotter_item['ident'].'",';
156
+							if ($compress) {
157
+								$output .= '"c": "'.$spotter_item['ident'].'",';
158
+							} else {
159
+								$output .= '"callsign": "'.$spotter_item['ident'].'",';
160
+							}
122 161
 						} else {
123
-							if ($compress) $output .= '"c": "NA",';
124
-							else $output .= '"callsign": "NA",';
162
+							if ($compress) {
163
+								$output .= '"c": "NA",';
164
+							} else {
165
+								$output .= '"callsign": "NA",';
166
+							}
167
+						}
168
+						if (isset($spotter_item['registration'])) {
169
+							$output .= '"registration": "'.$spotter_item['registration'].'",';
125 170
 						}
126
-						if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",';
127 171
 						if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) {
128 172
 							$output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",';
129 173
 							$output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",';
@@ -136,19 +180,29 @@  discard block
 block discarded – undo
136 180
 							$output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",';
137 181
 						}
138 182
 						if (!isset($spotter_item['aircraft_shadow'])) {
139
-							if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = '';
140
-							else {
183
+							if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') {
184
+								$spotter_item['aircraft_shadow'] = '';
185
+							} else {
141 186
 								$aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']);
142
-								if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow'];
143
-								else $spotter_item['aircraft_shadow'] = '';
187
+								if (count($aircraft_info) > 0) {
188
+									$spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow'];
189
+								} else {
190
+									$spotter_item['aircraft_shadow'] = '';
191
+								}
144 192
 							}
145 193
 						}
146 194
 						if ($spotter_item['aircraft_shadow'] == '') {
147
-							if ($compress) $output .= '"as": "default.png",';
148
-							else $output .= '"aircraft_shadow": "default.png",';
195
+							if ($compress) {
196
+								$output .= '"as": "default.png",';
197
+							} else {
198
+								$output .= '"aircraft_shadow": "default.png",';
199
+							}
149 200
 						} else {
150
-							if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",';
151
-							else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",';
201
+							if ($compress) {
202
+								$output .= '"as": "'.$spotter_item['aircraft_shadow'].'",';
203
+							} else {
204
+								$output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",';
205
+							}
152 206
 						}
153 207
 						if (isset($spotter_item['airline_name'])) {
154 208
 							$output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
@@ -156,8 +210,11 @@  discard block
 block discarded – undo
156 210
 							$output .= '"airline_name": "NA",';
157 211
 						}
158 212
 						if (isset($spotter_item['departure_airport'])) {
159
-							if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",';
160
-							else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",';
213
+							if ($compress) {
214
+								$output .= '"dac": "'.$spotter_item['departure_airport'].'",';
215
+							} else {
216
+								$output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",';
217
+							}
161 218
 						}
162 219
 						if (isset($spotter_item['departure_airport_city'])) {
163 220
 							$output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",';
@@ -169,8 +226,11 @@  discard block
 block discarded – undo
169 226
 							$output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",';
170 227
 						}
171 228
 						if (isset($spotter_item['arrival_airport'])) {
172
-							if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",';
173
-							else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",';
229
+							if ($compress) {
230
+								$output .= '"aac": "'.$spotter_item['arrival_airport'].'",';
231
+							} else {
232
+								$output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",';
233
+							}
174 234
 						}
175 235
 						if (isset($spotter_item['arrival_airport_city'])) {
176 236
 							$output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",';
@@ -188,10 +248,16 @@  discard block
 block discarded – undo
188 248
 							$output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",';
189 249
 						}
190 250
 						
191
-						if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",';
192
-						else $output .= '"altitude": "'.$spotter_item['altitude'].'",';
193
-						if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",';
194
-						else $output .= '"heading": "'.$spotter_item['heading'].'",';
251
+						if ($compress) {
252
+							$output .= '"a": "'.$spotter_item['altitude'].'",';
253
+						} else {
254
+							$output .= '"altitude": "'.$spotter_item['altitude'].'",';
255
+						}
256
+						if ($compress) {
257
+							$output .= '"h": "'.$spotter_item['heading'].'",';
258
+						} else {
259
+							$output .= '"heading": "'.$spotter_item['heading'].'",';
260
+						}
195 261
 						
196 262
 						/*
197 263
 						if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed);
@@ -201,7 +267,9 @@  discard block
 block discarded – undo
201 267
 						$output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],';
202 268
 						*/
203 269
 
204
-						if (!$min) $output .= '"image": "'.$image.'",';
270
+						if (!$min) {
271
+							$output .= '"image": "'.$image.'",';
272
+						}
205 273
 						if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') {
206 274
 							$output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",';
207 275
 						}
@@ -209,8 +277,11 @@  discard block
 block discarded – undo
209 277
 							$output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",';
210 278
 						}
211 279
 						if (isset($spotter_item['squawk'])) {
212
-							if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",';
213
-							else $output .= '"squawk": "'.$spotter_item['squawk'].'",';
280
+							if ($compress) {
281
+								$output .= '"sq": "'.$spotter_item['squawk'].'",';
282
+							} else {
283
+								$output .= '"squawk": "'.$spotter_item['squawk'].'",';
284
+							}
214 285
 						}
215 286
 						if (isset($spotter_item['squawk_usage'])) {
216 287
 							$output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",';
@@ -241,9 +312,13 @@  discard block
 block discarded – undo
241 312
 						$k++;
242 313
 						$output_history .= '['.$spotter_history['longitude'].', '.$spotter_history['latitude'].'],';
243 314
 						$output_time .= (strtotime($spotter_history['date'])*1000).',';
244
-						if ($previousts != 0) $output_timediff .= (strtotime($spotter_history['date'])-$previousts).',';
315
+						if ($previousts != 0) {
316
+							$output_timediff .= (strtotime($spotter_history['date'])-$previousts).',';
317
+						}
245 318
 						$previousts = strtotime($spotter_history['date']);
246
-						if ($k > 1 && (strtotime($spotter_history['date'])*1000 > $enddate)) $end = true;
319
+						if ($k > 1 && (strtotime($spotter_history['date'])*1000 > $enddate)) {
320
+							$end = true;
321
+						}
247 322
 					}
248 323
 				}
249 324
 				if (isset($output_time)) {
@@ -255,8 +330,11 @@  discard block
 block discarded – undo
255 330
 				    $output .= '"timediff": ['.$output_timediff.'],';
256 331
 				}
257 332
 							// FIXME : type when not aircraft ?
258
-						if ($compress) $output .= '"t": "aircraft"';
259
-						else $output .= '"type": "aircraft"';
333
+						if ($compress) {
334
+							$output .= '"t": "aircraft"';
335
+						} else {
336
+							$output .= '"type": "aircraft"';
337
+						}
260 338
 						$output .= '},';
261 339
 						$output .= '"geometry": {';
262 340
 						//$output .= '"type": "MultiPoint",';
@@ -276,7 +354,9 @@  discard block
 block discarded – undo
276 354
 		$output .= ']';
277 355
 		$output .= ',"initial_sqltime": "'.$sqltime.'",';
278 356
 		$output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",';
279
-		if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",';
357
+		if (isset($begindate)) {
358
+			$output .= '"archive_date": "'.$begindate.'",';
359
+		}
280 360
 		$output .= '"fc": "'.$flightcnt.'"';
281 361
 	} else {
282 362
 		$output .= '"features": ';
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +513 added lines, -130 removed lines patch added patch discarded remove patch
@@ -51,7 +51,10 @@  discard block
 block discarded – undo
51 51
 <?php
52 52
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
53 53
 ?>
54
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
54
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
55
+	print '?tsk='.$tsk;
56
+}
57
+?>"></script>
55 58
 <?php
56 59
 	if (!isset($globalAircraft) || $globalAircraft) {
57 60
 ?>
@@ -141,8 +144,14 @@  discard block
 block discarded – undo
141 144
 ?>
142 145
 		<form>
143 146
 			<ul>
144
-				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li>
145
-				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li>
147
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
148
+	print 'checked';
149
+}
150
+?> /><?php echo _("Display waypoints"); ?></label></div></li>
151
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
152
+	print 'checked';
153
+}
154
+?> /><?php echo _("Display airspace"); ?></label></div></li>
146 155
 			</ul>
147 156
 		</form>
148 157
 <?php
@@ -150,8 +159,14 @@  discard block
 block discarded – undo
150 159
 ?>
151 160
 		<form>
152 161
 			<ul>
153
-				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
154
-				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
162
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
163
+	print 'checked';
164
+}
165
+?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
166
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
167
+	print 'checked';
168
+}
169
+?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
155 170
 			</ul>
156 171
 			<p>This layers are in Beta, this can and will crash.</p>
157 172
 		</form>
@@ -162,14 +177,32 @@  discard block
 block discarded – undo
162 177
 		<h1>NOTAM</h1>
163 178
 		<form>
164 179
 			<ul>
165
-				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li>
180
+				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') {
181
+	print 'checked';
182
+}
183
+?> /><?php echo _("Display NOTAM"); ?></label></div></li>
166 184
 				<li><?php echo _("NOTAM scope:"); ?>
167 185
 					<select class="selectpicker" onchange="notamscope(this);">
168
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
169
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
170
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
171
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
172
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
186
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
187
+	print ' selected';
188
+}
189
+?>>All</option>
190
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
191
+	print ' selected';
192
+}
193
+?>>Airport/Enroute warning</option>
194
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
195
+	print ' selected';
196
+}
197
+?>>Airport warning</option>
198
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
199
+	print ' selected';
200
+}
201
+?>>Navigation warning</option>
202
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
203
+	print ' selected';
204
+}
205
+?>>Enroute warning</option>
173 206
 					</select
174 207
 				</li>
175 208
 			</ul>
@@ -197,7 +230,10 @@  discard block
 block discarded – undo
197 230
 		    <div class="form-group">
198 231
 			<label><?php echo _("From:"); ?></label>
199 232
 			<div class='input-group date' id='datetimepicker1'>
200
-			    <input type='text' id="start_date" name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("Y-m-d H:i",$_COOKIE['archive_begin']); ?> UTC" required />
233
+			    <input type='text' id="start_date" name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) {
234
+	print date("Y-m-d H:i",$_COOKIE['archive_begin']);
235
+}
236
+?> UTC" required />
201 237
 			    <span class="input-group-addon">
202 238
 				<span class="glyphicon glyphicon-calendar"></span>
203 239
 			    </span>
@@ -206,7 +242,10 @@  discard block
 block discarded – undo
206 242
 		    <div class="form-group">
207 243
 			<label><?php echo _("To:"); ?></label>
208 244
 			<div class='input-group date' id='datetimepicker2'>
209
-			    <input type='text' id="end_date" name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("Y-m-d H:i",$_COOKIE['archive_end']); ?> UTC" />
245
+			    <input type='text' id="end_date" name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) {
246
+	print date("Y-m-d H:i",$_COOKIE['archive_end']);
247
+}
248
+?> UTC" />
210 249
 			    <span class="input-group-addon">
211 250
 				<span class="glyphicon glyphicon-calendar"></span>
212 251
 			    </span>
@@ -238,8 +277,20 @@  discard block
 block discarded – undo
238 277
 		    </script>
239 278
 		<li><?php echo _("Playback speed:"); ?>
240 279
 		    <div class="range">
241
-			<input type="range" min="0" max="50" step="1" id="archivespeed" 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'; ?>">
242
-			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
280
+			<input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
281
+	print $_POST['archivespeed'];
282
+} elseif (isset($_COOKIE['archive_speed'])) {
283
+	print $_COOKIE['archive_speed'];
284
+} else {
285
+	print '1';
286
+}
287
+?>">
288
+			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
289
+	print $_COOKIE['archive_speed'];
290
+} else {
291
+	print '1';
292
+}
293
+?></output>
243 294
 		    </div>
244 295
 		</li>
245 296
 		<li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li>
@@ -258,29 +309,53 @@  discard block
 block discarded – undo
258 309
 		    <li><?php echo _("Type of Map:"); ?>
259 310
 			<select  class="selectpicker" onchange="mapType(this);">
260 311
 			    <?php
261
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
262
-				else $MapType = $_COOKIE['MapType'];
312
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
313
+					$MapType = $globalMapProvider;
314
+				} else {
315
+					$MapType = $_COOKIE['MapType'];
316
+				}
263 317
 			    ?>
264 318
 			    <?php
265 319
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
266 320
 			    ?>
267
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
321
+			    <option value="offline"<?php if ($MapType == 'offline') {
322
+	print ' selected';
323
+}
324
+?>>Natural Earth (local)</option>
268 325
 			    <?php
269 326
 				} else {
270 327
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
271 328
 			    ?>
272
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
329
+			    <option value="offline"<?php if ($MapType == 'offline') {
330
+	print ' selected';
331
+}
332
+?>>Natural Earth (local)</option>
273 333
 			    <?php
274 334
 				    }
275 335
 			    ?>
276
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
277
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
336
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
337
+	print ' selected';
338
+}
339
+?>>ArcGIS Streetmap</option>
340
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
341
+	print ' selected';
342
+}
343
+?>>ArcGIS Satellite</option>
278 344
 			    <?php
279 345
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
280 346
 			    ?>
281
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
282
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
283
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
347
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
348
+	print ' selected';
349
+}
350
+?>>Bing-Aerial</option>
351
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
352
+	print ' selected';
353
+}
354
+?>>Bing-Hybrid</option>
355
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
356
+	print ' selected';
357
+}
358
+?>>Bing-Road</option>
284 359
 			    <?php
285 360
 				    }
286 361
 			    ?>
@@ -290,59 +365,143 @@  discard block
 block discarded – undo
290 365
 			    <?php
291 366
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
292 367
 			    ?>
293
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
294
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
295
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
368
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
369
+	print ' selected';
370
+}
371
+?>>Here-Aerial</option>
372
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
373
+	print ' selected';
374
+}
375
+?>>Here-Hybrid</option>
376
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
377
+	print ' selected';
378
+}
379
+?>>Here-Road</option>
296 380
 			    <?php
297 381
 					}
298 382
 			    ?>
299 383
 			    <?php
300 384
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
301 385
 			    ?>
302
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
303
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
304
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
305
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
386
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
387
+	print ' selected';
388
+}
389
+?>>Google Roadmap</option>
390
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
391
+	print ' selected';
392
+}
393
+?>>Google Satellite</option>
394
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
395
+	print ' selected';
396
+}
397
+?>>Google Hybrid</option>
398
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
399
+	print ' selected';
400
+}
401
+?>>Google Terrain</option>
306 402
 			    <?php
307 403
 					}
308 404
 			    ?>
309 405
 			    <?php
310 406
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
311 407
 			    ?>
312
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
313
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
314
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
408
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
409
+	print ' selected';
410
+}
411
+?>>MapQuest-OSM</option>
412
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
413
+	print ' selected';
414
+}
415
+?>>MapQuest-Aerial</option>
416
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
417
+	print ' selected';
418
+}
419
+?>>MapQuest-Hybrid</option>
315 420
 			    <?php
316 421
 					}
317 422
 			    ?>
318
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
319
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
423
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
424
+	print ' selected';
425
+}
426
+?>>Yandex</option>
427
+			    <option value="offline"<?php if ($MapType == 'offline') {
428
+	print ' selected';
429
+}
430
+?>>Natural Earth</option>
320 431
 			    <?php
321 432
 				    }
322 433
 			    ?>
323
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
434
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
435
+	print ' selected';
436
+}
437
+?>>National Geographic Street</option>
324 438
 			    <?php
325 439
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
326
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
327
-					else $MapBoxId = $_COOKIE['MapTypeId'];
440
+					if (!isset($_COOKIE['MapTypeId'])) {
441
+						$MapBoxId = 'default';
442
+					} else {
443
+						$MapBoxId = $_COOKIE['MapTypeId'];
444
+					}
328 445
 			    ?>
329
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
330
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
331
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
332
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
333
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
334
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
335
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
336
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
337
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
338
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
339
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
340
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
341
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
446
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
447
+	print ' selected';
448
+}
449
+?>>Mapbox GL</option>
450
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
451
+	print ' selected';
452
+}
453
+?>>Mapbox default</option>
454
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
455
+	print ' selected';
456
+}
457
+?>>Mapbox streets</option>
458
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
459
+	print ' selected';
460
+}
461
+?>>Mapbox light</option>
462
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
463
+	print ' selected';
464
+}
465
+?>>Mapbox dark</option>
466
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
467
+	print ' selected';
468
+}
469
+?>>Mapbox satellite</option>
470
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
471
+	print ' selected';
472
+}
473
+?>>Mapbox streets-satellite</option>
474
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
475
+	print ' selected';
476
+}
477
+?>>Mapbox streets-basic</option>
478
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
479
+	print ' selected';
480
+}
481
+?>>Mapbox comic</option>
482
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
483
+	print ' selected';
484
+}
485
+?>>Mapbox outdoors</option>
486
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
487
+	print ' selected';
488
+}
489
+?>>Mapbox pencil</option>
490
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
491
+	print ' selected';
492
+}
493
+?>>Mapbox pirates</option>
494
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
495
+	print ' selected';
496
+}
497
+?>>Mapbox emerald</option>
342 498
 			    <?php
343 499
 				    }
344 500
 			    ?>
345
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
501
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
502
+	print ' selected';
503
+}
504
+?>>OpenStreetMap</option>
346 505
 			    <?php
347 506
 				}
348 507
 			    ?>
@@ -353,10 +512,22 @@  discard block
 block discarded – undo
353 512
 ?>
354 513
 		    <li><?php echo _("Type of Terrain:"); ?>
355 514
 			<select  class="selectpicker" onchange="terrainType(this);">
356
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
357
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
358
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
359
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
515
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
516
+	print ' selected';
517
+}
518
+?>>stk terrain</option>
519
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
520
+	print ' selected';
521
+}
522
+?>>ellipsoid</option>
523
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
524
+	print ' selected';
525
+}
526
+?>>vr terrain</option>
527
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
528
+	print ' selected';
529
+}
530
+?>>ArticDEM</option>
360 531
 			</select>
361 532
 		    </li>
362 533
 <?php
@@ -365,50 +536,98 @@  discard block
 block discarded – undo
365 536
 <?php
366 537
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
367 538
 ?>
368
-		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
539
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
540
+	print 'checked';
541
+}
542
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
369 543
 
370 544
 <?php
371 545
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
372 546
 ?>
373
-		    <!--<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>-->
374
-		    <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>
375
-		    <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']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
376
-		    <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>
377
-		    <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>
547
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
548
+	print 'checked';
549
+}
550
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
551
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
552
+	print 'checked';
553
+}
554
+?> ><?php echo _("Display flight path"); ?></label></div></li>
555
+		    <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']) && isset($globalMapRoute) && $globalMapRoute)) {
556
+	print 'checked';
557
+}
558
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
559
+		    <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)) {
560
+	print 'checked';
561
+}
562
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
563
+		    <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)) {
564
+	print 'checked';
565
+}
566
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
378 567
 <?php
379 568
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
380 569
 ?>
381
-		    <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li>
570
+		    <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) {
571
+	print 'checked';
572
+}
573
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
382 574
 <?php
383 575
 	}
384 576
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
385 577
 ?>
386
-		    <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
578
+		    <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) {
579
+	print 'checked';
580
+}
581
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
387 582
 <?php
388 583
 	}
389 584
     }
390 585
 ?>
391
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
392
-		    <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>
393
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li>
394
-		    <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li>
586
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) {
587
+	print 'checked';
588
+}
589
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
590
+		    <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))) {
591
+	print 'checked';
592
+}
593
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
594
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) {
595
+	print 'checked';
596
+}
597
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
598
+		    <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) {
599
+	print 'checked';
600
+}
601
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
395 602
 <?php
396 603
 	if (isset($globalFires)) {
397 604
 ?>
398
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li>
605
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) {
606
+	print 'checked';
607
+}
608
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
399 609
 <?php
400 610
 	}
401 611
 	if (isset($globalMap3D) && $globalMap3D) {
402 612
 ?>
403
-		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
613
+		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') {
614
+	print 'checked';
615
+}
616
+?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
404 617
 <?php
405 618
 	}
406 619
 ?>
407 620
 <?php
408 621
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
409 622
 ?>
410
-		    <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>
411
-		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
623
+		    <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')) {
624
+	print 'checked';
625
+}
626
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
627
+		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) {
628
+	print 'checked';
629
+}
630
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
412 631
 <?php
413 632
     }
414 633
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -421,17 +640,25 @@  discard block
 block discarded – undo
421 640
 			if (function_exists('array_column')) {
422 641
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
423 642
 		    ?>
424
-		    <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>
643
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
644
+	print 'checked';
645
+}
646
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
425 647
 		    <?php
426 648
 			    }
427 649
 			} elseif (isset($globalSources)) {
428 650
 			    $dispolar = false;
429 651
 			    foreach ($globalSources as $testsource) {
430
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
652
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
653
+			        	$dispolar = true;
654
+			        }
431 655
 			    }
432 656
 			    if ($dispolar) {
433 657
 		    ?>
434
-		    <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>
658
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
659
+	print 'checked';
660
+}
661
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
435 662
 		    <?php
436 663
 			    }
437 664
 		        }
@@ -444,11 +671,21 @@  discard block
 block discarded – undo
444 671
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
445 672
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
446 673
 		    ?>
447
-		    <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>
674
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
675
+	print 'checked';
676
+}
677
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
448 678
 		    <?php 
449 679
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
450 680
 		    ?>
451
-			<li><?php echo _("Aircraft icon color:"); ?><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'; ?>"></li>
681
+			<li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
682
+	print $_COOKIE['IconColor'];
683
+} elseif (isset($globalAircraftIconColor)) {
684
+	print $globalAircraftIconColor;
685
+} else {
686
+	print '1a3151';
687
+}
688
+?>"></li>
452 689
 		    <?php
453 690
 				}
454 691
 			    }
@@ -459,7 +696,14 @@  discard block
 block discarded – undo
459 696
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
460 697
 		    ?>
461 698
 		    <li><?php echo _("Marine icon color:"); ?>
462
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
699
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
700
+	print $_COOKIE['MarineIconColor'];
701
+} elseif (isset($globalMarineIconColor)) {
702
+	print $globalMarineIconColor;
703
+} else {
704
+	print '1a3151';
705
+}
706
+?>">
463 707
 		    </li>
464 708
 		    <?php
465 709
 			    }
@@ -470,7 +714,14 @@  discard block
 block discarded – undo
470 714
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
471 715
 		    ?>
472 716
 		    <li><?php echo _("Tracker icon color:"); ?>
473
-			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>">
717
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
718
+	print $_COOKIE['TrackerIconColor'];
719
+} elseif (isset($globalTrackerIconColor)) {
720
+	print $globalTrackerIconColor;
721
+} else {
722
+	print '1a3151';
723
+}
724
+?>">
474 725
 		    </li>
475 726
 		    <?php
476 727
 			    }
@@ -481,8 +732,22 @@  discard block
 block discarded – undo
481 732
 		    ?>
482 733
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
483 734
 			<div class="range">
484
-			    <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'; ?>">
485
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
735
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
736
+	print $_COOKIE['AirportZoom'];
737
+} elseif (isset($globalAirportZoom)) {
738
+	print $globalAirportZoom;
739
+} else {
740
+	print '7';
741
+}
742
+?>">
743
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
744
+	print $_COOKIE['AirportZoom'];
745
+} elseif (isset($globalAirportZoom)) {
746
+	print $globalAirportZoom;
747
+} else {
748
+	print '7';
749
+}
750
+?></output>
486 751
 			</div>
487 752
 		    </li>
488 753
 		    <?php
@@ -494,10 +759,23 @@  discard block
 block discarded – undo
494 759
 <?php
495 760
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
496 761
 ?>
497
-		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> ><?php echo _("Use airlines liveries"); ?></li>
498
-		    <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"); ?>&nbsp;
762
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
763
+	print 'checked';
764
+}
765
+?> ><?php echo _("Use airlines liveries"); ?></li>
766
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
767
+	print 'checked';
768
+}
769
+?> ><?php echo _("Force Aircraft color"); ?>&nbsp;
499 770
 		    <!--<li><?php echo _("Aircraft icon color:"); ?>-->
500
-			<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'; ?>">
771
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
772
+	print $_COOKIE['IconColor'];
773
+} elseif (isset($globalAircraftIconColor)) {
774
+	print $globalAircraftIconColor;
775
+} else {
776
+	print 'ff0000';
777
+}
778
+?>">
501 779
 		    </li>
502 780
 <?php
503 781
 	}
@@ -505,9 +783,19 @@  discard block
 block discarded – undo
505 783
 <?php
506 784
 	if (isset($globalMarine) && $globalMarine === TRUE) {
507 785
 ?>
508
-		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?>&nbsp;
786
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
787
+	print 'checked';
788
+}
789
+?> ><?php echo _("Force Marine color"); ?>&nbsp;
509 790
 		    <!--<li><?php echo _("Marine icon color:"); ?>-->
510
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>">
791
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
792
+	print $_COOKIE['MarineIconColor'];
793
+} elseif (isset($globalMarineIconColor)) {
794
+	print $globalMarineIconColor;
795
+} else {
796
+	print 'ff0000';
797
+}
798
+?>">
511 799
 		    </li>
512 800
 <?php
513 801
 	}
@@ -515,9 +803,19 @@  discard block
 block discarded – undo
515 803
 <?php
516 804
 	if (isset($globalTracker) && $globalTracker === TRUE) {
517 805
 ?>
518
-		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?>&nbsp;
806
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
807
+	print 'checked';
808
+}
809
+?> ><?php echo _("Force Tracker color"); ?>&nbsp;
519 810
 		    <!--<li><?php echo _("Tracker icon color:"); ?>-->
520
-			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>">
811
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
812
+	print $_COOKIE['TrackerIconColor'];
813
+} elseif (isset($globalTrackerIconColor)) {
814
+	print $globalTrackerIconColor;
815
+} else {
816
+	print 'ff0000';
817
+}
818
+?>">
521 819
 		    </li>
522 820
 <?php
523 821
 	}
@@ -525,22 +823,46 @@  discard block
 block discarded – undo
525 823
 ?>
526 824
 		    <li><?php echo _("Distance unit:"); ?>
527 825
 			<select class="selectpicker" onchange="unitdistance(this);">
528
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
529
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
530
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
826
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
827
+	echo ' selected';
828
+}
829
+?>>km</option>
830
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
831
+	echo ' selected';
832
+}
833
+?>>nm</option>
834
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
835
+	echo ' selected';
836
+}
837
+?>>mi</option>
531 838
 		        </select>
532 839
 		    </li>
533 840
 		    <li><?php echo _("Altitude unit:"); ?>
534 841
 			<select class="selectpicker" onchange="unitaltitude(this);">
535
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
536
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
842
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
843
+	echo ' selected';
844
+}
845
+?>>m</option>
846
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
847
+	echo ' selected';
848
+}
849
+?>>feet</option>
537 850
 		        </select>
538 851
 		    </li>
539 852
 		    <li><?php echo _("Speed unit:"); ?>
540 853
 			<select class="selectpicker" onchange="unitspeed(this);">
541
-			    <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>
542
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
543
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
854
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
855
+	echo ' selected';
856
+}
857
+?>>km/h</option>
858
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
859
+	echo ' selected';
860
+}
861
+?>>mph</option>
862
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
863
+	echo ' selected';
864
+}
865
+?>>knots</option>
544 866
 		        </select>
545 867
 		    </li>
546 868
 
@@ -558,9 +880,18 @@  discard block
 block discarded – undo
558 880
 		    <?php
559 881
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
560 882
 		    ?>
561
-			<?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 } ?>
562
-			<?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 } ?>
563
-			<?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 } ?>
883
+			<?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'])) {
884
+	print 'checked';
885
+}
886
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
887
+			<?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'])) {
888
+	print 'checked';
889
+}
890
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
891
+			<?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'])) {
892
+	print 'checked';
893
+}
894
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
564 895
 		    <?php
565 896
 			}
566 897
 		    ?>
@@ -568,10 +899,16 @@  discard block
 block discarded – undo
568 899
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
569 900
 		    ?>
570 901
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
571
-			    <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>
902
+			    <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'])) {
903
+	print 'checked';
904
+}
905
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
572 906
 			<?php } ?>
573 907
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
574
-			    <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>
908
+			    <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'])) {
909
+	print 'checked';
910
+}
911
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
575 912
 			<?php } ?>
576 913
 		    <?php
577 914
 			}
@@ -588,7 +925,9 @@  discard block
 block discarded – undo
588 925
 				}
589 926
 				foreach($allairlinenames as $airline) {
590 927
 					$airline_name = $airline['airline_name'];
591
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
928
+					if (strlen($airline_name) > 30) {
929
+						$airline_name = substr($airline_name,0,30).'...';
930
+					}
592 931
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
593 932
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
594 933
 					} else {
@@ -606,7 +945,10 @@  discard block
 block discarded – undo
606 945
 		    <li><?php echo _("Display alliance:"); ?>
607 946
 		    <br/>
608 947
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
609
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
948
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
949
+	echo ' selected';
950
+}
951
+?>><?php echo _("All"); ?></option>
610 952
 			    <?php
611 953
 				foreach($allalliancenames as $alliance) {
612 954
 					$alliance_name = $alliance['alliance'];
@@ -665,10 +1007,22 @@  discard block
 block discarded – undo
665 1007
 		    ?>
666 1008
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
667 1009
 			<select class="selectpicker" onchange="airlinestype(this);">
668
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
669
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
670
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
671
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
1010
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
1011
+	echo ' selected';
1012
+}
1013
+?>><?php echo _("All"); ?></option>
1014
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
1015
+	echo ' selected';
1016
+}
1017
+?>><?php echo _("Passenger"); ?></option>
1018
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
1019
+	echo ' selected';
1020
+}
1021
+?>><?php echo _("Cargo"); ?></option>
1022
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
1023
+	echo ' selected';
1024
+}
1025
+?>><?php echo _("Military"); ?></option>
672 1026
 			</select>
673 1027
 		    </li>
674 1028
 		    <?php
@@ -682,14 +1036,20 @@  discard block
 block discarded – undo
682 1036
 		    ?>
683 1037
 		    <li>
684 1038
 			<?php echo _("Display vessels with MMSI:"); ?>
685
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1039
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1040
+	print $_COOKIE['filter_mmsi'];
1041
+}
1042
+?>" />
686 1043
 		    </li>
687 1044
 		    <?php
688 1045
 			}
689 1046
 		    ?>
690 1047
 		    <li>
691 1048
 			<?php echo _("Display with ident:"); ?>
692
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1049
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1050
+	print $_COOKIE['filter_ident'];
1051
+}
1052
+?>" />
693 1053
 		    </li>
694 1054
 		</ul>
695 1055
 	    </form>
@@ -705,7 +1065,10 @@  discard block
 block discarded – undo
705 1065
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
706 1066
 	    <form>
707 1067
 		<ul>
708
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
1068
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) {
1069
+	print 'checked';
1070
+}
1071
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
709 1072
 		    <li><?php echo _("Type:"); ?>
710 1073
 			<select class="selectpicker" multiple onchange="sattypes(this);">
711 1074
 			    <?php
@@ -713,25 +1076,45 @@  discard block
 block discarded – undo
713 1076
 				$types = $Satellite->get_tle_types();
714 1077
 				foreach ($types as $type) {
715 1078
 					$type_name = $type['tle_type'];
716
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
717
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
718
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
719
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
720
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
721
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
722
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
723
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
724
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
725
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
726
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
727
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
728
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
729
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
730
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
731
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
732
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
733
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
734
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1079
+					if ($type_name == 'musson') {
1080
+						$type_name = 'Russian LEO Navigation';
1081
+					} else if ($type_name == 'nnss') {
1082
+						$type_name = 'Navi Navigation Satellite System';
1083
+					} else if ($type_name == 'sbas') {
1084
+						$type_name = 'Satellite-Based Augmentation System';
1085
+					} else if ($type_name == 'glo-ops') {
1086
+						$type_name = 'Glonass Operational';
1087
+					} else if ($type_name == 'gps-ops') {
1088
+						$type_name = 'GPS Operational';
1089
+					} else if ($type_name == 'argos') {
1090
+						$type_name = 'ARGOS Data Collection System';
1091
+					} else if ($type_name == 'tdrss') {
1092
+						$type_name = 'Tracking and Data Relay Satellite System';
1093
+					} else if ($type_name == 'sarsat') {
1094
+						$type_name = 'Search & Rescue';
1095
+					} else if ($type_name == 'dmc') {
1096
+						$type_name = 'Disaster Monitoring';
1097
+					} else if ($type_name == 'resource') {
1098
+						$type_name = 'Earth Resources';
1099
+					} else if ($type_name == 'stations') {
1100
+						$type_name = 'Space Stations';
1101
+					} else if ($type_name == 'geo') {
1102
+						$type_name = 'Geostationary';
1103
+					} else if ($type_name == 'amateur') {
1104
+						$type_name = 'Amateur Radio';
1105
+					} else if ($type_name == 'x-comm') {
1106
+						$type_name = 'Experimental';
1107
+					} else if ($type_name == 'other-comm') {
1108
+						$type_name = 'Other Comm';
1109
+					} else if ($type_name == 'science') {
1110
+						$type_name = 'Space & Earth Science';
1111
+					} else if ($type_name == 'military') {
1112
+						$type_name = 'Miscellaneous Military';
1113
+					} else if ($type_name == 'radar') {
1114
+						$type_name = 'Radar Calibration';
1115
+					} else if ($type_name == 'tle-new') {
1116
+						$type_name = 'Last 30 days launches';
1117
+					}
735 1118
 					
736 1119
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
737 1120
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.