Completed
Push — master ( 1a51fc...8357f7 )
by Yannick
10:26
created
header.php 1 patch
Indentation   +67 added lines, -67 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,17 +167,17 @@  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
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
173 173
 <?php 
174
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
174
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
175 175
 ?>
176 176
 
177 177
 <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>
178 178
 <?php    
179
-	    }
180
-    } else {
179
+		}
180
+	} else {
181 181
 ?>
182 182
 <?php
183 183
 /*	if (isset($globalBeta) && $globalBeta) {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 */
190 190
 ?>
191 191
 <?php 
192
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
192
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
193 193
 ?>
194 194
 <?php
195 195
 //		if (isset($globalBeta) && $globalBeta) {
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
 <script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>"></script>
217 217
 <?php
218 218
 		}
219
-	    }
219
+		}
220 220
 ?>
221 221
 <?php
222 222
 //	}
223 223
 ?>
224 224
 <?php
225
-    }
225
+	}
226 226
 }
227 227
 ?>
228 228
 <?php
@@ -398,24 +398,24 @@  discard block
 block discarded – undo
398 398
       <ul class="nav navbar-nav">
399 399
 
400 400
 <?php 
401
-    $sub = false;
402
-    if (((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))) || (isset($globalMarine) && $globalMarine === TRUE && isset($globalTracker) && $globalTracker === TRUE)) {
401
+	$sub = false;
402
+	if (((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))) || (isset($globalMarine) && $globalMarine === TRUE && isset($globalTracker) && $globalTracker === TRUE)) {
403 403
 	$sub = true;
404
-    }
404
+	}
405 405
 ?>
406 406
 <?php
407
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
407
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
408 408
 ?>
409 409
     <li class="dropdown">
410 410
 <?php
411
-    if ($sub) {
411
+	if ($sub) {
412 412
 ?>
413 413
       	<li class="dropdown">
414 414
           <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircrafts"); ?> <b class="caret"></b></a>
415 415
 	<ul class="dropdown-menu multi-level">
416 416
       	<li class="dropdown-submenu">
417 417
 <?php
418
-    }
418
+	}
419 419
 ?>
420 420
           <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
421 421
           <ul class="dropdown-menu">
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
 			<li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li>
424 424
 			<li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li>
425 425
 <?php
426
-    if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
426
+	if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
427 427
 ?>
428 428
 			<li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li>
429 429
 <?php
430
-    } 
431
-    if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
430
+	} 
431
+	if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
432 432
 
433 433
 ?>
434 434
 			<li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li>
435 435
 <?php
436
-    }
436
+	}
437 437
 ?>
438 438
 			<li><hr /></li>
439 439
             <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li>
@@ -441,34 +441,34 @@  discard block
 block discarded – undo
441 441
             <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
442 442
             <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li>
443 443
             <?php
444
-        	if ($globalACARS) {
445
-        	    if (isset($globalDemo) && $globalDemo) {
446
-    	    ?>
444
+			if ($globalACARS) {
445
+				if (isset($globalDemo) && $globalDemo) {
446
+			?>
447 447
             <li><hr /></li>
448 448
             <li><i><?php echo _('ACARS data not available publicly'); ?></i></li>
449 449
             <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li>
450 450
             <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li>
451 451
             <?php
452
-        	    } else {
453
-    	    ?>
452
+				} else {
453
+			?>
454 454
             <li><hr /></li>
455 455
             <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li>
456 456
             <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li>
457 457
             <?php
458
-        	    }
459
-        	}
460
-    	    ?>
458
+				}
459
+			}
460
+			?>
461 461
     	    <?php
462
-    	        if (isset($globalAccidents) && $globalAccidents) {
463
-    	    ?>
462
+				if (isset($globalAccidents) && $globalAccidents) {
463
+			?>
464 464
             <li><hr /></li>
465 465
             <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li>
466 466
             <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li>
467 467
             <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li>
468 468
             <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li>
469 469
             <?php
470
-        	}
471
-    	    ?>
470
+			}
471
+			?>
472 472
             <li><hr /></li>
473 473
             <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li>
474 474
             <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li>
@@ -491,14 +491,14 @@  discard block
 block discarded – undo
491 491
     </ul>
492 492
 <?php
493 493
 	}
494
-    }
494
+	}
495 495
 ?>
496 496
 <?php
497
-    if (isset($globalMarine) && $globalMarine) {
497
+	if (isset($globalMarine) && $globalMarine) {
498 498
 ?>
499 499
     <li class="dropdown">
500 500
 <?php
501
-        if ($sub) {
501
+		if ($sub) {
502 502
 ?>
503 503
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Vessels"); ?> <b class="caret"></b></a>
504 504
 	<ul class="dropdown-menu multi-level">
@@ -523,14 +523,14 @@  discard block
 block discarded – undo
523 523
 	}
524 524
 ?>
525 525
 <?php
526
-    }
526
+	}
527 527
 ?>
528 528
 <?php
529
-    if (isset($globalTracker) && $globalTracker) {
529
+	if (isset($globalTracker) && $globalTracker) {
530 530
 ?>
531 531
     <li class="dropdown">
532 532
 <?php
533
-        if ($sub) {
533
+		if ($sub) {
534 534
 ?>
535 535
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a>
536 536
 	<ul class="dropdown-menu multi-level">
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 	}
556 556
 ?>
557 557
 <?php
558
-    }
558
+	}
559 559
 ?>
560 560
 
561 561
         <li class="dropdown">
@@ -564,12 +564,12 @@  discard block
 block discarded – undo
564 564
           	<li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li>
565 565
           	<li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li>
566 566
 <?php
567
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
567
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
568 568
 ?>
569 569
 		<li><hr /></li>
570 570
 		<li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li>
571 571
 <?php
572
-    }
572
+	}
573 573
 ?>
574 574
 	    <?php if (isset($globalContribute) && $globalContribute) { ?>
575 575
                 <li><hr /></li>
@@ -590,14 +590,14 @@  discard block
 block discarded – undo
590 590
   	    <form>
591 591
   		<select class="selectpicker" data-width="120px" onchange="language(this);">
592 592
   		    <?php
593
-  		        $Language = new Language();
594
-  		        $alllang = $Language->getLanguages();
595
-  		        foreach ($alllang as $key => $lang) {
596
-  		            print '<option value="'.$key.'"';
597
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
598
-  		            print '>'.$lang[0].'</option>';
599
-  		        }
600
-  		    ?>
593
+  				$Language = new Language();
594
+  				$alllang = $Language->getLanguages();
595
+  				foreach ($alllang as $key => $lang) {
596
+  					print '<option value="'.$key.'"';
597
+  					if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
598
+  					print '>'.$lang[0].'</option>';
599
+  				}
600
+  			?>
601 601
   		</select>
602 602
   	    </form>
603 603
   	</div>
@@ -628,18 +628,18 @@  discard block
 block discarded – undo
628 628
 ?>
629 629
     <div class="top-header clear" role="main">
630 630
 <?php
631
-    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
631
+	if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
632 632
 ?>
633 633
     <div id="archive-map"></div>
634 634
 <?php
635
-    }
635
+	}
636 636
 ?>
637 637
     </div>
638 638
 <?php
639 639
 }
640 640
 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))
641 641
 {
642
-    ?>
642
+	?>
643 643
     <div class="top-header clear" role="main">
644 644
         <div id="map"></div>
645 645
 	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
@@ -650,15 +650,15 @@  discard block
 block discarded – undo
650 650
         var zoom = 13;
651 651
 //create the map
652 652
 <?php
653
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
653
+	if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
654 654
 ?>
655 655
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
656 656
 <?php
657
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
657
+	} elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
658 658
 ?>
659 659
   map = L.map('map', { zoomControl:true });
660 660
 <?php
661
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
661
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
662 662
 ?>
663 663
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
664 664
     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);
@@ -666,22 +666,22 @@  discard block
 block discarded – undo
666 666
     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);
667 667
     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);
668 668
 <?php
669
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
669
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
670 670
 ?>
671 671
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
672 672
 <?php
673
-    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
673
+	} elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
674 674
 ?>
675 675
   map = L.map('map', { zoomControl:true });
676 676
 <?php
677
-    }
677
+	}
678 678
 ?>
679 679
   //initialize the layer group for the aircrft markers
680 680
   var layer_data = L.layerGroup();
681 681
 
682 682
   //a few title layers
683 683
 <?php
684
-    if ($globalMapProvider == 'Mapbox') {
684
+	if ($globalMapProvider == 'Mapbox') {
685 685
 ?>
686 686
   L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
687 687
     maxZoom: 18,
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
     token : '<?php print $globalMapboxToken; ?>'
693 693
   }).addTo(map);
694 694
 <?php
695
-    } elseif ($globalMapProvider == 'MapQuest-OSM') {
695
+	} elseif ($globalMapProvider == 'MapQuest-OSM') {
696 696
 ?>
697 697
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
698 698
     maxZoom: 18,
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>'
702 702
   }).addTo(map);
703 703
 <?php
704
-    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
704
+	} elseif ($globalMapProvider == 'MapQuest-Aerial') {
705 705
 ?>
706 706
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
707 707
     maxZoom: 18,
@@ -710,27 +710,27 @@  discard block
 block discarded – undo
710 710
       '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"'
711 711
   }).addTo(map);
712 712
 <?php
713
-    } elseif ($globalMapProvider == 'Google-Roadmap') {
713
+	} elseif ($globalMapProvider == 'Google-Roadmap') {
714 714
 ?>
715 715
     var googleLayer = new L.Google('ROADMAP');
716 716
     map.addLayer(googleLayer);
717 717
 <?php
718
-    } elseif ($globalMapProvider == 'Google-Satellite') {
718
+	} elseif ($globalMapProvider == 'Google-Satellite') {
719 719
 ?>
720 720
     var googleLayer = new L.Google('SATELLITE');
721 721
     map.addLayer(googleLayer);
722 722
 <?php
723
-    } elseif ($globalMapProvider == 'Google-Hybrid') {
723
+	} elseif ($globalMapProvider == 'Google-Hybrid') {
724 724
 ?>
725 725
     var googleLayer = new L.Google('HYBRID');
726 726
     map.addLayer(googleLayer);
727 727
 <?php
728
-    } elseif ($globalMapProvider == 'Google-Terrain') {
728
+	} elseif ($globalMapProvider == 'Google-Terrain') {
729 729
 ?>
730 730
     var googleLayer = new L.Google('Terrain');
731 731
     map.addLayer(googleLayer);
732 732
 <?php
733
-    } elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
733
+	} elseif (isset($globalMapCustomLayer[$globalMapProvider])) {
734 734
 	$customid = $globalMapProvider;
735 735
 ?>
736 736
     L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
@@ -740,8 +740,8 @@  discard block
 block discarded – undo
740 740
         attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
741 741
     }).addTo(map);
742 742
 <?php
743
-    //} elseif ($globalMapProvider == 'OpenStreetMap') {
744
-    } else {
743
+	//} elseif ($globalMapProvider == 'OpenStreetMap') {
744
+	} else {
745 745
 ?>
746 746
   L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
747 747
     maxZoom: 18,
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
   }).addTo(map);
751 751
 
752 752
 <?php
753
-    }
753
+	}
754 754
 ?>
755 755
         </script>
756 756
     </div>
Please login to merge, or discard this patch.
statistics.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -79,24 +79,24 @@  discard block
 block discarded – undo
79 79
         <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span>
80 80
         <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
81 81
 	<?php
82
-	    if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
82
+		if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) {
83 83
  	?>
84 84
     	    <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span>
85 85
 	    <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
86 86
         <?php
87
-    	    }
88
-	    if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
89
-    	?>
87
+			}
88
+		if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) {
89
+		?>
90 90
     	    <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span>
91 91
 	    <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
92 92
     	<?php
93
-    	    }
94
-    	?>
93
+			}
94
+		?>
95 95
         <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span>
96 96
         <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
97 97
         <?php
98
-    		if ($airline_icao == '') {
99
-    	?>
98
+			if ($airline_icao == '') {
99
+		?>
100 100
         <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span>
101 101
 	<!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
102 102
 	<?php
@@ -139,39 +139,39 @@  discard block
 block discarded – undo
139 139
             <div class="col-md-6">
140 140
                 <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2>
141 141
                  <?php
142
-                  $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month);
143
-		    if (count($aircraft_array) == 0) print _("No data available");
144
-		    else {
145
-                    print '<div id="chart1" class="chart" width="100%"></div><script>';
146
-                    $aircraft_data = '';
147
-                    foreach($aircraft_array as $aircraft_item)
148
-                    {
149
-                        if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],';
150
-                        else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],';
151
-                    }
152
-                    $aircraft_data = substr($aircraft_data, 0, -1);
153
-		    print 'var series = ['.$aircraft_data.'];';
154
-		    print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
155
-		    print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
156
-		    print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
157
-                    print 'var aircraftype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
158
-                    print 'dataset';
159
-                    print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
160
-                    print '</script>';
161
-                  }
162
-                  ?>
142
+				  $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month);
143
+			if (count($aircraft_array) == 0) print _("No data available");
144
+			else {
145
+					print '<div id="chart1" class="chart" width="100%"></div><script>';
146
+					$aircraft_data = '';
147
+					foreach($aircraft_array as $aircraft_item)
148
+					{
149
+						if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],';
150
+						else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],';
151
+					}
152
+					$aircraft_data = substr($aircraft_data, 0, -1);
153
+			print 'var series = ['.$aircraft_data.'];';
154
+			print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
155
+			print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
156
+			print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
157
+					print 'var aircraftype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
158
+					print 'dataset';
159
+					print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
160
+					print '</script>';
161
+				  }
162
+				  ?>
163 163
                 <div class="more">
164 164
             	    <?php
165
-            		if ($year != '' && $month != '') {
166
-            	    ?>
165
+					if ($year != '' && $month != '') {
166
+					?>
167 167
             	    <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
168 168
             	    <?php
169
-            		} else {
170
-            	    ?>
169
+					} else {
170
+					?>
171 171
             	    <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>&raquo;</a>
172 172
             	    <?php
173
-            		}
174
-            	    ?>
173
+					}
174
+					?>
175 175
                 </div>
176 176
             </div>
177 177
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
@@ -224,29 +224,29 @@  discard block
 block discarded – undo
224 224
             <div class="col-md-6">
225 225
                 <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2>
226 226
                  <?php
227
-                    $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month);
228
-		    if (count($marine_array) == 0) print _("No data available");
229
-		    else {
230
-                    print '<div id="chart1" class="chart" width="100%"></div><script>';
231
-                    $marine_data = '';
232
-                    foreach($marine_array as $marine_item)
233
-                    {
234
-                        $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],';
235
-                    }
236
-                    $marine_data = substr($marine_data, 0, -1);
237
-		    print 'var series = ['.$marine_data.'];';
238
-		    print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
239
-		    print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
240
-		    print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
241
-                    print 'var marinetype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
242
-                    print 'dataset';
243
-                    print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
244
-                    print '</script>';
245
-                  }
246
-                  ?>
227
+					$marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month);
228
+			if (count($marine_array) == 0) print _("No data available");
229
+			else {
230
+					print '<div id="chart1" class="chart" width="100%"></div><script>';
231
+					$marine_data = '';
232
+					foreach($marine_array as $marine_item)
233
+					{
234
+						$marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],';
235
+					}
236
+					$marine_data = substr($marine_data, 0, -1);
237
+			print 'var series = ['.$marine_data.'];';
238
+			print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
239
+			print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
240
+			print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
241
+					print 'var marinetype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
242
+					print 'dataset';
243
+					print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
244
+					print '</script>';
245
+				  }
246
+				  ?>
247 247
                 <div class="more">
248 248
             	    <?php
249
-            	    /*
249
+					/*
250 250
             		if ($year != '' && $month != '') {
251 251
             	    ?>
252 252
             	    <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>
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             	    <?php
258 258
             		}
259 259
             		*/
260
-            	    ?>
260
+					?>
261 261
                 </div>
262 262
             </div>
263 263
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
@@ -272,29 +272,29 @@  discard block
 block discarded – undo
272 272
             <div class="col-md-6">
273 273
                 <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2>
274 274
                  <?php
275
-                  $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month);
276
-		    if (count($tracker_array) == 0) print _("No data available");
277
-		    else {
278
-                    print '<div id="chart1" class="chart" width="100%"></div><script>';
279
-                    $tracker_data = '';
280
-                    foreach($tracker_array as $tracker_item)
281
-                    {
282
-                        $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],';
283
-                    }
284
-                    $tracker_data = substr($tracker_data, 0, -1);
285
-		    print 'var series = ['.$tracker_data.'];';
286
-		    print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
287
-		    print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
288
-		    print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
289
-                    print 'var trackertype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
290
-                    print 'dataset';
291
-                    print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
292
-                    print '</script>';
293
-                  }
294
-                  ?>
275
+				  $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month);
276
+			if (count($tracker_array) == 0) print _("No data available");
277
+			else {
278
+					print '<div id="chart1" class="chart" width="100%"></div><script>';
279
+					$tracker_data = '';
280
+					foreach($tracker_array as $tracker_item)
281
+					{
282
+						$tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],';
283
+					}
284
+					$tracker_data = substr($tracker_data, 0, -1);
285
+			print 'var series = ['.$tracker_data.'];';
286
+			print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
287
+			print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);';
288
+			print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});';
289
+					print 'var trackertype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":';
290
+					print 'dataset';
291
+					print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});';
292
+					print '</script>';
293
+				  }
294
+				  ?>
295 295
                 <div class="more">
296 296
             	    <?php
297
-            	    /*
297
+					/*
298 298
             		if ($year != '' && $month != '') {
299 299
             	    ?>
300 300
             	    <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>
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             	    <?php
306 306
             		}
307 307
             		*/
308
-            	    ?>
308
+					?>
309 309
                 </div>
310 310
             </div>
311 311
     <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> -->
Please login to merge, or discard this patch.