Completed
Push — master ( 4407ee...8e145a )
by Yannick
06:51
created
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.
install/header.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 <meta property="og:site_name" content="<?php print $globalName; ?>"/>
41 41
 
42 42
 <?php
43
-    if (!isset($_SESSION['install']) && !$globalInstalled) {
43
+	if (!isset($_SESSION['install']) && !$globalInstalled) {
44 44
 ?>
45 45
 <script language="JavaScript" type="text/javascript">
46 46
     function datasource_js() {
@@ -121,22 +121,22 @@  discard block
 block discarded – undo
121 121
     }
122 122
 </script>
123 123
 <?php
124
-    }
124
+	}
125 125
 ?>
126 126
 
127 127
 </head>
128 128
 
129 129
 <?php
130
-    if (!isset($_SESSION['install']) && !$globalInstalled) {
130
+	if (!isset($_SESSION['install']) && !$globalInstalled) {
131 131
 ?>
132 132
 
133 133
 <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()">
134 134
 <?php
135
-    } else {
135
+	} else {
136 136
 ?>
137 137
     <body class="page-<?php print strtolower($current_page); ?>">
138 138
 <?php
139
-    }
139
+	}
140 140
 ?>
141 141
 <div class="navbar navbar-fixed-top" role="navigation">
142 142
     <div class="container">
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
 
188 188
 <?php
189 189
 if (isset($top_header)) {
190
-    if ($top_header != "")
191
-    {
190
+	if ($top_header != "")
191
+	{
192 192
 	print '<div class="top-header container clear" role="main">';
193 193
 		print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />';
194 194
 	print '</div>';
195
-    }
195
+	}
196 196
 }
197 197
 ?>
198 198
 
Please login to merge, or discard this patch.
country-statistics-route.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.
ident-statistics-departure-airport-country.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
ident-statistics-manufacturer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
airport-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['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();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
           function drawChart() {
70 70
             var data = google.visualization.arrayToDataTable([
71 71
             	["'._("Hour").'", "'._("# of Flights").'"], ';
72
-            $hour_data = '';
72
+			$hour_data = '';
73 73
 	foreach($hour_array as $hour_item)
74 74
 	{
75 75
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
statistics-year.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 if (!isset($filter_name)) $filter_name = '';
9 9
 $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == 'all') {
11
-    unset($_COOKIE['stats_airline_icao']);
12
-    setcookie('stats_airline_icao', '', time()-3600);
13
-    $airline_icao = '';
11
+	unset($_COOKIE['stats_airline_icao']);
12
+	setcookie('stats_airline_icao', '', time()-3600);
13
+	$airline_icao = '';
14 14
 } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) {
15
-    $airline_icao = $_COOKIE['stats_airline_icao'];
15
+	$airline_icao = $_COOKIE['stats_airline_icao'];
16 16
 } elseif ($airline_icao == '' && isset($globalFilter)) {
17
-    if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
17
+	if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
18 18
 }
19 19
 setcookie('stats_airline_icao',$airline_icao);
20 20
 
Please login to merge, or discard this patch.
statistics-time.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 if (!isset($filter_name)) $filter_name = '';
9 9
 $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == 'all') {
11
-    unset($_COOKIE['stats_airline_icao']);
12
-    setcookie('stats_airline_icao', '', time()-3600);
13
-    $airline_icao = '';
11
+	unset($_COOKIE['stats_airline_icao']);
12
+	setcookie('stats_airline_icao', '', time()-3600);
13
+	$airline_icao = '';
14 14
 } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) {
15
-    $airline_icao = $_COOKIE['stats_airline_icao'];
15
+	$airline_icao = $_COOKIE['stats_airline_icao'];
16 16
 } elseif ($airline_icao == '' && isset($globalFilter)) {
17
-    if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
17
+	if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
18 18
 }
19 19
 setcookie('stats_airline_icao',$airline_icao);
20 20
 
Please login to merge, or discard this patch.
airline-statistics-registration.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['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();
Please login to merge, or discard this patch.