Completed
Push — master ( e14a40...cfb98e )
by Yannick
54:46 queued 27:34
created
statistics-fatalities-month.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 print '<div id="chart" class="chart" width="100%"></div><script>';
21 21
 $year_data = '';
22 22
 $year_cnt = '';
23
-foreach($date_array as $year_item)
23
+foreach ($date_array as $year_item)
24 24
 {
25 25
 	$year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",';
26 26
 	$year_cnt .= $year_item['count'].',';
27 27
 }
28 28
 $year_data = "['x',".substr($year_data, 0, -1)."]";
29
-$year_cnt = "['flights',".substr($year_cnt,0,-1)."]";
29
+$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]";
30 30
 print 'c3.generate({
31 31
     bindto: "#chart",
32 32
     data: { x: "x",
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (!empty($date_array))
38 38
 {
39
-	foreach($date_array as $key => $row) {
39
+	foreach ($date_array as $key => $row) {
40 40
 		$years[$key] = $row['year'];
41 41
 		$months[$key] = $row['month'];
42 42
 		$counts[$key] = $row['count'];
43 43
 	}
44 44
 //	array_multisort($years,SORT_DESC,$months,SORT_DESC,$date_array);
45
-	array_multisort($counts,SORT_DESC,$date_array);
45
+	array_multisort($counts, SORT_DESC, $date_array);
46 46
 	print '<div class="table-responsive">';
47 47
 	print '<table class="common-date table-striped">';
48 48
 	print '<thead>';
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 	print '</thead>';
53 53
 	print '<tbody>';
54 54
 	$i = 1;
55
-	foreach($date_array as $date_item)
55
+	foreach ($date_array as $date_item)
56 56
 	{
57 57
 		print '<tr>';
58 58
 		print '<td><strong>'.$i.'</strong></td>';
59 59
 		print '<td>';
60 60
 		if ($date_item['month'] < 10) $month = '0'.$date_item['month'];
61 61
 		else $month = $date_item['month'];
62
-		print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>';
62
+		print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>';
63 63
 		print '</td>';
64 64
 		print '<td>';
65 65
 		print $date_item['count'];
Please login to merge, or discard this patch.
statistics-pilot.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Pilots");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/');
14
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+setcookie('stats_airline_icao', $airline_icao, time() + 60*60*24, '/');
14
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
15
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
16 16
 require_once('header.php');
17 17
 include('statistics-sub-menu.php');
18 18
 print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	</div>
23 23
 	<p>'._("Below are the <strong>Top 10</strong> most common pilot.").'</p>';
24 24
 	  
25
-$pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month);
25
+$pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month);
26 26
 print '<div id="chart" class="chart" width="100%"></div><script>';
27 27
 $pilot_data = '';
28
-foreach($pilot_array as $pilot_item)
28
+foreach ($pilot_array as $pilot_item)
29 29
 {
30 30
 	$pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],';
31 31
 }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	print '</thead>';
51 51
 	print '<tbody>';
52 52
 	$i = 1;
53
-	foreach($pilot_array as $pilot_item)
53
+	foreach ($pilot_array as $pilot_item)
54 54
 	{
55 55
 		print '<tr>';
56 56
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-airport-arrival.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Arrival Airport");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
14
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
14
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
15 15
 
16 16
 require_once('header.php');
17 17
 include('statistics-sub-menu.php'); 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
     	 <p>'._("Below are the <strong>Top 10</strong> most common arrival airports.").'</p>';
26 26
 print '<div id="chartAirport" class="chart" width="100%"></div>';
27 27
 print '<script>';
28
-$airport_airport_array = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month);
28
+$airport_airport_array = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month);
29 29
 
30 30
 print 'var series = [';
31 31
     $airport_data = '';
32
-foreach($airport_airport_array as $airport_item)
32
+foreach ($airport_airport_array as $airport_item)
33 33
 {
34 34
 	$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
35 35
 }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 print '</thead>';
84 84
 print '<tbody>';
85 85
 $i = 1;
86
-foreach($airport_airport_array as $airport_item)
86
+foreach ($airport_airport_array as $airport_item)
87 87
 {
88 88
 	print '<tr>';
89 89
 	print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-fatalities-year.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 print '<div id="chart" class="chart" width="100%"></div><script>';
20 20
 $year_data = '';
21 21
 $year_cnt = '';
22
-foreach($date_array as $year_item)
22
+foreach ($date_array as $year_item)
23 23
 {
24 24
 	$year_data .= '"'.$year_item['year'].'-01-01",';
25 25
 	$year_cnt .= $year_item['count'].',';
26 26
 }
27 27
 $year_data = "['x',".substr($year_data, 0, -1)."]";
28
-$year_cnt = "['flights',".substr($year_cnt,0,-1)."]";
28
+$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]";
29 29
 print 'c3.generate({
30 30
     bindto: "#chart",
31 31
     data: { x: "x",
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 
36 36
 if (!empty($date_array))
37 37
 {
38
-	foreach($date_array as $key => $row) {
38
+	foreach ($date_array as $key => $row) {
39 39
 		$years[$key] = $row['year'];
40 40
 		$counts[$key] = $row['count'];
41 41
 	}
42 42
 	//array_multisort($years,SORT_DESC,$date_array);
43
-	array_multisort($counts,SORT_DESC,$date_array);
43
+	array_multisort($counts, SORT_DESC, $date_array);
44 44
 	print '<div class="table-responsive">';
45 45
 	print '<table class="common-date table-striped">';
46 46
 	print '<thead>';
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	print '</thead>';
51 51
 	print '<tbody>';
52 52
 	$i = 1;
53
-	foreach($date_array as $date_item)
53
+	foreach ($date_array as $date_item)
54 54
 	{
55 55
 		print '<tr>';
56 56
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-registration.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Aircraft Registrations");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/');
14
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+setcookie('stats_airline_icao', $airline_icao, time() + 60*60*24, '/');
14
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
15
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
16 16
 
17 17
 require_once('header.php');
18 18
 include('statistics-sub-menu.php'); 
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	</div>
25 25
     	<p>'._("Below are the <strong>Top 10</strong> most common aircraft registrations.").'</p>';
26 26
   
27
-$registration_array = $Stats->countAllAircraftRegistrations(true,$airline_icao,$filter_name,$year,$month);
27
+$registration_array = $Stats->countAllAircraftRegistrations(true, $airline_icao, $filter_name, $year, $month);
28 28
 print '<div id="chart" class="chart" width="100%"></div><script>';
29 29
 $registration_data = '';
30
-foreach($registration_array as $registration_item)
30
+foreach ($registration_array as $registration_item)
31 31
 {
32 32
 	$registration_data .= '[ "'.$registration_item['registration'].' - '.$registration_item['aircraft_name'].' ('.$registration_item['aircraft_icao'].')",'.$registration_item['aircraft_registration_count'].'],';
33 33
 }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	print '</thead>';
55 55
 	print '<tbody>';
56 56
 	$i = 1;
57
-	foreach($registration_array as $registration_item)
57
+	foreach ($registration_array as $registration_item)
58 58
 	{
59 59
 		print '<tr>';
60 60
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-airport-departure-country.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Departure Airport by Country");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
14
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
14
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
15 15
 
16 16
 require_once('header.php');
17 17
 include('statistics-sub-menu.php'); 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 	<p>'._("Below are the <strong>Top 10</strong> most common countries of all the departure airports.").'</p>';
26 26
 print '<div id="chartCountry" class="chart" width="100%"></div>';
27 27
 
28
-$airport_country_array = $Stats->countAllDepartureCountries(true,$airline_icao,$filter_name,$year,$month);
28
+$airport_country_array = $Stats->countAllDepartureCountries(true, $airline_icao, $filter_name, $year, $month);
29 29
 print '<script>';
30 30
 print 'var series = [';
31 31
 $country_data = '';
32
-foreach($airport_country_array as $airport_item)
32
+foreach ($airport_country_array as $airport_item)
33 33
 {
34 34
 	$country_data .= '[ "'.$airport_item['airport_departure_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
35 35
 }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 print '</thead>';
75 75
 print '<tbody>';
76 76
 $i = 1;
77
-foreach($airport_country_array as $airport_item)
77
+foreach ($airport_country_array as $airport_item)
78 78
 {
79 79
 	print '<tr>';
80 80
 	print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-airline-country.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Airline by Country");
7 7
 if (!isset($filter_name)) $filter_name = '';
8 8
 require_once('header.php');
9
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
9
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
10
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
11 11
 include('statistics-sub-menu.php'); 
12 12
 
13 13
 print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	  </div>
19 19
       <p>'._("Below are the <strong>Top 10</strong> countries that an airline belongs to.").'</p>';
20 20
 
21
-$airline_array = $Stats->countAllAirlineCountries(true,$filter_name,$year,$month);
21
+$airline_array = $Stats->countAllAirlineCountries(true, $filter_name, $year, $month);
22 22
 if (count($airline_array) > 0) {
23 23
 print '<div id="chartCountry" class="chart" width="100%"></div><script>';
24 24
 $country_data = '';
25
-foreach($airline_array as $airline_item)
25
+foreach ($airline_array as $airline_item)
26 26
 {
27 27
 	$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
28 28
 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	print '</thead>';
70 70
 	print '<tbody>';
71 71
 	$i = 1;
72
-	foreach($airline_array as $airline_item)
72
+	foreach ($airline_array as $airline_item)
73 73
 	{
74 74
 		print '<tr>';
75 75
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-airport-arrival-country.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Arrival Airport by Country");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
14
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
14
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
15 15
 require_once('header.php');
16 16
 include('statistics-sub-menu.php'); 
17 17
 
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
     	 <p>'._("Below are the <strong>Top 10</strong> most common countries of all the arrival airports.").'</p>';
25 25
 print '<div id="chartCountry" class="chart" width="100%"></div>';
26 26
 
27
-$airport_country_array = $Stats->countAllArrivalCountries(true,$airline_icao,$filter_name,$year,$month);
27
+$airport_country_array = $Stats->countAllArrivalCountries(true, $airline_icao, $filter_name, $year, $month);
28 28
 print '<script>';
29 29
 print 'var series = [';
30 30
 $country_data = '';
31
-foreach($airport_country_array as $airport_item)
31
+foreach ($airport_country_array as $airport_item)
32 32
 {
33 33
 	$country_data .= '[ "'.$airport_item['airport_arrival_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
34 34
 }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 print '</thead>';
75 75
 print '<tbody>';
76 76
 $i = 1;
77
-foreach($airport_country_array as $airport_item)
77
+foreach ($airport_country_array as $airport_item)
78 78
 {
79 79
 	print '<tr>';
80 80
 	print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-owner.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common owners");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
14
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
14
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
15 15
 require_once('header.php');
16 16
 include('statistics-sub-menu.php');
17 17
 print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	</div>
22 22
 	<p>'._("Below are the <strong>Top 10</strong> most common owner.").'</p>';
23 23
  
24
-$owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month);
24
+$owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month);
25 25
 print '<div id="chart" class="chart" width="100%"></div><script>';
26 26
 $owner_data = '';
27
-foreach($owner_array as $owner_item)
27
+foreach ($owner_array as $owner_item)
28 28
 {
29 29
 	$owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],';
30 30
 }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	print '</thead>';
50 50
 	print '<tbody>';
51 51
 	$i = 1;
52
-	foreach($owner_array as $owner_item)
52
+	foreach ($owner_array as $owner_item)
53 53
 	{
54 54
 		print '<tr>';
55 55
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.