Completed
Pull Request — master (#456)
by
unknown
09:39
created
search.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -91,32 +91,32 @@
 block discarded – undo
91 91
 $limit_previous_2 = $limit_end - $absolute_difference;
92 92
 
93 93
 if (
94
-    (isset($_GET['q']) && $_GET['q'] != '') || 
95
-    (isset($_GET['registration']) && $_GET['registration'] != '') || 
96
-    (isset($_GET['aircraft']) && $_GET['aircraft'] != '') ||
97
-    (isset($_GET['manufacturer']) && $_GET['manufacturer'] != '') ||
98
-    (isset($_GET['highlights']) && $_GET['highlights'] != '') ||
99
-    (isset($_GET['airline']) && $_GET['airline'] != '') ||
100
-    (isset($_GET['airline_country']) && $_GET['airline_country'] != '') ||
101
-    (isset($_GET['airline_type']) && $_GET['airline_type'] != '') ||
102
-    (isset($_GET['airport']) && $_GET['airport'] != '') ||
103
-    (isset($_GET['airport_country']) && $_GET['airport_country'] != '') ||
104
-    (isset($_GET['callsign']) && $_GET['callsign'] != '') ||
105
-    (isset($_GET['captain_id']) && $_GET['captain_id'] != '') ||
106
-    (isset($_GET['race_id']) && $_GET['race_id'] != '') ||
107
-    (isset($_GET['captain_name']) && $_GET['captain_name'] != '') ||
108
-    (isset($_GET['race_name']) && $_GET['race_name'] != '') ||
109
-    (isset($_GET['owner']) && $_GET['owner'] != '') ||
110
-    (isset($_GET['pilot_name']) && $_GET['pilot_name'] != '') ||
111
-    (isset($_GET['pilot_id']) && $_GET['pilot_id'] != '') ||
112
-    (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != '') ||
113
-    (isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != '') ||
114
-    (isset($_GET['mmsi']) && $_GET['mmsi'] != '') ||
115
-    (isset($_GET['imo']) && $_GET['imo'] != '') ||
116
-    ((isset($_GET['origlat']) && $_GET['origlat'] != '') &&
117
-    (isset($_GET['origlon']) && $_GET['origlon'] != '') &&
118
-    (isset($_GET['dist']) && $_GET['dist'] != ''))
119
-    ){  
94
+	(isset($_GET['q']) && $_GET['q'] != '') || 
95
+	(isset($_GET['registration']) && $_GET['registration'] != '') || 
96
+	(isset($_GET['aircraft']) && $_GET['aircraft'] != '') ||
97
+	(isset($_GET['manufacturer']) && $_GET['manufacturer'] != '') ||
98
+	(isset($_GET['highlights']) && $_GET['highlights'] != '') ||
99
+	(isset($_GET['airline']) && $_GET['airline'] != '') ||
100
+	(isset($_GET['airline_country']) && $_GET['airline_country'] != '') ||
101
+	(isset($_GET['airline_type']) && $_GET['airline_type'] != '') ||
102
+	(isset($_GET['airport']) && $_GET['airport'] != '') ||
103
+	(isset($_GET['airport_country']) && $_GET['airport_country'] != '') ||
104
+	(isset($_GET['callsign']) && $_GET['callsign'] != '') ||
105
+	(isset($_GET['captain_id']) && $_GET['captain_id'] != '') ||
106
+	(isset($_GET['race_id']) && $_GET['race_id'] != '') ||
107
+	(isset($_GET['captain_name']) && $_GET['captain_name'] != '') ||
108
+	(isset($_GET['race_name']) && $_GET['race_name'] != '') ||
109
+	(isset($_GET['owner']) && $_GET['owner'] != '') ||
110
+	(isset($_GET['pilot_name']) && $_GET['pilot_name'] != '') ||
111
+	(isset($_GET['pilot_id']) && $_GET['pilot_id'] != '') ||
112
+	(isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != '') ||
113
+	(isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != '') ||
114
+	(isset($_GET['mmsi']) && $_GET['mmsi'] != '') ||
115
+	(isset($_GET['imo']) && $_GET['imo'] != '') ||
116
+	((isset($_GET['origlat']) && $_GET['origlat'] != '') &&
117
+	(isset($_GET['origlon']) && $_GET['origlon'] != '') &&
118
+	(isset($_GET['dist']) && $_GET['dist'] != ''))
119
+	){  
120 120
 	$q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING);
121 121
 	$registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING);
122 122
 	$aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
statistics.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
                 <div class="more">
268 268
             	    <?php
269 269
             	    
270
-            		if ($year != '' && $month != '') {
271
-            	    ?>
270
+					if ($year != '' && $month != '') {
271
+					?>
272 272
             	    <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
273 273
             	    <?php
274
-            		} else {
275
-            	    ?>
274
+					} else {
275
+					?>
276 276
             	    <a href="<?php print $globalURL; ?>/marine/statistics/type" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
277 277
             	    <?php
278
-            		}
279
-            	    ?>
278
+					}
279
+					?>
280 280
                 </div>
281 281
             </div>
282 282
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
@@ -308,16 +308,16 @@  discard block
 block discarded – undo
308 308
 ?>
309 309
                 <div class="more">
310 310
             	    <?php
311
-            		if ($year != '' && $month != '') {
312
-            	    ?>
311
+					if ($year != '' && $month != '') {
312
+					?>
313 313
             	    <a href="<?php print $globalURL; ?>/marine/statistics/race/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
314 314
             	    <?php
315
-            		} else {
316
-            	    ?>
315
+					} else {
316
+					?>
317 317
             	    <a href="<?php print $globalURL; ?>/marine/statistics/race" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
318 318
             	    <?php
319
-            		}
320
-            	    ?>
319
+					}
320
+					?>
321 321
                 </div>
322 322
             </div>
323 323
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 ?>
355 355
                 <div class="more">
356 356
             	    <?php
357
-            	    /*
357
+					/*
358 358
             		if ($year != '' && $month != '') {
359 359
             	    ?>
360 360
             	    <a href="<?php print $globalURL; ?>/tracker/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             	    <?php
366 366
             		}
367 367
             		*/
368
-            	    ?>
368
+					?>
369 369
                 </div>
370 370
             </div>
371 371
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
Please login to merge, or discard this patch.
footer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 </div>
7 7
 <footer class="container">
8 8
 	<?php
9
-	    if (isset($sql_time)) {
9
+		if (isset($sql_time)) {
10 10
 	?>
11 11
 	<i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i>
12 12
 	<br />
13 13
 	<?php
14
-	    }
14
+		}
15 15
 	?>
16 16
 	<span>Developed in Barrie by <a href="http://www.mariotrunz.me/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.com/" target="_blank">Get source code</a></span>
17 17
 </footer>
Please login to merge, or discard this patch.
header.php 1 patch
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 // When button "Remove all filters" is clicked
39 39
 if (isset($_POST['removefilters'])) {
40 40
 	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
41
-	    return strpos($key,'filter_') === 0;
41
+		return strpos($key,'filter_') === 0;
42 42
 	});
43 43
 	foreach ($allfilters as $filt) {
44 44
 		unset($_COOKIE[$filt]);
@@ -409,34 +409,34 @@  discard block
 block discarded – undo
409 409
 
410 410
       <ul class="nav navbar-nav">
411 411
 <?php
412
-    if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) {
412
+	if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) {
413 413
 ?>
414 414
     <li><a href="<?php print $globalURL; ?>/news"><?php echo _("News"); ?></a></li>
415 415
 <?php
416
-    }
416
+	}
417 417
 ?>
418 418
 
419 419
 <?php 
420
-    $sub = false;
421
-    if (
420
+	$sub = false;
421
+	if (
422 422
 	(
423
-	    (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
423
+		(!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
424 424
 	) || 
425 425
 	(
426
-	    isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
426
+		isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
427 427
 	) || 
428 428
 	(
429
-	    isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
429
+		isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE))
430 430
 	) || 
431 431
 	(
432
-	    isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))
432
+		isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))
433 433
 	)
434
-    ) {
434
+	) {
435 435
 	$sub = true;
436
-    }
436
+	}
437 437
 ?>
438 438
 <?php
439
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
439
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
440 440
 ?>
441 441
     <li class="dropdown">
442 442
 <?php
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 	<ul class="dropdown-menu multi-level">
448 448
       	<li class="dropdown-submenu">
449 449
 <?php
450
-        }
450
+		}
451 451
 ?>
452 452
 <?php
453 453
 	if (isset($globalNewsFeeds['aircraft']) && !empty($globalNewsFeeds['aircraft'])) {
@@ -462,25 +462,25 @@  discard block
 block discarded – undo
462 462
           <ul class="dropdown-menu">
463 463
           	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li>
464 464
 <?php
465
-    if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) {
465
+	if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) {
466 466
 ?>
467 467
 			<li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li>
468 468
 <?php
469
-    }
469
+	}
470 470
 ?>
471 471
 			<li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li>
472 472
 <?php
473
-    if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
473
+	if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
474 474
 ?>
475 475
 			<li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li>
476 476
 <?php
477
-    } 
478
-    if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
477
+	} 
478
+	if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
479 479
 
480 480
 ?>
481 481
 			<li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li>
482 482
 <?php
483
-    }
483
+	}
484 484
 ?>
485 485
 			<li><hr /></li>
486 486
             <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li>
@@ -488,43 +488,43 @@  discard block
 block discarded – undo
488 488
             <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
489 489
             <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li>
490 490
             <?php
491
-        	if ($globalACARS) {
492
-        	    if (isset($globalDemo) && $globalDemo) {
493
-    	    ?>
491
+			if ($globalACARS) {
492
+				if (isset($globalDemo) && $globalDemo) {
493
+			?>
494 494
             <li><hr /></li>
495 495
             <li><i><?php echo _('ACARS data not available publicly'); ?></i></li>
496 496
             <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li>
497 497
             <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li>
498 498
             <?php
499
-        	    } else {
500
-    	    ?>
499
+				} else {
500
+			?>
501 501
             <li><hr /></li>
502 502
             <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li>
503 503
             <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li>
504 504
             <?php
505
-        	    }
506
-        	}
507
-    	    ?>
505
+				}
506
+			}
507
+			?>
508 508
     	    <?php
509
-    	        if (isset($globalAccidents) && $globalAccidents) {
510
-    	    ?>
509
+				if (isset($globalAccidents) && $globalAccidents) {
510
+			?>
511 511
             <li><hr /></li>
512 512
             <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li>
513 513
             <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li>
514 514
             <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li>
515 515
             <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li>
516 516
             <?php
517
-        	}
518
-    	    ?>
517
+			}
518
+			?>
519 519
             <li><hr /></li>
520 520
             <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li>
521 521
             <?php
522 522
 		if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) {
523
-	    ?>
523
+		?>
524 524
             <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li>
525 525
 	    <?php
526 526
 		}
527
-	    ?>
527
+		?>
528 528
           </ul>
529 529
         </li>
530 530
       	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
@@ -551,14 +551,14 @@  discard block
 block discarded – undo
551 551
     </ul>
552 552
 <?php
553 553
 	}
554
-    }
554
+	}
555 555
 ?>
556 556
 <?php
557
-    if (isset($globalMarine) && $globalMarine) {
557
+	if (isset($globalMarine) && $globalMarine) {
558 558
 ?>
559 559
     <li class="dropdown">
560 560
 <?php
561
-        if ($sub) {
561
+		if ($sub) {
562 562
 ?>
563 563
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Marines"); ?> <b class="caret"></b></a>
564 564
 	<ul class="dropdown-menu multi-level">
@@ -601,14 +601,14 @@  discard block
 block discarded – undo
601 601
 	}
602 602
 ?>
603 603
 <?php
604
-    }
604
+	}
605 605
 ?>
606 606
 <?php
607
-    if (isset($globalTracker) && $globalTracker) {
607
+	if (isset($globalTracker) && $globalTracker) {
608 608
 ?>
609 609
     <li class="dropdown">
610 610
 <?php
611
-        if ($sub) {
611
+		if ($sub) {
612 612
 ?>
613 613
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a>
614 614
 	<ul class="dropdown-menu multi-level">
@@ -642,14 +642,14 @@  discard block
 block discarded – undo
642 642
 	}
643 643
 ?>
644 644
 <?php
645
-    }
645
+	}
646 646
 ?>
647 647
 <?php
648
-    if (isset($globalSatellite) && $globalSatellite) {
648
+	if (isset($globalSatellite) && $globalSatellite) {
649 649
 ?>
650 650
     <li class="dropdown">
651 651
 <?php
652
-        if ($sub) {
652
+		if ($sub) {
653 653
 ?>
654 654
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a>
655 655
 	<ul class="dropdown-menu multi-level">
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 	}
686 686
 ?>
687 687
 <?php
688
-    }
688
+	}
689 689
 ?>
690 690
 
691 691
         <li class="dropdown">
@@ -693,13 +693,13 @@  discard block
 block discarded – undo
693 693
           <ul class="dropdown-menu">
694 694
           	<li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li>
695 695
 <?php
696
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
696
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
697 697
 ?>
698 698
           	<li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li>
699 699
 		<li><hr /></li>
700 700
 		<li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li>
701 701
 <?php
702
-    }
702
+	}
703 703
 ?>
704 704
 	    <?php if (isset($globalContribute) && $globalContribute) { ?>
705 705
                 <li><hr /></li>
@@ -723,13 +723,13 @@  discard block
 block discarded – undo
723 723
   	    <form>
724 724
   		<select class="selectpicker" data-width="120px" onchange="language(this);">
725 725
   		    <?php
726
-  		        foreach ($alllang as $key => $lang) {
727
-  		            print '<option value="'.$key.'"';
728
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
729
-  		            if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (&beta;eta)</option>';
730
-  		            else print '>'.$lang[0].'</option>';
731
-  		        }
732
-  		    ?>
726
+  				foreach ($alllang as $key => $lang) {
727
+  					print '<option value="'.$key.'"';
728
+  					if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
729
+  					if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (&beta;eta)</option>';
730
+  					else print '>'.$lang[0].'</option>';
731
+  				}
732
+  			?>
733 733
   		</select>
734 734
   	    </form>
735 735
   	</div>
@@ -762,18 +762,18 @@  discard block
 block discarded – undo
762 762
 ?>
763 763
     <div class="top-header clear" role="main">
764 764
 <?php
765
-    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
765
+	if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
766 766
 ?>
767 767
     <div id="archive-map"></div>
768 768
 <?php
769
-    }
769
+	}
770 770
 ?>
771 771
     </div>
772 772
 <?php
773 773
 }
774 774
 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))
775 775
 {
776
-    ?>
776
+	?>
777 777
     <div class="top-header clear" role="main">
778 778
         <div id="map"></div>
779 779
 	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
@@ -784,15 +784,15 @@  discard block
 block discarded – undo
784 784
         var zoom = 13;
785 785
 //create the map
786 786
 <?php
787
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
787
+	if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
788 788
 ?>
789 789
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
790 790
 <?php
791
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
791
+	} elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
792 792
 ?>
793 793
   map = L.map('map', { zoomControl:true });
794 794
 <?php
795
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
795
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
796 796
 ?>
797 797
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
798 798
     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);
@@ -800,22 +800,22 @@  discard block
 block discarded – undo
800 800
     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);
801 801
     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);
802 802
 <?php
803
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
803
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
804 804
 ?>
805 805
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
806 806
 <?php
807
-    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
807
+	} elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
808 808
 ?>
809 809
   map = L.map('map', { zoomControl:true });
810 810
 <?php
811
-    }
811
+	}
812 812
 ?>
813 813
   //initialize the layer group for the aircrft markers
814 814
   var layer_data = L.layerGroup();
815 815
 
816 816
   //a few title layers
817 817
 <?php
818
-    if ($globalMapProvider == 'Mapbox') {
818
+	if ($globalMapProvider == 'Mapbox') {
819 819
 ?>
820 820
   L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
821 821
     maxZoom: 18,
@@ -826,14 +826,14 @@  discard block
 block discarded – undo
826 826
     token : '<?php print $globalMapboxToken; ?>'
827 827
   }).addTo(map);
828 828
 <?php
829
-    } elseif ($globalMapProvider == 'Mapbox-GL') {
829
+	} elseif ($globalMapProvider == 'Mapbox-GL') {
830 830
 ?>
831 831
     L.mapboxGL({
832 832
 	accessToken: '<?php print $globalMapboxToken; ?>',
833 833
 	style: 'mapbox://styles/mapbox/bright-v8'
834 834
   }).addTo(map);
835 835
 <?php
836
-    } elseif ($globalMapProvider == 'MapQuest-OSM') {
836
+	} elseif ($globalMapProvider == 'MapQuest-OSM') {
837 837
 ?>
838 838
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
839 839
     maxZoom: 18,
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>'
843 843
   }).addTo(map);
844 844
 <?php
845
-    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
845
+	} elseif ($globalMapProvider == 'MapQuest-Aerial') {
846 846
 ?>
847 847
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
848 848
     maxZoom: 18,
@@ -851,27 +851,27 @@  discard block
 block discarded – undo
851 851
       '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"'
852 852
   }).addTo(map);
853 853
 <?php
854
-    } elseif ($globalMapProvider == 'Google-Roadmap') {
854
+	} elseif ($globalMapProvider == 'Google-Roadmap') {
855 855
 ?>
856 856
     var googleLayer = new L.Google('ROADMAP');
857 857
     map.addLayer(googleLayer);
858 858
 <?php
859
-    } elseif ($globalMapProvider == 'Google-Satellite') {
859
+	} elseif ($globalMapProvider == 'Google-Satellite') {
860 860
 ?>
861 861
     var googleLayer = new L.Google('SATELLITE');
862 862
     map.addLayer(googleLayer);
863 863
 <?php
864
-    } elseif ($globalMapProvider == 'Google-Hybrid') {
864
+	} elseif ($globalMapProvider == 'Google-Hybrid') {
865 865
 ?>
866 866
     var googleLayer = new L.Google('HYBRID');
867 867
     map.addLayer(googleLayer);
868 868
 <?php
869
-    } elseif ($globalMapProvider == 'Google-Terrain') {
869
+	} elseif ($globalMapProvider == 'Google-Terrain') {
870 870
 ?>
871 871
     var googleLayer = new L.Google('Terrain');
872 872
     map.addLayer(googleLayer);
873 873
 <?php
874
-    } elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
874
+	} elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
875 875
 	$customid = $globalMapProvider;
876 876
 ?>
877 877
     L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
         attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
882 882
     }).addTo(map);
883 883
 <?php
884
-    } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) {
884
+	} elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) {
885 885
 ?>
886 886
     var center = map.getCenter();
887 887
     map.options.crs = L.CRS.EPSG4326;
@@ -896,8 +896,8 @@  discard block
 block discarded – undo
896 896
         attribution: 'Natural Earth'
897 897
     }).addTo(map);
898 898
 <?php
899
-    //} elseif ($globalMapProvider == 'OpenStreetMap') {
900
-    } else {
899
+	//} elseif ($globalMapProvider == 'OpenStreetMap') {
900
+	} else {
901 901
 ?>
902 902
   L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
903 903
     maxZoom: 18,
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
   }).addTo(map);
907 907
 
908 908
 <?php
909
-    }
909
+	}
910 910
 ?>
911 911
         </script>
912 912
     </div>
Please login to merge, or discard this patch.
location-geojson.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
 {
14 14
 	$coords = explode(',',$_GET['coord']);
15 15
 	if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
16
-	    || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) {
16
+		|| (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) {
17 17
 		//$spotter_array = $Source->getAllLocationInfo();
18 18
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs',$coords));
19 19
 	}
20 20
 	if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
21
-	    || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) {
21
+		|| (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) {
22 22
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx',$coords));
23 23
 	}
24 24
 	if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
25
-	    || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) {
25
+		|| (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) {
26 26
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning',$coords));
27 27
 	}
28 28
 	if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') 
29
-	    || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) {
29
+		|| (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) {
30 30
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',$coords,true));
31 31
 	}
32 32
 	if (!isset($globalDemo)) {
@@ -34,20 +34,20 @@  discard block
 block discarded – undo
34 34
 	}
35 35
 } else {
36 36
 	if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
37
-	    || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) {
37
+		|| (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) {
38 38
 		//$spotter_array = $Source->getAllLocationInfo();
39 39
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs'));
40 40
 	}
41 41
 	if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
42
-	    || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) {
42
+		|| (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) {
43 43
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx'));
44 44
 	}
45 45
 	if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
46
-	    || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) {
46
+		|| (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) {
47 47
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning'));
48 48
 	}
49 49
 	if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') 
50
-	    || (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) {
50
+		|| (!isset($_COOKIE['show_Fire']) && (isset($globalMapFires) && $globalMapFires === TRUE))) {
51 51
 		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',array(),true));
52 52
 	}
53 53
 	if (!isset($globalDemo)) {
Please login to merge, or discard this patch.
scripts/daemon-acars.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -11,27 +11,27 @@  discard block
 block discarded – undo
11 11
 require_once(dirname(__FILE__).'/../require/class.Connection.php');
12 12
 $schema = new Connection();
13 13
 if ($schema->latest() === false) {
14
-    echo "You MUST update to latest schema. Run install/index.php";
15
-    exit();
14
+	echo "You MUST update to latest schema. Run install/index.php";
15
+	exit();
16 16
 }
17 17
 if ($globalInstalled === FALSE) {
18
-    echo "Install script MUST be run before this script. Use you web browser to run install/index.php";
19
-    die();
18
+	echo "Install script MUST be run before this script. Use you web browser to run install/index.php";
19
+	die();
20 20
 }
21 21
 if (!isset($globalACARSHost) || !isset($globalACARSPort) || $globalACARSHost == '' || $globalACARSPort == '') {
22
-    echo 'You MUST define $globalACARSHost and $globalACARSPort in require/settings.php';
23
-    die();
22
+	echo 'You MUST define $globalACARSHost and $globalACARSPort in require/settings.php';
23
+	die();
24 24
 }
25 25
 
26 26
 $ACARS=new ACARS(null,true);
27 27
 date_default_timezone_set('UTC');
28 28
 // signal handler - playing nice with sockets and dump1090
29 29
 pcntl_signal(SIGINT,  function($signo) {
30
-    global $sock;
31
-    echo "\n\nctrl-c or kill signal received. Tidying up ... ";
32
-    socket_shutdown($sock, 0);
33
-    socket_close($sock);
34
-    die("Bye!\n");
30
+	global $sock;
31
+	echo "\n\nctrl-c or kill signal received. Tidying up ... ";
32
+	socket_shutdown($sock, 0);
33
+	socket_close($sock);
34
+	die("Bye!\n");
35 35
 });
36 36
 pcntl_signal_dispatch();
37 37
 
@@ -44,24 +44,24 @@  discard block
 block discarded – undo
44 44
 // Bind the source address
45 45
 if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) )
46 46
 {
47
-    $errorcode = socket_last_error();
48
-    $errormsg = socket_strerror($errorcode);
47
+	$errorcode = socket_last_error();
48
+	$errormsg = socket_strerror($errorcode);
49 49
      
50
-    die("Could not bind socket : [$errorcode] $errormsg \n");
50
+	die("Could not bind socket : [$errorcode] $errormsg \n");
51 51
 }
52 52
 
53 53
 if ($globalDebug) echo "LISTEN UDP MODE \n\n";
54 54
 while(1) {
55
-    $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
55
+	$r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
56 56
 
57
-    // lets play nice and handle signals such as ctrl-c/kill properly
58
-    pcntl_signal_dispatch();
59
-    $dataFound = false;
60
-    //  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
61
-    if ($globalDebug) echo $buffer."\n";
62
-    $ACARS->add(trim($buffer));
63
-    socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
64
-    $ACARS->deleteLiveAcarsData();
57
+	// lets play nice and handle signals such as ctrl-c/kill properly
58
+	pcntl_signal_dispatch();
59
+	$dataFound = false;
60
+	//  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
61
+	if ($globalDebug) echo $buffer."\n";
62
+	$ACARS->add(trim($buffer));
63
+	socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
64
+	$ACARS->deleteLiveAcarsData();
65 65
 }
66 66
 pcntl_exec($_,$argv);
67 67
 ?>
Please login to merge, or discard this patch.
install/header.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 <meta property="og:site_name" content="<?php print $globalName; ?>"/>
46 46
 
47 47
 <?php
48
-    if (!isset($_SESSION['install']) && !isset($_POST['dbtype'])) {
48
+	if (!isset($_SESSION['install']) && !isset($_POST['dbtype'])) {
49 49
 ?>
50 50
 <script language="JavaScript" type="text/javascript">
51 51
     function datasource_js() {
@@ -154,22 +154,22 @@  discard block
 block discarded – undo
154 154
     }
155 155
 </script>
156 156
 <?php
157
-    }
157
+	}
158 158
 ?>
159 159
 
160 160
 </head>
161 161
 
162 162
 <?php
163
-    if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && isset($_SESSION['identified'])) {
163
+	if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && isset($_SESSION['identified'])) {
164 164
 ?>
165 165
 
166 166
 <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()">
167 167
 <?php
168
-    } else {
168
+	} else {
169 169
 ?>
170 170
     <body class="page-<?php print strtolower($current_page); ?>">
171 171
 <?php
172
-    }
172
+	}
173 173
 ?>
174 174
 <div class="navbar navbar-fixed-top" role="navigation">
175 175
     <div class="container">
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	    <a class="navbar-brand" href="../"><img src="<?php print '../'.$logoURL; ?>" height="30px" /></a>
184 184
 	</div>
185 185
 <?php
186
-    if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && isset($_SESSION['identified'])) {
186
+	if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && isset($_SESSION['identified'])) {
187 187
 ?>
188 188
 	<div class="collapse navbar-collapse">
189 189
 	    <ul class="nav navbar-nav">
@@ -213,19 +213,19 @@  discard block
 block discarded – undo
213 213
 	     </ul>
214 214
 	</div>
215 215
 <?php
216
-    }
216
+	}
217 217
 ?>
218 218
     </div>
219 219
 </div>
220 220
 
221 221
 <?php
222 222
 if (isset($top_header)) {
223
-    if ($top_header != "")
224
-    {
223
+	if ($top_header != "")
224
+	{
225 225
 	print '<div class="top-header container clear" role="main">';
226 226
 		print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />';
227 227
 	print '</div>';
228
-    }
228
+	}
229 229
 }
230 230
 ?>
231 231
 
Please login to merge, or discard this patch.
js/map.2d.js.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 	};
449 449
 
450 450
 <?php
451
-    if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
451
+	if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
452 452
 ?>
453 453
 	function tskPopup (feature, layer) {
454 454
 		var output = '';
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 	};
484 484
 	update_tsk();
485 485
 <?php
486
-    }
486
+	}
487 487
 ?>
488 488
 	map.on('moveend', function() {
489 489
 		if (map.hasLayer(locationsLayer) == true) {
@@ -504,10 +504,10 @@  discard block
 block discarded – undo
504 504
 		update_santaLayer(false);
505 505
 	}
506 506
 <?php
507
-    // Add support for custom json via $globalMapJson
508
-    if (isset($globalMapJson) && is_array($globalMapJson)) {
507
+	// Add support for custom json via $globalMapJson
508
+	if (isset($globalMapJson) && is_array($globalMapJson)) {
509 509
 	foreach ($globalMapJson as $json) {
510
-	    if (isset($json['url'])) {
510
+		if (isset($json['url'])) {
511 511
 ?>
512 512
 update_genLayer('<?php print $json['url']; ?>');
513 513
 <?php
@@ -516,9 +516,9 @@  discard block
 block discarded – undo
516 516
 setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>);
517 517
 <?php
518 518
 		}
519
-	    }
519
+		}
520
+	}
520 521
 	}
521
-    }
522 522
 
523 523
 ?>
524 524
 //adds the bootstrap tooltip to the map icons
Please login to merge, or discard this patch.
install/index.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -229,13 +229,13 @@  discard block
 block discarded – undo
229 229
 			<p>
230 230
 				<label for="siteurl">Site directory</label>
231 231
 				<?php
232
-				    // Try to detect site directory
233
-				    if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) {
232
+					// Try to detect site directory
233
+					if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) {
234 234
 					if (isset($_SERVER['REQUEST_URI'])) {
235 235
 						$URL = $_SERVER['REQUEST_URI'];
236 236
 						$globalURL = str_replace('/install','',str_replace('/install/','',str_replace('/install/index.php','',$URL)));
237 237
 					}
238
-				    }
238
+					}
239 239
 				?>
240 240
 				<input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" />
241 241
 				<p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p>
@@ -416,17 +416,17 @@  discard block
 block discarded – undo
416 416
 				</thead>
417 417
 				<tbody>
418 418
 		<?php
419
-		    if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') {
419
+			if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') {
420 420
 		?>
421 421
 		<!--
422 422
 		<?php
423
-			    require_once(dirname(__FILE__).'/../require/class.Connection.php');
424
-			    $Connection = new Connection();
423
+				require_once(dirname(__FILE__).'/../require/class.Connection.php');
424
+				$Connection = new Connection();
425 425
 		?>
426 426
 		-->
427 427
 		<?php
428 428
 			if ($Connection->db != NULL) {
429
-			    if ($Connection->tableExists('source_location')) {
429
+				if ($Connection->tableExists('source_location')) {
430 430
 				require_once(dirname(__FILE__).'/../require/class.Source.php');
431 431
 				$Source = new Source();
432 432
 				//$alllocations = $Source->getAllLocationInfo();
@@ -446,9 +446,9 @@  discard block
 block discarded – undo
446 446
 		
447 447
 		<?php
448 448
 				}
449
-			    }
449
+				}
450
+			}
450 451
 			}
451
-		    }
452 452
 		?>
453 453
 
454 454
 				<tr>
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 ?>
578 578
 							<tr>
579 579
 								<?php
580
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
580
+									if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
581 581
 								?>
582 582
 								<td><input type="text" name="host[]" value="<?php print $source['host']; ?>" /></td>
583 583
 								<td><input type="text" name="port[]" class="col-xs-2" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td>
584 584
 								<?php
585
-								    } else {
585
+									} else {
586 586
 									$hostport = explode(':',$source['host']);
587 587
 									if (isset($hostport[1])) {
588 588
 										$host = $hostport[0];
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 								<td><input type="text" name="host[]" value="<?php print $host; ?>" /></td>
596 596
 								<td><input type="text" name="port[]" class="col-xs-2" value="<?php print $port; ?>" /></td>
597 597
 								<?php
598
-								    }
598
+									}
599 599
 								?>
600 600
 								<td>
601 601
 									<select name="format[]">
@@ -740,9 +740,9 @@  discard block
 block discarded – undo
740 740
 			    </thead>
741 741
 			    <tbody>
742 742
 				<?php
743
-				    if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) {
743
+					if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) {
744 744
 					foreach ($globalNewsFeeds as $type => $feedslng) {
745
-					    foreach ($feedslng as $lng => $feeds) {
745
+						foreach ($feedslng as $lng => $feeds) {
746 746
 						foreach ($feeds as $feed) {
747 747
 				?>
748 748
 				<tr>
@@ -767,9 +767,9 @@  discard block
 block discarded – undo
767 767
 				
768 768
 				<?php
769 769
 						}
770
-					    }
770
+						}
771
+					}
771 772
 					}
772
-				    }
773 773
 				?>
774 774
 				<tr>
775 775
 				    <td><input type="url" name="newsurl[]" /></td>
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
 				<p class="help-block">tsk file can be loaded using http://yourflightairmap/tsk=http://yourtskfile</p>
1185 1185
 			</p>
1186 1186
 			<?php 
1187
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
1187
+				if (extension_loaded('gd') && function_exists('gd_info')) {
1188 1188
 			?>
1189 1189
 			<br />
1190 1190
 			<p>
@@ -1215,14 +1215,14 @@  discard block
 block discarded – undo
1215 1215
 			</p>
1216 1216
 			<?php
1217 1217
 				}
1218
-			    } else {
1218
+				} else {
1219 1219
 			?>
1220 1220
 			<br />
1221 1221
 			<p>
1222 1222
 				<b>PHP GD is not installed, you can't change color of aircraft icon on map</b>
1223 1223
 			</p>
1224 1224
 			<?php
1225
-			    }
1225
+				}
1226 1226
 			?>
1227 1227
 			<br />
1228 1228
 			<p>
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 	</p>
1246 1246
 <?php
1247 1247
 	require('../footer.php');
1248
-        exit;
1248
+		exit;
1249 1249
 }
1250 1250
 // '	
1251 1251
 $settings = array();
@@ -1349,8 +1349,8 @@  discard block
 block discarded – undo
1349 1349
 	
1350 1350
 	$sources = array();
1351 1351
 	foreach ($source_name as $keys => $name) {
1352
-	    if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]);
1353
-	    else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]);
1352
+		if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]);
1353
+		else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]);
1354 1354
 	}
1355 1355
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
1356 1356
 
@@ -1360,13 +1360,13 @@  discard block
 block discarded – undo
1360 1360
 	
1361 1361
 	$newsfeeds = array();
1362 1362
 	foreach($newsurl as $newskey => $url) {
1363
-	    if ($url != '') {
1363
+		if ($url != '') {
1364 1364
 		$type = $newstype[$newskey];
1365 1365
 		$lng = $newslng[$newskey];
1366 1366
 		if (isset($newsfeeds[$type][$lng])) {
1367
-		    $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1367
+			$newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1368 1368
 		} else $newsfeeds[$type][$lng] = array($url);
1369
-	    }
1369
+		}
1370 1370
 	}
1371 1371
 	$settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds));
1372 1372
 
@@ -1847,14 +1847,14 @@  discard block
 block discarded – undo
1847 1847
 
1848 1848
 	// Set some defaults values...
1849 1849
 	if (!isset($globalAircraftImageSources)) {
1850
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1851
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1850
+		$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1851
+		$settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1852 1852
 	}
1853 1853
 
1854 1854
 	if (!isset($globalSchedulesSources)) {
1855
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1856
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1857
-    	}
1855
+		$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1856
+			$settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1857
+		}
1858 1858
 
1859 1859
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1860 1860
 
@@ -1902,21 +1902,21 @@  discard block
 block discarded – undo
1902 1902
 	$popi = false;
1903 1903
 	$popw = false;
1904 1904
 	foreach ($_SESSION['done'] as $done) {
1905
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1906
-	    if ($done == 'Create database') $pop = true;
1907
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1908
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1909
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
1905
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1906
+		if ($done == 'Create database') $pop = true;
1907
+		if ($_SESSION['install'] == 'database_create') $pop = true;
1908
+		if ($_SESSION['install'] == 'database_import') $popi = true;
1909
+		if ($_SESSION['install'] == 'waypoints') $popw = true;
1910 1910
 	}
1911 1911
 	if ($pop) {
1912
-	    sleep(5);
1913
-	    print '<li>Create database....<img src="../images/loading.gif" /></li>';
1912
+		sleep(5);
1913
+		print '<li>Create database....<img src="../images/loading.gif" /></li>';
1914 1914
 	} else if ($popi) {
1915
-	    sleep(5);
1916
-	    print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1915
+		sleep(5);
1916
+		print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1917 1917
 	} else if ($popw) {
1918
-	    sleep(5);
1919
-	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1918
+		sleep(5);
1919
+		print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1920 1920
 	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1921 1921
 	print '</div></ul>';
1922 1922
 	print '<div id="error"></div>';
@@ -1983,7 +1983,7 @@  discard block
 block discarded – undo
1983 1983
 	unset($_COOKIE['install']);
1984 1984
 	print '<div class="info column"><ul>';
1985 1985
 	foreach ($_SESSION['done'] as $done) {
1986
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1986
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1987 1987
 	}
1988 1988
 	print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>';
1989 1989
 	print '</ul></div>';
Please login to merge, or discard this patch.