Completed
Push — master ( 1fed4c...6bbecb )
by Yannick
05:53
created
redirect.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 {
8 8
 	$spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($_GET['flightaware_id']);
9 9
     
10
-    if ($spotter_id != "")
11
-    {
12
-        header('Location: '.$globalURL.'/flightid/'.$spotter_id);
13
-    } else {
10
+	if ($spotter_id != "")
11
+	{
12
+		header('Location: '.$globalURL.'/flightid/'.$spotter_id);
13
+	} else {
14 14
 	   header('Location: '.$globalURL);
15
-    }
15
+	}
16 16
 }
17 17
 ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if ($_GET['flightaware_id'] != "")
7 7
 {
8
-	$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
8
+	$flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING);
9 9
 	$spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($flightaware_id);
10 10
     
11 11
     if ($spotter_id != "")
Please login to merge, or discard this patch.
aircraft.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_name'] == '') $aircraft_types = $Spotter->getAllAircraftTypes();
20 20
 	$previous = null;
21 21
 	print '<div class="alphabet-legend">';
22
-	foreach($aircraft_types as $value) {
22
+	foreach ($aircraft_types as $value) {
23 23
 		$firstLetter = substr($value['aircraft_name'], 0, 1);
24
-		if($previous !== $firstLetter)
24
+		if ($previous !== $firstLetter)
25 25
 		{
26 26
 			if ($previous !== null) print ' | ';
27 27
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 	}
31 31
 	print '</div>';
32 32
 	$previous = null;
33
-	foreach($aircraft_types as $value) {
33
+	foreach ($aircraft_types as $value) {
34 34
 		$firstLetter = substr($value['aircraft_name'], 0, 1);
35 35
 		if ($firstLetter != "")
36 36
 		{
37
-			if($previous !== $firstLetter)
37
+			if ($previous !== $firstLetter)
38 38
 			{
39 39
 				if ($previous !== null) print '</div>';
40 40
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@  discard block
 block discarded – undo
16 16
 	print '<h1>'._("Aircrafts Types").'</h1>';
17 17
 
18 18
 	$aircraft_types = $Stats->getAllAircraftTypes();
19
-	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes();
19
+	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') {
20
+		$aircraft_types = $Spotter->getAllAircraftTypes();
21
+	}
20 22
 	$previous = null;
21 23
 	print '<div class="alphabet-legend">';
22 24
 	foreach($aircraft_types as $value) {
@@ -24,7 +26,9 @@  discard block
 block discarded – undo
24 26
 		$firstLetter = substr($value['aircraft_manufacturer'], 0, 1);
25 27
 		if($previous !== $firstLetter)
26 28
 		{
27
-			if ($previous !== null) print ' | ';
29
+			if ($previous !== null) {
30
+				print ' | ';
31
+			}
28 32
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
29 33
 		}
30 34
 		$previous = $firstLetter;
@@ -38,7 +42,9 @@  discard block
 block discarded – undo
38 42
 		{
39 43
 			if($previous !== $firstLetter)
40 44
 			{
41
-				if ($previous !== null) print '</div>';
45
+				if ($previous !== null) {
46
+					print '</div>';
47
+				}
42 48
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
43 49
 			}
44 50
 			$previous = $firstLetter;
Please login to merge, or discard this patch.
airline.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	print '<div class="column">';
15 15
 	print '<h1>'._("Airlines").'</h1>';
16 16
 	if (isset($_POST['airline_type'])) {
17
-		$airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING);
17
+		$airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING);
18 18
 		//$airline_names = $Spotter->getAllAirlineNames($airline_type);
19 19
 	} else {
20 20
 		//$airline_names = $Spotter->getAllAirlineNames();
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 	if (isset($_POST['airline_type'])) 
37 37
 	{
38
-		$airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING);
38
+		$airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING);
39 39
 		$airline_names = $Spotter->getAllAirlineNames($airline_type);
40 40
 	} else {
41 41
 		$Stats = new Stats();
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 	$previous = null;
47 47
 	print '<div class="alphabet-legend">';
48
-	foreach($airline_names as $value) 
48
+	foreach ($airline_names as $value) 
49 49
 	{
50 50
 		//echo $value['airline_name']."\n";
51 51
 		//echo mb_substr($value['airline_name'],0,1).' - '.$value['airline_name']."\n";
52
-		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8');
53
-		if($previous !== $firstLetter)
52
+		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1), 'UTF-8');
53
+		if ($previous !== $firstLetter)
54 54
 		{
55 55
 			if ($previous !== null) print ' | ';
56 56
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 	}
60 60
 	print '</div>';
61 61
 	$previous = null;
62
-	foreach($airline_names as $value) {
62
+	foreach ($airline_names as $value) {
63 63
 		$firstLetter = strtoupper(substr($value['airline_name'], 0, 1));
64 64
 		if ($firstLetter != "")
65 65
 		{
66
-			if($previous !== $firstLetter)
66
+			if ($previous !== $firstLetter)
67 67
 			{
68 68
 				if ($previous !== null) print '</div>';
69 69
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,13 +24,21 @@  discard block
 block discarded – undo
24 24
 
25 25
 	print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">';
26 26
 	print '<option value="all"';
27
-	if ($airline_type == 'all') print 'selected="selected" ';
27
+	if ($airline_type == 'all') {
28
+		print 'selected="selected" ';
29
+	}
28 30
 	print '>'._("All").'</option><option value="passenger"';
29
-	if ($airline_type == 'passenger') print 'selected="selected" ';
31
+	if ($airline_type == 'passenger') {
32
+		print 'selected="selected" ';
33
+	}
30 34
 	print '>'._("Passenger").'</option><option value="cargo"';
31
-	if ($airline_type == 'cargo') print 'selected="selected" ';
35
+	if ($airline_type == 'cargo') {
36
+		print 'selected="selected" ';
37
+	}
32 38
 	print '>'._("Cargo").'</option><option value="military"';
33
-	if ($airline_type == 'military') print 'selected="selected" ';
39
+	if ($airline_type == 'military') {
40
+		print 'selected="selected" ';
41
+	}
34 42
 	print '>'._("Military").'</option></select>';
35 43
 	print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>';
36 44
 
@@ -57,7 +65,9 @@  discard block
 block discarded – undo
57 65
 		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8');
58 66
 		if($previous !== $firstLetter)
59 67
 		{
60
-			if ($previous !== null) print ' | ';
68
+			if ($previous !== null) {
69
+				print ' | ';
70
+			}
61 71
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
62 72
 		}
63 73
 		$previous = $firstLetter;
@@ -70,7 +80,9 @@  discard block
 block discarded – undo
70 80
 		{
71 81
 			if($previous !== $firstLetter)
72 82
 			{
73
-				if ($previous !== null) print '</div>';
83
+				if ($previous !== null) {
84
+					print '</div>';
85
+				}
74 86
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
75 87
 			}
76 88
 			$previous = $firstLetter;
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
10
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft from %s"),$manufacturer);
16
+	$title = sprintf(_("Most Common Aircraft from %s"), $manufacturer);
17 17
 
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
22 22
 	print '<option></option>';
23 23
 	$all_manufacturers = $Spotter->getAllManufacturers();
24
-	foreach($all_manufacturers as $all_manufacturer)
24
+	foreach ($all_manufacturers as $all_manufacturer)
25 25
 	{
26
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
26
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
27 27
 		{
28 28
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
29 29
 		} else {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	include('manufacturer-sub-menu.php');
43 43
 	print '<div class="column">';
44 44
 	print '<h2>'._("Most Common Aircraft").'</h2>';
45
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>';
45
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $manufacturer).'</p>';
46 46
 
47 47
 	$aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer);
48 48
 	if (!empty($aircraft_array))
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		print '</thead>';
58 58
 		print '<tbody>';
59 59
 		$i = 1;
60
-		foreach($aircraft_array as $aircraft_item)
60
+		foreach ($aircraft_array as $aircraft_item)
61 61
 		{
62 62
 			print '<tr>';
63 63
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['aircraft_manufacturer'])) {
6
-        header('Location: '.$globalURL.'/manufacturer');
7
-        die();
6
+		header('Location: '.$globalURL.'/manufacturer');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
24 24
 	$Stats = new Stats();
25 25
 	$all_manufacturers = $Stats->getAllManufacturers();
26
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
26
+	if (empty($all_manufacturers)) {
27
+		$all_manufacturers = $Spotter->getAllManufacturers();
28
+	}
27 29
 	foreach($all_manufacturers as $all_manufacturer)
28 30
 	{
29 31
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
scripts/cron.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@
 block discarded – undo
11 11
 //checks to see if FlightAware import is set
12 12
 if ($globalFlightAware == TRUE)
13 13
 {
14
-    $SpotterLive = new SpotterLive();
15
-    $Spotter = new Spotter();
16
-    //deletes the spotter LIVE data
17
-    $SpotterLive->deleteLiveSpotterData();
14
+	$SpotterLive = new SpotterLive();
15
+	$Spotter = new Spotter();
16
+	//deletes the spotter LIVE data
17
+	$SpotterLive->deleteLiveSpotterData();
18 18
     
19
-    //imports the new data from FlightAware
20
-    $Spotter->importFromFlightAware();
19
+	//imports the new data from FlightAware
20
+	$Spotter->importFromFlightAware();
21 21
 }
22 22
 ?>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
scripts/check_data.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 */
6 6
 require_once(dirname(__FILE__).'/../require/settings.php');
7 7
 if ($globalInstalled) {
8
-    echo '$globalInstalled must be set to FALSE in require/settings.php';
9
-    exit;
8
+	echo '$globalInstalled must be set to FALSE in require/settings.php';
9
+	exit;
10 10
 }
11 11
 
12 12
 require_once('../require/class.Connection.php');
Please login to merge, or discard this patch.
scripts/daemon-acars.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  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
 
18 18
 $debug = true;
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 date_default_timezone_set('UTC');
22 22
 // signal handler - playing nice with sockets and dump1090
23 23
 pcntl_signal(SIGINT,  function($signo) {
24
-    global $sock;
25
-    echo "\n\nctrl-c or kill signal received. Tidying up ... ";
26
-    socket_shutdown($sock, 0);
27
-    socket_close($sock);
28
-    die("Bye!\n");
24
+	global $sock;
25
+	echo "\n\nctrl-c or kill signal received. Tidying up ... ";
26
+	socket_shutdown($sock, 0);
27
+	socket_close($sock);
28
+	die("Bye!\n");
29 29
 });
30 30
 pcntl_signal_dispatch();
31 31
 
@@ -38,24 +38,24 @@  discard block
 block discarded – undo
38 38
 // Bind the source address
39 39
 if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) )
40 40
 {
41
-    $errorcode = socket_last_error();
42
-    $errormsg = socket_strerror($errorcode);
41
+	$errorcode = socket_last_error();
42
+	$errormsg = socket_strerror($errorcode);
43 43
      
44
-    die("Could not bind socket : [$errorcode] $errormsg \n");
44
+	die("Could not bind socket : [$errorcode] $errormsg \n");
45 45
 }
46 46
 
47 47
 echo "LISTEN UDP MODE \n\n";
48 48
 while(1) {
49
-    $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
50
-
51
-    // lets play nice and handle signals such as ctrl-c/kill properly
52
-    pcntl_signal_dispatch();
53
-    $dataFound = false;
54
-    //  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
55
-    echo $buffer."\n";
56
-    $ACARS->add(trim($buffer));
57
-    socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
58
-    $ACARS->deleteLiveAcarsData();
49
+	$r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
50
+
51
+	// lets play nice and handle signals such as ctrl-c/kill properly
52
+	pcntl_signal_dispatch();
53
+	$dataFound = false;
54
+	//  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
55
+	echo $buffer."\n";
56
+	$ACARS->add(trim($buffer));
57
+	socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
58
+	$ACARS->deleteLiveAcarsData();
59 59
 }
60 60
 pcntl_exec($_,$argv);
61 61
 ?>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 
18 18
 $debug = true;
19 19
 
20
-$ACARS=new ACARS();
20
+$ACARS = new ACARS();
21 21
 date_default_timezone_set('UTC');
22 22
 // signal handler - playing nice with sockets and dump1090
23
-pcntl_signal(SIGINT,  function($signo) {
23
+pcntl_signal(SIGINT, function($signo) {
24 24
     global $sock;
25 25
     echo "\n\nctrl-c or kill signal received. Tidying up ... ";
26 26
     socket_shutdown($sock, 0);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $sock = socket_create(AF_INET, SOCK_DGRAM, 0) or die("Unable to create socket\n");
37 37
 
38 38
 // Bind the source address
39
-if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) )
39
+if (!socket_bind($sock, $globalACARSHost, $globalACARSPort))
40 40
 {
41 41
     $errorcode = socket_last_error();
42 42
     $errormsg = socket_strerror($errorcode);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 
47 47
 echo "LISTEN UDP MODE \n\n";
48
-while(1) {
48
+while (1) {
49 49
     $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
50 50
 
51 51
     // lets play nice and handle signals such as ctrl-c/kill properly
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     //  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
55 55
     echo $buffer."\n";
56 56
     $ACARS->add(trim($buffer));
57
-    socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
57
+    socket_sendto($sock, "OK ".$buffer, 100, 0, $remote_ip, $remote_port);
58 58
     $ACARS->deleteLiveAcarsData();
59 59
 }
60
-pcntl_exec($_,$argv);
60
+pcntl_exec($_, $argv);
61 61
 ?>
Please login to merge, or discard this patch.
ident-statistics-arrival-airport-country.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByIdent($ident);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
30 30
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             var data = google.visualization.arrayToDataTable([
36 36
             	["'._("Country").'", "'._("# of times").'"], ';
37 37
 	$country_data = '';
38
-	foreach($airport_country_array as $airport_item)
38
+	foreach ($airport_country_array as $airport_item)
39 39
 	{
40 40
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
41 41
 	}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		print '</thead>';
70 70
 		print '<tbody>';
71 71
 		$i = 1;
72
-		foreach($airport_country_array as $airport_item)
72
+		foreach ($airport_country_array as $airport_item)
73 73
 		{
74 74
 			print '<tr>';
75 75
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
ident-statistics-arrival-airport.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByIdent($ident);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
30 30
     	<script>
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         	["'._("Airport").'", "'._("# of times").'"],';
40 40
 
41 41
 	$airport_data = '';
42
-	foreach($airport_airport_array as $airport_item)
42
+	foreach ($airport_airport_array as $airport_item)
43 43
 	{
44 44
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
45 45
 		$name = str_replace("'", "", $name);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	print '</thead>';
79 79
 	print '<tbody>';
80 80
 	$i = 1;
81
-	foreach($airport_airport_array as $airport_item)
81
+	foreach ($airport_airport_array as $airport_item)
82 82
 	{
83 83
 		print '<tr>';
84 84
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.