Completed
Push — master ( 2285a7...8ce5a2 )
by Yannick
06:42
created
airport-statistics-arrival-airport-country.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
           function drawChart() {
68 68
             var data = google.visualization.arrayToDataTable([
69 69
             	["'._("Country").'", "'._("# of times").'"], ';
70
-            	$country_data = '';
70
+				$country_data = '';
71 71
 	foreach($airport_country_array as $airport_item)
72 72
 	{
73 73
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
Please login to merge, or discard this patch.
airline-statistics-time.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airline'])) {
7
-        header('Location: '.$globalURL.'/airline');
8
-        die();
7
+		header('Location: '.$globalURL.'/airline');
8
+		die();
9 9
 }
10 10
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
           function drawChart() {
74 74
             var data = google.visualization.arrayToDataTable([
75 75
             	["'._("Hour").'", "'._("# of Flights").'"], ';
76
-        $hour_data = '';
76
+		$hour_data = '';
77 77
 	foreach($hour_array as $hour_item)
78 78
 	{
79 79
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
airport-statistics-route.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.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.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.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
country-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['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
registration-statistics-time.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
           function drawChart() {
39 39
             var data = google.visualization.arrayToDataTable([
40 40
             	["'._("Hour").'", "'._("# of Flights").'"], ';
41
-            	$hour_data = '';
41
+				$hour_data = '';
42 42
 	foreach($hour_array as $hour_item)
43 43
 	{
44 44
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
manufacturer-statistics-departure-airport-country.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.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
manufacturer-statistics-time.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
           function drawChart() {
56 56
             var data = google.visualization.arrayToDataTable([
57 57
             	["'._("Hour").'", "'._("# of Flights").'"], ';
58
-            	$hour_data = '';
58
+				$hour_data = '';
59 59
 	foreach($hour_array as $hour_item)
60 60
 	{
61 61
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
header.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // When button "Remove all filters" is clicked
29 29
 if (isset($_POST['removefilters'])) {
30 30
 	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
31
-	    return strpos($key,'filter_') === 0;
31
+		return strpos($key,'filter_') === 0;
32 32
 	});
33 33
 	foreach ($allfilters as $filt) {
34 34
 		unset($_COOKIE[$filt]);
@@ -167,16 +167,16 @@  discard block
 block discarded – undo
167 167
 	}
168 168
 ?>
169 169
 <?php 
170
-    if (isset($_POST['archive'])) {
170
+	if (isset($_POST['archive'])) {
171 171
 ?>
172 172
 <?php 
173
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
173
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
174 174
 ?>
175 175
 
176 176
 <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script>
177 177
 <?php    
178
-	    }
179
-    } else {
178
+		}
179
+	} else {
180 180
 ?>
181 181
 <?php
182 182
 /*	if (isset($globalBeta) && $globalBeta) {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 */
189 189
 ?>
190 190
 <?php 
191
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
191
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
192 192
 ?>
193 193
 <?php
194 194
 //		if (isset($globalBeta) && $globalBeta) {
@@ -199,13 +199,13 @@  discard block
 block discarded – undo
199 199
 ?>
200 200
 <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>"></script>
201 201
 <?php
202
-	    }
202
+		}
203 203
 ?>
204 204
 <?php
205 205
 //	}
206 206
 ?>
207 207
 <?php
208
-    }
208
+	}
209 209
 }
210 210
 ?>
211 211
 <?php
@@ -365,34 +365,34 @@  discard block
 block discarded – undo
365 365
             <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
366 366
             <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li>
367 367
             <?php
368
-        	if ($globalACARS) {
369
-        	    if (isset($globalDemo) && $globalDemo) {
370
-    	    ?>
368
+			if ($globalACARS) {
369
+				if (isset($globalDemo) && $globalDemo) {
370
+			?>
371 371
             <li><hr /></li>
372 372
             <li><i><?php echo _('ACARS data not available publicly'); ?></i></li>
373 373
             <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li>
374 374
             <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li>
375 375
             <?php
376
-        	    } else {
377
-    	    ?>
376
+				} else {
377
+			?>
378 378
             <li><hr /></li>
379 379
             <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li>
380 380
             <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li>
381 381
             <?php
382
-        	    }
383
-        	}
384
-    	    ?>
382
+				}
383
+			}
384
+			?>
385 385
     	    <?php
386
-    	        if (isset($globalAccidents) && $globalAccidents) {
387
-    	    ?>
386
+				if (isset($globalAccidents) && $globalAccidents) {
387
+			?>
388 388
             <li><hr /></li>
389 389
             <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident messages"); ?></a></li>
390 390
             <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li>
391 391
             <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident messages"); ?></a></li>
392 392
             <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li>
393 393
             <?php
394
-        	}
395
-    	    ?>
394
+			}
395
+			?>
396 396
             <li><hr /></li>
397 397
             <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li>
398 398
             <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li>
@@ -434,14 +434,14 @@  discard block
 block discarded – undo
434 434
   	    <form>
435 435
   		<select class="selectpicker" data-width="120px" onchange="language(this);">
436 436
   		    <?php
437
-  		        $Language = new Language();
438
-  		        $alllang = $Language->getLanguages();
439
-  		        foreach ($alllang as $key => $lang) {
440
-  		            print '<option value="'.$key.'"';
441
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
442
-  		            print '>'.$lang[0].'</option>';
443
-  		        }
444
-  		    ?>
437
+  				$Language = new Language();
438
+  				$alllang = $Language->getLanguages();
439
+  				foreach ($alllang as $key => $lang) {
440
+  					print '<option value="'.$key.'"';
441
+  					if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
442
+  					print '>'.$lang[0].'</option>';
443
+  				}
444
+  			?>
445 445
   		</select>
446 446
   	    </form>
447 447
   	</div>
@@ -472,18 +472,18 @@  discard block
 block discarded – undo
472 472
 ?>
473 473
     <div class="top-header clear" role="main">
474 474
 <?php
475
-    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
475
+	if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
476 476
 ?>
477 477
     <div id="archive-map"></div>
478 478
 <?php
479
-    }
479
+	}
480 480
 ?>
481 481
     </div>
482 482
 <?php
483 483
 }
484 484
 if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false))
485 485
 {
486
-    ?>
486
+	?>
487 487
     <div class="top-header clear" role="main">
488 488
         <div id="map"></div>
489 489
 	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
@@ -494,15 +494,15 @@  discard block
 block discarded – undo
494 494
         var zoom = 13;
495 495
 //create the map
496 496
 <?php
497
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
497
+	if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
498 498
 ?>
499 499
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
500 500
 <?php
501
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
501
+	} elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
502 502
 ?>
503 503
   map = L.map('map', { zoomControl:true });
504 504
 <?php
505
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
505
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
506 506
 ?>
507 507
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
508 508
     var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map);
@@ -510,22 +510,22 @@  discard block
 block discarded – undo
510 510
     var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
511 511
     var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
512 512
 <?php
513
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
513
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
514 514
 ?>
515 515
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
516 516
 <?php
517
-    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
517
+	} elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
518 518
 ?>
519 519
   map = L.map('map', { zoomControl:true });
520 520
 <?php
521
-    }
521
+	}
522 522
 ?>
523 523
   //initialize the layer group for the aircrft markers
524 524
   var layer_data = L.layerGroup();
525 525
 
526 526
   //a few title layers
527 527
 <?php
528
-    if ($globalMapProvider == 'Mapbox') {
528
+	if ($globalMapProvider == 'Mapbox') {
529 529
 ?>
530 530
   L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
531 531
     maxZoom: 18,
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     token : '<?php print $globalMapboxToken; ?>'
537 537
   }).addTo(map);
538 538
 <?php
539
-    } elseif ($globalMapProvider == 'OpenStreetMap') {
539
+	} elseif ($globalMapProvider == 'OpenStreetMap') {
540 540
 ?>
541 541
   L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
542 542
     maxZoom: 18,
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
       '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>'
545 545
   }).addTo(map);
546 546
 <?php
547
-    } elseif ($globalMapProvider == 'MapQuest-OSM') {
547
+	} elseif ($globalMapProvider == 'MapQuest-OSM') {
548 548
 ?>
549 549
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
550 550
     maxZoom: 18,
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>'
554 554
   }).addTo(map);
555 555
 <?php
556
-    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
556
+	} elseif ($globalMapProvider == 'MapQuest-Aerial') {
557 557
 ?>
558 558
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
559 559
     maxZoom: 18,
@@ -562,27 +562,27 @@  discard block
 block discarded – undo
562 562
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"'
563 563
   }).addTo(map);
564 564
 <?php
565
-    } elseif ($globalMapProvider == 'Google-Roadmap') {
565
+	} elseif ($globalMapProvider == 'Google-Roadmap') {
566 566
 ?>
567 567
     var googleLayer = new L.Google('ROADMAP');
568 568
     map.addLayer(googleLayer);
569 569
 <?php
570
-    } elseif ($globalMapProvider == 'Google-Satellite') {
570
+	} elseif ($globalMapProvider == 'Google-Satellite') {
571 571
 ?>
572 572
     var googleLayer = new L.Google('SATELLITE');
573 573
     map.addLayer(googleLayer);
574 574
 <?php
575
-    } elseif ($globalMapProvider == 'Google-Hybrid') {
575
+	} elseif ($globalMapProvider == 'Google-Hybrid') {
576 576
 ?>
577 577
     var googleLayer = new L.Google('HYBRID');
578 578
     map.addLayer(googleLayer);
579 579
 <?php
580
-    } elseif ($globalMapProvider == 'Google-Terrain') {
580
+	} elseif ($globalMapProvider == 'Google-Terrain') {
581 581
 ?>
582 582
     var googleLayer = new L.Google('Terrain');
583 583
     map.addLayer(googleLayer);
584 584
 <?php
585
-    }
585
+	}
586 586
 ?>
587 587
         </script>
588 588
     </div>
Please login to merge, or discard this patch.