Completed
Push — master ( f6e401...19913c )
by Yannick
10:24
created
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.
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.
install/populate_ivao.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@
 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.update_db.php');
9
-    if (isset($globalVATSIM) && $globalVATSIM) {
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.update_db.php');
9
+	if (isset($globalVATSIM) && $globalVATSIM) {
10 10
 	echo "Install VATSIM airlines...";
11 11
 	update_db::update_vatsim();
12 12
 	echo "Done !\n";
13
-    }
14
-    if (isset($globalIVAO) && $globalIVAO) {
13
+	}
14
+	if (isset($globalIVAO) && $globalIVAO) {
15 15
 	if (!file_exists('tmp/ivae_feb2013.zip')) {
16 16
 		echo "You have to download the file ivae_feb2013.zip from https://www.ivao.aero/softdev/mirrors.asp?software=IvAeDataUp and put it in install/tmp directory";
17 17
 	} else {
18
-	        echo "Install IVAO airlines and logos...";
19
-	        update_db::update_IVAO();
18
+			echo "Install IVAO airlines and logos...";
19
+			update_db::update_IVAO();
20 20
 		echo "Done !\n";
21 21
 	}
22
-    }
22
+	}
23 23
 ?>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
install/install-action.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -68,27 +68,27 @@  discard block
 block discarded – undo
68 68
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') {
69 69
 	if (update_schema::check_version(false) == '0') {
70 70
 		if ($globalDBdriver == 'mysql') {
71
-		    $error .= create_db::import_all_db('../db/');
71
+			$error .= create_db::import_all_db('../db/');
72 72
 		} elseif ($globalDBdriver == 'pgsql') {
73
-		    $error .= create_db::import_all_db('../db/pgsql/');
73
+			$error .= create_db::import_all_db('../db/pgsql/');
74 74
 		}
75 75
 		if ($error != '') {
76
-                        $_SESSION['error'] = $error;
76
+						$_SESSION['error'] = $error;
77 77
 		}
78 78
 		$_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables'));
79 79
 		if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) {
80 80
 			$_SESSION['install'] = 'populate';
81 81
 			$_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B';
82 82
 		} else {
83
-		    $_SESSION['install'] = 'sources';
84
-		    $_SESSION['next'] = 'Insert data in source table';
83
+			$_SESSION['install'] = 'sources';
84
+			$_SESSION['next'] = 'Insert data in source table';
85 85
 		}
86 86
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
87 87
 		print json_encode($result);
88 88
 	} else {
89 89
 		$error .= update_schema::check_version(true);
90 90
 		if ($error != '') {
91
-                        $_SESSION['error'] = $error;
91
+						$_SESSION['error'] = $error;
92 92
 		}
93 93
 		$_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed'));
94 94
 		$_SESSION['install'] = 'sources';
@@ -118,25 +118,25 @@  discard block
 block discarded – undo
118 118
 	$error .= update_db::update_countries();
119 119
 	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database'));
120 120
 	if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
121
-	    $_SESSION['install'] = 'notam';
122
-	    $_SESSION['next'] = 'Populate NOTAM table with externals data';
123
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
124
-	    print json_encode($result);
121
+		$_SESSION['install'] = 'notam';
122
+		$_SESSION['next'] = 'Populate NOTAM table with externals data';
123
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
124
+		print json_encode($result);
125 125
 	} elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) {
126
-	    $_SESSION['install'] = 'owner';
127
-	    $_SESSION['next'] = 'Populate owner table with externals data';
128
-	    unset($_SESSION['owner']);
129
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
130
-	    print json_encode($result);
126
+		$_SESSION['install'] = 'owner';
127
+		$_SESSION['next'] = 'Populate owner table with externals data';
128
+		unset($_SESSION['owner']);
129
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
130
+		print json_encode($result);
131 131
 	} else {
132
-	    $_SESSION['install'] = 'sources';
133
-	    $_SESSION['next'] = 'Insert data in source table';
134
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
135
-	    print json_encode($result);
132
+		$_SESSION['install'] = 'sources';
133
+		$_SESSION['next'] = 'Insert data in source table';
134
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
135
+		print json_encode($result);
136 136
 	}
137 137
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') {
138 138
 	if (!is_writable('tmp')) {
139
-                $error = 'The directory <i>install/tmp</i> must be writable.';
139
+				$error = 'The directory <i>install/tmp</i> must be writable.';
140 140
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
141 141
 		print json_encode($result);
142 142
 	} else {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	}
153 153
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') {
154 154
 	if (!is_writable('tmp')) {
155
-                $error = 'The directory <i>install/tmp</i> must be writable.';
155
+				$error = 'The directory <i>install/tmp</i> must be writable.';
156 156
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
157 157
 		print json_encode($result);
158 158
 	} else {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	}
186 186
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') {
187 187
 	if (!is_writable('tmp')) {
188
-                $error = 'The directory <i>install/tmp</i> must be writable.';
188
+				$error = 'The directory <i>install/tmp</i> must be writable.';
189 189
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
190 190
 		print json_encode($result);
191 191
 	} else {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	}
201 201
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') {
202 202
 	if (!is_writable('tmp')) {
203
-                $error = 'The directory <i>install/tmp</i> must be writable.';
203
+				$error = 'The directory <i>install/tmp</i> must be writable.';
204 204
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
205 205
 		print json_encode($result);
206 206
 	} else {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	}
230 230
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') {
231 231
 	if (!is_writable('tmp')) {
232
-                $error = 'The directory <i>install/tmp</i> must be writable.';
232
+				$error = 'The directory <i>install/tmp</i> must be writable.';
233 233
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
234 234
 		print json_encode($result);
235 235
 	} else {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	}
245 245
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') {
246 246
 	if (!is_writable('tmp')) {
247
-                $error = 'The directory <i>install/tmp</i> must be writable.';
247
+				$error = 'The directory <i>install/tmp</i> must be writable.';
248 248
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
249 249
 		print json_encode($result);
250 250
 	} else {
@@ -296,17 +296,17 @@  discard block
 block discarded – undo
296 296
 */
297 297
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'sources') {
298 298
 	if (isset($_SESSION['sources']) && count($_SESSION['sources']) > 0) {
299
-	    $sources = $_SESSION['sources'];
299
+		$sources = $_SESSION['sources'];
300 300
 
301
-	    include_once('../require/class.Source.php');
302
-	    $globalDebug = FALSE;
303
-	    $Source = new Source();
304
-	    $Source->deleteAllLocation();
305
-	    foreach ($sources as $src) {
301
+		include_once('../require/class.Source.php');
302
+		$globalDebug = FALSE;
303
+		$Source = new Source();
304
+		$Source->deleteAllLocation();
305
+		foreach ($sources as $src) {
306 306
 		if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png');
307
-	    }
308
-	    $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
309
-	    unset($_SESSION['sources']);
307
+		}
308
+		$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
309
+		unset($_SESSION['sources']);
310 310
 	}
311 311
 	/*
312 312
 	if (isset($globalIVAO) && $globalIVAO) $_SESSION['install'] = 'ivao';
Please login to merge, or discard this patch.
install/update_arrival_airport.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
  *    This Script will try to find all real arrival airports for all flights in DB
5 5
  *
6 6
 */
7
-    require_once('../require/settings.php');
8
-    if ($globalInstalled) {
9
-        echo '$globalInstalled must be set to FALSE in require/settings.php';
10
-        exit;
11
-    }
12
-    require('../require/class.Spotter.php');
13
-    $Spotter = new Spotter();
14
-    $Spotter->updateArrivalAirports();
7
+	require_once('../require/settings.php');
8
+	if ($globalInstalled) {
9
+		echo '$globalInstalled must be set to FALSE in require/settings.php';
10
+		exit;
11
+	}
12
+	require('../require/class.Spotter.php');
13
+	$Spotter = new Spotter();
14
+	$Spotter->updateArrivalAirports();
15 15
 
16 16
 ?>
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
airport-detailed.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 			$metar_info = $METAR->getMETAR($airport_icao);
47 47
 			//print_r($metar_info);
48 48
 			if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']);
49
-            		//print_r($metar_parse);
49
+					//print_r($metar_parse);
50 50
 		}
51 51
 		
52 52
 		$title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
                       function drawChart6() {
100 100
                         var data = google.visualization.arrayToDataTable([
101 101
                             ["'._("Date").'","'._("Departure").'","'._("Arrival").'"], ';
102
-                            $airport_data = '';
103
-                                foreach($all_data as $data)
104
-                                {
105
-                                        $airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],';
106
-                                }
107
-                                $airport_data = substr($airport_data, 0, -1);
108
-                                print $airport_data.']);
102
+							$airport_data = '';
103
+								foreach($all_data as $data)
104
+								{
105
+										$airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],';
106
+								}
107
+								$airport_data = substr($airport_data, 0, -1);
108
+								print $airport_data.']);
109 109
 
110 110
                         var options = {
111 111
                     	    legend: {position: "none"},
Please login to merge, or discard this patch.