Completed
Push — master ( 3afeea...5bdcfd )
by Yannick
06:37
created
aircraft-statistics-arrival-airport.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 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
 
11 11
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
55 55
 	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56 56
 	 $airport_airport_array = $Spotter->countAllArrivalAirportsByAircraft($aircraft_type);
57
-    	?>
57
+		?>
58 58
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
59 59
     	<script>
60 60
     	google.load("visualization", "1", {packages:["geochart"]});
Please login to merge, or discard this patch.
ident-statistics-time.php 1 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
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
country-statistics-airline-country.php 1 patch
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['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)));
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
           function drawChart() {
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Country").'", "'._("# of times").'"], ';
64
-            	$country_data = '';
64
+				$country_data = '';
65 65
 	foreach($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
Please login to merge, or discard this patch.
atc-geojson.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		date_default_timezone_set('UTC');
26 26
 		//waypoint plotting
27 27
 		$output .= '{"type": "Feature",';
28
-		    $output .= '"properties": {';
28
+			$output .= '"properties": {';
29 29
 			$output .= '"ident": "'.$spotter_item['ident'].'",';
30 30
 			$output .= '"frequency": "'.$spotter_item['frequency'].'",';
31 31
 			$radius = $spotter_item['atc_range']*100;
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 			$output .= '"ivao_name": "'.$spotter_item['ivao_name'].'",';
35 35
 			$output .= '"info": "'.$spotter_item['info'].'",';
36 36
 			$output .= '"type": "'.$spotter_item['type'].'"';
37
-		    $output .= '},';
38
-		    $output .= '"geometry": {';
37
+			$output .= '},';
38
+			$output .= '"geometry": {';
39 39
 			$output .= '"type": "Point",';
40 40
 			$output .= '"coordinates": [';
41
-			    $output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
41
+				$output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
42 42
 			$output .= ']';
43
-		    $output .= '}';
43
+			$output .= '}';
44 44
 		$output .= '},';
45 45
 	}
46 46
 	$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
country-statistics-arrival-airport-country.php 1 patch
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['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)));
@@ -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 Arrival Airports by Country").'</h2>';
54
-        print '<p>'.sprintf(_("The statistic below shows all arrival 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 arrival 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->countAllArrivalAirportCountriesByCountry($country);
57 57
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
           function drawChart() {
63 63
             var data = google.visualization.arrayToDataTable([
64 64
             	["'._("Country").'", "'._("# of times").'"], ';
65
-            	$country_data = '';
65
+				$country_data = '';
66 66
 	foreach($airport_country_array as $airport_item)
67 67
 	{
68 68
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
Please login to merge, or discard this patch.
search-xml.php 1 patch
Indentation   +86 added lines, -86 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);
@@ -89,56 +89,56 @@  discard block
 block discarded – undo
89 89
        
90 90
 $output = '<?xml version="1.0" encoding="UTF-8" ?>';
91 91
   $output .= '<flightairmap>';
92
-    $output .= '<title>'.$globalName.' XML Feed</title>';
93
-    $output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>';
94
-    $output .= '<aircrafts>';
92
+	$output .= '<title>'.$globalName.' XML Feed</title>';
93
+	$output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>';
94
+	$output .= '<aircrafts>';
95 95
     
96
-    if (!empty($spotter_array))
96
+	if (!empty($spotter_array))
97 97
 	  {
98
-	    foreach($spotter_array as $spotter_item)
99
-	    {
98
+		foreach($spotter_array as $spotter_item)
99
+		{
100 100
 	    	
101
-            $output .= '<aircraft>';
102
-              $output .= '<id>'.$spotter_item['spotter_id'].'</id>';
103
-		      $output .= '<ident>'.$spotter_item['ident'].'</ident>';
104
-		      $output .= '<registration>'.$spotter_item['registration'].'</registration>';
105
-              $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>';
106
-		      $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>';
107
-              $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>';
108
-              $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>';
109
-		      $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>';
101
+			$output .= '<aircraft>';
102
+			  $output .= '<id>'.$spotter_item['spotter_id'].'</id>';
103
+			  $output .= '<ident>'.$spotter_item['ident'].'</ident>';
104
+			  $output .= '<registration>'.$spotter_item['registration'].'</registration>';
105
+			  $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>';
106
+			  $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>';
107
+			  $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>';
108
+			  $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>';
109
+			  $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>';
110 110
 		if (isset($spotter_item['airline_iata'])) {
111
-            	    $output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>';
112
-              }
113
-              $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>';
114
-              if (isset($spotter_item['airline_callsign'])) {
115
-            	$output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>';
116
-              }
117
-              $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>';
118
-              $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>';
119
-		      $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>';  
120
-              $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>';
121
-              $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>';
122
-              $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>';
123
-              $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>';
124
-              $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>';
125
-              $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>';
126
-		      $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>';  
127
-              $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>';
128
-              $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>';
129
-              $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>';
130
-              $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>';
131
-              $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>';
132
-              $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>';
133
-              $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>';
134
-              $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>';
135
-              $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>';
136
-              $output .= '<heading>'.$spotter_item['heading'].'</heading>';
137
-              $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>';
138
-              $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>';
139
-		      $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>';
140
-            $output .= '</aircraft>';
141
-	    }
111
+					$output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>';
112
+			  }
113
+			  $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>';
114
+			  if (isset($spotter_item['airline_callsign'])) {
115
+				$output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>';
116
+			  }
117
+			  $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>';
118
+			  $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>';
119
+			  $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>';  
120
+			  $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>';
121
+			  $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>';
122
+			  $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>';
123
+			  $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>';
124
+			  $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>';
125
+			  $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>';
126
+			  $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>';  
127
+			  $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>';
128
+			  $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>';
129
+			  $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>';
130
+			  $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>';
131
+			  $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>';
132
+			  $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>';
133
+			  $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>';
134
+			  $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>';
135
+			  $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>';
136
+			  $output .= '<heading>'.$spotter_item['heading'].'</heading>';
137
+			  $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>';
138
+			  $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>';
139
+			  $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>';
140
+			$output .= '</aircraft>';
141
+		}
142 142
 	   }
143 143
 		 $output .= '</aircrafts>';
144 144
 $output .= '</flightairmap>';
Please login to merge, or discard this patch.
route-statistics-airline-country.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
           function drawChart() {
36 36
             var data = google.visualization.arrayToDataTable([
37 37
             	["'._("Country").'", "'._("# of times").'"], ';
38
-            	$country_data = '';
38
+				$country_data = '';
39 39
 	foreach($airline_array as $airline_item)
40 40
 	{
41 41
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
Please login to merge, or discard this patch.
search-gpx.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@
 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);
Please login to merge, or discard this patch.
install/install_db.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@
 block discarded – undo
1 1
 #!/usr/bin/php
2 2
 <?php
3
-    require_once('../require/settings.php');
4
-    if ($globalInstalled) {
5
-        echo '$globalInstalled must be set to FALSE in require/settings.php';
6
-        exit;
7
-    }
8
-    require('class.create_db.php');
9
-    echo "Create and import all tables...";
10
-    create_db::import_all_db('../db/');
11
-    echo "Done !\n";
3
+	require_once('../require/settings.php');
4
+	if ($globalInstalled) {
5
+		echo '$globalInstalled must be set to FALSE in require/settings.php';
6
+		exit;
7
+	}
8
+	require('class.create_db.php');
9
+	echo "Create and import all tables...";
10
+	create_db::import_all_db('../db/');
11
+	echo "Done !\n";
12 12
 
13
-    require('class.update_db.php');
14
-    echo "Populate all tables...\n";
15
-    update_db::update_all();
16
-    echo "\nInstall waypoints...(VERY slow!)";
17
-    update_db::update_waypoints();
18
-    echo "Done !\n";
19
-    echo "Install airspace...";
20
-    update_db::update_airspace();
21
-    echo "Done !\n";
22
-    echo 'All is now installed ! Thanks'."\n";
23
-    if ($globalSBS1) {
24
-            echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n";
25
-    }
26
-    if ($globalACARS) {
27
-            echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n";
28
-    }
13
+	require('class.update_db.php');
14
+	echo "Populate all tables...\n";
15
+	update_db::update_all();
16
+	echo "\nInstall waypoints...(VERY slow!)";
17
+	update_db::update_waypoints();
18
+	echo "Done !\n";
19
+	echo "Install airspace...";
20
+	update_db::update_airspace();
21
+	echo "Done !\n";
22
+	echo 'All is now installed ! Thanks'."\n";
23
+	if ($globalSBS1) {
24
+			echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n";
25
+	}
26
+	if ($globalACARS) {
27
+			echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n";
28
+	}
29 29
     
30 30
 ?>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.