Completed
Push — master ( d44f1f...2285a7 )
by Yannick
09:57
created
search-georss.php 1 patch
Indentation   +51 added lines, -51 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);
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 	print '<subtitle>The latest airplanes</subtitle>';
99 99
 	print '<updated>'.$date.'</updated>';
100 100
 	print '<author>';
101
-    	print '<name>FlightAirMap</name>';
102
-    	print '<email>[email protected]</email>';
101
+		print '<name>FlightAirMap</name>';
102
+		print '<email>[email protected]</email>';
103 103
 	print '</author>';
104 104
 	print '<id>FlightAirMap</id>';
105 105
 	
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
 	
111 111
 	      
112 112
 		  print '<entry>';
113
-		    print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>';
114
-		    print '<link href="http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'"/>';
115
-		    print '<id>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</id>';
116
-		    print '<content>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</content>';
117
-		    print '<updated>'.$date.'</updated>';
118
-		    if ($spotter_item['waypoints'] != "")
119
-		    {
120
-			    print '<georss:where>';
113
+			print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>';
114
+			print '<link href="http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'"/>';
115
+			print '<id>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</id>';
116
+			print '<content>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</content>';
117
+			print '<updated>'.$date.'</updated>';
118
+			if ($spotter_item['waypoints'] != "")
119
+			{
120
+				print '<georss:where>';
121 121
 					print '<gml:LineString>';
122 122
 						print '<gml:posList>';
123 123
 							$waypoint_pieces = explode(' ', $spotter_item['waypoints']);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 							    
126 126
 							foreach ($waypoint_pieces as $waypoint_coordinate)
127 127
 							{
128
-							        print $waypoint_coordinate[0].' '.$waypoint_coordinate[1].' ';
128
+									print $waypoint_coordinate[0].' '.$waypoint_coordinate[1].' ';
129 129
 							
130 130
 							}
131 131
 						print '</gml:posList>';
Please login to merge, or discard this patch.
js/map.js.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	    <?php
333 333
 		if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom'];
334 334
 		else $getZoom = '7';
335
-	    ?>
335
+		?>
336 336
 	    //if (map.getZoom() <= <?php print $getZoom; ?>) {
337 337
 		if (typeof airportsLayer != 'undefined') {
338 338
 			if (map.hasLayer(airportsLayer) == true) {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 	update_locationsLayer();
486 486
 	
487 487
 <?php
488
-	    if (!isset($ident) && !isset($flightaware_id)) {
488
+		if (!isset($ident) && !isset($flightaware_id)) {
489 489
 ?>
490 490
 	
491 491
 	var info = L.control();
@@ -506,11 +506,11 @@  discard block
 block discarded – undo
506 506
 
507 507
 
508 508
 	<?php
509
-	    }
509
+		}
510 510
 	?>
511 511
 
512 512
 	<?php
513
-	    if (isset($_GET['archive'])) {
513
+		if (isset($_GET['archive'])) {
514 514
 	?>
515 515
 	var archive = L.control();
516 516
 	archive.onAdd = function (map) {
@@ -529,12 +529,12 @@  discard block
 block discarded – undo
529 529
 	};
530 530
 	archive.addTo(map);
531 531
 	<?php
532
-	    }
532
+		}
533 533
 	?>
534 534
 
535 535
 
536 536
 	<?php
537
-	    //if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'false') || (isset($globalMapPopup) && !$globalMapPopup)) {
537
+		//if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'false') || (isset($globalMapPopup) && !$globalMapPopup)) {
538 538
 	?>
539 539
 	var showdetails = L.control();
540 540
 	showdetails.onAdd = function (map) {
@@ -1016,15 +1016,15 @@  discard block
 block discarded – undo
1016 1016
 			if (map.getZoom() > 7) {
1017 1017
                 	    var style = {
1018 1018
 				<?php
1019
-				    if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1019
+					if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1020 1020
 				?>
1021 1021
 				"color": "#1a3151",
1022 1022
 				<?php
1023
-				    } else {
1023
+					} else {
1024 1024
 				?>
1025 1025
 				"color": getAltitudeColor(altitude),
1026 1026
 				<?php
1027
-				    }
1027
+					}
1028 1028
 				?>
1029 1029
 				"weight": 3,
1030 1030
 				"opacity": 1
@@ -1034,15 +1034,15 @@  discard block
 block discarded – undo
1034 1034
 			} else {
1035 1035
 			    var style = {
1036 1036
 				<?php
1037
-				    if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1037
+					if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1038 1038
 				?>
1039 1039
 				"color": "#1a3151",
1040 1040
 				<?php
1041
-				    } else {
1041
+					} else {
1042 1042
 				?>
1043 1043
 				"color": getAltitudeColor(altitude),
1044 1044
 				<?php
1045
-				    }
1045
+					}
1046 1046
 				?>
1047 1047
 				"weight": 2,
1048 1048
 				"opacity": 1
@@ -1054,15 +1054,15 @@  discard block
 block discarded – undo
1054 1054
 			if (map.getZoom() > 7) {
1055 1055
                 	    var style = {
1056 1056
 				<?php
1057
-				    if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1057
+					if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1058 1058
 				?>
1059 1059
                     		"color": "#1a3151",
1060 1060
 				<?php
1061
-				    } else {
1061
+					} else {
1062 1062
 				?>
1063 1063
 				"color": getAltitudeColor(altitude),
1064 1064
 				<?php
1065
-				    }
1065
+					}
1066 1066
 				?>
1067 1067
 				"weight": 3,
1068 1068
 				"opacity": 0.6
@@ -1072,15 +1072,15 @@  discard block
 block discarded – undo
1072 1072
 			} else {
1073 1073
                 	    var style = {
1074 1074
 				<?php
1075
-				    if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1075
+					if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1076 1076
 				?>
1077 1077
                     		"color": "#1a3151",
1078 1078
 				<?php
1079
-				    } else {
1079
+					} else {
1080 1080
 				?>
1081 1081
                     		"color": getAltitudeColor(altitude),
1082 1082
 				<?php
1083
-				    }
1083
+					}
1084 1084
 				?>
1085 1085
 				"weight": 2,
1086 1086
 				"opacity": 0.6
@@ -1090,21 +1090,21 @@  discard block
 block discarded – undo
1090 1090
 			}
1091 1091
                     }
1092 1092
 		    <?php
1093
-            		} else {
1094
-            	    ?>
1093
+					} else {
1094
+					?>
1095 1095
 		    if (map.getZoom() > 7) {
1096 1096
                 	var style = {
1097 1097
 			    <?php
1098 1098
 				if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1099
-			    ?>
1099
+				?>
1100 1100
                     	    "color": "#1a3151",
1101 1101
 			    <?php
1102 1102
 				} else {
1103
-			    ?>
1103
+				?>
1104 1104
                     	    "color": getAltitudeColor(altitude),
1105 1105
 			    <?php
1106 1106
 				}
1107
-			    ?>
1107
+				?>
1108 1108
                     	    "weight": 3,
1109 1109
                     	    "opacity": 0.6
1110 1110
                 	};
@@ -1114,15 +1114,15 @@  discard block
 block discarded – undo
1114 1114
                 	var style = {
1115 1115
 			    <?php
1116 1116
 				if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) {
1117
-			    ?>
1117
+				?>
1118 1118
 			    "color": "#1a3151",
1119 1119
 			    <?php
1120 1120
 				} else {
1121
-			    ?>
1121
+				?>
1122 1122
 			    "color": getAltitudeColor(altitude),
1123 1123
 			    <?php
1124 1124
 				}
1125
-			    ?>
1125
+				?>
1126 1126
                     	    "weight": 2,
1127 1127
                     	    "opacity": 0.6
1128 1128
                 	};
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
                 	layer_data.addLayer(layer);
1131 1131
 		    }
1132 1132
 <?php
1133
-            		}
1133
+					}
1134 1134
 ?>
1135 1135
 				}
1136 1136
 			    }
@@ -1190,10 +1190,10 @@  discard block
 block discarded – undo
1190 1190
 
1191 1191
 
1192 1192
 <?php
1193
-    // Add support for custom json via $globalMapJson
1194
-    if (isset($globalMapJson) && is_array($globalMapJson)) {
1193
+	// Add support for custom json via $globalMapJson
1194
+	if (isset($globalMapJson) && is_array($globalMapJson)) {
1195 1195
 	foreach ($globalMapJson as $json) {
1196
-	    if (isset($json['url'])) {
1196
+		if (isset($json['url'])) {
1197 1197
 ?>
1198 1198
 update_genLayer('<?php print $json['url']; ?>');
1199 1199
 <?php
@@ -1202,9 +1202,9 @@  discard block
 block discarded – undo
1202 1202
 setInterval(function(){update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>);
1203 1203
 <?php
1204 1204
 		}
1205
-	    }
1205
+		}
1206
+	}
1206 1207
 	}
1207
-    }
1208 1208
 
1209 1209
 ?>
1210 1210
 
Please login to merge, or discard this patch.
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.
manufacturer-statistics-airline-country.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['aircraft_manufacturer'])) {
6
-        header('Location: '.$globalURL.'/manufacturer');
7
-        die();
6
+		header('Location: '.$globalURL.'/manufacturer');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
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.
airspace-geojson.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 $Connection = new Connection();
12 12
 
13 13
 if (!$Connection->tableExists('airspace')) {
14
-    die;
14
+	die;
15 15
 }
16 16
 
17 17
 if (isset($_GET['coord'])) 
18 18
 {
19 19
 	$coords = explode(',',$_GET['coord']);
20
-        if ($globalDBdriver == 'mysql') {
20
+		if ($globalDBdriver == 'mysql') {
21 21
 		$query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))";
22 22
 		try {
23 23
 			$sth = $Connection->db->prepare($query);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		}
38 38
 	}
39 39
 } else {
40
-        if ($globalDBdriver == 'mysql') {
40
+		if ($globalDBdriver == 'mysql') {
41 41
 		$query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace";
42 42
 	} else {
43 43
 		$query = "SELECT *, ST_AsBinary(wkb_geometry,'NDR') AS wkb FROM airspace";
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 }
52 52
 
53 53
 $geojson = array(
54
-    'type' => 'FeatureCollection',
55
-    'features' => array()
54
+	'type' => 'FeatureCollection',
55
+	'features' => array()
56 56
 );
57 57
 
58 58
 while ($row = $sth->fetch(PDO::FETCH_ASSOC))
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 			$geom = geoPHP::load(stream_get_contents($row['wkb']));
68 68
 		}
69 69
 		$feature = array(
70
-		    'type' => 'Feature',
71
-		    'geometry' => json_decode($geom->out('json')),
72
-		    'properties' => $properties
70
+			'type' => 'Feature',
71
+			'geometry' => json_decode($geom->out('json')),
72
+			'properties' => $properties
73 73
 		);
74 74
 		array_push($geojson['features'], $feature);
75 75
 }
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['aircraft_type'])) {
6
-        header('Location: '.$globalURL.'/aircraft');
7
-        die();
6
+		header('Location: '.$globalURL.'/aircraft');
7
+		die();
8 8
 }
9 9
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
52 52
 	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
53 53
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type);
54
-    	print '
54
+		print '
55 55
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
56 56
     	<script>
57 57
     	google.load("visualization", "1", {packages:["geochart"]});
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     
64 64
         var data = google.visualization.arrayToDataTable([ 
65 65
         	["'._("Airport").'", "'._("# of times").'"],';
66
-        $airport_data = '';
66
+		$airport_data = '';
67 67
 	foreach($airport_airport_array as $airport_item)
68 68
 	{
69 69
 		$name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')';
Please login to merge, or discard this patch.