Completed
Push — master ( 2ab225...cf2b25 )
by Yannick
08:54 queued 42s
created
search-php.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7
-        //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
-                $start_date = $_GET['start_date'].":00";
10
-                $end_date = $_GET['end_date'].":00";
11
-                $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
13
-                $start_date = $_GET['start_date'].":00";
14
-                $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
-                $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
-                $sql_date = $end_date;
18
-        } else $sql_date = '';
7
+		//for the date manipulation into the query
8
+		if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
+				$start_date = $_GET['start_date'].":00";
10
+				$end_date = $_GET['end_date'].":00";
11
+				$sql_date = $start_date.",".$end_date;
12
+		} else if($_GET['start_date'] != ""){
13
+				$start_date = $_GET['start_date'].":00";
14
+				$sql_date = $start_date;
15
+		} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
+				$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
+				$sql_date = $end_date;
18
+		} else $sql_date = '';
19 19
 } else $sql_date = '';
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22
-        //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
-                $end_altitude = $_GET['highest_altitude'];
25
-                $start_altitude = $_GET['lowest_altitude'];
26
-                $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
28
-                $end_altitude = $_GET['highest_altitude'];
29
-                $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
-                $start_altitude = $_GET['lowest_altitude'].",60000";
32
-                $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
22
+		//for altitude manipulation
23
+		if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
+				$end_altitude = $_GET['highest_altitude'];
25
+				$start_altitude = $_GET['lowest_altitude'];
26
+				$sql_altitude = $start_altitude.",".$end_altitude;
27
+		} else if($_GET['highest_altitude'] != ""){
28
+				$end_altitude = $_GET['highest_altitude'];
29
+				$sql_altitude = $end_altitude;
30
+		} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
+				$start_altitude = $_GET['lowest_altitude'].",60000";
32
+				$sql_altitude = $start_altitude;
33
+		} else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37 37
 if(!isset($_GET['limit']))
38 38
 {
39
-        if (!isset($_GET['number_results']))
40
-        {
41
-                $limit_start = 0;
42
-                $limit_end = 25;
43
-                $absolute_difference = 25;
44
-        } else {
45
-                if ($_GET['number_results'] > 1000){
46
-                        $_GET['number_results'] = 1000;
47
-                }
48
-                $limit_start = 0;
49
-                $limit_end = $_GET['number_results'];
50
-                $absolute_difference = $_GET['number_results'];
51
-        }
39
+		if (!isset($_GET['number_results']))
40
+		{
41
+				$limit_start = 0;
42
+				$limit_end = 25;
43
+				$absolute_difference = 25;
44
+		} else {
45
+				if ($_GET['number_results'] > 1000){
46
+						$_GET['number_results'] = 1000;
47
+				}
48
+				$limit_start = 0;
49
+				$limit_end = $_GET['number_results'];
50
+				$absolute_difference = $_GET['number_results'];
51
+		}
52 52
 }  else {
53
-        $limit_explode = explode(",", $_GET['limit']);
54
-        $limit_start = $limit_explode[0];
55
-        $limit_end = $limit_explode[1];
53
+		$limit_explode = explode(",", $_GET['limit']);
54
+		$limit_start = $limit_explode[0];
55
+		$limit_end = $limit_explode[1];
56 56
 }
57 57
 
58 58
 $absolute_difference = abs($limit_start - $limit_end);
@@ -95,39 +95,39 @@  discard block
 block discarded – undo
95 95
   {
96 96
 	  
97 97
 	array_push($flights, array(
98
-                            "id" => $spotter_item['spotter_id'], 
98
+							"id" => $spotter_item['spotter_id'], 
99 99
 							"ident" => $spotter_item['ident'], 
100 100
 							"registration" => $spotter_item['registration'], 
101 101
 							"aircraft_icao" => $spotter_item['aircraft_type'], 
102
-                            "aircraft_name" => $spotter_item['aircraft_name'], 
103
-                            "aircraft_manufacturer" => $spotter_item['aircraft_manufacturer'],
102
+							"aircraft_name" => $spotter_item['aircraft_name'], 
103
+							"aircraft_manufacturer" => $spotter_item['aircraft_manufacturer'],
104 104
 							"airline_name" => $spotter_item['airline_name'], 
105
-                            "airline_icao" => $spotter_item['airline_icao'], 
106
-                            "airline_iata" => $spotter_item['airline_iata'], 
107
-                            "airline_country" => $spotter_item['airline_country'], 
108
-                            "airline_callsign" => $spotter_item['airline_callsign'], 
109
-                            "airline_type" => $spotter_item['airline_type'],
110
-                            "departure_airport_city" => $spotter_item['departure_airport_city'], 
111
-                            "departure_airport_country" => $spotter_item['departure_airport_country'], 
112
-                            "departure_airport_iata" => $spotter_item['departure_airport_iata'], 
113
-                            "departure_airport_icao" => $spotter_item['departure_airport_icao'], 
114
-                            "departure_airport_latitude" => $spotter_item['departure_airport_latitude'], 
115
-                            "departure_airport_longitude" => $spotter_item['departure_airport_longitude'], 
116
-                            "departure_airport_altitude" => $spotter_item['departure_airport_altitude'], 
117
-                            "arrival_airport_city" => $spotter_item['arrival_airport_city'], 
118
-                            "arrival_airport_country" => $spotter_item['arrival_airport_country'], 
119
-                            "arrival_airport_iata" => $spotter_item['arrival_airport_iata'], 
120
-                            "arrival_airport_icao" => $spotter_item['arrival_airport_icao'], 
121
-                            "arrival_airport_latitude" => $spotter_item['arrival_airport_latitude'], 
122
-                            "arrival_airport_longitude" => $spotter_item['arrival_airport_longitude'], 
123
-                            "arrival_airport_altitude" => $spotter_item['arrival_airport_altitude'],
124
-                            "latitude" => $spotter_item['latitude'], 
125
-                            "longitude" => $spotter_item['longitude'], 
126
-                            "altitude" => $spotter_item['altitude'], 
127
-                            "ground_speed" => $spotter_item['ground_speed'], 
128
-                            "heading" => $spotter_item['heading'], 
129
-                            "heading_name" => $spotter_item['heading_name'], 
130
-                            "waypoints" => $spotter_item['waypoints'],
105
+							"airline_icao" => $spotter_item['airline_icao'], 
106
+							"airline_iata" => $spotter_item['airline_iata'], 
107
+							"airline_country" => $spotter_item['airline_country'], 
108
+							"airline_callsign" => $spotter_item['airline_callsign'], 
109
+							"airline_type" => $spotter_item['airline_type'],
110
+							"departure_airport_city" => $spotter_item['departure_airport_city'], 
111
+							"departure_airport_country" => $spotter_item['departure_airport_country'], 
112
+							"departure_airport_iata" => $spotter_item['departure_airport_iata'], 
113
+							"departure_airport_icao" => $spotter_item['departure_airport_icao'], 
114
+							"departure_airport_latitude" => $spotter_item['departure_airport_latitude'], 
115
+							"departure_airport_longitude" => $spotter_item['departure_airport_longitude'], 
116
+							"departure_airport_altitude" => $spotter_item['departure_airport_altitude'], 
117
+							"arrival_airport_city" => $spotter_item['arrival_airport_city'], 
118
+							"arrival_airport_country" => $spotter_item['arrival_airport_country'], 
119
+							"arrival_airport_iata" => $spotter_item['arrival_airport_iata'], 
120
+							"arrival_airport_icao" => $spotter_item['arrival_airport_icao'], 
121
+							"arrival_airport_latitude" => $spotter_item['arrival_airport_latitude'], 
122
+							"arrival_airport_longitude" => $spotter_item['arrival_airport_longitude'], 
123
+							"arrival_airport_altitude" => $spotter_item['arrival_airport_altitude'],
124
+							"latitude" => $spotter_item['latitude'], 
125
+							"longitude" => $spotter_item['longitude'], 
126
+							"altitude" => $spotter_item['altitude'], 
127
+							"ground_speed" => $spotter_item['ground_speed'], 
128
+							"heading" => $spotter_item['heading'], 
129
+							"heading_name" => $spotter_item['heading_name'], 
130
+							"waypoints" => $spotter_item['waypoints'],
131 131
 							"date" => date("c", strtotime($spotter_item['date_iso_8601']))
132 132
 						)
133 133
 			); 	
Please login to merge, or discard this patch.
aircraft-statistics-airline.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 
6 6
 if (!isset($_GET['aircraft_type'])) {
7
-        header('Location: '.$globalURL.'/aircraft');
8
-        die();
7
+		header('Location: '.$globalURL.'/aircraft');
8
+		die();
9 9
 }
10 10
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
search-yaml.php 1 patch
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7
-        //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
-                $start_date = $_GET['start_date'].":00";
10
-                $end_date = $_GET['end_date'].":00";
11
-                $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
13
-                $start_date = $_GET['start_date'].":00";
14
-                $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
-                $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
-                $sql_date = $end_date;
18
-        } else $sql_date = '';
7
+		//for the date manipulation into the query
8
+		if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
+				$start_date = $_GET['start_date'].":00";
10
+				$end_date = $_GET['end_date'].":00";
11
+				$sql_date = $start_date.",".$end_date;
12
+		} else if($_GET['start_date'] != ""){
13
+				$start_date = $_GET['start_date'].":00";
14
+				$sql_date = $start_date;
15
+		} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
+				$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
+				$sql_date = $end_date;
18
+		} else $sql_date = '';
19 19
 } else $sql_date = '';
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22
-        //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
-                $end_altitude = $_GET['highest_altitude'];
25
-                $start_altitude = $_GET['lowest_altitude'];
26
-                $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
28
-                $end_altitude = $_GET['highest_altitude'];
29
-                $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
-                $start_altitude = $_GET['lowest_altitude'].",60000";
32
-                $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
22
+		//for altitude manipulation
23
+		if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
+				$end_altitude = $_GET['highest_altitude'];
25
+				$start_altitude = $_GET['lowest_altitude'];
26
+				$sql_altitude = $start_altitude.",".$end_altitude;
27
+		} else if($_GET['highest_altitude'] != ""){
28
+				$end_altitude = $_GET['highest_altitude'];
29
+				$sql_altitude = $end_altitude;
30
+		} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
+				$start_altitude = $_GET['lowest_altitude'].",60000";
32
+				$sql_altitude = $start_altitude;
33
+		} else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37 37
 if(!isset($_GET['limit']))
38 38
 {
39
-        if (!isset($_GET['number_results']))
40
-        {
41
-                $limit_start = 0;
42
-                $limit_end = 25;
43
-                $absolute_difference = 25;
44
-        } else {
45
-                if ($_GET['number_results'] > 1000){
46
-                        $_GET['number_results'] = 1000;
47
-                }
48
-                $limit_start = 0;
49
-                $limit_end = $_GET['number_results'];
50
-                $absolute_difference = $_GET['number_results'];
51
-        }
39
+		if (!isset($_GET['number_results']))
40
+		{
41
+				$limit_start = 0;
42
+				$limit_end = 25;
43
+				$absolute_difference = 25;
44
+		} else {
45
+				if ($_GET['number_results'] > 1000){
46
+						$_GET['number_results'] = 1000;
47
+				}
48
+				$limit_start = 0;
49
+				$limit_end = $_GET['number_results'];
50
+				$absolute_difference = $_GET['number_results'];
51
+		}
52 52
 }  else {
53
-        $limit_explode = explode(",", $_GET['limit']);
54
-        $limit_start = $limit_explode[0];
55
-        $limit_end = $limit_explode[1];
53
+		$limit_explode = explode(",", $_GET['limit']);
54
+		$limit_start = $limit_explode[0];
55
+		$limit_end = $limit_explode[1];
56 56
 }
57 57
 
58 58
 $absolute_difference = abs($limit_start - $limit_end);
@@ -94,70 +94,70 @@  discard block
 block discarded – undo
94 94
   foreach($spotter_array as $spotter_item)
95 95
   {
96 96
 	   	
97
-    $output .= ' - id: '.$spotter_item['spotter_id'];
98
-    $output .= "\n";
99
-    $output .= ' - ident: '.$spotter_item['ident'];
100
-    $output .= "\n";
101
-    $output .= ' - registration: '.$spotter_item['registration'];
102
-    $output .= "\n";
103
-    $output .= ' - aircraft_icao: '.$spotter_item['aircraft_type'];
104
-    $output .= "\n";
105
-    $output .= ' - aircraft_name: '.$spotter_item['aircraft_name'];
106
-    $output .= "\n";
107
-    $output .= ' - aircraft_manufacturer: '.$spotter_item['aircraft_manufacturer'];
108
-    $output .= "\n";
109
-    $output .= ' - airline_name: '.$spotter_item['airline_name'];
110
-    $output .= "\n";
111
-    $output .= ' - airline_icao: '.$spotter_item['airline_icao'];
112
-    $output .= "\n";
113
-    $output .= ' - airline_iata: '.$spotter_item['airline_iata'];
114
-    $output .= "\n";
115
-    $output .= ' - airline_country: '.$spotter_item['airline_country'];
116
-    $output .= "\n";
117
-    $output .= ' - airline_callsign: '.$spotter_item['airline_callsign'];
118
-    $output .= "\n";
119
-    $output .= ' - airline_type: '.$spotter_item['airline_type'];
120
-    $output .= "\n";
121
-    $output .= ' - departure_airport_city: '.$spotter_item['departure_airport_city'];
122
-    $output .= "\n";
123
-    $output .= ' - departure_airport_country: '.$spotter_item['departure_airport_country'];
124
-    $output .= "\n";
125
-    $output .= ' - departure_airport_iata: '.$spotter_item['departure_airport_iata'];
126
-    $output .= "\n";
127
-    $output .= ' - departure_airport_icao: '.$spotter_item['departure_airport_icao'];
128
-    $output .= "\n";
129
-    $output .= ' - departure_airport_latitude: '.$spotter_item['departure_airport_latitude'];
130
-    $output .= "\n";
131
-    $output .= ' - departure_airport_altitude: '.$spotter_item['departure_airport_altitude'];
132
-    $output .= "\n";
133
-    $output .= ' - arrival_airport_city: '.$spotter_item['arrival_airport_city'];
134
-    $output .= "\n";
135
-    $output .= ' - arrival_airport_country: '.$spotter_item['arrival_airport_country'];
136
-    $output .= "\n";
137
-    $output .= ' - arrival_airport_iata: '.$spotter_item['arrival_airport_iata'];
138
-    $output .= "\n";
139
-    $output .= ' - arrival_airport_icao: '.$spotter_item['arrival_airport_icao'];
140
-    $output .= "\n";
141
-    $output .= ' - arrival_airport_latitude: '.$spotter_item['arrival_airport_latitude'];
142
-    $output .= "\n";
143
-    $output .= ' - arrival_airport_altitude: '.$spotter_item['arrival_airport_altitude'];
144
-    $output .= "\n";    
145
-    $output .= ' - latitude: '.$spotter_item['latitude'];
146
-    $output .= "\n";
147
-    $output .= ' - longitude: '.$spotter_item['longitude'];
148
-    $output .= "\n";
149
-    $output .= ' - altitude: '.$spotter_item['altitude'];
150
-    $output .= "\n";
151
-    $output .= ' - ground_speed: '.$spotter_item['ground_speed'];
152
-    $output .= "\n";
153
-    $output .= ' - heading: '.$spotter_item['heading'];
154
-    $output .= "\n";
155
-    $output .= ' - heading_name: '.$spotter_item['heading_name'];
156
-    $output .= "\n";
157
-    $output .= ' - waypoints: '.$spotter_item['waypoints'];
158
-    $output .= "\n";
159
-    $output .= ' - date: '.date("c", strtotime($spotter_item['date_iso_8601']));
160
-    $output .= "\n\n";
97
+	$output .= ' - id: '.$spotter_item['spotter_id'];
98
+	$output .= "\n";
99
+	$output .= ' - ident: '.$spotter_item['ident'];
100
+	$output .= "\n";
101
+	$output .= ' - registration: '.$spotter_item['registration'];
102
+	$output .= "\n";
103
+	$output .= ' - aircraft_icao: '.$spotter_item['aircraft_type'];
104
+	$output .= "\n";
105
+	$output .= ' - aircraft_name: '.$spotter_item['aircraft_name'];
106
+	$output .= "\n";
107
+	$output .= ' - aircraft_manufacturer: '.$spotter_item['aircraft_manufacturer'];
108
+	$output .= "\n";
109
+	$output .= ' - airline_name: '.$spotter_item['airline_name'];
110
+	$output .= "\n";
111
+	$output .= ' - airline_icao: '.$spotter_item['airline_icao'];
112
+	$output .= "\n";
113
+	$output .= ' - airline_iata: '.$spotter_item['airline_iata'];
114
+	$output .= "\n";
115
+	$output .= ' - airline_country: '.$spotter_item['airline_country'];
116
+	$output .= "\n";
117
+	$output .= ' - airline_callsign: '.$spotter_item['airline_callsign'];
118
+	$output .= "\n";
119
+	$output .= ' - airline_type: '.$spotter_item['airline_type'];
120
+	$output .= "\n";
121
+	$output .= ' - departure_airport_city: '.$spotter_item['departure_airport_city'];
122
+	$output .= "\n";
123
+	$output .= ' - departure_airport_country: '.$spotter_item['departure_airport_country'];
124
+	$output .= "\n";
125
+	$output .= ' - departure_airport_iata: '.$spotter_item['departure_airport_iata'];
126
+	$output .= "\n";
127
+	$output .= ' - departure_airport_icao: '.$spotter_item['departure_airport_icao'];
128
+	$output .= "\n";
129
+	$output .= ' - departure_airport_latitude: '.$spotter_item['departure_airport_latitude'];
130
+	$output .= "\n";
131
+	$output .= ' - departure_airport_altitude: '.$spotter_item['departure_airport_altitude'];
132
+	$output .= "\n";
133
+	$output .= ' - arrival_airport_city: '.$spotter_item['arrival_airport_city'];
134
+	$output .= "\n";
135
+	$output .= ' - arrival_airport_country: '.$spotter_item['arrival_airport_country'];
136
+	$output .= "\n";
137
+	$output .= ' - arrival_airport_iata: '.$spotter_item['arrival_airport_iata'];
138
+	$output .= "\n";
139
+	$output .= ' - arrival_airport_icao: '.$spotter_item['arrival_airport_icao'];
140
+	$output .= "\n";
141
+	$output .= ' - arrival_airport_latitude: '.$spotter_item['arrival_airport_latitude'];
142
+	$output .= "\n";
143
+	$output .= ' - arrival_airport_altitude: '.$spotter_item['arrival_airport_altitude'];
144
+	$output .= "\n";    
145
+	$output .= ' - latitude: '.$spotter_item['latitude'];
146
+	$output .= "\n";
147
+	$output .= ' - longitude: '.$spotter_item['longitude'];
148
+	$output .= "\n";
149
+	$output .= ' - altitude: '.$spotter_item['altitude'];
150
+	$output .= "\n";
151
+	$output .= ' - ground_speed: '.$spotter_item['ground_speed'];
152
+	$output .= "\n";
153
+	$output .= ' - heading: '.$spotter_item['heading'];
154
+	$output .= "\n";
155
+	$output .= ' - heading_name: '.$spotter_item['heading_name'];
156
+	$output .= "\n";
157
+	$output .= ' - waypoints: '.$spotter_item['waypoints'];
158
+	$output .= "\n";
159
+	$output .= ' - date: '.date("c", strtotime($spotter_item['date_iso_8601']));
160
+	$output .= "\n\n";
161 161
   }
162 162
  }
163 163
 
Please login to merge, or discard this patch.
ident-statistics-registration.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
sitemap.php 1 patch
Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 		foreach($spotter_array as $spotter_item)
16 16
 		{
17 17
 			$output .= '<url>';
18
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>';
19
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
20
-			    $output .= '<changefreq>weekly</changefreq>';
18
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>';
19
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
20
+				$output .= '<changefreq>weekly</changefreq>';
21 21
 			$output .= '</url>';
22 22
 		}
23 23
 	$output .= '</urlset>';
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 		foreach($aircraft_types as $aircraft_item)
33 33
 		{
34 34
 			$output .= '<url>';
35
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'</loc>';
36
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
37
-			    $output .= '<changefreq>daily</changefreq>';
35
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'</loc>';
36
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
37
+				$output .= '<changefreq>daily</changefreq>';
38 38
 			$output .= '</url>';
39 39
 		}
40 40
 	$output .= '</urlset>';
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 		foreach($aircraft_registrations as $aircraft_item)
50 50
 		{
51 51
 			$output .= '<url>';
52
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.$aircraft_item['registration'].'</loc>';
53
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
54
-			    $output .= '<changefreq>daily</changefreq>';
52
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.$aircraft_item['registration'].'</loc>';
53
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
54
+				$output .= '<changefreq>daily</changefreq>';
55 55
 			$output .= '</url>';
56 56
 		}
57 57
 	$output .= '</urlset>';
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 		foreach($airline_names as $airline_item)
66 66
 		{
67 67
 			$output .= '<url>';
68
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.$airline_item['airline_icao'].'</loc>';
69
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
70
-			    $output .= '<changefreq>daily</changefreq>';
68
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.$airline_item['airline_icao'].'</loc>';
69
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
70
+				$output .= '<changefreq>daily</changefreq>';
71 71
 			$output .= '</url>';
72 72
 		}
73 73
 	$output .= '</urlset>';
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 		foreach($airport_names as $airport_item)
82 82
 		{
83 83
 			$output .= '<url>';
84
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>';
85
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
86
-			    $output .= '<changefreq>daily</changefreq>';
84
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>';
85
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
86
+				$output .= '<changefreq>daily</changefreq>';
87 87
 			$output .= '</url>';
88 88
 		}
89 89
 	$output .= '</urlset>';
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 		foreach($manufacturer_names as $manufacturer_item)
98 98
 		{
99 99
 			$output .= '<url>';
100
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $manufacturer_item['aircraft_manufacturer'])).'</loc>';
101
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
102
-			    $output .= '<changefreq>daily</changefreq>';
100
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $manufacturer_item['aircraft_manufacturer'])).'</loc>';
101
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
102
+				$output .= '<changefreq>daily</changefreq>';
103 103
 			$output .= '</url>';
104 104
 		}
105 105
 	$output .= '</urlset>';
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 		foreach($country_names as $country_item)
114 114
 		{
115 115
 			$output .= '<url>';
116
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/country/'.strtolower(str_replace(" ", "-", $country_item['country'])).'</loc>';
117
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
118
-			    $output .= '<changefreq>daily</changefreq>';
116
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/country/'.strtolower(str_replace(" ", "-", $country_item['country'])).'</loc>';
117
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
118
+				$output .= '<changefreq>daily</changefreq>';
119 119
 			$output .= '</url>';
120 120
 		}
121 121
 	$output .= '</urlset>';
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
 		{
131 131
 			if (ctype_alnum($ident_item['ident'])) {
132 132
 				$output .= '<url>';
133
-				    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/ident/'.$ident_item['ident'].'</loc>';
134
-				    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
135
-				    $output .= '<changefreq>daily</changefreq>';
133
+					$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/ident/'.$ident_item['ident'].'</loc>';
134
+					$output .= '<lastmod>'.date("c", time()).'</lastmod>';
135
+					$output .= '<changefreq>daily</changefreq>';
136 136
 				$output .= '</url>';
137 137
 			}
138 138
 		}
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 		foreach($date_names as $date_item)
148 148
 		{
149 149
 			$output .= '<url>';
150
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/date/'.date("Y-m-d", strtotime($date_item['date'])).'</loc>';
151
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
152
-			    $output .= '<changefreq>daily</changefreq>';
150
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/date/'.date("Y-m-d", strtotime($date_item['date'])).'</loc>';
151
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
152
+				$output .= '<changefreq>daily</changefreq>';
153 153
 			$output .= '</url>';
154 154
 		}
155 155
 	$output .= '</urlset>';
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 		foreach($route_names as $route_item)
164 164
 		{
165 165
 			$output .= '<url>';
166
-			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'</loc>';
167
-			    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
168
-			    $output .= '<changefreq>daily</changefreq>';
166
+				$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'</loc>';
167
+				$output .= '<lastmod>'.date("c", time()).'</lastmod>';
168
+				$output .= '<changefreq>daily</changefreq>';
169 169
 			$output .= '</url>';
170 170
 		}
171 171
 	$output .= '</urlset>';
@@ -177,117 +177,117 @@  discard block
 block discarded – undo
177 177
 		
178 178
 		/* STATIC PAGES */
179 179
 		$output .= '<url>';
180
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/</loc>';
181
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
182
-		    $output .= '<changefreq>daily</changefreq>';
180
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/</loc>';
181
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
182
+			$output .= '<changefreq>daily</changefreq>';
183 183
 		$output .= '</url>';
184 184
 		$output .= '<url>';
185
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/latest</loc>';
186
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
187
-		    $output .= '<changefreq>daily</changefreq>';
185
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/latest</loc>';
186
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
187
+			$output .= '<changefreq>daily</changefreq>';
188 188
 		$output .= '</url>';
189 189
 		$output .= '<url>';
190
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/highlights</loc>';
191
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
192
-		    $output .= '<changefreq>daily</changefreq>';
190
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/highlights</loc>';
191
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
192
+			$output .= '<changefreq>daily</changefreq>';
193 193
 		$output .= '</url>';
194 194
 		$output .= '<url>';
195
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft</loc>';
196
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
197
-		    $output .= '<changefreq>daily</changefreq>';
195
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft</loc>';
196
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
197
+			$output .= '<changefreq>daily</changefreq>';
198 198
 		$output .= '</url>';
199 199
 		$output .= '<url>';
200
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline</loc>';
201
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
202
-		    $output .= '<changefreq>daily</changefreq>';
200
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline</loc>';
201
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
202
+			$output .= '<changefreq>daily</changefreq>';
203 203
 		$output .= '</url>';
204 204
 		$output .= '<url>';
205
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport</loc>';
206
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
207
-		    $output .= '<changefreq>daily</changefreq>';
205
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport</loc>';
206
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
207
+			$output .= '<changefreq>daily</changefreq>';
208 208
 		$output .= '</url>';
209 209
 		$output .= '<url>';
210
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/search</loc>';
211
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
212
-		    $output .= '<changefreq>daily</changefreq>';
210
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/search</loc>';
211
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
212
+			$output .= '<changefreq>daily</changefreq>';
213 213
 		$output .= '</url>';
214 214
 		$output .= '<url>';
215
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/about</loc>';
216
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
217
-		    $output .= '<changefreq>weekly</changefreq>';
215
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/about</loc>';
216
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
217
+			$output .= '<changefreq>weekly</changefreq>';
218 218
 		$output .= '</url>';
219 219
 		
220 220
 		
221 221
 		/* STATISTIC PAGES */
222 222
 		$output .= '<url>';
223
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/aircraft</loc>';
224
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
225
-		    $output .= '<changefreq>daily</changefreq>';
223
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/aircraft</loc>';
224
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
225
+			$output .= '<changefreq>daily</changefreq>';
226 226
 		$output .= '</url>';
227 227
 		$output .= '<url>';
228
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/registration</loc>';
229
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
230
-		    $output .= '<changefreq>daily</changefreq>';
228
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/registration</loc>';
229
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
230
+			$output .= '<changefreq>daily</changefreq>';
231 231
 		$output .= '</url>';
232 232
 		$output .= '<url>';
233
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/manufacturer</loc>';
234
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
235
-		    $output .= '<changefreq>daily</changefreq>';
233
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/manufacturer</loc>';
234
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
235
+			$output .= '<changefreq>daily</changefreq>';
236 236
 		$output .= '</url>';
237 237
 		$output .= '<url>';
238
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airline</loc>';
239
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
240
-		    $output .= '<changefreq>daily</changefreq>';
238
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airline</loc>';
239
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
240
+			$output .= '<changefreq>daily</changefreq>';
241 241
 		$output .= '</url>';
242 242
 		$output .= '<url>';
243
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airline-country</loc>';
244
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
245
-		    $output .= '<changefreq>daily</changefreq>';
243
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airline-country</loc>';
244
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
245
+			$output .= '<changefreq>daily</changefreq>';
246 246
 		$output .= '</url>';
247 247
 		$output .= '<url>';
248
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-departure</loc>';
249
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
250
-		    $output .= '<changefreq>daily</changefreq>';
248
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-departure</loc>';
249
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
250
+			$output .= '<changefreq>daily</changefreq>';
251 251
 		$output .= '</url>';
252 252
 		$output .= '<url>';
253
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-departure-country</loc>';
254
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
255
-		    $output .= '<changefreq>daily</changefreq>';
253
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-departure-country</loc>';
254
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
255
+			$output .= '<changefreq>daily</changefreq>';
256 256
 		$output .= '</url>';
257 257
 		$output .= '<url>';
258
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-arrival</loc>';
259
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
260
-		    $output .= '<changefreq>daily</changefreq>';
258
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-arrival</loc>';
259
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
260
+			$output .= '<changefreq>daily</changefreq>';
261 261
 		$output .= '</url>';
262 262
 		$output .= '<url>';
263
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-arrival-country</loc>';
264
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
265
-		    $output .= '<changefreq>daily</changefreq>';
263
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/airport-arrival-country</loc>';
264
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
265
+			$output .= '<changefreq>daily</changefreq>';
266 266
 		$output .= '</url>';
267 267
 		$output .= '<url>';
268
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/route-airport</loc>';
269
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
270
-		    $output .= '<changefreq>daily</changefreq>';
268
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/route-airport</loc>';
269
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
270
+			$output .= '<changefreq>daily</changefreq>';
271 271
 		$output .= '</url>';
272 272
 		$output .= '<url>';
273
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/route-waypoint</loc>';
274
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
275
-		    $output .= '<changefreq>daily</changefreq>';
273
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/route-waypoint</loc>';
274
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
275
+			$output .= '<changefreq>daily</changefreq>';
276 276
 		$output .= '</url>';
277 277
 		$output .= '<url>';
278
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/callsign</loc>';
279
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
280
-		    $output .= '<changefreq>daily</changefreq>';
278
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/callsign</loc>';
279
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
280
+			$output .= '<changefreq>daily</changefreq>';
281 281
 		$output .= '</url>';
282 282
 		$output .= '<url>';
283
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/date</loc>';
284
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
285
-		    $output .= '<changefreq>daily</changefreq>';
283
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/date</loc>';
284
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
285
+			$output .= '<changefreq>daily</changefreq>';
286 286
 		$output .= '</url>';
287 287
 		$output .= '<url>';
288
-		    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/time</loc>';
289
-		    $output .= '<lastmod>'.date("c", time()).'</lastmod>';
290
-		    $output .= '<changefreq>daily</changefreq>';
288
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/statistics/time</loc>';
289
+			$output .= '<lastmod>'.date("c", time()).'</lastmod>';
290
+			$output .= '<changefreq>daily</changefreq>';
291 291
 		$output .= '</url>';
292 292
 	$output .= '</urlset>';
293 293
 	
@@ -297,37 +297,37 @@  discard block
 block discarded – undo
297 297
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
298 298
 	$output .= '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
299 299
 		$output .= '<sitemap>';
300
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/static</loc>';
300
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/static</loc>';
301 301
 		$output .= '</sitemap>';
302 302
 		$output .= '<sitemap>';
303
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/flight</loc>';
303
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/flight</loc>';
304 304
 		$output .= '</sitemap>';
305 305
 		$output .= '<sitemap>';
306
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/aircraft</loc>';
306
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/aircraft</loc>';
307 307
 		$output .= '</sitemap>';
308 308
 		$output .= '<sitemap>';
309
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/registration</loc>';
309
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/registration</loc>';
310 310
 		$output .= '</sitemap>';
311 311
 		$output .= '<sitemap>';
312
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/airline</loc>';
312
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/airline</loc>';
313 313
 		$output .= '</sitemap>';
314 314
 		$output .= '<sitemap>';
315
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/airport</loc>';
315
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/airport</loc>';
316 316
 		$output .= '</sitemap>';
317 317
 		$output .= '<sitemap>';
318
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/manufacturer</loc>';
318
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/manufacturer</loc>';
319 319
 		$output .= '</sitemap>';
320 320
 		$output .= '<sitemap>';
321
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/country</loc>';
321
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/country</loc>';
322 322
 		$output .= '</sitemap>';
323 323
 		$output .= '<sitemap>';
324
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/ident</loc>';
324
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/ident</loc>';
325 325
 		$output .= '</sitemap>';
326 326
 		$output .= '<sitemap>';
327
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/date</loc>';
327
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/date</loc>';
328 328
 		$output .= '</sitemap>';
329 329
 		$output .= '<sitemap>';
330
-	    	$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/route</loc>';
330
+			$output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/sitemap/route</loc>';
331 331
 		$output .= '</sitemap>';
332 332
 	$output .= '</sitemapindex>';
333 333
 	
Please login to merge, or discard this patch.
archive-geojson.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 $Common = new Common();
10 10
 
11 11
 if (isset($_GET['download'])) {
12
-    if ($_GET['download'] == "true")
13
-    {
12
+	if ($_GET['download'] == "true")
13
+	{
14 14
 	header('Content-disposition: attachment; filename="flightairmap.json"');
15
-    }
15
+	}
16 16
 }
17 17
 header('Content-Type: text/javascript');
18 18
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				}
92 92
 
93 93
 				//waypoint plotting
94
-                /*
94
+				/*
95 95
 				$output .= '{';
96 96
 					$output .= '"type": "Feature",';
97 97
 						$output .= '"properties": {';
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
 					$output_time .= (strtotime($spotter_history['date'])*1000).',';
271 271
 				}
272 272
 				if (isset($output_time)) {
273
-				    $output_time  = substr($output_time, 0, -1);
274
-				    $output .= '"time": ['.$output_time.'],';
273
+					$output_time  = substr($output_time, 0, -1);
274
+					$output .= '"time": ['.$output_time.'],';
275 275
 				}
276 276
 
277 277
 
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 						$output .= '"coordinates": [';
286 286
 						
287 287
 				if (isset($output_history)) {
288
-				    $output_history  = substr($output_history, 0, -1);
289
-				    $output .= $output_history;
288
+					$output_history  = substr($output_history, 0, -1);
289
+					$output .= $output_history;
290 290
 				}
291 291
 				
292 292
 						$output .= ']';
Please login to merge, or discard this patch.
live-czml.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,30 +13,30 @@
 block discarded – undo
13 13
 
14 14
 
15 15
 function quaternionrotate($heading, $attitude = 0, $bank = 0) {
16
-    // Assuming the angles are in radians.
17
-    $c1 = cos($heading/2);
18
-    $s1 = sin($heading/2);
19
-    $c2 = cos($attitude/2);
20
-    $s2 = sin($attitude/2);
21
-    $c3 = cos($bank/2);
22
-    $s3 = sin($bank/2);
23
-    $c1c2 = $c1*$c2;
24
-    $s1s2 = $s1*$s2;
25
-    $w =$c1c2*$c3 - $s1s2*$s3;
26
-    $x =$c1c2*$s3 + $s1s2*$c3;
27
-    $y =$s1*$c2*$c3 + $c1*$s2*$s3;
28
-    $z =$c1*$s2*$c3 - $s1*$c2*$s3;
29
-    return array('x' => $x,'y' => $y,'z' => $z,'w' => $w);
16
+	// Assuming the angles are in radians.
17
+	$c1 = cos($heading/2);
18
+	$s1 = sin($heading/2);
19
+	$c2 = cos($attitude/2);
20
+	$s2 = sin($attitude/2);
21
+	$c3 = cos($bank/2);
22
+	$s3 = sin($bank/2);
23
+	$c1c2 = $c1*$c2;
24
+	$s1s2 = $s1*$s2;
25
+	$w =$c1c2*$c3 - $s1s2*$s3;
26
+	$x =$c1c2*$s3 + $s1s2*$c3;
27
+	$y =$s1*$c2*$c3 + $c1*$s2*$s3;
28
+	$z =$c1*$s2*$c3 - $s1*$c2*$s3;
29
+	return array('x' => $x,'y' => $y,'z' => $z,'w' => $w);
30 30
 //    return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365');
31 31
 
32 32
 }
33 33
 
34 34
 
35 35
 if (isset($_GET['download'])) {
36
-    if ($_GET['download'] == "true")
37
-    {
36
+	if ($_GET['download'] == "true")
37
+	{
38 38
 	header('Content-disposition: attachment; filename="flightairmap.json"');
39
-    }
39
+	}
40 40
 }
41 41
 header('Content-Type: text/javascript');
42 42
 
Please login to merge, or discard this patch.
getImages.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -4,88 +4,88 @@
 block discarded – undo
4 4
 	$hex = str_replace("#", "", $hex);
5 5
 	$color = array();
6 6
 	if (strlen($hex) == 3) {
7
-	    $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1));
8
-	    $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1));
9
-	    $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1));
7
+		$color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1));
8
+		$color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1));
9
+		$color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1));
10 10
 	} else if (strlen($hex) == 6) {
11
-	    $color['r'] = hexdec(substr($hex, 0, 2));
12
-	    $color['g'] = hexdec(substr($hex, 2, 2));
13
-	    $color['b'] = hexdec(substr($hex, 4, 2));
11
+		$color['r'] = hexdec(substr($hex, 0, 2));
12
+		$color['g'] = hexdec(substr($hex, 2, 2));
13
+		$color['b'] = hexdec(substr($hex, 4, 2));
14 14
 	}
15 15
 	return $color;
16 16
 }
17 17
 
18 18
 
19 19
 if (!isset($_GET['color']) || $_GET['color'] == '' || !preg_match('/^([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/',$_GET['color'])) { 
20
-    exit(0);
20
+	exit(0);
21 21
 }
22 22
 $color = $_GET['color'];
23 23
 if (!isset($_GET['filename']) || !preg_match('/^[a-z0-9-_]+\.png$/', strtolower($_GET['filename']))) {
24
-    echo "Incorrect filename";
25
-    exit(0);
24
+	echo "Incorrect filename";
25
+	exit(0);
26 26
 }
27 27
 $filename = $_GET['filename'];
28 28
 if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename)) {
29
-    header('Content-type: image/png');
30
-    readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename);
31
-    exit(0);
29
+	header('Content-type: image/png');
30
+	readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename);
31
+	exit(0);
32 32
 }
33 33
 $original = dirname(__FILE__).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'aircrafts'.DIRECTORY_SEPARATOR.'new'.DIRECTORY_SEPARATOR.$filename;
34 34
 if (!file_exists($original)) {
35
-    echo "File not found";
35
+	echo "File not found";
36 36
 }
37 37
 
38 38
 if (extension_loaded('gd') && function_exists('gd_info')) {
39
-    $image = imagecreatefrompng($original);
40
-    $index = imagecolorexact($image,26,49,81);
41
-    if ($index < 0) {
39
+	$image = imagecreatefrompng($original);
40
+	$index = imagecolorexact($image,26,49,81);
41
+	if ($index < 0) {
42 42
 	$index = imagecolorexact($image,25,49,79);
43
-    }
44
-    if ($index < 0) {
43
+	}
44
+	if ($index < 0) {
45 45
 	$index = imagecolorexact($image,0,0,0);
46
-    }
47
-    $c = hexToRGB($color);
48
-    imagecolorset($image,$index,$c['r'],$c['g'],$c['b']);
46
+	}
47
+	$c = hexToRGB($color);
48
+	imagecolorset($image,$index,$c['r'],$c['g'],$c['b']);
49 49
  /*
50 50
     $ig = imagecolorat($image, 0, 0);
51 51
     imagecolortransparent($image, $ig);
52 52
    */
53 53
 
54
-    header('Content-type: image/png');
55
-    if (isset($_GET['resize']) && function_exists('imagecopyresampled')) {
54
+	header('Content-type: image/png');
55
+	if (isset($_GET['resize']) && function_exists('imagecopyresampled')) {
56 56
 	$resize = filter_input(INPUT_GET,'resize',FILTER_SANITIZE_NUMBER_INT);
57 57
 	$newimg = imagecreatetruecolor($resize,$resize);
58
-        imagealphablending($newimg, false);
58
+		imagealphablending($newimg, false);
59 59
 	imagesavealpha($newimg, true);
60 60
 	imagecopyresampled($newimg,$image,0,0,0,0,15,15,imagesx($image),imagesy($image));
61 61
 	if (isset($_GET['heading'])) {
62
-    	    $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT);
63
-    	    $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127));
64
-    	    imagealphablending($rotation, false);
65
-	    imagesavealpha($rotation, true);
66
-    	    imagepng($rotation);
67
-    	    imagedestroy($newimg);
68
-    	    imagedestroy($image);
69
-    	    imagedestroy($rotation);
62
+			$heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT);
63
+			$rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127));
64
+			imagealphablending($rotation, false);
65
+		imagesavealpha($rotation, true);
66
+			imagepng($rotation);
67
+			imagedestroy($newimg);
68
+			imagedestroy($image);
69
+			imagedestroy($rotation);
70 70
 	
71 71
 	} else {
72
-    	    imagepng($newimg);
73
-    	    imagedestroy($newimg);
74
-    	    imagedestroy($image);
75
-        }
76
-    } else {
72
+			imagepng($newimg);
73
+			imagedestroy($newimg);
74
+			imagedestroy($image);
75
+		}
76
+	} else {
77 77
 	imagealphablending($image, false);
78
-        imagesavealpha($image, true);
78
+		imagesavealpha($image, true);
79 79
 	imagepng($image);
80 80
 	imagepng($image);
81 81
 	if (is_writable('cache')) {
82
-    	    imagepng($image,dirname(__FILE__).DIRECTORY_SEPARATOR.'cache/'.$color.'-'.$filename);
82
+			imagepng($image,dirname(__FILE__).DIRECTORY_SEPARATOR.'cache/'.$color.'-'.$filename);
83
+	}
84
+		imagedestroy($image);
83 85
 	}
84
-        imagedestroy($image);
85
-    }
86 86
 } else {
87
-    header('Content-type: image/png');
88
-    if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename);
89
-    else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename);
87
+	header('Content-type: image/png');
88
+	if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename);
89
+	else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename);
90 90
 }
91 91
 ?>
92 92
\ No newline at end of file
Please login to merge, or discard this patch.
require/class.ACARS.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 		$this->SI = new SpotterImport($this->db);
17 17
 	}
18 18
 	/**
19
-	* Change IATA to ICAO value for ident
20
-	*
21
-	* @param String $ident ident
22
-	* @return String the icao
23
-	*/
19
+	 * Change IATA to ICAO value for ident
20
+	 *
21
+	 * @param String $ident ident
22
+	 * @return String the icao
23
+	 */
24 24
 	public function ident2icao($ident) {
25 25
 		if (substr($ident,0,2) == 'AF') {
26 26
 			if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident;
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	/**
39
-	* Deletes all info in the live table
40
-	*
41
-	* @return String success or false
42
-	*
43
-	*/
39
+	 * Deletes all info in the live table
40
+	 *
41
+	 * @return String success or false
42
+	 *
43
+	 */
44 44
 	public function deleteLiveAcarsData()
45 45
 	{
46 46
 		global $globalDBdriver;
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	/**
63
-	* Deletes all info in the archive table
64
-	*
65
-	* @return String success or false
66
-	*
67
-	*/
63
+	 * Deletes all info in the archive table
64
+	 *
65
+	 * @return String success or false
66
+	 *
67
+	 */
68 68
 	public function deleteArchiveAcarsData()
69 69
 	{
70 70
 		global $globalACARSArchiveKeepMonths, $globalDBdriver;
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 
86 86
 
87 87
 	/**
88
-	* Parse ACARS data
89
-	*
90
-	* @param String ACARS data in acarsdec data
91
-	*
92
-	*/
88
+	 * Parse ACARS data
89
+	 *
90
+	 * @param String ACARS data in acarsdec data
91
+	 *
92
+	 */
93 93
 	public function parse($data) {
94 94
 		global $globalDebug, $globalACARSArchive;
95 95
 		//$Image = new Image($this->db);
@@ -666,11 +666,11 @@  discard block
 block discarded – undo
666 666
 
667 667
 
668 668
 	/**
669
-	* Add ACARS data
670
-	*
671
-	* @param String ACARS data in acarsdec data
672
-	*
673
-	*/
669
+	 * Add ACARS data
670
+	 *
671
+	 * @param String ACARS data in acarsdec data
672
+	 *
673
+	 */
674 674
 	function add($data) {
675 675
 		global $globalDebug, $globalACARSArchive;
676 676
 		$Image = new Image($this->db);
@@ -725,15 +725,15 @@  discard block
 block discarded – undo
725 725
 	}
726 726
 
727 727
 	/**
728
-	* Add Live ACARS data in DB
729
-	*
730
-	* @param String $ident ident
731
-	* @param String $registration Registration of the aircraft
732
-	* @param String $label Label of the ACARS message
733
-	* @param String $block_id Block id of the ACARS message
734
-	* @param String $msg_no Number of the ACARS message
735
-	* @param String $message ACARS message
736
-	*/
728
+	 * Add Live ACARS data in DB
729
+	 *
730
+	 * @param String $ident ident
731
+	 * @param String $registration Registration of the aircraft
732
+	 * @param String $label Label of the ACARS message
733
+	 * @param String $block_id Block id of the ACARS message
734
+	 * @param String $msg_no Number of the ACARS message
735
+	 * @param String $message ACARS message
736
+	 */
737 737
 	public function addLiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') {
738 738
 		global $globalDebug;
739 739
 		date_default_timezone_set('UTC');
@@ -771,15 +771,15 @@  discard block
 block discarded – undo
771 771
 	}
772 772
 
773 773
 	/**
774
-	* Add Archive ACARS data in DB
775
-	*
776
-	* @param String $ident ident
777
-	* @param String $registration Registration of the aircraft
778
-	* @param String $label Label of the ACARS message
779
-	* @param String $block_id Block id of the ACARS message
780
-	* @param String $msg_no Number of the ACARS message
781
-	* @param String $message ACARS message
782
-	*/
774
+	 * Add Archive ACARS data in DB
775
+	 *
776
+	 * @param String $ident ident
777
+	 * @param String $registration Registration of the aircraft
778
+	 * @param String $label Label of the ACARS message
779
+	 * @param String $block_id Block id of the ACARS message
780
+	 * @param String $msg_no Number of the ACARS message
781
+	 * @param String $message ACARS message
782
+	 */
783 783
 	public function addArchiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') {
784 784
 		global $globalDebug;
785 785
 		date_default_timezone_set('UTC');
@@ -813,11 +813,11 @@  discard block
 block discarded – undo
813 813
 	}
814 814
 
815 815
 	/**
816
-	* Get Message title from label from DB
817
-	*
818
-	* @param String $label
819
-	* @return String Return ACARS title
820
-	*/
816
+	 * Get Message title from label from DB
817
+	 *
818
+	 * @param String $label
819
+	 * @return String Return ACARS title
820
+	 */
821 821
 	public function getTitlefromLabel($label) {
822 822
 		$Connection = new Connection($this->db);
823 823
 		$this->db = $Connection->db;
@@ -837,10 +837,10 @@  discard block
 block discarded – undo
837 837
 	}
838 838
 
839 839
 	/**
840
-	* List all Message title & label from DB
841
-	*
842
-	* @return Array Return ACARS data in array
843
-	*/
840
+	 * List all Message title & label from DB
841
+	 *
842
+	 * @return Array Return ACARS data in array
843
+	 */
844 844
 	public function getAllTitleLabel() {
845 845
 		$query = "SELECT * FROM acars_label ORDER BY title";
846 846
 		$query_values = array();
@@ -858,11 +858,11 @@  discard block
 block discarded – undo
858 858
 	}
859 859
 
860 860
 	/**
861
-	* Get Live ACARS data from DB
862
-	*
863
-	* @param String $ident
864
-	* @return Array Return ACARS data in array
865
-	*/
861
+	 * Get Live ACARS data from DB
862
+	 *
863
+	 * @param String $ident
864
+	 * @return Array Return ACARS data in array
865
+	 */
866 866
 	public function getLiveAcarsData($ident) {
867 867
 		$query = "SELECT * FROM acars_live WHERE ident = :ident ORDER BY acars_live_id DESC";
868 868
 		$query_values = array(':ident' => $ident);
@@ -880,10 +880,10 @@  discard block
 block discarded – undo
880 880
 	}
881 881
 
882 882
 	/**
883
-	* Get Latest ACARS data from DB
884
-	*
885
-	* @return Array Return ACARS data in array
886
-	*/
883
+	 * Get Latest ACARS data from DB
884
+	 *
885
+	 * @return Array Return ACARS data in array
886
+	 */
887 887
 	public function getLatestAcarsData($limit = '',$label = '') {
888 888
 		global $globalURL, $globalDBdriver;
889 889
 		$Image = new Image($this->db);
@@ -980,10 +980,10 @@  discard block
 block discarded – undo
980 980
 	}
981 981
 
982 982
 	/**
983
-	* Get Archive ACARS data from DB
984
-	*
985
-	* @return Array Return ACARS data in array
986
-	*/
983
+	 * Get Archive ACARS data from DB
984
+	 *
985
+	 * @return Array Return ACARS data in array
986
+	 */
987 987
 	public function getArchiveAcarsData($limit = '',$label = '') {
988 988
 		global $globalURL, $globalDBdriver;
989 989
 		$Image = new Image($this->db);
@@ -1085,13 +1085,13 @@  discard block
 block discarded – undo
1085 1085
 	}
1086 1086
 
1087 1087
 	/**
1088
-	* Add ModeS data to DB
1089
-	*
1090
-	* @param String $ident ident
1091
-	* @param String $registration Registration of the aircraft
1092
-	* @param String $icao
1093
-	* @param String $ICAOTypeCode
1094
-	*/
1088
+	 * Add ModeS data to DB
1089
+	 *
1090
+	 * @param String $ident ident
1091
+	 * @param String $registration Registration of the aircraft
1092
+	 * @param String $icao
1093
+	 * @param String $ICAOTypeCode
1094
+	 */
1095 1095
 	public function addModeSData($ident,$registration,$icao = '',$ICAOTypeCode = '',$latitude = '', $longitude = '') {
1096 1096
 		global $globalDebug, $globalDBdriver;
1097 1097
 		$ident = trim($ident);
Please login to merge, or discard this patch.