Completed
Push — master ( 73f088...7f17b6 )
by Yannick
07:13
created
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_all.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,37 +1,37 @@
 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
-    echo "Populate all tables...\n";
10
-    update_db::update_all();
11
-    echo "\nInstall waypoints...(VERY slow!)";
12
-    update_db::update_waypoints();
13
-    echo "Done !\n";
14
-    echo "Install airspace...";
15
-    update_db::update_airspace();
16
-    echo "Done !\n";
17
-    echo "Install countries...";
18
-    update_db::update_countries();
19
-    echo "Done !\n";
20
-    if (isset($globalOwner) && $globalOwner) {
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
+	echo "Populate all tables...\n";
10
+	update_db::update_all();
11
+	echo "\nInstall waypoints...(VERY slow!)";
12
+	update_db::update_waypoints();
13
+	echo "Done !\n";
14
+	echo "Install airspace...";
15
+	update_db::update_airspace();
16
+	echo "Done !\n";
17
+	echo "Install countries...";
18
+	update_db::update_countries();
19
+	echo "Done !\n";
20
+	if (isset($globalOwner) && $globalOwner) {
21 21
 	echo "Install private owners...";
22 22
 	update_db::update_owner();
23
-        echo "Done !\n";
24
-    }
25
-    /*
23
+		echo "Done !\n";
24
+	}
25
+	/*
26 26
     if (isset($globalIVAO) && $globalIVAO) {
27 27
         echo "Install IVAO airlines and logos...";
28 28
         update_db::update_IVAO();
29 29
 	echo "Done !\n";
30 30
     }
31 31
     */
32
-    if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
32
+	if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
33 33
 	echo "Install NOTAM from notaminfo.com...";
34
-        update_db:update_notam();
35
-        echo "Done !\n";
36
-    }
34
+		update_db:update_notam();
35
+		echo "Done !\n";
36
+	}
37 37
 ?>
38 38
\ 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/header.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 <meta property="og:site_name" content="<?php print $globalName; ?>"/>
40 40
 
41 41
 <?php
42
-    if (!isset($_SESSION['install']) && !$globalInstalled) {
42
+	if (!isset($_SESSION['install']) && !$globalInstalled) {
43 43
 ?>
44 44
 <script language="JavaScript" type="text/javascript">
45 45
     function datasource_js() {
@@ -120,22 +120,22 @@  discard block
 block discarded – undo
120 120
     }
121 121
 </script>
122 122
 <?php
123
-    }
123
+	}
124 124
 ?>
125 125
 
126 126
 </head>
127 127
 
128 128
 <?php
129
-    if (!isset($_SESSION['install']) && !$globalInstalled) {
129
+	if (!isset($_SESSION['install']) && !$globalInstalled) {
130 130
 ?>
131 131
 
132 132
 <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()">
133 133
 <?php
134
-    } else {
134
+	} else {
135 135
 ?>
136 136
     <body class="page-<?php print strtolower($current_page); ?>">
137 137
 <?php
138
-    }
138
+	}
139 139
 ?>
140 140
 <div class="navbar navbar-fixed-top" role="navigation">
141 141
   <div class="container">
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
 
155 155
 <?php
156 156
 if (isset($top_header)) {
157
-    if ($top_header != "")
158
-    {
157
+	if ($top_header != "")
158
+	{
159 159
 	print '<div class="top-header container clear" role="main">';
160 160
 		print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />';
161 161
 	print '</div>';
162
-    }
162
+	}
163 163
 }
164 164
 ?>
165 165
 
Please login to merge, or discard this patch.
install/class.create_db.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@  discard block
 block discarded – undo
6 6
 	public static function import_file($filename) {
7 7
 		$filename = filter_var($filename,FILTER_SANITIZE_STRING);
8 8
 		$Connection = new Connection();
9
-                //Connection::$db->beginTransaction();
10
-                 $templine = '';
11
-                 $lines = file($filename);
12
-                 foreach ($lines as $line)
13
-                 {
14
-                	if (substr($line,0,2) == '--' || $line == '') continue;
15
-                	$templine .= $line;
16
-                	if (substr(trim($line), -1,1) == ';')
17
-                	{
18
-                		try {
19
-                			$sth = $Connection->db->prepare($templine);
9
+				//Connection::$db->beginTransaction();
10
+				 $templine = '';
11
+				 $lines = file($filename);
12
+				 foreach ($lines as $line)
13
+				 {
14
+					if (substr($line,0,2) == '--' || $line == '') continue;
15
+					$templine .= $line;
16
+					if (substr(trim($line), -1,1) == ';')
17
+					{
18
+						try {
19
+							$sth = $Connection->db->prepare($templine);
20 20
 					$sth->execute();
21
-                    		} catch(PDOException $e) {
21
+							} catch(PDOException $e) {
22 22
 					return "error (import ".$filename.") : ".$e->getMessage()."\n";
23
-                    		}
24
-                		$templine = '';
25
-                	}
23
+							}
24
+						$templine = '';
25
+					}
26 26
 		}
27
-                //Connection::$db->commit();
28
-                $Connection->db = null;
29
-                return '';
27
+				//Connection::$db->commit();
28
+				$Connection->db = null;
29
+				return '';
30 30
 	}
31 31
 
32 32
 	public static function import_all_db($directory) {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		//foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $filename)
36 36
 		while(false !== ($filename = readdir($dh)))
37 37
 		{
38
-		    if (preg_match('/\.sql$/',$filename)) $error .= create_db::import_file($directory.$filename);
38
+			if (preg_match('/\.sql$/',$filename)) $error .= create_db::import_file($directory.$filename);
39 39
 		}
40 40
 		return $error;
41 41
 	}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		$host = filter_var($host,FILTER_SANITIZE_STRING);
51 51
 		// Dirty hack
52 52
 		if ($host != 'localhost' && $host != '127.0.0.1') {
53
-		    $grantright = $_SERVER['SERVER_ADDR'];
53
+			$grantright = $_SERVER['SERVER_ADDR'];
54 54
 		} else $grantright = 'localhost';
55 55
 		try {
56 56
 			$dbh = new PDO($db_type.':host='.$host,$root,$root_pass);
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.
aircraft-statistics-airline-country.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
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
-    	print '<option></option>';
24
-    	$aircraft_types = $Spotter->getAllAircraftTypes();
25
-    	foreach($aircraft_types as $aircrafttype)
26
-    	{
27
-    		if($aircraft_type == $aircrafttype['aircraft_icao'])
28
-    		{
29
-    			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
30
-    		} else {
31
-    			print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32
-    		}
23
+		print '<option></option>';
24
+		$aircraft_types = $Spotter->getAllAircraftTypes();
25
+		foreach($aircraft_types as $aircrafttype)
26
+		{
27
+			if($aircraft_type == $aircrafttype['aircraft_icao'])
28
+			{
29
+				print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
30
+			} else {
31
+				print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32
+			}
33 33
 	}
34 34
 	print '</select>';
35 35
 	print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>';
@@ -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.