Completed
Branch master (3f174d)
by Yannick
13:43
created
aircraft-statistics-time.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 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_type'])) {
6
-        header('Location: '.$globalURL.'/aircraft');
7
-        die();
6
+		header('Location: '.$globalURL.'/aircraft');
7
+		die();
8 8
 }
9 9
 
10 10
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
           function drawChart() {
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Hour").'", "'._("# of Flights").'"], ';
64
-        $hour_data = '';
64
+		$hour_data = '';
65 65
 	foreach($hour_array as $hour_item)
66 66
 	{
67 67
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
68 68
 	}
69 69
 	$hour_data = substr($hour_data, 0, -1);
70 70
 	print $hour_data;
71
-        print ']);
71
+		print ']);
72 72
     
73 73
             var options = {
74 74
             	legend: {position: "none"},
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 
10
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
11 11
 
12 12
 $Spotter = new Spotter();
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
22 22
 	print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
23 23
 	print '<option></option>';
24 24
 	$aircraft_types = $Spotter->getAllAircraftTypes();
25
-	foreach($aircraft_types as $aircraft_type)
25
+	foreach ($aircraft_types as $aircraft_type)
26 26
 	{
27
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
27
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
28 28
 		{
29 29
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
30 30
 		} else {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	include('aircraft-sub-menu.php');
51 51
 	print '<div class="column">';
52 52
 	print '<h2>'._("Most Common Time of Day").'</h2>';
53
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
53
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
54 54
 
55 55
 	$hour_array = $Spotter->countAllHoursByAircraft($aircraft_type);
56 56
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Hour").'", "'._("# of Flights").'"], ';
64 64
         $hour_data = '';
65
-	foreach($hour_array as $hour_item)
65
+	foreach ($hour_array as $hour_item)
66 66
 	{
67 67
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
68 68
 	}
Please login to merge, or discard this patch.
aircraft-statistics-route.php 2 patches
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_type'])) {
6
-        header('Location: '.$globalURL.'/aircraft');
7
-        die();
6
+		header('Location: '.$globalURL.'/aircraft');
7
+		die();
8 8
 }
9 9
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
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 Routes from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
16
+	$title = sprintf(_("Most Common Routes 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 Routes").'</h2>';
51
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from <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 routes from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
52 52
 
53 53
 	$route_array = $Spotter->countAllRoutesByAircraft($aircraft_type);
54 54
 	if (!empty($route_array))
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		print '</thead>';
66 66
 		print '<tbody>';
67 67
 		$i = 1;
68
-		foreach($route_array as $route_item)
68
+		foreach ($route_array as $route_item)
69 69
 		{
70 70
 			print '<tr>';
71 71
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airline-sub-menu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 </span>
4 4
 <div class="sub-menu sub-menu-container">
5 5
 	<ul class="nav nav-pills">
6
-		<li><a href="<?php print $globalURL; ?>/airline/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
6
+		<li><a href="<?php print $globalURL; ?>/airline/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
7 7
 		<li class="dropdown">
8
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "airline-statistics-aircraft" || strtolower($current_page) == "airline-statistics-registration" || strtolower($current_page) == "airline-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
8
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "airline-statistics-aircraft" || strtolower($current_page) == "airline-statistics-registration" || strtolower($current_page) == "airline-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#">
9 9
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
10 10
 		    </a>
11 11
 		    <ul class="dropdown-menu" role="menu">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		    </ul>
16 16
 		</li>
17 17
 		<li class="dropdown">
18
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "airline-statistics-departure-airport" || strtolower($current_page) == "airline-statistics-departure-airport-country" || strtolower($current_page) == "airline-statistics-arrival-airport" || strtolower($current_page) == "airline-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
18
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "airline-statistics-departure-airport" || strtolower($current_page) == "airline-statistics-departure-airport-country" || strtolower($current_page) == "airline-statistics-arrival-airport" || strtolower($current_page) == "airline-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
19 19
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
20 20
 		    </a>
21 21
 		    <ul class="dropdown-menu" role="menu">
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			  <li><a href="<?php print $globalURL; ?>/airline/statistics/arrival-airport-country/<?php print $_GET['airline']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li>
26 26
 		    </ul>
27 27
 		</li>
28
-		<li><a href="<?php print $globalURL; ?>/airline/statistics/route/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
29
-		<li><a href="<?php print $globalURL; ?>/airline/statistics/time/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
28
+		<li><a href="<?php print $globalURL; ?>/airline/statistics/route/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
29
+		<li><a href="<?php print $globalURL; ?>/airline/statistics/time/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
30 30
 	</ul>
31 31
 </div>
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
location-geojson.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		date_default_timezone_set('UTC');
29 29
 		//waypoint plotting
30 30
 		$output .= '{"type": "Feature",';
31
-		    $output .= '"properties": {';
31
+			$output .= '"properties": {';
32 32
 			$output .= '"name": "'.$spotter_item['name'].'",';
33 33
 			$output .= '"city": "'.$spotter_item['city'].'",';
34 34
 			$output .= '"country": "'.$spotter_item['country'].'",';
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 			$output .= '"icon": "'.$globalURL.'/images/antenna.png",';
38 38
 			$output .= '"type": "'.$spotter_item['type'].'",';
39 39
 			$output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"';
40
-		    $output .= '},';
41
-		    $output .= '"geometry": {';
40
+			$output .= '},';
41
+			$output .= '"geometry": {';
42 42
 			$output .= '"type": "Point",';
43 43
 			$output .= '"coordinates": [';
44
-			    $output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
44
+				$output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
45 45
 			$output .= ']';
46
-		    $output .= '}';
46
+			$output .= '}';
47 47
 		$output .= '},';
48 48
 	}
49 49
 	$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 if (!isset($globalDemo)) {
13 13
 	if (isset($_GET['coord'])) 
14 14
 	{
15
-		$coords = explode(',',$_GET['coord']);
15
+		$coords = explode(',', $_GET['coord']);
16 16
 //		$spotter_array = Source::getAllLocationInfobyCoord($coords);
17 17
 		$spotter_array = $Source->getAllLocationInfo();
18 18
 	} else {
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 $output = '{"type": "FeatureCollection","features": [';
24 24
 if (!empty($spotter_array))
25 25
 {
26
-	foreach($spotter_array as $spotter_item)
26
+	foreach ($spotter_array as $spotter_item)
27 27
 	{
28 28
 		date_default_timezone_set('UTC');
29 29
 		//waypoint plotting
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		    $output .= '}';
47 47
 		$output .= '},';
48 48
 	}
49
-	$output  = substr($output, 0, -1);
49
+	$output = substr($output, 0, -1);
50 50
 }
51 51
 $output .= ']}';
52 52
 
Please login to merge, or discard this patch.
search-rss.php 3 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7
-        //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
-                $start_date = $_GET['start_date'].":00";
10
-                $end_date = $_GET['end_date'].":00";
11
-                $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
13
-                $start_date = $_GET['start_date'].":00";
14
-                $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
-                $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
-                $sql_date = $end_date;
18
-        } else $sql_date = '';
7
+		//for the date manipulation into the query
8
+		if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
+				$start_date = $_GET['start_date'].":00";
10
+				$end_date = $_GET['end_date'].":00";
11
+				$sql_date = $start_date.",".$end_date;
12
+		} else if($_GET['start_date'] != ""){
13
+				$start_date = $_GET['start_date'].":00";
14
+				$sql_date = $start_date;
15
+		} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
+				$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
+				$sql_date = $end_date;
18
+		} else $sql_date = '';
19 19
 } else $sql_date = '';
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22
-        //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
-                $end_altitude = $_GET['highest_altitude'];
25
-                $start_altitude = $_GET['lowest_altitude'];
26
-                $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
28
-                $end_altitude = $_GET['highest_altitude'];
29
-                $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
-                $start_altitude = $_GET['lowest_altitude'].",60000";
32
-                $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
22
+		//for altitude manipulation
23
+		if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
+				$end_altitude = $_GET['highest_altitude'];
25
+				$start_altitude = $_GET['lowest_altitude'];
26
+				$sql_altitude = $start_altitude.",".$end_altitude;
27
+		} else if($_GET['highest_altitude'] != ""){
28
+				$end_altitude = $_GET['highest_altitude'];
29
+				$sql_altitude = $end_altitude;
30
+		} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
+				$start_altitude = $_GET['lowest_altitude'].",60000";
32
+				$sql_altitude = $start_altitude;
33
+		} else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37 37
 if(!isset($_GET['limit']))
38 38
 {
39
-        if (!isset($_GET['number_results']))
40
-        {
41
-                $limit_start = 0;
42
-                $limit_end = 25;
43
-                $absolute_difference = 25;
44
-        } else {
45
-                if ($_GET['number_results'] > 1000){
46
-                        $_GET['number_results'] = 1000;
47
-                }
48
-                $limit_start = 0;
49
-                $limit_end = $_GET['number_results'];
50
-                $absolute_difference = $_GET['number_results'];
51
-        }
39
+		if (!isset($_GET['number_results']))
40
+		{
41
+				$limit_start = 0;
42
+				$limit_end = 25;
43
+				$absolute_difference = 25;
44
+		} else {
45
+				if ($_GET['number_results'] > 1000){
46
+						$_GET['number_results'] = 1000;
47
+				}
48
+				$limit_start = 0;
49
+				$limit_end = $_GET['number_results'];
50
+				$absolute_difference = $_GET['number_results'];
51
+		}
52 52
 }  else {
53
-        $limit_explode = explode(",", $_GET['limit']);
54
-        $limit_start = $limit_explode[0];
55
-        $limit_end = $limit_explode[1];
53
+		$limit_explode = explode(",", $_GET['limit']);
54
+		$limit_start = $limit_explode[0];
55
+		$limit_end = $limit_explode[1];
56 56
 }
57 57
 
58 58
 $absolute_difference = abs($limit_start - $limit_end);
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
   
103 103
   if (!empty($spotter_array))
104 104
   {
105
-    foreach($spotter_array as $spotter_item)
106
-    {
105
+	foreach($spotter_array as $spotter_item)
106
+	{
107 107
 
108 108
           
109 109
 		  print '<item>';
110
-		    print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>';
111
-		    print '<link>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</link>';
112
-		    print '<guid isPermaLink="false">http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</guid>';
113
-		    print '<description>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</description>';
114
-		    print '<pubDate>'.$date.'</pubDate>';
110
+			print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>';
111
+			print '<link>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</link>';
112
+			print '<guid isPermaLink="false">http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</guid>';
113
+			print '<description>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</description>';
114
+			print '<pubDate>'.$date.'</pubDate>';
115 115
 		  print '</item>';
116 116
 		    
117 117
 		 }
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7 7
         //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
8
+        if ($_GET['start_date'] != "" && $_GET['end_date'] != "") {
9 9
                 $start_date = $_GET['start_date'].":00";
10 10
                 $end_date = $_GET['end_date'].":00";
11 11
                 $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
12
+        } else if ($_GET['start_date'] != "") {
13 13
                 $start_date = $_GET['start_date'].":00";
14 14
                 $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
15
+        } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") {
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18 18
         } else $sql_date = '';
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22 22
         //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
23
+        if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") {
24 24
                 $end_altitude = $_GET['highest_altitude'];
25 25
                 $start_altitude = $_GET['lowest_altitude'];
26 26
                 $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
27
+        } else if ($_GET['highest_altitude'] != "") {
28 28
                 $end_altitude = $_GET['highest_altitude'];
29 29
                 $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
30
+        } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") {
31 31
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 32
                 $sql_altitude = $start_altitude;
33 33
         } else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37
-if(!isset($_GET['limit']))
37
+if (!isset($_GET['limit']))
38 38
 {
39 39
         if (!isset($_GET['number_results']))
40 40
         {
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
                 $limit_end = 25;
43 43
                 $absolute_difference = 25;
44 44
         } else {
45
-                if ($_GET['number_results'] > 1000){
45
+                if ($_GET['number_results'] > 1000) {
46 46
                         $_GET['number_results'] = 1000;
47 47
                 }
48 48
                 $limit_start = 0;
49 49
                 $limit_end = $_GET['number_results'];
50 50
                 $absolute_difference = $_GET['number_results'];
51 51
         }
52
-}  else {
52
+} else {
53 53
         $limit_explode = explode(",", $_GET['limit']);
54 54
         $limit_start = $limit_explode[0];
55 55
         $limit_end = $limit_explode[1];
@@ -72,23 +72,23 @@  discard block
 block discarded – undo
72 72
 
73 73
 if (isset($_GET['sort'])) $sort = $_GET['sort'];
74 74
 else $sort = '';
75
-$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
76
-$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
77
-$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
78
-$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING);
79
-$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING);
80
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
81
-$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING);
82
-$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING);
83
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
84
-$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING);
85
-$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING);
86
-$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING);
87
-$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING);
88
-$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING);
89
-$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING);
90
-$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING);
91
-$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'');
75
+$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
76
+$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING);
77
+$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING);
78
+$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING);
79
+$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING);
80
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
81
+$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING);
82
+$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING);
83
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
84
+$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING);
85
+$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING);
86
+$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING);
87
+$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING);
88
+$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING);
89
+$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING);
90
+$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING);
91
+$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '');
92 92
  
93 93
 print '<?xml version="1.0" encoding="UTF-8" ?>';
94 94
 print '<rss xmlns:flightairmap="http://'.$_SERVER['HTTP_HOST'].''.htmlentities($_SERVER['REQUEST_URI']).'" version="2.0">';
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
   
103 103
   if (!empty($spotter_array))
104 104
   {
105
-    foreach($spotter_array as $spotter_item)
105
+    foreach ($spotter_array as $spotter_item)
106 106
     {
107 107
 
108 108
           
Please login to merge, or discard this patch.
Braces   +18 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,12 @@  discard block
 block discarded – undo
15 15
         } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18
-        } else $sql_date = '';
19
-} else $sql_date = '';
18
+        } else {
19
+        	$sql_date = '';
20
+        }
21
+        } else {
22
+	$sql_date = '';
23
+}
20 24
 
21 25
 if (isset($_GET['highest_altitude'])) {
22 26
         //for altitude manipulation
@@ -30,8 +34,12 @@  discard block
 block discarded – undo
30 34
         } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31 35
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 36
                 $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
34
-} else $sql_altitude = '';
37
+        } else {
38
+        	$sql_altitude = '';
39
+        }
40
+        } else {
41
+	$sql_altitude = '';
42
+}
35 43
 
36 44
 //calculuation for the pagination
37 45
 if(!isset($_GET['limit']))
@@ -49,7 +57,7 @@  discard block
 block discarded – undo
49 57
                 $limit_end = $_GET['number_results'];
50 58
                 $absolute_difference = $_GET['number_results'];
51 59
         }
52
-}  else {
60
+} else {
53 61
         $limit_explode = explode(",", $_GET['limit']);
54 62
         $limit_start = $limit_explode[0];
55 63
         $limit_end = $limit_explode[1];
@@ -70,8 +78,11 @@  discard block
 block discarded – undo
70 78
 
71 79
 $date = date("D, d M Y H:i:s T", time());
72 80
 
73
-if (isset($_GET['sort'])) $sort = $_GET['sort'];
74
-else $sort = '';
81
+if (isset($_GET['sort'])) {
82
+	$sort = $_GET['sort'];
83
+} else {
84
+	$sort = '';
85
+}
75 86
 $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
76 87
 $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
77 88
 $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
country-statistics-departure-airport-country.php 2 patches
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['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 
13 13
 if (isset($_GET['sort'])) {
14 14
 	$spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Departure Airports by Country from %s"),$country);
21
+	$title = sprintf(_("Most Common Departure Airports by Country from %s"), $country);
22 22
 	require_once('header.php');
23 23
 	print '<div class="select-item">';
24 24
 	print '<form action="'.$globalURL.'/country" method="post">';
25 25
 	print '<select name="country" class="selectpicker" data-live-search="true">';
26 26
 	print '<option></option>';
27 27
 	$all_countries = $Spotter->getAllCountries();
28
-	foreach($all_countries as $all_country)
28
+	foreach ($all_countries as $all_country)
29 29
 	{
30
-		if($country == $all_country['country'])
30
+		if ($country == $all_country['country'])
31 31
 		{
32 32
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
33 33
 		} else {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	if ($_GET['country'] != "NA")
43 43
 	{
44 44
 		print '<div class="info column">';
45
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
45
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
46 46
 		print '</div>';
47 47
 	} else {
48 48
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('country-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights of airports &amp; airlines from <strong>%s</strong>."),$country).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights of airports &amp; airlines from <strong>%s</strong>."), $country).'</p>';
55 55
 
56 56
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByCountry($country);
57 57
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             	["'._("Country").'", "'._("# of times").'"], ';
65 65
 
66 66
 	$country_data = '';
67
-	foreach($airport_country_array as $airport_item)
67
+	foreach ($airport_country_array as $airport_item)
68 68
 	{
69 69
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
70 70
 	}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		print '</thead>';
99 99
 		print '<tbody>';
100 100
 		$i = 1;
101
-		foreach($airport_country_array as $airport_item)
101
+		foreach ($airport_country_array as $airport_item)
102 102
 		{
103 103
 			print '<tr>';
104 104
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-sub-menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 </span>
4 4
 <div class="sub-menu sub-menu-container">
5 5
 	<ul class="nav nav-pills">
6
-		<li><a href="<?php print $globalURL; ?>/airport/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
6
+		<li><a href="<?php print $globalURL; ?>/airport/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
7 7
 		<li class="dropdown">
8
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "airport-statistics-aircraft" || strtolower($current_page) == "airport-statistics-registration" || strtolower($current_page) == "airport-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
8
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "airport-statistics-aircraft" || strtolower($current_page) == "airport-statistics-registration" || strtolower($current_page) == "airport-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#">
9 9
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
10 10
 		    </a>
11 11
 		    <ul class="dropdown-menu" role="menu">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		    </ul>
16 16
 		</li>
17 17
 		<li class="dropdown">
18
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "airport-statistics-airline" || strtolower($current_page) == "airport-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
18
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "airport-statistics-airline" || strtolower($current_page) == "airport-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
19 19
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
20 20
 		    </a>
21 21
 		    <ul class="dropdown-menu" role="menu">
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		    </ul>
25 25
 		</li>
26 26
 		<li class="dropdown">
27
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "airport-statistics-departure-airport" || strtolower($current_page) == "airport-statistics-departure-airport-country" || strtolower($current_page) == "airport-statistics-arrival-airport" || strtolower($current_page) == "airport-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
27
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "airport-statistics-departure-airport" || strtolower($current_page) == "airport-statistics-departure-airport-country" || strtolower($current_page) == "airport-statistics-arrival-airport" || strtolower($current_page) == "airport-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
28 28
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
29 29
 		    </a>
30 30
 		    <ul class="dropdown-menu" role="menu">
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			  <li><a href="<?php print $globalURL; ?>/airport/statistics/arrival-airport-country/<?php print $_GET['airport']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li>
35 35
 		    </ul>
36 36
 		</li>
37
-		<li><a href="<?php print $globalURL; ?>/airport/statistics/route/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
-		<li><a href="<?php print $globalURL; ?>/airport/statistics/time/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
37
+		<li><a href="<?php print $globalURL; ?>/airport/statistics/route/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
+		<li><a href="<?php print $globalURL; ?>/airport/statistics/time/<?php print $_GET['airport']; ?>" <?php if (strtolower($current_page) == "airport-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
39 39
 	</ul>
40 40
 </div>
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
airline-statistics-time.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
           function drawChart() {
71 71
             var data = google.visualization.arrayToDataTable([
72 72
             	["'._("Hour").'", "'._("# of Flights").'"], ';
73
-        $hour_data = '';
73
+		$hour_data = '';
74 74
 	foreach($hour_array as $hour_item)
75 75
 	{
76 76
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
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.'/airline');
7 7
         die();
8 8
 }
9
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
12 12
 
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
20 20
 	print '<select name="airline" class="selectpicker" data-live-search="true">';
21 21
 	print '<option></option>';
22 22
 	$airline_names = $Spotter->getAllAirlineNames();
23
-	foreach($airline_names as $airline_name)
23
+	foreach ($airline_names as $airline_name)
24 24
 	{
25
-		if($airline == $airline_name['airline_icao'])
25
+		if ($airline == $airline_name['airline_icao'])
26 26
 		{
27 27
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
28 28
 		} else {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	include('airline-sub-menu.php');
61 61
 	print '<div class="column">';
62 62
 	print '<h2>'._("Most Common Time of Day").'</h2>';
63
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
63
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
64 64
 	$hour_array = $Spotter->countAllHoursByAirline($airline);
65 65
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
66 66
 	print '<div id="chartHour" class="chart" width="100%"></div>
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             var data = google.visualization.arrayToDataTable([
72 72
             	["'._("Hour").'", "'._("# of Flights").'"], ';
73 73
         $hour_data = '';
74
-	foreach($hour_array as $hour_item)
74
+	foreach ($hour_array as $hour_item)
75 75
 	{
76 76
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
77 77
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 			if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif'))
42 42
 			{
43 43
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
44
-			}
45
-			elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
44
+			} elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
46 45
 			{
47 46
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
48 47
 			}
Please login to merge, or discard this patch.
country-statistics-route.php 2 patches
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['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 
13 13
 if (isset($_GET['sort'])) {
14 14
 	$spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Routes from %s"),$country);
21
+	$title = sprintf(_("Most Common Routes from %s"), $country);
22 22
 	require_once('header.php');
23 23
 	print '<div class="select-item">';
24 24
 	print '<form action="'.$globalURL.'/country" method="post">';
25 25
 	print '<select name="country" class="selectpicker" data-live-search="true">';
26 26
 	print '<option></option>';
27 27
 	$all_countries = $Spotter->getAllCountries();
28
-	foreach($all_countries as $all_country)
28
+	foreach ($all_countries as $all_country)
29 29
 	{
30
-		if($country == $all_country['country'])
30
+		if ($country == $all_country['country'])
31 31
 		{
32 32
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
33 33
 		} else {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	if ($_GET['country'] != "NA")
43 43
 	{
44 44
 		print '<div class="info column">';
45
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
45
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
46 46
 		print '</div>';
47 47
 	} else {
48 48
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('country-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Routes").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common routes of airports &amp; airlines from <strong>%s</strong>."),$country).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows the most common routes of airports &amp; airlines from <strong>%s</strong>."), $country).'</p>';
55 55
 	$route_array = $Spotter->countAllRoutesByCountry($country);
56 56
 	if (!empty($route_array))
57 57
 	{
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		print '</thead>';
67 67
 		print '<tbody>';
68 68
 		$i = 1;
69
-		foreach($route_array as $route_item)
69
+		foreach ($route_array as $route_item)
70 70
 		{
71 71
 			print '<tr>';
72 72
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.