Completed
Push — master ( 73f088...7f17b6 )
by Yannick
07:13
created
airline-statistics-arrival-airport.php 1 patch
Indentation   +3 added lines, -3 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['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     
73 73
         var data = google.visualization.arrayToDataTable([ 
74 74
         	["'._("Airport").'", "'._("# of times").'"],';
75
-        $airport_data = '';
75
+		$airport_data = '';
76 76
 	foreach($airport_airport_array as $airport_item)
77 77
 	{
78 78
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
Please login to merge, or discard this patch.
airline-statistics-departure-airport.php 1 patch
Indentation   +3 added lines, -3 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['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
62 62
 	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
63 63
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAirline($airline);
64
-    	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
64
+		print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
65 65
     	<script>
66 66
     	google.load("visualization", "1", {packages:["geochart"]});
67 67
     	google.setOnLoadCallback(drawCharts);
Please login to merge, or discard this patch.
table-output.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -361,17 +361,17 @@  discard block
 block discarded – undo
361 361
 				else {
362 362
 					$planespotter_url_array = explode("_", $spotter_item['image']);
363 363
 					$planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]);
364
-                                        $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
364
+										$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
365 365
 				}
366 366
 				if (isset($spotter_item['airline_name'])) {
367 367
 					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
368 368
 				} else {
369 369
 					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
370 370
 				}
371
-                        } else {
372
-                    		if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
373
-                    		$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
374
-                    		} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
371
+						} else {
372
+							if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
373
+							$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
374
+							} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
375 375
 				if (isset($spotter_item['airline_name'])) {
376 376
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
377 377
 				} else {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	}
388 388
 	if(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){
389 389
 		if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) {
390
-		    $spotter_item['squawk'] = '-';
390
+			$spotter_item['squawk'] = '-';
391 391
 		}
392 392
 		if ($spotter_item['image_thumbnail'] != "")
393 393
 		{
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 				else {
399 399
 					$planespotter_url_array = explode("_", $spotter_array[0]['image']);
400 400
 					$planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]);
401
-                                        $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
401
+										$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
402 402
 				}
403 403
 				if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
404 404
 					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
@@ -410,9 +410,9 @@  discard block
 block discarded – undo
410 410
 					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
411 411
 				}
412 412
 			} else {
413
-                    		if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
414
-                    		$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
415
-                    		} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
413
+							if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
414
+							$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
415
+							} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
416 416
 				if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
417 417
 					print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
418 418
 				} elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) {
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 			print '</td>'."\n";
427 427
 		} else {
428 428
 			print '<td class="aircraft_thumbnail">'."\n";
429
-       //   	 	print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>';
429
+	   //   	 	print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>';
430 430
 	//}
431 431
 			if (!isset($spotter_item['airline_name']) && !isset($spotter_item['aircraft_name'])) {
432 432
 				print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '._("Not available").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n";
@@ -523,13 +523,13 @@  discard block
 block discarded – undo
523 523
 		}
524 524
 		$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude);
525 525
 		if ($distance != '') {
526
-		    if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
527
-			    echo '<br/><i>'.round($distance*0.539957).' nm</i>';
528
-		    } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
529
-			    echo '<br/><i>'.round($distance*0.621371).' mi</i>';
530
-		    } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
531
-			    echo '<br/><i>'.$distance.' km</i>';
532
-		    }
526
+			if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
527
+				echo '<br/><i>'.round($distance*0.539957).' nm</i>';
528
+			} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
529
+				echo '<br/><i>'.round($distance*0.621371).' mi</i>';
530
+			} elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
531
+				echo '<br/><i>'.$distance.' km</i>';
532
+			}
533 533
 		}
534 534
 	}
535 535
 	print '</td>'."\n";
@@ -588,13 +588,13 @@  discard block
 block discarded – undo
588 588
 		}
589 589
 		$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude);
590 590
 		if ($distance != '') {
591
-		    if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
592
-			    echo '<br/><i>'.round($distance*0.539957).' nm</i>';
593
-		    } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
594
-			    echo '<br/><i>'.round($distance*0.621371).' mi</i>';
595
-		    } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
596
-			    echo '<br/><i>'.$distance.' km</i>';
597
-		    }
591
+			if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
592
+				echo '<br/><i>'.round($distance*0.539957).' nm</i>';
593
+			} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
594
+				echo '<br/><i>'.round($distance*0.621371).' mi</i>';
595
+			} elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
596
+				echo '<br/><i>'.$distance.' km</i>';
597
+			}
598 598
 		}
599 599
 	}
600 600
 	print '</td>'."\n";
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
23 23
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
24 24
 <?php
25
-    if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) {
25
+	if (isset($globalArchive) && $globalArchive == TRUE && (isset($globalBeta) && $globalBeta == TRUE)) {
26 26
 ?>
27 27
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
28 28
 <?php
29
-    }
29
+	}
30 30
 ?>
31 31
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
32 32
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
@@ -46,15 +46,15 @@  discard block
 block discarded – undo
46 46
 		<ul><li><a class="button waypoints" onclick="showWaypoints(); return false;"><?php echo _("Waypoints"); ?></a></li></ul>
47 47
 		<ul><li><a class="button airspace" onclick="showAirspace(); return false;"><?php echo _("Airspace"); ?></a></li></ul>
48 48
 <?php
49
-    if (isset($globalNOTAM) && $globalNOTAM) {
49
+	if (isset($globalNOTAM) && $globalNOTAM) {
50 50
 ?>
51 51
 		<ul><li><a class="button notam" onclick="showNotam(); return false;"><?php echo _("NOTAM"); ?></a></li></ul>
52 52
 <?php
53
-    }
53
+	}
54 54
 ?>
55 55
         </div>
56 56
 <?php
57
-    if (isset($globalArchive) && $globalArchive == TRUE) {
57
+	if (isset($globalArchive) && $globalArchive == TRUE) {
58 58
 ?>
59 59
         <div class="sidebar-pane" id="archive">
60 60
 	    <h1><?php echo _("Playback"); ?> <i>Bêta</i></h1>
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	    </form>
111 111
 	</div>
112 112
 <?php
113
-    }
113
+	}
114 114
 ?>
115 115
         <div class="sidebar-pane" id="settings">
116 116
 	    <h1><?php echo _("Settings"); ?></h1>
@@ -121,40 +121,40 @@  discard block
 block discarded – undo
121 121
 			    <?php
122 122
 				if (!isset($_COOKIE['MapType'])) $MapType = $globalMapProvider;
123 123
 				else $MapType = $_COOKIE['MapType'];
124
-			    ?>
124
+				?>
125 125
 			    <?php
126 126
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
127
-			    ?>
127
+				?>
128 128
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
129 129
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
130 130
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
131 131
 			    <?php
132 132
 				}
133
-			    ?>
133
+				?>
134 134
 			    <?php
135 135
 				if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
136
-			    ?>
136
+				?>
137 137
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
138 138
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
139 139
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
140 140
 			    <?php
141 141
 				}
142
-			    ?>
142
+				?>
143 143
 			    <?php
144 144
 				if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
145
-			    ?>
145
+				?>
146 146
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
147 147
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
148 148
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
149 149
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
150 150
 			    <?php
151 151
 				}
152
-			    ?>
152
+				?>
153 153
 			    <?php
154 154
 				if (isset($globalMapboxToken) && $globalMapboxToken != '') {
155
-				    if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
156
-				    else $MapBoxId = $_COOKIE['MapTypeId'];
157
-			    ?>
155
+					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
156
+					else $MapBoxId = $_COOKIE['MapTypeId'];
157
+				?>
158 158
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
159 159
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
160 160
 			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
@@ -169,16 +169,16 @@  discard block
 block discarded – undo
169 169
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
170 170
 			    <?php
171 171
 				}
172
-			    ?>
172
+				?>
173 173
 			    <?php
174 174
 				if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
175
-			    ?>
175
+				?>
176 176
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
177 177
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
178 178
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
179 179
 			    <?php
180 180
 				}
181
-			    ?>
181
+				?>
182 182
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
183 183
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
184 184
 			</select>
@@ -189,26 +189,26 @@  discard block
 block discarded – undo
189 189
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
190 190
 		    <?php
191 191
 			if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
192
-		    ?>
192
+			?>
193 193
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
194 194
 		    <?php
195 195
 			}
196
-		    ?>
196
+			?>
197 197
 
198 198
 		    <?php
199
-		        if (extension_loaded('gd') && function_exists('gd_info')) {
200
-		    ?>
199
+				if (extension_loaded('gd') && function_exists('gd_info')) {
200
+			?>
201 201
 		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
202 202
 		    <?php 
203 203
 			if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
204
-		    ?>
204
+			?>
205 205
 		    <li><?php echo _("Aircraft icon color:"); ?>
206 206
 			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>">
207 207
 		    </li>
208 208
 		    <?php
209
-			    }
210
-		        }
211
-		    ?>
209
+				}
210
+				}
211
+			?>
212 212
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
213 213
 			<div class="range">
214 214
 			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>">
@@ -217,16 +217,16 @@  discard block
 block discarded – undo
217 217
 		    </li>
218 218
 		    <?php
219 219
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
220
-		    ?>
220
+			?>
221 221
 			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
222 222
 			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
223 223
 			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
224 224
 		    <?php
225 225
 			}
226
-		    ?>
226
+			?>
227 227
 		    <?php
228 228
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
229
-		    ?>
229
+			?>
230 230
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
231 231
 			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
232 232
 			<?php } ?>
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			<?php } ?>
236 236
 		    <?php
237 237
 			}
238
-		    ?>
238
+			?>
239 239
 		    <li><?php echo _("Display airlines:"); ?>
240 240
 			<select class="selectpicker" multiple onchange="airlines(this);">
241 241
 			    <?php
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
250 250
 					}
251 251
 				}
252
-			    ?>
252
+				?>
253 253
 			</select>
254 254
 		    </li>
255 255
 		    <?php
256 256
 			if (isset($globalAPRS) && $globalAPRS) {
257
-		    ?>
257
+			?>
258 258
 		    <li><?php echo _("Display APRS sources name:"); ?>
259 259
 			<select class="selectpicker" multiple onchange="sources(this);">
260 260
 			    <?php
@@ -266,15 +266,15 @@  discard block
 block discarded – undo
266 266
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
267 267
 					}
268 268
 				}
269
-			    ?>
269
+				?>
270 270
 			</select>
271 271
 		    </li>
272 272
 		    <?php
273 273
 			}
274
-		    ?>
274
+			?>
275 275
 		    <?php
276 276
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
277
-		    ?>
277
+			?>
278 278
 		    <li><?php echo _("Display airlines of type:"); ?>
279 279
 			<select class="selectpicker" onchange="airlinestype(this);">
280 280
 			    <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		    </li>
286 286
 		    <?php
287 287
 			}
288
-		    ?>
288
+			?>
289 289
 		    <li><?php echo _("Distance unit:"); ?>
290 290
 			<select class="selectpicker" onchange="unitdistance(this);">
291 291
 			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
Please login to merge, or discard this patch.
search-geojson.php 1 patch
Indentation   +126 added lines, -126 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);
@@ -90,69 +90,69 @@  discard block
 block discarded – undo
90 90
       
91 91
 $output = '{';
92 92
 	$output .= '"type": "FeatureCollection",';
93
-    $output .= '"features": [';
93
+	$output .= '"features": [';
94 94
             
95 95
     
96
-    if (!empty($spotter_array))
96
+	if (!empty($spotter_array))
97 97
 	  {	  
98
-	    foreach($spotter_array as $spotter_item)
99
-	    {
98
+		foreach($spotter_array as $spotter_item)
99
+		{
100 100
 				
101 101
 				
102 102
 				//waypoint plotting
103 103
 				$output .= '{';  
104 104
 					$output .= '"type": "Feature",';
105
-	      		$output .= '"properties": {';
106
-	          	    $output .= '"id": "'.$spotter_item['spotter_id'].'",';
107
-                    $output .= '"ident": "'.$spotter_item['ident'].'",';
108
-                    $output .= '"registration": "'.$spotter_item['registration'].'",';
109
-                    $output .= '"aircraft_icao": "'.$spotter_item['aircraft_type'].'",';
110
-                    $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].'",';
111
-                    $output .= '"aircraft_manufacturer": "'.$spotter_item['aircraft_manufacturer'].'",';
112
-                    $output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
113
-                    $output .= '"airline_icao": "'.$spotter_item['airline_icao'].'",';
114
-                    $output .= '"airline_iata": "'.$spotter_item['airline_iata'].'",';
115
-                    $output .= '"airline_country": "'.$spotter_item['airline_country'].'",';
116
-                    $output .= '"airline_callsign": "'.$spotter_item['airline_callsign'].'",';
117
-                    $output .= '"airline_type": "'.$spotter_item['airline_type'].'",';
118
-                    $output .= '"departure_airport_city": "'.$spotter_item['departure_airport_city'].'",';
119
-                    $output .= '"departure_airport_country": "'.$spotter_item['departure_airport_country'].'",';
120
-                    $output .= '"departure_airport_iata": "'.$spotter_item['departure_airport_iata'].'",';
121
-                    $output .= '"departure_airport_icao": "'.$spotter_item['departure_airport_icao'].'",';
122
-                    $output .= '"departure_airport_latitude": "'.$spotter_item['departure_airport_latitude'].'",';
123
-                    $output .= '"departure_airport_longitude": "'.$spotter_item['departure_airport_longitude'].'",';
124
-                    $output .= '"departure_airport_altitude": "'.$spotter_item['departure_airport_altitude'].'",'; 
125
-                    $output .= '"arrival_airport_city": "'.$spotter_item['arrival_airport_city'].'",';
126
-                    $output .= '"arrival_airport_country": "'.$spotter_item['arrival_airport_country'].'",';
127
-                    $output .= '"arrival_airport_iata": "'.$spotter_item['arrival_airport_iata'].'",';
128
-                    $output .= '"departure_airport_icao": "'.$spotter_item['arrival_airport_icao'].'",';
129
-                    $output .= '"arrival_airport_latitude": "'.$spotter_item['arrival_airport_latitude'].'",';
130
-                    $output .= '"arrival_airport_longitude": "'.$spotter_item['arrival_airport_longitude'].'",';
131
-                    $output .= '"arrival_airport_altitude": "'.$spotter_item['arrival_airport_altitude'].'",';
132
-                    $output .= '"latitude": "'.$spotter_item['latitude'].'",';
133
-                    $output .= '"longitude": "'.$spotter_item['longitude'].'",';
134
-                    $output .= '"altitude": "'.$spotter_item['altitude'].'",';
135
-                    $output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",';
136
-                    $output .= '"heading": "'.$spotter_item['heading'].'",';
137
-                    $output .= '"heading_name": "'.$spotter_item['heading_name'].'",';
138
-                    $output .= '"date": "'.date("c", strtotime($spotter_item['date_iso_8601'])).'"';
139
-	          $output .= '}';
140
-	          if ($spotter_item['waypoints'] != '') {
141
-	          $output .= ',"geometry": {';
142
-	          	$output .= '"type": "LineString",';
143
-	            	$output .= '"coordinates": [';
144
-		            	$waypoint_pieces = explode(' ', $spotter_item['waypoints']);
105
+		  		$output .= '"properties": {';
106
+			  		$output .= '"id": "'.$spotter_item['spotter_id'].'",';
107
+					$output .= '"ident": "'.$spotter_item['ident'].'",';
108
+					$output .= '"registration": "'.$spotter_item['registration'].'",';
109
+					$output .= '"aircraft_icao": "'.$spotter_item['aircraft_type'].'",';
110
+					$output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].'",';
111
+					$output .= '"aircraft_manufacturer": "'.$spotter_item['aircraft_manufacturer'].'",';
112
+					$output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
113
+					$output .= '"airline_icao": "'.$spotter_item['airline_icao'].'",';
114
+					$output .= '"airline_iata": "'.$spotter_item['airline_iata'].'",';
115
+					$output .= '"airline_country": "'.$spotter_item['airline_country'].'",';
116
+					$output .= '"airline_callsign": "'.$spotter_item['airline_callsign'].'",';
117
+					$output .= '"airline_type": "'.$spotter_item['airline_type'].'",';
118
+					$output .= '"departure_airport_city": "'.$spotter_item['departure_airport_city'].'",';
119
+					$output .= '"departure_airport_country": "'.$spotter_item['departure_airport_country'].'",';
120
+					$output .= '"departure_airport_iata": "'.$spotter_item['departure_airport_iata'].'",';
121
+					$output .= '"departure_airport_icao": "'.$spotter_item['departure_airport_icao'].'",';
122
+					$output .= '"departure_airport_latitude": "'.$spotter_item['departure_airport_latitude'].'",';
123
+					$output .= '"departure_airport_longitude": "'.$spotter_item['departure_airport_longitude'].'",';
124
+					$output .= '"departure_airport_altitude": "'.$spotter_item['departure_airport_altitude'].'",'; 
125
+					$output .= '"arrival_airport_city": "'.$spotter_item['arrival_airport_city'].'",';
126
+					$output .= '"arrival_airport_country": "'.$spotter_item['arrival_airport_country'].'",';
127
+					$output .= '"arrival_airport_iata": "'.$spotter_item['arrival_airport_iata'].'",';
128
+					$output .= '"departure_airport_icao": "'.$spotter_item['arrival_airport_icao'].'",';
129
+					$output .= '"arrival_airport_latitude": "'.$spotter_item['arrival_airport_latitude'].'",';
130
+					$output .= '"arrival_airport_longitude": "'.$spotter_item['arrival_airport_longitude'].'",';
131
+					$output .= '"arrival_airport_altitude": "'.$spotter_item['arrival_airport_altitude'].'",';
132
+					$output .= '"latitude": "'.$spotter_item['latitude'].'",';
133
+					$output .= '"longitude": "'.$spotter_item['longitude'].'",';
134
+					$output .= '"altitude": "'.$spotter_item['altitude'].'",';
135
+					$output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",';
136
+					$output .= '"heading": "'.$spotter_item['heading'].'",';
137
+					$output .= '"heading_name": "'.$spotter_item['heading_name'].'",';
138
+					$output .= '"date": "'.date("c", strtotime($spotter_item['date_iso_8601'])).'"';
139
+			  $output .= '}';
140
+			  if ($spotter_item['waypoints'] != '') {
141
+			  $output .= ',"geometry": {';
142
+			  	$output .= '"type": "LineString",';
143
+					$output .= '"coordinates": [';
144
+						$waypoint_pieces = explode(' ', $spotter_item['waypoints']);
145 145
 									$waypoint_pieces = array_chunk($waypoint_pieces, 2);
146 146
 									    
147 147
 									foreach ($waypoint_pieces as $waypoint_coordinate)
148 148
 									{
149 149
 										$output .= '[';
150
-									        $output .=  $waypoint_coordinate[1].', ';	
151
-									        $output .=  $waypoint_coordinate[0];
150
+											$output .=  $waypoint_coordinate[1].', ';	
151
+											$output .=  $waypoint_coordinate[0];
152 152
 									  $output .= '],';
153 153
 									
154 154
 									}
155
-		            	$output = substr($output, 0, -1);
155
+						$output = substr($output, 0, -1);
156 156
 								$output .= ']';
157 157
 							$output .= '}';
158 158
 		}
@@ -161,50 +161,50 @@  discard block
 block discarded – undo
161 161
 				//location of aircraft
162 162
 				$output .= '{';  
163 163
 					$output .= '"type": "Feature",';
164
-	      		$output .= '"properties": {';
165
-	          	    $output .= '"id": "'.$spotter_item['spotter_id'].'",';
166
-                    $output .= '"ident": "'.$spotter_item['ident'].'",';
167
-                    $output .= '"registration": "'.$spotter_item['registration'].'",';
168
-                    $output .= '"aircraft_icao": "'.$spotter_item['aircraft_type'].'",';
169
-                    $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].'",';
170
-                    $output .= '"aircraft_manufacturer": "'.$spotter_item['aircraft_manufacturer'].'",';
171
-                    $output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
172
-                    $output .= '"airline_icao": "'.$spotter_item['airline_icao'].'",';
173
-                    $output .= '"airline_iata": "'.$spotter_item['airline_iata'].'",';
174
-                    $output .= '"airline_country": "'.$spotter_item['airline_country'].'",';
175
-                    $output .= '"airline_callsign": "'.$spotter_item['airline_callsign'].'",';
176
-                    $output .= '"airline_type": "'.$spotter_item['airline_type'].'",';
177
-                    $output .= '"departure_airport_city": "'.$spotter_item['departure_airport_city'].'",';
178
-                    $output .= '"departure_airport_country": "'.$spotter_item['departure_airport_country'].'",';
179
-                    $output .= '"departure_airport_iata": "'.$spotter_item['departure_airport_iata'].'",';
180
-                    $output .= '"departure_airport_icao": "'.$spotter_item['departure_airport_icao'].'",';
181
-                    $output .= '"departure_airport_latitude": "'.$spotter_item['departure_airport_latitude'].'",';
182
-                    $output .= '"departure_airport_longitude": "'.$spotter_item['departure_airport_longitude'].'",';
183
-                    $output .= '"departure_airport_altitude": "'.$spotter_item['departure_airport_altitude'].'",'; 
184
-                    $output .= '"arrival_airport_city": "'.$spotter_item['arrival_airport_city'].'",';
185
-                    $output .= '"arrival_airport_country": "'.$spotter_item['arrival_airport_country'].'",';
186
-                    $output .= '"arrival_airport_iata": "'.$spotter_item['arrival_airport_iata'].'",';
187
-                    $output .= '"departure_airport_icao": "'.$spotter_item['arrival_airport_icao'].'",';
188
-                    $output .= '"arrival_airport_latitude": "'.$spotter_item['arrival_airport_latitude'].'",';
189
-                    $output .= '"arrival_airport_longitude": "'.$spotter_item['arrival_airport_longitude'].'",';
190
-                    $output .= '"arrival_airport_altitude": "'.$spotter_item['arrival_airport_altitude'].'",';
191
-                    $output .= '"latitude": "'.$spotter_item['latitude'].'",';
192
-                    $output .= '"longitude": "'.$spotter_item['longitude'].'",';
193
-                    $output .= '"altitude": "'.$spotter_item['altitude'].'",';
194
-                    $output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",';
195
-                    $output .= '"heading": "'.$spotter_item['heading'].'",';
196
-                    $output .= '"heading_name": "'.$spotter_item['heading_name'].'",';
197
-                    $output .= '"date": "'.date("c", strtotime($spotter_item['date_iso_8601'])).'"';
198
-	          $output .= '},';
199
-	          $output .= '"geometry": {';
200
-	          	$output .= '"type": "Point",';
201
-	            	$output .= '"coordinates": [';
164
+		  		$output .= '"properties": {';
165
+			  		$output .= '"id": "'.$spotter_item['spotter_id'].'",';
166
+					$output .= '"ident": "'.$spotter_item['ident'].'",';
167
+					$output .= '"registration": "'.$spotter_item['registration'].'",';
168
+					$output .= '"aircraft_icao": "'.$spotter_item['aircraft_type'].'",';
169
+					$output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].'",';
170
+					$output .= '"aircraft_manufacturer": "'.$spotter_item['aircraft_manufacturer'].'",';
171
+					$output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
172
+					$output .= '"airline_icao": "'.$spotter_item['airline_icao'].'",';
173
+					$output .= '"airline_iata": "'.$spotter_item['airline_iata'].'",';
174
+					$output .= '"airline_country": "'.$spotter_item['airline_country'].'",';
175
+					$output .= '"airline_callsign": "'.$spotter_item['airline_callsign'].'",';
176
+					$output .= '"airline_type": "'.$spotter_item['airline_type'].'",';
177
+					$output .= '"departure_airport_city": "'.$spotter_item['departure_airport_city'].'",';
178
+					$output .= '"departure_airport_country": "'.$spotter_item['departure_airport_country'].'",';
179
+					$output .= '"departure_airport_iata": "'.$spotter_item['departure_airport_iata'].'",';
180
+					$output .= '"departure_airport_icao": "'.$spotter_item['departure_airport_icao'].'",';
181
+					$output .= '"departure_airport_latitude": "'.$spotter_item['departure_airport_latitude'].'",';
182
+					$output .= '"departure_airport_longitude": "'.$spotter_item['departure_airport_longitude'].'",';
183
+					$output .= '"departure_airport_altitude": "'.$spotter_item['departure_airport_altitude'].'",'; 
184
+					$output .= '"arrival_airport_city": "'.$spotter_item['arrival_airport_city'].'",';
185
+					$output .= '"arrival_airport_country": "'.$spotter_item['arrival_airport_country'].'",';
186
+					$output .= '"arrival_airport_iata": "'.$spotter_item['arrival_airport_iata'].'",';
187
+					$output .= '"departure_airport_icao": "'.$spotter_item['arrival_airport_icao'].'",';
188
+					$output .= '"arrival_airport_latitude": "'.$spotter_item['arrival_airport_latitude'].'",';
189
+					$output .= '"arrival_airport_longitude": "'.$spotter_item['arrival_airport_longitude'].'",';
190
+					$output .= '"arrival_airport_altitude": "'.$spotter_item['arrival_airport_altitude'].'",';
191
+					$output .= '"latitude": "'.$spotter_item['latitude'].'",';
192
+					$output .= '"longitude": "'.$spotter_item['longitude'].'",';
193
+					$output .= '"altitude": "'.$spotter_item['altitude'].'",';
194
+					$output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",';
195
+					$output .= '"heading": "'.$spotter_item['heading'].'",';
196
+					$output .= '"heading_name": "'.$spotter_item['heading_name'].'",';
197
+					$output .= '"date": "'.date("c", strtotime($spotter_item['date_iso_8601'])).'"';
198
+			  $output .= '},';
199
+			  $output .= '"geometry": {';
200
+			  	$output .= '"type": "Point",';
201
+					$output .= '"coordinates": [';
202 202
 										$output .=  $spotter_item['longitude'].', ';	
203 203
 									  $output .=  $spotter_item['latitude'];
204 204
 								$output .= ']';
205 205
 							$output .= '}';
206 206
 				$output .= '},';
207
-	    }
207
+		}
208 208
 	   }
209 209
 	   $output  = substr($output, 0, -1);
210 210
 	   
Please login to merge, or discard this patch.
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.