Completed
Push — master ( 7fab65...347b49 )
by Yannick
05:33
created
require/libs/Predict/Predict/Geodetic.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
  */
7 7
 class Predict_Geodetic
8 8
 {
9
-    public $lat; /*!< Lattitude [rad] */
10
-    public $lon; /*!< Longitude [rad] */
11
-    public $alt; /*!< Altitude [km] */
12
-    public $theta;
9
+	public $lat; /*!< Lattitude [rad] */
10
+	public $lon; /*!< Longitude [rad] */
11
+	public $alt; /*!< Altitude [km] */
12
+	public $theta;
13 13
 }
Please login to merge, or discard this patch.
require/libs/Predict/Predict/SGSDPStatic.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@
 block discarded – undo
8 8
  */
9 9
 class Predict_SGSDPStatic
10 10
 {
11
-    public $aodp;
12
-    public $aycof;
13
-    public $c1;
14
-    public $c4;
15
-    public $c5;
16
-    public $cosio;
17
-    public $d2;
18
-    public $d3;
19
-    public $d4;
20
-    public $delmo;
21
-    public $omgcof;
22
-    public $eta;
23
-    public $omgdot;
24
-    public $sinio;
25
-    public $xnodp;
26
-    public $sinmo;
27
-    public $t2cof;
28
-    public $t3cof;
29
-    public $t4cof;
30
-    public $t5cof;
31
-    public $x1mth2;
32
-    public $x3thm1;
33
-    public $x7thm1;
34
-    public $xmcof;
35
-    public $xmdot;
36
-    public $xnodcf;
37
-    public $xnodot;
38
-    public $xlcof;
11
+	public $aodp;
12
+	public $aycof;
13
+	public $c1;
14
+	public $c4;
15
+	public $c5;
16
+	public $cosio;
17
+	public $d2;
18
+	public $d3;
19
+	public $d4;
20
+	public $delmo;
21
+	public $omgcof;
22
+	public $eta;
23
+	public $omgdot;
24
+	public $sinio;
25
+	public $xnodp;
26
+	public $sinmo;
27
+	public $t2cof;
28
+	public $t3cof;
29
+	public $t4cof;
30
+	public $t5cof;
31
+	public $x1mth2;
32
+	public $x3thm1;
33
+	public $x7thm1;
34
+	public $xmcof;
35
+	public $xmdot;
36
+	public $xnodcf;
37
+	public $xnodot;
38
+	public $xlcof;
39 39
 }
Please login to merge, or discard this patch.
require/libs/Predict/Predict/QTH.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  */
8 8
 class Predict_QTH
9 9
 {
10
-     public $name;   /*!< Name, eg. callsign. */
11
-     public $loc;    /*!< Location, eg City, Country. */
12
-     public $desc;   /*!< Short description. */
13
-     public $lat;    /*!< Latitude in dec. deg. North. */
14
-     public $lon;    /*!< Longitude in dec. deg. East. */
15
-     public $alt;    /*!< Altitude above sea level in meters. */
16
-     public $qra;    /*!< QRA locator */
17
-     public $wx;     /*!< Weather station code (4 chars). */
10
+	 public $name;   /*!< Name, eg. callsign. */
11
+	 public $loc;    /*!< Location, eg City, Country. */
12
+	 public $desc;   /*!< Short description. */
13
+	 public $lat;    /*!< Latitude in dec. deg. North. */
14
+	 public $lon;    /*!< Longitude in dec. deg. East. */
15
+	 public $alt;    /*!< Altitude above sea level in meters. */
16
+	 public $qra;    /*!< QRA locator */
17
+	 public $wx;     /*!< Weather station code (4 chars). */
18 18
 
19
-     public $data;   /*!< Raw data from cfg file. */
19
+	 public $data;   /*!< Raw data from cfg file. */
20 20
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  */
8 8
 class Predict_QTH
9 9
 {
10
-     public $name;   /*!< Name, eg. callsign. */
11
-     public $loc;    /*!< Location, eg City, Country. */
12
-     public $desc;   /*!< Short description. */
13
-     public $lat;    /*!< Latitude in dec. deg. North. */
14
-     public $lon;    /*!< Longitude in dec. deg. East. */
15
-     public $alt;    /*!< Altitude above sea level in meters. */
16
-     public $qra;    /*!< QRA locator */
17
-     public $wx;     /*!< Weather station code (4 chars). */
10
+     public $name; /*!< Name, eg. callsign. */
11
+     public $loc; /*!< Location, eg City, Country. */
12
+     public $desc; /*!< Short description. */
13
+     public $lat; /*!< Latitude in dec. deg. North. */
14
+     public $lon; /*!< Longitude in dec. deg. East. */
15
+     public $alt; /*!< Altitude above sea level in meters. */
16
+     public $qra; /*!< QRA locator */
17
+     public $wx; /*!< Weather station code (4 chars). */
18 18
 
19
-     public $data;   /*!< Raw data from cfg file. */
19
+     public $data; /*!< Raw data from cfg file. */
20 20
 }
Please login to merge, or discard this patch.
require/libs/Predict/Predict/Vector.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
  */
7 7
 class Predict_Vector
8 8
 {
9
-    public $x = 0;
10
-    public $y = 0;
11
-    public $z = 0;
12
-    public $w = 0;
9
+	public $x = 0;
10
+	public $y = 0;
11
+	public $z = 0;
12
+	public $w = 0;
13 13
 }
Please login to merge, or discard this patch.
require/class.Satellite.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		try {
20 20
 			$sth = $this->db->prepare($query);
21 21
 			$sth->execute(array(':name' => $name));
22
-		} catch(PDOException $e) {
22
+		} catch (PDOException $e) {
23 23
 			echo $e->getMessage();
24 24
 		}
25 25
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		try {
32 32
 			$sth = $this->db->prepare($query);
33 33
 			$sth->execute();
34
-		} catch(PDOException $e) {
34
+		} catch (PDOException $e) {
35 35
 			echo $e->getMessage();
36 36
 		}
37 37
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		try {
44 44
 			$sth = $this->db->prepare($query);
45 45
 			$sth->execute();
46
-		} catch(PDOException $e) {
46
+		} catch (PDOException $e) {
47 47
 			echo $e->getMessage();
48 48
 		}
49 49
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		try {
56 56
 			$sth = $this->db->prepare($query);
57 57
 			$sth->execute(array(':type' => $type));
58
-		} catch(PDOException $e) {
58
+		} catch (PDOException $e) {
59 59
 			echo $e->getMessage();
60 60
 		}
61 61
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -63,27 +63,27 @@  discard block
 block discarded – undo
63 63
 		else return array();
64 64
 	}
65 65
 	
66
-	public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) {
66
+	public function position_all($timestamp_begin = '', $timestamp_end = '', $second = 10) {
67 67
 		$all_sat = $this->get_tle_names();
68 68
 		$result = array();
69 69
 		foreach ($all_sat as $sat) {
70
-			$position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second);
71
-			$result = array_merge($position,$result);
70
+			$position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second);
71
+			$result = array_merge($position, $result);
72 72
 		}
73 73
 		return $result;
74 74
 	}
75 75
 
76
-	public function position_all_type($type,$timestamp_begin = '',$timestamp_end = '',$second = 10) {
76
+	public function position_all_type($type, $timestamp_begin = '', $timestamp_end = '', $second = 10) {
77 77
 		$all_sat = $this->get_tle_names_type($type);
78 78
 		$result = array();
79 79
 		foreach ($all_sat as $sat) {
80
-			$position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second);
81
-			$result = array_merge($position,$result);
80
+			$position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second);
81
+			$result = array_merge($position, $result);
82 82
 		}
83 83
 		return $result;
84 84
 	}
85 85
 	
86
-	public function position($name,$timestamp_begin = '',$timestamp_end = '',$second = 10) {
86
+	public function position($name, $timestamp_begin = '', $timestamp_end = '', $second = 10) {
87 87
 		$qth = new Predict_QTH();
88 88
 		$qth->lat = 37.790252;
89 89
 		$qth->lon = -122.419968;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$tle_file = $this->get_tle($name);
92 92
 		//print_r($tle_file);
93 93
 		$type = $tle_file['tle_type'];
94
-		$tle = new Predict_TLE($tle_file['tle_name'],$tle_file['tle_tle1'],$tle_file['tle_tle2']);
94
+		$tle = new Predict_TLE($tle_file['tle_name'], $tle_file['tle_tle1'], $tle_file['tle_tle2']);
95 95
 		$sat = new Predict_Sat($tle);
96 96
 		$predict = new Predict();
97 97
 		//if ($timestamp == '') $now = Predict_Time::get_current_daynum();
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 		if ($timestamp_end == '') {
100 100
 			$now = Predict_Time::unix2daynum($timestamp_begin);
101 101
 			//echo $now;
102
-			$predict->predict_calc($sat,$qth,$now);
103
-			return array('name' => $name, 'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp_begin,'type' => $type);
102
+			$predict->predict_calc($sat, $qth, $now);
103
+			return array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp_begin, 'type' => $type);
104 104
 		} else {
105
-			for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp=$timestamp+$second) {
105
+			for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp = $timestamp + $second) {
106 106
 				//echo $timestamp."\n";
107 107
 				$now = Predict_Time::unix2daynum($timestamp);
108 108
 				//echo $now;
109
-				$predict->predict_calc($sat,$qth,$now);
110
-				$result[] = array('name' => $name,'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp,'type' => $type);
109
+				$predict->predict_calc($sat, $qth, $now);
110
+				$result[] = array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp, 'type' => $type);
111 111
 			}
112 112
 			return $result;
113 113
 		}
Please login to merge, or discard this patch.
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,8 +23,11 @@  discard block
 block discarded – undo
23 23
 			echo $e->getMessage();
24 24
 		}
25 25
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
26
-		if (isset($result[0])) return $result[0];
27
-		else return array();
26
+		if (isset($result[0])) {
27
+			return $result[0];
28
+		} else {
29
+			return array();
30
+		}
28 31
 	}
29 32
 	public function get_tle_types() {
30 33
 		$query = 'SELECT DISTINCT tle_type FROM tle ORDER BY tle_type';
@@ -35,8 +38,11 @@  discard block
 block discarded – undo
35 38
 			echo $e->getMessage();
36 39
 		}
37 40
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
38
-		if (isset($result[0])) return $result;
39
-		else return array();
41
+		if (isset($result[0])) {
42
+			return $result;
43
+		} else {
44
+			return array();
45
+		}
40 46
 	}
41 47
 	public function get_tle_names() {
42 48
 		$query = 'SELECT DISTINCT tle_name, tle_type FROM tle';
@@ -47,8 +53,11 @@  discard block
 block discarded – undo
47 53
 			echo $e->getMessage();
48 54
 		}
49 55
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
50
-		if (isset($result[0])) return $result;
51
-		else return array();
56
+		if (isset($result[0])) {
57
+			return $result;
58
+		} else {
59
+			return array();
60
+		}
52 61
 	}
53 62
 	public function get_tle_names_type($type) {
54 63
 		$query = 'SELECT tle_name, tle_type FROM tle WHERE tle_type = :type ORDER BY tle_name';
@@ -59,8 +68,11 @@  discard block
 block discarded – undo
59 68
 			echo $e->getMessage();
60 69
 		}
61 70
 		$result = $sth->fetchAll(PDO::FETCH_ASSOC);
62
-		if (isset($result[0])) return $result;
63
-		else return array();
71
+		if (isset($result[0])) {
72
+			return $result;
73
+		} else {
74
+			return array();
75
+		}
64 76
 	}
65 77
 	
66 78
 	public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) {
@@ -95,7 +107,9 @@  discard block
 block discarded – undo
95 107
 		$sat = new Predict_Sat($tle);
96 108
 		$predict = new Predict();
97 109
 		//if ($timestamp == '') $now = Predict_Time::get_current_daynum();
98
-		if ($timestamp_begin == '') $timestamp_begin = time();
110
+		if ($timestamp_begin == '') {
111
+			$timestamp_begin = time();
112
+		}
99 113
 		if ($timestamp_end == '') {
100 114
 			$now = Predict_Time::unix2daynum($timestamp_begin);
101 115
 			//echo $now;
Please login to merge, or discard this patch.
space-data.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <button type="button" class="close">&times;</button>
8 8
 <?php
9 9
 
10
-$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING);
10
+$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING);
11 11
 $sat = urldecode($sat);
12 12
 
13 13
 if ($sat == 'ISS (ZARYA)') {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	$aircraft_name = 'INTEGRAL';
43 43
 //	$ground_speed = 14970;
44 44
 	$launch_date = '17 October 2002';
45
-} elseif (strpos($sat,'IRIDIUM') !== false) {
45
+} elseif (strpos($sat, 'IRIDIUM') !== false) {
46 46
 	$image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg';
47 47
 	$image_copyright = 'Cliff';
48 48
 	$ident = 'Iridium satellite constellation';
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 	$aircraft_name = $sat;
51 51
 //	$ground_speed = 14970;
52 52
 //	$launch_date = '29 september 2011';
53
-} elseif (strpos($sat,'ORBCOMM') !== false) {
53
+} elseif (strpos($sat, 'ORBCOMM') !== false) {
54 54
 	$ident = 'Orbcomm';
55 55
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)';
56 56
 	$aircraft_name = $sat;
57
-} elseif (strpos($sat,'GLOBALSTAR') !== false) {
57
+} elseif (strpos($sat, 'GLOBALSTAR') !== false) {
58 58
 	$ident = 'Globalstar';
59 59
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar';
60 60
 	$aircraft_name = $sat;
61
-} elseif (strpos($sat,'OSCAR 7') !== false) {
61
+} elseif (strpos($sat, 'OSCAR 7') !== false) {
62 62
 	$image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg';
63 63
 	$image_copyright = 'Amsat.org';
64 64
 	$ident = 'AMSAT-OSCAR 7';
Please login to merge, or discard this patch.
install/populate_all.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 #!/usr/bin/php
2 2
 <?php
3
-    require_once('../require/settings.php');
4
-    if ($globalInstalled) {
5
-        echo '$globalInstalled must be set to FALSE in require/settings.php';
6
-        exit;
7
-    }
8
-    require('class.update_db.php');
9
-    echo "Populate all tables...\n";
10
-    update_db::update_all();
11
-    echo "\nInstall waypoints...(VERY slow!)";
12
-    update_db::update_waypoints();
13
-    echo "Done !\n";
14
-    echo "Install airspace...";
15
-    update_db::update_airspace();
16
-    echo "Done !\n";
17
-    echo "Install countries...";
18
-    update_db::update_countries();
19
-    echo "Done !\n";
20
-    if (isset($globalOwner) && $globalOwner) {
3
+	require_once('../require/settings.php');
4
+	if ($globalInstalled) {
5
+		echo '$globalInstalled must be set to FALSE in require/settings.php';
6
+		exit;
7
+	}
8
+	require('class.update_db.php');
9
+	echo "Populate all tables...\n";
10
+	update_db::update_all();
11
+	echo "\nInstall waypoints...(VERY slow!)";
12
+	update_db::update_waypoints();
13
+	echo "Done !\n";
14
+	echo "Install airspace...";
15
+	update_db::update_airspace();
16
+	echo "Done !\n";
17
+	echo "Install countries...";
18
+	update_db::update_countries();
19
+	echo "Done !\n";
20
+	if (isset($globalOwner) && $globalOwner) {
21 21
 	echo "Install private owners...";
22 22
 	update_db::update_owner();
23
-        echo "Done !\n";
24
-    }
25
-    /*
23
+		echo "Done !\n";
24
+	}
25
+	/*
26 26
     if (isset($globalIVAO) && $globalIVAO) {
27 27
         echo "Install IVAO airlines and logos...";
28 28
         update_db::update_IVAO();
29 29
 	echo "Done !\n";
30 30
     }
31 31
     */
32
-    if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
32
+	if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
33 33
 	echo "Install NOTAM from notaminfo.com...";
34
-        update_db:update_notam();
35
-        echo "Done !\n";
36
-    }
37
-    if (isset($globalMap3D) && $globalMap3D) {
34
+		update_db:update_notam();
35
+		echo "Done !\n";
36
+	}
37
+	if (isset($globalMap3D) && $globalMap3D) {
38 38
 	echo "Install 3D models...";
39 39
 	update_db::update_models();
40 40
 	echo "Done !\n";
41 41
 	if (isset($globalMapSatellites) && $globalMapSatellites) {
42
-	    echo "Install Space 3D models...";
43
-	    update_db::update_space_models();
44
-	    echo "Done !\n";
45
-        }
46
-    }
42
+		echo "Install Space 3D models...";
43
+		update_db::update_space_models();
44
+		echo "Done !\n";
45
+		}
46
+	}
47 47
 
48 48
 ?>
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
live-sat-czml.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 
21 21
 $spotter_array = array();
22 22
 if (isset($_COOKIE['sattypes']) && $_COOKIE['sattypes'] != '') {
23
-	$sattypes = explode(',',$_COOKIE['sattypes']);
23
+	$sattypes = explode(',', $_COOKIE['sattypes']);
24 24
 	foreach ($sattypes as $sattype) {
25
-		$spotter_array = array_merge($Satellite->position_all_type($sattype,$timeb-$globalLiveInterval,$timeb),$spotter_array);
25
+		$spotter_array = array_merge($Satellite->position_all_type($sattype, $timeb - $globalLiveInterval, $timeb), $spotter_array);
26 26
 	}
27 27
 }
28 28
 if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss']) {
29
-	$spotter_array = array_merge($Satellite->position('ISS (ZARYA)',time()-$globalLiveInterval,time()),$spotter_array);
30
-	$spotter_array = array_merge($Satellite->position('TIANGONG 1',time()-$globalLiveInterval,time()),$spotter_array);
31
-	$spotter_array = array_merge($Satellite->position('TIANGONG-2',time()-$globalLiveInterval,time()),$spotter_array);
29
+	$spotter_array = array_merge($Satellite->position('ISS (ZARYA)', time() - $globalLiveInterval, time()), $spotter_array);
30
+	$spotter_array = array_merge($Satellite->position('TIANGONG 1', time() - $globalLiveInterval, time()), $spotter_array);
31
+	$spotter_array = array_merge($Satellite->position('TIANGONG-2', time() - $globalLiveInterval, time()), $spotter_array);
32 32
 }
33
-$spotter_array = array_unique($spotter_array,SORT_REGULAR);
33
+$spotter_array = array_unique($spotter_array, SORT_REGULAR);
34 34
 /*
35 35
 $modelsdb = array();
36 36
 if (file_exists('models/space/space_modelsdb')) {
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}';
55 55
 
56 56
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
57
-$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
57
+$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
58 58
 //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
59 59
 
60 60
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"step": "SYSTEM_CLOCK_MULTIPLIER"}';
61 61
 $output .= '},';
62 62
 if (!empty($spotter_array) && is_array($spotter_array))
63 63
 {
64
-	foreach($spotter_array as $spotter_item)
64
+	foreach ($spotter_array as $spotter_item)
65 65
 	{
66 66
 		$j++;
67 67
 		date_default_timezone_set('UTC');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$orientation = '';
77 77
 			$prev_satname = $spotter_item['name'];
78 78
 			$output .= '{';
79
-			$output .= '"id": "'.trim(str_replace(array('[+]','[-]'),'',$spotter_item['name'])).'",';
79
+			$output .= '"id": "'.trim(str_replace(array('[+]', '[-]'), '', $spotter_item['name'])).'",';
80 80
 			$output .= '"properties": {';
81 81
 			// Not yet supported in CZML with Cesium
82 82
 			$output .= '},';
@@ -114,23 +114,23 @@  discard block
 block discarded – undo
114 114
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubiesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
115 115
 				} elseif ($spotter_item['name'] == 'TERRA') {
116 116
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/terra.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
117
-				} elseif (strpos($spotter_item['name'],'O3B') !== false) {
117
+				} elseif (strpos($spotter_item['name'], 'O3B') !== false) {
118 118
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/o3b.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
119
-				} elseif (strpos($spotter_item['name'],'GLOBALSTAR') !== false) {
119
+				} elseif (strpos($spotter_item['name'], 'GLOBALSTAR') !== false) {
120 120
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/globalstar.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
121
-				} elseif (strpos($spotter_item['name'],'GPS') !== false) {
121
+				} elseif (strpos($spotter_item['name'], 'GPS') !== false) {
122 122
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/gps.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
123
-				} elseif (strpos($spotter_item['name'],'GENESIS') !== false) {
123
+				} elseif (strpos($spotter_item['name'], 'GENESIS') !== false) {
124 124
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/genesis.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
125
-				} elseif (strpos($spotter_item['name'],'OSCAR 7') !== false) {
125
+				} elseif (strpos($spotter_item['name'], 'OSCAR 7') !== false) {
126 126
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/oscar7.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
127
-				} elseif (strpos($spotter_item['name'],'FLOCK') !== false) {
127
+				} elseif (strpos($spotter_item['name'], 'FLOCK') !== false) {
128 128
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
129
-				} elseif (strpos($spotter_item['name'],'PLEIADES') !== false) {
129
+				} elseif (strpos($spotter_item['name'], 'PLEIADES') !== false) {
130 130
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/pleiades.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
131
-				} elseif (strpos($spotter_item['name'],'DUCHIFAT') !== false) {
131
+				} elseif (strpos($spotter_item['name'], 'DUCHIFAT') !== false) {
132 132
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/duchifat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
133
-				} elseif (strpos($spotter_item['name'],'FORMOSAT-2') !== false) {
133
+				} elseif (strpos($spotter_item['name'], 'FORMOSAT-2') !== false) {
134 134
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/formosat2.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
135 135
 				} elseif ($spotter_item['type'] == 'iridium') {
136 136
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/iridium.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
 	//		$output .= '"interpolationDegree" : 5,';
152 152
 	//		$output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", ';
153 153
 			$output .= '"cartographicDegrees": [';
154
-			$output .= '"'.date("c",$spotter_item['timestamp']).'", ';
154
+			$output .= '"'.date("c", $spotter_item['timestamp']).'", ';
155 155
 			$output .= $spotter_item['longitude'].', ';
156 156
 			$output .= $spotter_item['latitude'].', ';
157 157
 			$output .= $spotter_item['altitude']*1000;
158 158
 			$orientation = '"orientation" : { ';
159 159
 			$orientation .= '"unitQuaternion": [';
160 160
 		} else {
161
-			$output .= ',"'.date("c",$spotter_item['timestamp']).'", ';
161
+			$output .= ',"'.date("c", $spotter_item['timestamp']).'", ';
162 162
 			$output .= $spotter_item['longitude'].', ';
163 163
 			$output .= $spotter_item['latitude'].', ';
164 164
 			$output .= $spotter_item['altitude']*1000;
Please login to merge, or discard this patch.
index.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 require_once('require/class.Satellite.php');
6 6
 
7
-$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING);
7
+$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING);
8 8
 if ($trackident != '') {
9 9
 	require_once('require/class.SpotterLive.php');
10 10
 	$SpotterLive = new SpotterLive();
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		$spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident);
15 15
 		header('Location: '.$globalURL.'/flightid/'.$spotterid);
16 16
 	} else {
17
-		setcookie('MapTrack',$resulttrackident[0]['flightaware_id']);
17
+		setcookie('MapTrack', $resulttrackident[0]['flightaware_id']);
18 18
 	}
19 19
 } else {
20 20
 	unset($_COOKIE['MapTrack']);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		        <div class="form-group">
119 119
 			    <label>From (UTC):</label>
120 120
 		            <div class='input-group date' id='datetimepicker1'>
121
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
121
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a", $_COOKIE['archive_begin']); ?>" required />
122 122
 		                <span class="input-group-addon">
123 123
             			    <span class="glyphicon glyphicon-calendar"></span>
124 124
 		                </span>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		        <div class="form-group">
128 128
 			    <label>To (UTC):</label>
129 129
 		            <div class='input-group date' id='datetimepicker2'>
130
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" />
130
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a", $_COOKIE['archive_end']); ?>" />
131 131
             			<span class="input-group-addon">
132 132
 		                    <span class="glyphicon glyphicon-calendar"></span>
133 133
             			</span>
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
 		    <li><?php echo _("Type of Terrain:"); ?>
249 249
 			<select  class="selectpicker" onchange="terrainType(this);">
250 250
 			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
251
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
252
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
251
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option>
252
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option>
253 253
 			</select>
254 254
 		    </li>
255 255
 <?php
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
 			<select class="selectpicker" multiple onchange="airlines(this);">
347 347
 			    <?php
348 348
 				$Spotter = new Spotter();
349
-				foreach($Spotter->getAllAirlineNames() as $airline) {
349
+				foreach ($Spotter->getAllAirlineNames() as $airline) {
350 350
 					$airline_name = $airline['airline_name'];
351
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
352
-					if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) {
351
+					if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...';
352
+					if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['Airlines']))) {
353 353
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
354 354
 					} else {
355 355
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 			<select class="selectpicker" multiple onchange="sources(this);">
366 366
 			    <?php
367 367
 				$Spotter = new Spotter();
368
-				foreach($Spotter->getAllSourceName('aprs') as $source) {
369
-					if (isset($_COOKIE['Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['Sources']))) {
368
+				foreach ($Spotter->getAllSourceName('aprs') as $source) {
369
+					if (isset($_COOKIE['Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['Sources']))) {
370 370
 						echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>';
371 371
 					} else {
372 372
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
452 452
 					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
453 453
 					
454
-					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
454
+					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) {
455 455
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
456 456
 					} else {
457 457
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
Please login to merge, or discard this patch.
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 <div id="showdetails" class="showdetails"></div>
35 35
 <div id="infobox" class="infobox"></div>
36 36
 <?php
37
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
37
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
38 38
 
39 39
 ?>
40 40
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php"></script>
41 41
 <?php
42
-    }
42
+	}
43 43
 ?>
44 44
 <div id="dialog" title="<?php echo _("Session has timed-out"); ?>">
45 45
   <p><?php echo _("In order to save data consumption web page times out after 30 minutes. Close this dialog to continue."); ?></p>
@@ -53,31 +53,31 @@  discard block
 block discarded – undo
53 53
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
54 54
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
55 55
 <?php
56
-    if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) {
56
+	if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) {
57 57
 ?>
58 58
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
59 59
 <?php
60
-    }
60
+	}
61 61
 ?>
62 62
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
63 63
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
64 64
 <?php
65
-    if (isset($globalMap3D) && $globalMap3D) {
65
+	if (isset($globalMap3D) && $globalMap3D) {
66 66
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
67 67
 ?>
68 68
 	<li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
69 69
 <?php
70
-        } else {
71
-    	    if (isset($globalMapSatellites) && $globalMapSatellites) {
70
+		} else {
71
+			if (isset($globalMapSatellites) && $globalMapSatellites) {
72 72
 ?>
73 73
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
74 74
 <?php
75
-	    }
75
+		}
76 76
 ?>
77 77
 	<li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
78 78
 <?php
79 79
 	}
80
-    }
80
+	}
81 81
 ?>
82 82
     </ul>
83 83
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 ?>
110 110
         </div>
111 111
 <?php
112
-    if (isset($globalArchive) && $globalArchive == TRUE) {
112
+	if (isset($globalArchive) && $globalArchive == TRUE) {
113 113
 ?>
114 114
         <div class="sidebar-pane" id="archive">
115 115
 	    <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	    </form>
166 166
 	</div>
167 167
 <?php
168
-    }
168
+	}
169 169
 ?>
170 170
         <div class="sidebar-pane" id="settings">
171 171
 	    <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -176,56 +176,56 @@  discard block
 block discarded – undo
176 176
 			    <?php
177 177
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
178 178
 				else $MapType = $_COOKIE['MapType'];
179
-			    ?>
179
+				?>
180 180
 			    <?php
181 181
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
182
-			    ?>
182
+				?>
183 183
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
184 184
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
185 185
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
186 186
 			    <?php
187 187
 				}
188
-			    ?>
188
+				?>
189 189
 			    <?php
190
-			        if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
191
-			    ?>
190
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
191
+				?>
192 192
 			    <?php
193
-				    if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
194
-			    ?>
193
+					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
194
+				?>
195 195
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
196 196
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
197 197
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
198 198
 			    <?php
199
-				    }
200
-			    ?>
199
+					}
200
+				?>
201 201
 			    <?php
202
-				    if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
203
-			    ?>
202
+					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
203
+				?>
204 204
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
205 205
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
206 206
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
207 207
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
208 208
 			    <?php
209
-				    }
210
-			    ?>
209
+					}
210
+				?>
211 211
 			    <?php
212
-				    if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
213
-			    ?>
212
+					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
213
+				?>
214 214
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
215 215
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
216 216
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
217 217
 			    <?php
218
-				    }
219
-			    ?>
218
+					}
219
+				?>
220 220
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
221 221
 			    <?php
222 222
 				}
223
-			    ?>
223
+				?>
224 224
 			    <?php
225
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
225
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
226 226
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
227 227
 					else $MapBoxId = $_COOKIE['MapTypeId'];
228
-			    ?>
228
+				?>
229 229
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
230 230
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
231 231
 			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
240 240
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
241 241
 			    <?php
242
-				    }
243
-			    ?>
242
+					}
243
+				?>
244 244
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
245 245
 			</select>
246 246
 		    </li>
247 247
 <?php
248
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
248
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
249 249
 ?>
250 250
 		    <li><?php echo _("Type of Terrain:"); ?>
251 251
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 			</select>
256 256
 		    </li>
257 257
 <?php
258
-    }
258
+	}
259 259
 ?>
260 260
 <?php
261
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
261
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
262 262
 ?>
263 263
 		    
264 264
 		    <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>
@@ -266,54 +266,54 @@  discard block
 block discarded – undo
266 266
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
267 267
 		    <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>
268 268
 <?php
269
-    }
269
+	}
270 270
 ?>
271 271
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
272 272
 <?php
273
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
273
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
274 274
 ?>
275 275
 		    <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>
276 276
 <?php
277
-    }
277
+	}
278 278
 ?>
279 279
 
280 280
 		    <?php
281 281
 			if (function_exists('array_column')) {
282
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
283
-		    ?>
282
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
283
+			?>
284 284
 		    <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>
285 285
 		    <?php
286
-			    }
286
+				}
287 287
 			} elseif (isset($globalSources)) {
288
-			    $dispolar = false;
289
-			    foreach ($globalSources as $testsource) {
290
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
291
-			    }
292
-			    if ($dispolar) {
293
-		    ?>
288
+				$dispolar = false;
289
+				foreach ($globalSources as $testsource) {
290
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
291
+				}
292
+				if ($dispolar) {
293
+			?>
294 294
 		    <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>
295 295
 		    <?php
296
-			    }
297
-		        }
298
-		    ?>
296
+				}
297
+				}
298
+			?>
299 299
 <?php
300
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
300
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
301 301
 ?>
302 302
 
303 303
 		    <?php
304
-		        if (extension_loaded('gd') && function_exists('gd_info')) {
305
-		    ?>
304
+				if (extension_loaded('gd') && function_exists('gd_info')) {
305
+			?>
306 306
 		    <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>
307 307
 		    <?php 
308 308
 			if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
309
-		    ?>
309
+			?>
310 310
 		    <li><?php echo _("Aircraft icon color:"); ?>
311 311
 			<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'; ?>">
312 312
 		    </li>
313 313
 		    <?php
314
-			    }
315
-		        }
316
-		    ?>
314
+				}
315
+				}
316
+			?>
317 317
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
318 318
 			<div class="range">
319 319
 			    <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'; ?>">
@@ -321,20 +321,20 @@  discard block
 block discarded – undo
321 321
 			</div>
322 322
 		    </li>
323 323
 <?php
324
-    }
324
+	}
325 325
 ?>
326 326
 		    <?php
327 327
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
328
-		    ?>
328
+			?>
329 329
 			<?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 } ?>
330 330
 			<?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 } ?>
331 331
 			<?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 } ?>
332 332
 		    <?php
333 333
 			}
334
-		    ?>
334
+			?>
335 335
 		    <?php
336 336
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
337
-		    ?>
337
+			?>
338 338
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
339 339
 			    <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>
340 340
 			<?php } ?>
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 			<?php } ?>
344 344
 		    <?php
345 345
 			}
346
-		    ?>
346
+			?>
347 347
 		    <li><?php echo _("Display airlines:"); ?>
348 348
 			<select class="selectpicker" multiple onchange="airlines(this);">
349 349
 			    <?php
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
358 358
 					}
359 359
 				}
360
-			    ?>
360
+				?>
361 361
 			</select>
362 362
 		    </li>
363 363
 		    <?php
364 364
 			if (isset($globalAPRS) && $globalAPRS) {
365
-		    ?>
365
+			?>
366 366
 		    <li><?php echo _("Display APRS sources name:"); ?>
367 367
 			<select class="selectpicker" multiple onchange="sources(this);">
368 368
 			    <?php
@@ -374,15 +374,15 @@  discard block
 block discarded – undo
374 374
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
375 375
 					}
376 376
 				}
377
-			    ?>
377
+				?>
378 378
 			</select>
379 379
 		    </li>
380 380
 		    <?php
381 381
 			}
382
-		    ?>
382
+			?>
383 383
 		    <?php
384 384
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
385
-		    ?>
385
+			?>
386 386
 		    <li><?php echo _("Display airlines of type:"); ?>
387 387
 			<select class="selectpicker" onchange="airlinestype(this);">
388 388
 			    <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 		    </li>
394 394
 		    <?php
395 395
 			}
396
-		    ?>
396
+			?>
397 397
 		    <li><?php echo _("Distance unit:"); ?>
398 398
 			<select class="selectpicker" onchange="unitdistance(this);">
399 399
 			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	    <p><?php echo _("Any change in settings reload page"); ?></p>
420 420
     	</div>
421 421
 <?php
422
-    if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
422
+	if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
423 423
 ?>
424 424
         <div class="sidebar-pane" id="satellites">
425 425
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -459,14 +459,14 @@  discard block
 block discarded – undo
459 459
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
460 460
 					}
461 461
 				}
462
-			    ?>
462
+				?>
463 463
 			</select>
464 464
 		    </li>
465 465
 		</ul>
466 466
 	    </form>
467 467
 	</div>
468 468
 <?php
469
-    }
469
+	}
470 470
 ?>
471 471
     </div>
472 472
 </div>
Please login to merge, or discard this patch.
Braces   +347 added lines, -94 removed lines patch added patch discarded remove patch
@@ -108,11 +108,26 @@  discard block
 block discarded – undo
108 108
 				<li><div class="checkbox"><label><input type="checkbox" name="notam" value="1" onclick="showNotam();" /><?php echo _("NOTAM"); ?></label></div></li>
109 109
 				<li><?php echo _("NOTAM scope:"); ?>
110 110
 					<select class="selectpicker" onchange="notamscope(this);">
111
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
112
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
113
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
114
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
115
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
111
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
112
+	print ' selected';
113
+}
114
+?>>All</option>
115
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
116
+	print ' selected';
117
+}
118
+?>>Airport/Enroute warning</option>
119
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
120
+	print ' selected';
121
+}
122
+?>>Airport warning</option>
123
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
124
+	print ' selected';
125
+}
126
+?>>Navigation warning</option>
127
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
128
+	print ' selected';
129
+}
130
+?>>Enroute warning</option>
116 131
 					</select
117 132
 				</li>
118 133
 <?php
@@ -133,7 +148,10 @@  discard block
 block discarded – undo
133 148
 		        <div class="form-group">
134 149
 			    <label>From (UTC):</label>
135 150
 		            <div class='input-group date' id='datetimepicker1'>
136
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
151
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) {
152
+	print date("d/m/Y h:i a",$_COOKIE['archive_begin']);
153
+}
154
+?>" required />
137 155
 		                <span class="input-group-addon">
138 156
             			    <span class="glyphicon glyphicon-calendar"></span>
139 157
 		                </span>
@@ -142,7 +160,10 @@  discard block
 block discarded – undo
142 160
 		        <div class="form-group">
143 161
 			    <label>To (UTC):</label>
144 162
 		            <div class='input-group date' id='datetimepicker2'>
145
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" />
163
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) {
164
+	print date("d/m/Y h:i a",$_COOKIE['archive_end']);
165
+}
166
+?>" />
146 167
             			<span class="input-group-addon">
147 168
 		                    <span class="glyphicon glyphicon-calendar"></span>
148 169
             			</span>
@@ -165,8 +186,18 @@  discard block
 block discarded – undo
165 186
 
166 187
 		    <li><?php echo _("Playback speed:"); ?>
167 188
 			<div class="range">
168
-			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>">
169
-			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
189
+			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_COOKIE['archive_speed'])) {
190
+	print $_COOKIE['archive_speed'];
191
+} else {
192
+	print '1';
193
+}
194
+?>">
195
+			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
196
+	print $_COOKIE['archive_speed'];
197
+} else {
198
+	print '1';
199
+}
200
+?></output>
170 201
 			</div>
171 202
 		    </li>
172 203
 
@@ -187,15 +218,27 @@  discard block
 block discarded – undo
187 218
 		    <li><?php echo _("Type of Map:"); ?>
188 219
 			<select  class="selectpicker" onchange="mapType(this);">
189 220
 			    <?php
190
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
191
-				else $MapType = $_COOKIE['MapType'];
221
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
222
+					$MapType = $globalMapProvider;
223
+				} else {
224
+					$MapType = $_COOKIE['MapType'];
225
+				}
192 226
 			    ?>
193 227
 			    <?php
194 228
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
195 229
 			    ?>
196
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
197
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
198
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
230
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
231
+	print ' selected';
232
+}
233
+?>>Bing-Aerial</option>
234
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
235
+	print ' selected';
236
+}
237
+?>>Bing-Hybrid</option>
238
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
239
+	print ' selected';
240
+}
241
+?>>Bing-Road</option>
199 242
 			    <?php
200 243
 				}
201 244
 			    ?>
@@ -205,56 +248,131 @@  discard block
 block discarded – undo
205 248
 			    <?php
206 249
 				    if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
207 250
 			    ?>
208
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
209
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
210
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
251
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
252
+	print ' selected';
253
+}
254
+?>>Here-Aerial</option>
255
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
256
+	print ' selected';
257
+}
258
+?>>Here-Hybrid</option>
259
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
260
+	print ' selected';
261
+}
262
+?>>Here-Road</option>
211 263
 			    <?php
212 264
 				    }
213 265
 			    ?>
214 266
 			    <?php
215 267
 				    if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
216 268
 			    ?>
217
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
218
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
219
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
220
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
269
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
270
+	print ' selected';
271
+}
272
+?>>Google Roadmap</option>
273
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
274
+	print ' selected';
275
+}
276
+?>>Google Satellite</option>
277
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
278
+	print ' selected';
279
+}
280
+?>>Google Hybrid</option>
281
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
282
+	print ' selected';
283
+}
284
+?>>Google Terrain</option>
221 285
 			    <?php
222 286
 				    }
223 287
 			    ?>
224 288
 			    <?php
225 289
 				    if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
226 290
 			    ?>
227
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
228
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
229
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
291
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
292
+	print ' selected';
293
+}
294
+?>>MapQuest-OSM</option>
295
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
296
+	print ' selected';
297
+}
298
+?>>MapQuest-Aerial</option>
299
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
300
+	print ' selected';
301
+}
302
+?>>MapQuest-Hybrid</option>
230 303
 			    <?php
231 304
 				    }
232 305
 			    ?>
233
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
306
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
307
+	print ' selected';
308
+}
309
+?>>Yandex</option>
234 310
 			    <?php
235 311
 				}
236 312
 			    ?>
237 313
 			    <?php
238 314
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
239
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
240
-					else $MapBoxId = $_COOKIE['MapTypeId'];
315
+					if (!isset($_COOKIE['MapTypeId'])) {
316
+						$MapBoxId = 'default';
317
+					} else {
318
+						$MapBoxId = $_COOKIE['MapTypeId'];
319
+					}
241 320
 			    ?>
242
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
243
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
244
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
245
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
246
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
247
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
248
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
249
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
250
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
251
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
252
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
253
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
321
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
322
+	print ' selected';
323
+}
324
+?>>Mapbox default</option>
325
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
326
+	print ' selected';
327
+}
328
+?>>Mapbox streets</option>
329
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
330
+	print ' selected';
331
+}
332
+?>>Mapbox light</option>
333
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
334
+	print ' selected';
335
+}
336
+?>>Mapbox dark</option>
337
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
338
+	print ' selected';
339
+}
340
+?>>Mapbox satellite</option>
341
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
342
+	print ' selected';
343
+}
344
+?>>Mapbox streets-satellite</option>
345
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
346
+	print ' selected';
347
+}
348
+?>>Mapbox streets-basic</option>
349
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
350
+	print ' selected';
351
+}
352
+?>>Mapbox comic</option>
353
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
354
+	print ' selected';
355
+}
356
+?>>Mapbox outdoors</option>
357
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
358
+	print ' selected';
359
+}
360
+?>>Mapbox pencil</option>
361
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
362
+	print ' selected';
363
+}
364
+?>>Mapbox pirates</option>
365
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
366
+	print ' selected';
367
+}
368
+?>>Mapbox emerald</option>
254 369
 			    <?php
255 370
 				    }
256 371
 			    ?>
257
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
372
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
373
+	print ' selected';
374
+}
375
+?>>OpenStreetMap</option>
258 376
 			</select>
259 377
 		    </li>
260 378
 <?php
@@ -262,9 +380,18 @@  discard block
 block discarded – undo
262 380
 ?>
263 381
 		    <li><?php echo _("Type of Terrain:"); ?>
264 382
 			<select  class="selectpicker" onchange="terrainType(this);">
265
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
266
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
267
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
383
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
384
+	print ' selected';
385
+}
386
+?>>stk terrain</option>
387
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
388
+	print ' selected';
389
+}
390
+?>>ellipsoid</option>
391
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
392
+	print ' selected';
393
+}
394
+?>>vr terrain</option>
268 395
 			</select>
269 396
 		    </li>
270 397
 <?php
@@ -274,18 +401,36 @@  discard block
 block discarded – undo
274 401
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
275 402
 ?>
276 403
 		    
277
-		    <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>
278
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li>
279
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
280
-		    <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>
404
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
405
+	print 'checked';
406
+}
407
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>
408
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) {
409
+	print 'checked';
410
+}
411
+?> ><?php echo _("Display flight path"); ?></label></div></li>
412
+		    <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'])) {
413
+	print 'checked';
414
+}
415
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
416
+		    <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)) {
417
+	print 'checked';
418
+}
419
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
281 420
 <?php
282 421
     }
283 422
 ?>
284
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
423
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') {
424
+	print 'checked';
425
+}
426
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
285 427
 <?php
286 428
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
287 429
 ?>
288
-		    <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>
430
+		    <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')) {
431
+	print 'checked';
432
+}
433
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
289 434
 <?php
290 435
     }
291 436
 ?>
@@ -294,17 +439,25 @@  discard block
 block discarded – undo
294 439
 			if (function_exists('array_column')) {
295 440
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
296 441
 		    ?>
297
-		    <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>
442
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
443
+	print 'checked';
444
+}
445
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
298 446
 		    <?php
299 447
 			    }
300 448
 			} elseif (isset($globalSources)) {
301 449
 			    $dispolar = false;
302 450
 			    foreach ($globalSources as $testsource) {
303
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
451
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
452
+			        	$dispolar = true;
453
+			        }
304 454
 			    }
305 455
 			    if ($dispolar) {
306 456
 		    ?>
307
-		    <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>
457
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
458
+	print 'checked';
459
+}
460
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
308 461
 		    <?php
309 462
 			    }
310 463
 		        }
@@ -316,12 +469,22 @@  discard block
 block discarded – undo
316 469
 		    <?php
317 470
 		        if (extension_loaded('gd') && function_exists('gd_info')) {
318 471
 		    ?>
319
-		    <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>
472
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
473
+	print 'checked';
474
+}
475
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
320 476
 		    <?php 
321 477
 			if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
322 478
 		    ?>
323 479
 		    <li><?php echo _("Aircraft icon color:"); ?>
324
-			<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'; ?>">
480
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
481
+	print $_COOKIE['IconColor'];
482
+} elseif (isset($globalAircraftIconColor)) {
483
+	print $globalAircraftIconColor;
484
+} else {
485
+	print '1a3151';
486
+}
487
+?>">
325 488
 		    </li>
326 489
 		    <?php
327 490
 			    }
@@ -329,8 +492,22 @@  discard block
 block discarded – undo
329 492
 		    ?>
330 493
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
331 494
 			<div class="range">
332
-			    <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'; ?>">
333
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
495
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
496
+	print $_COOKIE['AirportZoom'];
497
+} elseif (isset($globalAirportZoom)) {
498
+	print $globalAirportZoom;
499
+} else {
500
+	print '7';
501
+}
502
+?>">
503
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
504
+	print $_COOKIE['AirportZoom'];
505
+} elseif (isset($globalAirportZoom)) {
506
+	print $globalAirportZoom;
507
+} else {
508
+	print '7';
509
+}
510
+?></output>
334 511
 			</div>
335 512
 		    </li>
336 513
 <?php
@@ -339,9 +516,18 @@  discard block
 block discarded – undo
339 516
 		    <?php
340 517
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
341 518
 		    ?>
342
-			<?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 } ?>
343
-			<?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 } ?>
344
-			<?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 } ?>
519
+			<?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'])) {
520
+	print 'checked';
521
+}
522
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
523
+			<?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'])) {
524
+	print 'checked';
525
+}
526
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
527
+			<?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'])) {
528
+	print 'checked';
529
+}
530
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
345 531
 		    <?php
346 532
 			}
347 533
 		    ?>
@@ -349,10 +535,16 @@  discard block
 block discarded – undo
349 535
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
350 536
 		    ?>
351 537
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
352
-			    <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>
538
+			    <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'])) {
539
+	print 'checked';
540
+}
541
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
353 542
 			<?php } ?>
354 543
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
355
-			    <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>
544
+			    <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'])) {
545
+	print 'checked';
546
+}
547
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
356 548
 			<?php } ?>
357 549
 		    <?php
358 550
 			}
@@ -363,7 +555,9 @@  discard block
 block discarded – undo
363 555
 				$Spotter = new Spotter();
364 556
 				foreach($Spotter->getAllAirlineNames() as $airline) {
365 557
 					$airline_name = $airline['airline_name'];
366
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
558
+					if (strlen($airline_name) > 30) {
559
+						$airline_name = substr($airline_name,0,30).'...';
560
+					}
367 561
 					if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) {
368 562
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
369 563
 					} else {
@@ -398,10 +592,22 @@  discard block
 block discarded – undo
398 592
 		    ?>
399 593
 		    <li><?php echo _("Display airlines of type:"); ?>
400 594
 			<select class="selectpicker" onchange="airlinestype(this);">
401
-			    <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
402
-			    <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
403
-			    <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
404
-			    <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
595
+			    <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') {
596
+	echo ' selected';
597
+}
598
+?>><?php echo _("All"); ?></option>
599
+			    <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') {
600
+	echo ' selected';
601
+}
602
+?>><?php echo _("Passenger"); ?></option>
603
+			    <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') {
604
+	echo ' selected';
605
+}
606
+?>><?php echo _("Cargo"); ?></option>
607
+			    <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') {
608
+	echo ' selected';
609
+}
610
+?>><?php echo _("Military"); ?></option>
405 611
 			</select>
406 612
 		    </li>
407 613
 		    <?php
@@ -409,22 +615,46 @@  discard block
 block discarded – undo
409 615
 		    ?>
410 616
 		    <li><?php echo _("Distance unit:"); ?>
411 617
 			<select class="selectpicker" onchange="unitdistance(this);">
412
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
413
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
414
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
618
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
619
+	echo ' selected';
620
+}
621
+?>>km</option>
622
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
623
+	echo ' selected';
624
+}
625
+?>>nm</option>
626
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
627
+	echo ' selected';
628
+}
629
+?>>mi</option>
415 630
 		        </select>
416 631
 		    </li>
417 632
 		    <li><?php echo _("Altitude unit:"); ?>
418 633
 			<select class="selectpicker" onchange="unitaltitude(this);">
419
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
420
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
634
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
635
+	echo ' selected';
636
+}
637
+?>>m</option>
638
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
639
+	echo ' selected';
640
+}
641
+?>>feet</option>
421 642
 		        </select>
422 643
 		    </li>
423 644
 		    <li><?php echo _("Speed unit:"); ?>
424 645
 			<select class="selectpicker" onchange="unitspeed(this);">
425
-			    <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>
426
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
427
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
646
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
647
+	echo ' selected';
648
+}
649
+?>>km/h</option>
650
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
651
+	echo ' selected';
652
+}
653
+?>>mph</option>
654
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
655
+	echo ' selected';
656
+}
657
+?>>knots</option>
428 658
 		        </select>
429 659
 		    </li>
430 660
 		</ul>
@@ -438,7 +668,10 @@  discard block
 block discarded – undo
438 668
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
439 669
 	    <form>
440 670
 		<ul>
441
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
671
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') {
672
+	print 'checked';
673
+}
674
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
442 675
 		    <li><?php echo _("Type:"); ?>
443 676
 			<select class="selectpicker" multiple onchange="sattypes(this);">
444 677
 			    <?php
@@ -446,25 +679,45 @@  discard block
 block discarded – undo
446 679
 				$types = $Satellite->get_tle_types();
447 680
 				foreach ($types as $type) {
448 681
 					$type_name = $type['tle_type'];
449
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
450
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
451
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
452
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
453
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
454
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
455
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
456
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
457
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
458
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
459
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
460
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
461
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
462
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
463
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
464
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
465
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
466
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
467
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
682
+					if ($type_name == 'musson') {
683
+						$type_name = 'Russian LEO Navigation';
684
+					} else if ($type_name == 'nnss') {
685
+						$type_name = 'Navi Navigation Satellite System';
686
+					} else if ($type_name == 'sbas') {
687
+						$type_name = 'Satellite-Based Augmentation System';
688
+					} else if ($type_name == 'glo-ops') {
689
+						$type_name = 'Glonass Operational';
690
+					} else if ($type_name == 'gps-ops') {
691
+						$type_name = 'GPS Operational';
692
+					} else if ($type_name == 'argos') {
693
+						$type_name = 'ARGOS Data Collection System';
694
+					} else if ($type_name == 'tdrss') {
695
+						$type_name = 'Tracking and Data Relay Satellite System';
696
+					} else if ($type_name == 'sarsat') {
697
+						$type_name = 'Search & Rescue';
698
+					} else if ($type_name == 'dmc') {
699
+						$type_name = 'Disaster Monitoring';
700
+					} else if ($type_name == 'resource') {
701
+						$type_name = 'Earth Resources';
702
+					} else if ($type_name == 'stations') {
703
+						$type_name = 'Space Stations';
704
+					} else if ($type_name == 'geo') {
705
+						$type_name = 'Geostationary';
706
+					} else if ($type_name == 'amateur') {
707
+						$type_name = 'Amateur Radio';
708
+					} else if ($type_name == 'x-comm') {
709
+						$type_name = 'Experimental';
710
+					} else if ($type_name == 'other-comm') {
711
+						$type_name = 'Other Comm';
712
+					} else if ($type_name == 'science') {
713
+						$type_name = 'Space & Earth Science';
714
+					} else if ($type_name == 'military') {
715
+						$type_name = 'Miscellaneous Military';
716
+					} else if ($type_name == 'radar') {
717
+						$type_name = 'Radar Calibration';
718
+					} else if ($type_name == 'tle-new') {
719
+						$type_name = 'Last 30 days launches';
720
+					}
468 721
 					
469 722
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
470 723
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.