Completed
Push — master ( 314f84...11bd0c )
by Yannick
30:49
created
live-czml.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
     $s3 = sin($bank/2);
60 60
     $c1c2 = $c1*$c2;
61 61
     $s1s2 = $s1*$s2;
62
-    $w =$c1c2*$c3 - $s1s2*$s3;
63
-    $x =$c1c2*$s3 + $s1s2*$c3;
64
-    $y =$s1*$c2*$c3 + $c1*$s2*$s3;
65
-    $z =$c1*$s2*$c3 - $s1*$c2*$s3;
66
-    return array('x' => $x,'y' => $y,'z' => $z,'w' => $w);
62
+    $w = $c1c2*$c3 - $s1s2*$s3;
63
+    $x = $c1c2*$s3 + $s1s2*$c3;
64
+    $y = $s1*$c2*$c3 + $c1*$s2*$s3;
65
+    $z = $c1*$s2*$c3 - $s1*$c2*$s3;
66
+    return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w);
67 67
 //    return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365');
68 68
 
69 69
 }
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
 $min = false;
85 85
 $allhistory = false;
86 86
 $filter['source'] = array();
87
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt'));
88
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup'));
89
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars'));
90
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs'));
91
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs'));
92
-if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING);
93
-if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING);
94
-if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING);
95
-if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING);
96
-if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING);
97
-if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING);
87
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt'));
88
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup'));
89
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars'));
90
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs'));
91
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs'));
92
+if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING);
93
+if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING);
94
+if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING);
95
+if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING);
96
+if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING);
97
+if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING);
98 98
 /*
99 99
 if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) {
100 100
 	$min = true;
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 	$from_archive = true;
142 142
 //	$begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~')));
143 143
 //	$enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~')));
144
-	$begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT);
145
-	$enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT);
146
-	$archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT);
147
-	$begindate = date('Y-m-d H:i:s',$begindate);
148
-	$enddate = date('Y-m-d H:i:s',$enddate);
149
-	$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter);
144
+	$begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT);
145
+	$enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT);
146
+	$archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT);
147
+	$begindate = date('Y-m-d H:i:s', $begindate);
148
+	$enddate = date('Y-m-d H:i:s', $enddate);
149
+	$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter);
150 150
 } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) {
151 151
 	$from_archive = true;
152 152
 //	$begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~')));
@@ -156,55 +156,55 @@  discard block
 block discarded – undo
156 156
 	$begindate = $_COOKIE['archive_begin'];
157 157
 	$enddate = $_COOKIE['archive_end'];
158 158
 
159
-	$archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT);
160
-	$begindate = date('Y-m-d H:i:s',$begindate);
161
-	$enddate = date('Y-m-d H:i:s',$enddate);
159
+	$archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT);
160
+	$begindate = date('Y-m-d H:i:s', $begindate);
161
+	$enddate = date('Y-m-d H:i:s', $enddate);
162 162
 //	echo 'Begin : '.$begindate.' - End : '.$enddate."\n";
163
-	$spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter);
163
+	$spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter);
164 164
 } elseif ($tracker) {
165 165
 	$coord = array();
166 166
 	if (isset($_GET['coord']) && $_GET['coord'] != '') {
167
-		$coord = explode(',',$_GET['coord']);
168
-		if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) 
167
+		$coord = explode(',', $_GET['coord']);
168
+		if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) 
169 169
 		    && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) {
170 170
 			$coord = array();
171 171
 		}
172 172
 	}
173
-	$spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true);
173
+	$spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true);
174 174
 } elseif ($marine) {
175 175
 	$coord = array();
176 176
 	if (isset($_GET['coord']) && $_GET['coord'] != '') {
177
-		$coord = explode(',',$_GET['coord']);
178
-		if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) 
177
+		$coord = explode(',', $_GET['coord']);
178
+		if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) 
179 179
 		    && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) {
180 180
 			$coord = array();
181 181
 		}
182 182
 	}
183
-	$spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true);
183
+	$spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true);
184 184
 } else {
185 185
 	$coord = array();
186 186
 	if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') {
187
-		$coord = explode(',',$_GET['coord']);
188
-		if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) 
187
+		$coord = explode(',', $_GET['coord']);
188
+		if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) 
189 189
 		    && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) {
190 190
 			$coord = array();
191 191
 		}
192 192
 	}
193 193
 	$previous_filter = $filter;
194 194
 	if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) {
195
-		$filter = array_merge($filter,array('id' => $_COOKIE['MapTrack']));
196
-		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true);
195
+		$filter = array_merge($filter, array('id' => $_COOKIE['MapTrack']));
196
+		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true);
197 197
 	} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) {
198
-		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true,$_COOKIE['MapTrack']);
198
+		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true, $_COOKIE['MapTrack']);
199 199
 	} else {
200
-		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true);
200
+		$spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true);
201 201
 	}
202 202
 	$filter = $previous_filter;
203 203
 }
204 204
 //print_r($spotter_array);
205 205
 if (!empty($spotter_array) && isset($coord)) {
206 206
 	if (isset($_GET['archive'])) {
207
-		$flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter);
207
+		$flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter);
208 208
 	} elseif ($tracker) {
209 209
 		$flightcnt = $TrackerLive->getLiveTrackerCount($filter);
210 210
 	} elseif ($marine) {
@@ -215,17 +215,17 @@  discard block
 block discarded – undo
215 215
 	if ($flightcnt == '') $flightcnt = 0;
216 216
 } else $flightcnt = 0;
217 217
 
218
-$sqltime = round(microtime(true)-$begintime,2);
218
+$sqltime = round(microtime(true) - $begintime, 2);
219 219
 $minitime = time();
220 220
 $minitracktime_begin = time();
221 221
 $minitracktime = $minitracktime_begin;
222 222
 $maxitime = 0;
223
-$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT);
223
+$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT);
224 224
 $modelsdb = array();
225 225
 if (file_exists(dirname(__FILE__).'/models/modelsdb')) {
226
-	if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) {
227
-		while (($row = fgetcsv($handle,1000)) !== FALSE) {
228
-			if (isset($row[1]) ){
226
+	if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) {
227
+		while (($row = fgetcsv($handle, 1000)) !== FALSE) {
228
+			if (isset($row[1])) {
229 229
 				$model = $row[0];
230 230
 				$modelsdb[$model] = $row[1];
231 231
 			}
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 }
236 236
 $modelsdb2 = array();
237 237
 if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) {
238
-	if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) {
239
-		while (($row = fgetcsv($handle,1000)) !== FALSE) {
240
-			if (isset($row[1]) ){
238
+	if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) {
239
+		while (($row = fgetcsv($handle, 1000)) !== FALSE) {
240
+			if (isset($row[1])) {
241 241
 				$model = $row[0];
242 242
 				$glb = $row[1];
243 243
 				if (isset($row[2])) {
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 if (!empty($spotter_array) && is_array($spotter_array))
282 282
 {
283 283
 	$nblatlong = 0;
284
-	foreach($spotter_array as $spotter_item)
284
+	foreach ($spotter_array as $spotter_item)
285 285
 	{
286 286
 		$j++;
287 287
 		//if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND';
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
 			$output .= '"lastupdate": "'.$lastupdate.'",';
324 324
 			if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",';
325 325
 			if ($tracker) {
326
-				$output.= '"type": "tracker"';
326
+				$output .= '"type": "tracker"';
327 327
 			} elseif ($marine) {
328
-				$output.= '"type": "marine"';
328
+				$output .= '"type": "marine"';
329 329
 			} else {
330 330
 				if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) {
331 331
 					$aircraft_icao = $spotter_item['aircraft_icao'];
@@ -339,14 +339,14 @@  discard block
 block discarded – undo
339 339
 						if (isset($airline_icao)) {
340 340
 							$imagefile = $aircraft_icao.'-'.$airline_icao.'.png';
341 341
 							if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) {
342
-								$output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",';
342
+								$output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",';
343 343
 							}
344 344
 						}
345 345
 					}
346
-					if ($ident != '') $output.= '"ident": "'.$ident.'",';
346
+					if ($ident != '') $output .= '"ident": "'.$ident.'",';
347 347
 				}
348
-				$output.= '"gltf2": %gltf2%,';
349
-				$output.= '"type": "flight"';
348
+				$output .= '"gltf2": %gltf2%,';
349
+				$output .= '"type": "flight"';
350 350
 			}
351 351
 			$output .= '},';
352 352
 
@@ -717,8 +717,8 @@  discard block
 block discarded – undo
717 717
 					$output .= '},';
718 718
 				}
719 719
 			}
720
-			if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output);
721
-			else $output = str_replace('%onground%','false',$output);
720
+			if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output);
721
+			else $output = str_replace('%onground%', 'false', $output);
722 722
 
723 723
 	//		$output .= '"heightReference": "CLAMP_TO_GROUND",';
724 724
 			//$output .= '"heightReference": "'.$heightrelative.'",';
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 			if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']);
735 735
 			if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']);
736 736
 			if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']);
737
-			$output .= '"'.date("c",strtotime($spotter_item['date'])).'", ';
737
+			$output .= '"'.date("c", strtotime($spotter_item['date'])).'", ';
738 738
 			$output .= $spotter_item['longitude'].', ';
739 739
 			$output .= $spotter_item['latitude'];
740 740
 			$prevlong = $spotter_item['longitude'];
@@ -762,8 +762,8 @@  discard block
 block discarded – undo
762 762
 			//$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0));
763 763
 			//$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w'];
764 764
 		} else {
765
-			$nblatlong = $nblatlong+1;
766
-			$output .= ',"'.date("c",strtotime($spotter_item['date'])).'", ';
765
+			$nblatlong = $nblatlong + 1;
766
+			$output .= ',"'.date("c", strtotime($spotter_item['date'])).'", ';
767 767
 			if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']);
768 768
 			if ($spotter_item['ground_speed'] == 0) {
769 769
 				$output .= $prevlong.', ';
@@ -803,21 +803,21 @@  discard block
 block discarded – undo
803 803
 }
804 804
 $output .= ']';
805 805
 if (isset($globalArchive) && $globalArchive === TRUE) {
806
-	if ((time()-$globalLiveInterval) > $minitime) {
807
-		if (time()-$globalLiveInterval > $maxitime) {
808
-			$output = str_replace('%minitime%',date("c",$maxitime),$output);
806
+	if ((time() - $globalLiveInterval) > $minitime) {
807
+		if (time() - $globalLiveInterval > $maxitime) {
808
+			$output = str_replace('%minitime%', date("c", $maxitime), $output);
809 809
 		} else {
810
-			$output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output);
810
+			$output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output);
811 811
 		}
812 812
 	}
813
-	else $output = str_replace('%minitime%',date("c",$minitime),$output);
813
+	else $output = str_replace('%minitime%', date("c", $minitime), $output);
814 814
 } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) {
815
-	$output = str_replace('%minitime%',date("c",$minitracktime),$output);
815
+	$output = str_replace('%minitime%', date("c", $minitracktime), $output);
816 816
 } else {
817
-	$output = str_replace('%minitime%',date("c",$minitime),$output);
817
+	$output = str_replace('%minitime%', date("c", $minitime), $output);
818 818
 }
819
-$output = str_replace('%maxitime%',date("c",$maxitime),$output);
820
-if ($gltf2) $output = str_replace('%gltf2%','true',$output);
821
-else $output = str_replace('%gltf2%','false',$output);
819
+$output = str_replace('%maxitime%', date("c", $maxitime), $output);
820
+if ($gltf2) $output = str_replace('%gltf2%', 'true', $output);
821
+else $output = str_replace('%gltf2%', 'false', $output);
822 822
 print $output;
823 823
 ?>
Please login to merge, or discard this patch.