Completed
Push — master ( d8c574...a11679 )
by Yannick
07:12
created
statistics-pilot.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
           function drawChart() {
23 23
             var data = google.visualization.arrayToDataTable([
24 24
             	["'._("Pilot").'", "'._("# of times").'"], ';
25
-            	$pilot_data = '';
25
+				$pilot_data = '';
26 26
 		foreach($pilot_array as $pilot_item)
27 27
 		{
28 28
 			$pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],';
29 29
 		}
30 30
 		$pilot_data = substr($pilot_data, 0, -1);
31 31
 		print $pilot_data;
32
-            print ']);
32
+			print ']);
33 33
     
34 34
             var options = {
35 35
             	chartArea: {"width": "80%", "height": "60%"},
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             var data = google.visualization.arrayToDataTable([
24 24
             	["'._("Pilot").'", "'._("# of times").'"], ';
25 25
             	$pilot_data = '';
26
-		foreach($pilot_array as $pilot_item)
26
+		foreach ($pilot_array as $pilot_item)
27 27
 		{
28 28
 			$pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],';
29 29
 		}
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	print '</thead>';
57 57
 	print '<tbody>';
58 58
 	$i = 1;
59
-	foreach($pilot_array as $pilot_item)
59
+	foreach ($pilot_array as $pilot_item)
60 60
 	{
61 61
 		print '<tr>';
62 62
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
redirect.php 1 patch
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.
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,14 +16,18 @@  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_name'] == '') $aircraft_types = $Spotter->getAllAircraftTypes();
19
+	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_name'] == '') {
20
+		$aircraft_types = $Spotter->getAllAircraftTypes();
21
+	}
20 22
 	$previous = null;
21 23
 	print '<div class="alphabet-legend">';
22 24
 	foreach($aircraft_types as $value) {
23 25
 		$firstLetter = substr($value['aircraft_name'], 0, 1);
24 26
 		if($previous !== $firstLetter)
25 27
 		{
26
-			if ($previous !== null) print ' | ';
28
+			if ($previous !== null) {
29
+				print ' | ';
30
+			}
27 31
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
28 32
 		}
29 33
 		$previous = $firstLetter;
@@ -36,7 +40,9 @@  discard block
 block discarded – undo
36 40
 		{
37 41
 			if($previous !== $firstLetter)
38 42
 			{
39
-				if ($previous !== null) print '</div>';
43
+				if ($previous !== null) {
44
+					print '</div>';
45
+				}
40 46
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
41 47
 			}
42 48
 			$previous = $firstLetter;
Please login to merge, or discard this patch.
polar-geojson.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,24 +9,24 @@  discard block
 block discarded – undo
9 9
 $Common = new Common();
10 10
 
11 11
 if (isset($_GET['download'])) {
12
-    if ($_GET['download'] == "true")
13
-    {
12
+	if ($_GET['download'] == "true")
13
+	{
14 14
 	header('Content-disposition: attachment; filename="flightairmap.json"');
15
-    }
15
+	}
16 16
 }
17 17
 header('Content-Type: text/javascript');
18 18
 
19 19
 
20 20
 $polar = $Stats->getStatsSource(date('Y-m-d'),'polar');
21 21
 if (!empty($polar)) {
22
-    $output = '';
23
-    $output = '{"type": "FeatureCollection","features": [';
22
+	$output = '';
23
+	$output = '{"type": "FeatureCollection","features": [';
24 24
 
25
-    foreach($polar as $eachpolar) {
25
+	foreach($polar as $eachpolar) {
26 26
 	$data = json_decode($eachpolar['source_data']);
27 27
 	$name = $eachpolar['source_name'];
28 28
 	$coord = $Location->getLocationInfobySourceName($name);
29
-        $output .= '{"type": "Feature","properties": {"name": "'.$name.'","style": {"color": "#D3FFCF", "opacity": 0.5}},"geometry": {"type": "Polygon","coordinates": [[';
29
+		$output .= '{"type": "Feature","properties": {"name": "'.$name.'","style": {"color": "#D3FFCF", "opacity": 0.5}},"geometry": {"type": "Polygon","coordinates": [[';
30 30
 	if (isset($coord[0]['latitude'])) {
31 31
 		$initial_latitude = $coord[0]['latitude'];
32 32
 		$initial_longitude = $coord[0]['longitude'];
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 	//$output  = substr($output, 0, -1);
44 44
 	$output .= $first;
45 45
 	$output .= ']]}},';
46
-    }
47
-    $output  = substr($output, 0, -1);
48
-    $output .= ']}';
46
+	}
47
+	$output  = substr($output, 0, -1);
48
+	$output .= ']}';
49 49
 }
50 50
 print $output;
51 51
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
 header('Content-Type: text/javascript');
18 18
 
19 19
 
20
-$polar = $Stats->getStatsSource(date('Y-m-d'),'polar');
20
+$polar = $Stats->getStatsSource(date('Y-m-d'), 'polar');
21 21
 if (!empty($polar)) {
22 22
     $output = '';
23 23
     $output = '{"type": "FeatureCollection","features": [';
24 24
 
25
-    foreach($polar as $eachpolar) {
25
+    foreach ($polar as $eachpolar) {
26 26
 	$data = json_decode($eachpolar['source_data']);
27 27
 	$name = $eachpolar['source_name'];
28 28
 	$coord = $Location->getLocationInfobySourceName($name);
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 		$initial_longitude = $globalCenterLongitude;
36 36
 	}
37 37
 	$first = '';
38
-	foreach($data as $value => $key) {
39
-		$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key);
40
-		if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
38
+	foreach ($data as $value => $key) {
39
+		$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude, $initial_longitude, $value*22.5, $key);
40
+		if ($first == '') $first = '['.round($final_coord['longitude'], 5).','.round($final_coord['latitude'], 5).']';
41 41
 		$output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],';
42 42
 	}
43 43
 	//$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@
 block discarded – undo
37 37
 	$first = '';
38 38
 	foreach($data as $value => $key) {
39 39
 		$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key);
40
-		if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
40
+		if ($first == '') {
41
+			$first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
42
+		}
41 43
 		$output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],';
42 44
 	}
43 45
 	//$output  = substr($output, 0, -1);
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   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,13 +23,21 @@  discard block
 block discarded – undo
23 23
 
24 24
 	print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">';
25 25
 	print '<option value="all"';
26
-	if ($airline_type == 'all') print 'selected="selected" ';
26
+	if ($airline_type == 'all') {
27
+		print 'selected="selected" ';
28
+	}
27 29
 	print '>'._("All").'</option><option value="passenger"';
28
-	if ($airline_type == 'passenger') print 'selected="selected" ';
30
+	if ($airline_type == 'passenger') {
31
+		print 'selected="selected" ';
32
+	}
29 33
 	print '>'._("Passenger").'</option><option value="cargo"';
30
-	if ($airline_type == 'cargo') print 'selected="selected" ';
34
+	if ($airline_type == 'cargo') {
35
+		print 'selected="selected" ';
36
+	}
31 37
 	print '>'._("Cargo").'</option><option value="military"';
32
-	if ($airline_type == 'military') print 'selected="selected" ';
38
+	if ($airline_type == 'military') {
39
+		print 'selected="selected" ';
40
+	}
33 41
 	print '>'._("Military").'</option></select>';
34 42
 	print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>';
35 43
 
@@ -41,7 +49,9 @@  discard block
 block discarded – undo
41 49
 		$Stats = new Stats();
42 50
 		//$airline_names = $Spotter->getAllAirlineNames();
43 51
 		$airline_names = $Stats->getAllAirlineNames();
44
-		if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
52
+		if (empty($airline_names)) {
53
+			$airline_names = $Spotter->getAllAirlineNames();
54
+		}
45 55
 	}
46 56
 	$previous = null;
47 57
 	print '<div class="alphabet-legend">';
@@ -52,7 +62,9 @@  discard block
 block discarded – undo
52 62
 		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8');
53 63
 		if($previous !== $firstLetter)
54 64
 		{
55
-			if ($previous !== null) print ' | ';
65
+			if ($previous !== null) {
66
+				print ' | ';
67
+			}
56 68
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
57 69
 		}
58 70
 		$previous = $firstLetter;
@@ -65,7 +77,9 @@  discard block
 block discarded – undo
65 77
 		{
66 78
 			if($previous !== $firstLetter)
67 79
 			{
68
-				if ($previous !== null) print '</div>';
80
+				if ($previous !== null) {
81
+					print '</div>';
82
+				}
69 83
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
70 84
 			}
71 85
 			$previous = $firstLetter;
Please login to merge, or discard this patch.
aircraft-statistics-registration.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,23 +6,23 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/aircraft');
7 7
         die();
8 8
 }
9
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
9
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
12 12
 
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
16
+	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
20 20
 	print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
21 21
 	print '<option></option>';
22 22
 	$aircraft_types = $Spotter->getAllAircraftTypes();
23
-	foreach($aircraft_types as $aircraft_type)
23
+	foreach ($aircraft_types as $aircraft_type)
24 24
 	{
25
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
25
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
26 26
 		{
27 27
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
28 28
 		} else {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	include('aircraft-sub-menu.php');
49 49
 	print '<div class="column">';
50 50
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
51
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from aircraft type <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
51
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from aircraft type <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
52 52
 
53 53
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByAircraft($aircraft_type);
54 54
 	if (!empty($aircraft_array))
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		print '</thead>';
66 66
 		print '<tbody>';
67 67
 		$i = 1;
68
-		foreach($aircraft_array as $aircraft_item)
68
+		foreach ($aircraft_array as $aircraft_item)
69 69
 		{
70 70
 			print '<tr>';
71 71
 			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
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 
6 6
 if (!isset($_GET['aircraft_type'])) {
7
-        header('Location: '.$globalURL.'/aircraft');
8
-        die();
7
+		header('Location: '.$globalURL.'/aircraft');
8
+		die();
9 9
 }
10 10
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.php 2 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.
scripts/update_db.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
10 10
 	exec("ps u", $output, $result);
11 11
 	$j = 0;
12
-	foreach ($output AS $line) if(strpos($line, "update_db.php")) $j++;
12
+	foreach ($output AS $line) if (strpos($line, "update_db.php")) $j++;
13 13
 	if ($j > 1) {
14 14
 		echo "Script is already runnning...";
15 15
 		die();
Please login to merge, or discard this patch.
Braces   +16 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@  discard block
 block discarded – undo
9 9
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
10 10
 	exec("ps u", $output, $result);
11 11
 	$j = 0;
12
-	foreach ($output AS $line) if(strpos($line, "update_db.php")) $j++;
12
+	foreach ($output AS $line) {
13
+		if(strpos($line, "update_db.php")) $j++;
14
+	}
13 15
 	if ($j > 1) {
14 16
 		echo "Script is already runnning...";
15 17
 		die();
@@ -22,7 +24,9 @@  discard block
 block discarded – undo
22 24
 	echo "updating NOTAM...";
23 25
 	$update_db->update_notam();
24 26
 	$update_db->insert_last_notam_update();
25
-} elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) echo "NOTAM are only updated once a day.\n";
27
+} elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) {
28
+	echo "NOTAM are only updated once a day.\n";
29
+}
26 30
 
27 31
 if ($update_db->check_last_update() && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
28 32
 	$update_db->update_all();
@@ -30,7 +34,9 @@  discard block
 block discarded – undo
30 34
 //	$Spotter = new Spotter();
31 35
 //	$Spotter->updateFieldsFromOtherTables();
32 36
 	$update_db->insert_last_update();
33
-} elseif (isset($globalDebug) && $globalDebug && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n";
37
+} elseif (isset($globalDebug) && $globalDebug && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) {
38
+	echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n";
39
+}
34 40
 
35 41
 
36 42
 if (isset($globalMETAR) && isset($globalMETARcycle) && $globalMETAR && $globalMETARcycle) {
@@ -40,15 +46,19 @@  discard block
 block discarded – undo
40 46
 	if ($METAR->check_last_update()) {
41 47
 		$METAR->addMETARCycle();
42 48
 		$METAR->insert_last_update();
43
-	} else echo "METAR are only updated every hours.\n";
44
-}
49
+	} else {
50
+		echo "METAR are only updated every hours.\n";
51
+	}
52
+	}
45 53
 
46 54
 
47 55
 if (isset($globalOwner) && $globalOwner && $update_db->check_last_owner_update() && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
48 56
 	echo "Updating private aircraft's owners...";
49 57
 	$update_db->update_owner();
50 58
 	$update_db->insert_last_owner_update();
51
-} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Owner are only updated every 15 days.\n";
59
+} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
60
+	echo "Owner are only updated every 15 days.\n";
61
+}
52 62
 
53 63
 if (isset($globalArchiveMonths) && $globalArchiveMonths > 0) {
54 64
 	echo "Updating statistics and archive old data...";
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.