@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_create') { |
69 | 69 | $dbroot = $_SESSION['database_root']; |
70 | 70 | $dbrootpass = $_SESSION['database_rootpass']; |
71 | - $error .= create_db::create_database($dbroot,$dbrootpass,$globalDBuser,$globalDBpass,$globalDBname,$globalDBdriver,$globalDBhost); |
|
71 | + $error .= create_db::create_database($dbroot, $dbrootpass, $globalDBuser, $globalDBpass, $globalDBname, $globalDBdriver, $globalDBhost); |
|
72 | 72 | sleep(5); |
73 | 73 | if ($error != '') { |
74 | 74 | $_SESSION['error'] = $error; |
75 | 75 | } |
76 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Create database')); |
|
76 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Create database')); |
|
77 | 77 | $_SESSION['install'] = 'database_import'; |
78 | 78 | $_SESSION['next'] = 'Create and import tables'; |
79 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
79 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
80 | 80 | print json_encode($result); |
81 | 81 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') { |
82 | 82 | if (update_schema::check_version(false) == '0') { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if ($error != '') { |
89 | 89 | $_SESSION['error'] = $error; |
90 | 90 | } |
91 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables')); |
|
91 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Create and import tables')); |
|
92 | 92 | if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) { |
93 | 93 | $_SESSION['install'] = 'populate'; |
94 | 94 | $_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B'; |
@@ -96,84 +96,84 @@ discard block |
||
96 | 96 | $_SESSION['install'] = 'sources'; |
97 | 97 | $_SESSION['next'] = 'Insert data in source table'; |
98 | 98 | } |
99 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
99 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
100 | 100 | print json_encode($result); |
101 | 101 | } else { |
102 | 102 | $error .= update_schema::check_version(true); |
103 | 103 | if ($error != '') { |
104 | 104 | $_SESSION['error'] = $error; |
105 | 105 | } |
106 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed')); |
|
106 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Update schema if needed')); |
|
107 | 107 | $_SESSION['install'] = 'sources'; |
108 | 108 | $_SESSION['next'] = 'Insert data in source table'; |
109 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
109 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
110 | 110 | print json_encode($result); |
111 | 111 | } |
112 | 112 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'waypoints') { |
113 | 113 | include_once('class.update_db.php'); |
114 | 114 | $error .= update_db::update_waypoints(); |
115 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate waypoints database')); |
|
115 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate waypoints database')); |
|
116 | 116 | |
117 | 117 | $_SESSION['install'] = 'airspace'; |
118 | 118 | $_SESSION['next'] = 'Populate airspace table'; |
119 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
119 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
120 | 120 | print json_encode($result); |
121 | 121 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'airspace') { |
122 | 122 | include_once('class.update_db.php'); |
123 | 123 | $error .= update_db::update_airspace_fam(); |
124 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate airspace database')); |
|
124 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate airspace database')); |
|
125 | 125 | $_SESSION['install'] = 'countries'; |
126 | 126 | $_SESSION['next'] = 'Populate countries table'; |
127 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
127 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
128 | 128 | print json_encode($result); |
129 | 129 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'countries') { |
130 | 130 | include_once('class.update_db.php'); |
131 | 131 | $error .= update_db::update_countries(); |
132 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database')); |
|
132 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate countries database')); |
|
133 | 133 | if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
134 | 134 | $_SESSION['install'] = 'notam'; |
135 | 135 | $_SESSION['next'] = 'Populate NOTAM table with externals data'; |
136 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
136 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
137 | 137 | print json_encode($result); |
138 | 138 | } elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) { |
139 | 139 | $_SESSION['install'] = 'owner'; |
140 | 140 | $_SESSION['next'] = 'Populate owner table with externals data'; |
141 | 141 | unset($_SESSION['owner']); |
142 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
142 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
143 | 143 | print json_encode($result); |
144 | 144 | } else { |
145 | 145 | $_SESSION['install'] = 'sources'; |
146 | 146 | $_SESSION['next'] = 'Insert data in source table'; |
147 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
147 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
148 | 148 | print json_encode($result); |
149 | 149 | } |
150 | 150 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') { |
151 | 151 | if (!is_writable('tmp')) { |
152 | 152 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
153 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
153 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
154 | 154 | print json_encode($result); |
155 | 155 | } else { |
156 | 156 | include_once('class.update_db.php'); |
157 | 157 | $globalDebug = FALSE; |
158 | 158 | $error .= update_db::update_ModeS(); |
159 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for ADS-B')); |
|
159 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for ADS-B')); |
|
160 | 160 | |
161 | 161 | $_SESSION['install'] = 'populate_flarm'; |
162 | 162 | $_SESSION['next'] = 'Populate aircraft_modes table with externals data for FLARM'; |
163 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
163 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
164 | 164 | print json_encode($result); |
165 | 165 | } |
166 | 166 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') { |
167 | 167 | if (!is_writable('tmp')) { |
168 | 168 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
169 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
169 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
170 | 170 | print json_encode($result); |
171 | 171 | } else { |
172 | 172 | include_once('class.update_db.php'); |
173 | 173 | $globalDebug = FALSE; |
174 | 174 | $error .= update_db::update_ModeS_flarm(); |
175 | 175 | $error .= update_db::update_ModeS_ogn(); |
176 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for FLARM')); |
|
176 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for FLARM')); |
|
177 | 177 | |
178 | 178 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
179 | 179 | $_SESSION['install'] = 'vatsim'; |
@@ -193,34 +193,34 @@ discard block |
||
193 | 193 | $_SESSION['install'] = 'routes'; |
194 | 194 | $_SESSION['next'] = 'Populate routes table with externals data'; |
195 | 195 | } |
196 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
196 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
197 | 197 | print json_encode($result); |
198 | 198 | } |
199 | 199 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') { |
200 | 200 | if (!is_writable('tmp')) { |
201 | 201 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
202 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
202 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
203 | 203 | print json_encode($result); |
204 | 204 | } else { |
205 | 205 | include_once('class.update_db.php'); |
206 | 206 | $globalDebug = FALSE; |
207 | 207 | $error .= update_db::update_routes(); |
208 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate routes table with externals data')); |
|
208 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate routes table with externals data')); |
|
209 | 209 | $_SESSION['install'] = 'translation'; |
210 | 210 | $_SESSION['next'] = 'Populate translation table with externals data'; |
211 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
211 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
212 | 212 | print json_encode($result); |
213 | 213 | } |
214 | 214 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') { |
215 | 215 | if (!is_writable('tmp')) { |
216 | 216 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
217 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
217 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
218 | 218 | print json_encode($result); |
219 | 219 | } else { |
220 | 220 | include_once('class.update_db.php'); |
221 | 221 | $globalDebug = FALSE; |
222 | 222 | $error .= update_db::update_translation(); |
223 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate translation table with externals data')); |
|
223 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate translation table with externals data')); |
|
224 | 224 | |
225 | 225 | if ($_SESSION['waypoints'] == 1) { |
226 | 226 | $_SESSION['install'] = 'waypoints'; |
@@ -237,48 +237,48 @@ discard block |
||
237 | 237 | $_SESSION['install'] = 'sources'; |
238 | 238 | $_SESSION['next'] = 'Insert data in source table'; |
239 | 239 | } |
240 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
240 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
241 | 241 | print json_encode($result); |
242 | 242 | } |
243 | 243 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') { |
244 | 244 | if (!is_writable('tmp')) { |
245 | 245 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
246 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
246 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
247 | 247 | print json_encode($result); |
248 | 248 | } else { |
249 | 249 | include_once('class.update_db.php'); |
250 | 250 | $globalDebug = FALSE; |
251 | 251 | $error = update_db::update_owner(); |
252 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate owner table with externals data')); |
|
252 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate owner table with externals data')); |
|
253 | 253 | $_SESSION['install'] = 'sources'; |
254 | 254 | $_SESSION['next'] = 'Insert data in source table'; |
255 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
255 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
256 | 256 | print json_encode($result); |
257 | 257 | } |
258 | 258 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') { |
259 | 259 | if (!is_writable('tmp')) { |
260 | 260 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
261 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
261 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
262 | 262 | print json_encode($result); |
263 | 263 | } else { |
264 | 264 | include_once('class.update_db.php'); |
265 | 265 | $globalDebug = FALSE; |
266 | 266 | if (isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
267 | 267 | $error .= update_db::update_notam(); |
268 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data')); |
|
268 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data')); |
|
269 | 269 | } else { |
270 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data (no source defined)')); |
|
270 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data (no source defined)')); |
|
271 | 271 | } |
272 | 272 | if (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) { |
273 | 273 | $_SESSION['install'] = 'owner'; |
274 | 274 | $_SESSION['next'] = 'Populate owner table'; |
275 | 275 | unset($_SESSION['owner']); |
276 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
276 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
277 | 277 | print json_encode($result); |
278 | 278 | } else { |
279 | 279 | $_SESSION['install'] = 'sources'; |
280 | 280 | $_SESSION['next'] = 'Insert data in source table'; |
281 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
281 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
282 | 282 | print json_encode($result); |
283 | 283 | } |
284 | 284 | } |
@@ -316,9 +316,9 @@ discard block |
||
316 | 316 | $Source = new Source(); |
317 | 317 | $Source->deleteAllLocation(); |
318 | 318 | foreach ($sources as $src) { |
319 | - if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
319 | + if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'], $src['latitude'], $src['longitude'], $src['altitude'], $src['city'], $src['country'], $src['source'], 'antenna.png'); |
|
320 | 320 | } |
321 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
|
321 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert data in source table')); |
|
322 | 322 | unset($_SESSION['sources']); |
323 | 323 | } |
324 | 324 | /* |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | $_SESSION['install'] = 'finish'; |
344 | 344 | $_SESSION['next'] = 'finish'; |
345 | 345 | } |
346 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
346 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
347 | 347 | print json_encode($result); |
348 | 348 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'vatsim') { |
349 | 349 | include_once('../install/class.create_db.php'); |
@@ -353,36 +353,36 @@ discard block |
||
353 | 353 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
354 | 354 | if (file_exists('tmp/ivae_feb2013.zip')) { |
355 | 355 | $error .= update_db::update_IVAO(); |
356 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data')); |
|
356 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data')); |
|
357 | 357 | } else { |
358 | 358 | $error .= update_db::update_vatsim(); |
359 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data')); |
|
359 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data')); |
|
360 | 360 | } |
361 | 361 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
362 | 362 | $error .= update_db::update_vatsim(); |
363 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data')); |
|
363 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data')); |
|
364 | 364 | } elseif (isset($globalIVAO) && $globalIVAO) { |
365 | 365 | if (file_exists('tmp/ivae_feb2013.zip')) { |
366 | 366 | $error .= update_db::update_IVAO(); |
367 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data')); |
|
367 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data')); |
|
368 | 368 | } else { |
369 | 369 | $error .= update_db::update_vatsim(); |
370 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data (IVAO not found)')); |
|
370 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data (IVAO not found)')); |
|
371 | 371 | } |
372 | 372 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
373 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert phpVMS data')); |
|
373 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert phpVMS data')); |
|
374 | 374 | } |
375 | 375 | //$_SESSION['install'] = 'routes'; |
376 | 376 | //$_SESSION['next'] = 'Populate routes table with externals data'; |
377 | 377 | $_SESSION['install'] = 'finish'; |
378 | 378 | $_SESSION['next'] = 'finish'; |
379 | 379 | |
380 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
380 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
381 | 381 | print json_encode($result); |
382 | 382 | } else { |
383 | 383 | //unset($_SESSION['install']); |
384 | 384 | $_SESSION['error'] = 'Unknwon task : '.$_SESSION['install']; |
385 | - $result = array('error' => 'Unknwon task : '.$_SESSION['install'],'done' => $_SESSION['done'],'next' => 'finish','install' => 'finish'); |
|
385 | + $result = array('error' => 'Unknwon task : '.$_SESSION['install'], 'done' => $_SESSION['done'], 'next' => 'finish', 'install' => 'finish'); |
|
386 | 386 | print json_encode($result); |
387 | 387 | } |
388 | 388 | ?> |
389 | 389 | \ No newline at end of file |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $Common = new Common(); |
13 | 13 | $settings_filename = '../require/settings.php'; |
14 | 14 | $content = file_get_contents($settings_filename); |
15 | - $fh = fopen($settings_filename,'w'); |
|
15 | + $fh = fopen($settings_filename, 'w'); |
|
16 | 16 | foreach ($settings as $settingname => $value) { |
17 | 17 | if ($value == 'TRUE' || $value == 'FALSE') { |
18 | 18 | $pattern = '/\R\$'.$settingname." = ".'(TRUE|FALSE)'."/"; |
@@ -79,21 +79,21 @@ discard block |
||
79 | 79 | $replace = "\n".'\$'.$settingname." = '".$value."'"; |
80 | 80 | } |
81 | 81 | $rep_cnt = 0; |
82 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
82 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
83 | 83 | |
84 | 84 | /// If setting was a string and is now an array |
85 | 85 | if ($rep_cnt === 0 && is_array($value)) { |
86 | 86 | $pattern = '/\R\$'.$settingname." = '".'(.*)'."'/"; |
87 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
87 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | // If setting is not in settings.php (for update) |
91 | 91 | if ($rep_cnt === 0) { |
92 | - $content = preg_replace('/\?>/',$replace.";\n?>",$content,1,$rep_cnt); |
|
92 | + $content = preg_replace('/\?>/', $replace.";\n?>", $content, 1, $rep_cnt); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | } |
96 | - fwrite($fh,$content); |
|
96 | + fwrite($fh, $content); |
|
97 | 97 | fclose($fh); |
98 | 98 | } |
99 | 99 | |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | $Common = new Common(); |
106 | 106 | $settings_filename = '../require/settings.php'; |
107 | 107 | $content = file_get_contents($settings_filename); |
108 | - $fh = fopen($settings_filename,'w'); |
|
108 | + $fh = fopen($settings_filename, 'w'); |
|
109 | 109 | foreach ($settings as $settingname) { |
110 | 110 | $pattern = '/\R\$'.$settingname." = /"; |
111 | 111 | $replace = '//$'.$settingname." = "; |
112 | - $content = preg_replace($pattern,$replace,$content); |
|
112 | + $content = preg_replace($pattern, $replace, $content); |
|
113 | 113 | } |
114 | - fwrite($fh,$content); |
|
114 | + fwrite($fh, $content); |
|
115 | 115 | fclose($fh); |
116 | 116 | } |
117 | 117 | } |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($aircraft_array as $aircraft_item) |
|
78 | + foreach ($aircraft_array as $aircraft_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Routes 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">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($airline == $airline_name['airline_icao']) |
|
27 | + if ($airline == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Routes").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
67 | 67 | if (!empty($route_array)) |
68 | 68 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($route_array as $route_item) |
|
81 | + foreach ($route_array as $route_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
12 | - $title = sprintf(_("Most Common Arrival Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Arrival Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | |
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
28 | 28 | print '<br />'; |
29 | 29 | print '<div class="info column">'; |
30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | 31 | print '</div>'; |
32 | 32 | |
33 | 33 | include('date-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
36 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
36 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
37 | 37 | $airport_airport_array = $Spotter->countAllArrivalAirportsByDate($date); |
38 | 38 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
39 | 39 | <script> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ["'._("Airport").'", "'._("# of times").'"],'; |
49 | 49 | |
50 | 50 | $airport_data = ''; |
51 | - foreach($airport_airport_array as $airport_item) |
|
51 | + foreach ($airport_airport_array as $airport_item) |
|
52 | 52 | { |
53 | 53 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
54 | 54 | $name = str_replace("'", "", $name); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | print '</thead>'; |
88 | 88 | print '<tbody>'; |
89 | 89 | $i = 1; |
90 | - foreach($airport_airport_array as $airport_item) |
|
90 | + foreach ($airport_airport_array as $airport_item) |
|
91 | 91 | { |
92 | 92 | print '<tr>'; |
93 | 93 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $title = _("Unknown Date"); |
113 | 113 | require_once('header.php'); |
114 | 114 | print '<h1>'._("Error").'</h1>'; |
115 | - print '<p>'._("Sorry, this date does not exist in this database. :(");'</p>'; |
|
115 | + print '<p>'._("Sorry, this date does not exist in this database. :("); '</p>'; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | require_once('footer.php'); |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | header('Location: '.$globalURL.'/aircraft'); |
9 | 9 | die(); |
10 | 10 | } |
11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
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 Airlines from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
18 | + $title = sprintf(_("Most Common Airlines 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">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $Stats = new Stats(); |
25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
26 | 26 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
27 | - foreach($aircraft_types as $aircrafttype) |
|
27 | + foreach ($aircraft_types as $aircrafttype) |
|
28 | 28 | { |
29 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
29 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
32 | 32 | } else { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | include('aircraft-sub-menu.php'); |
53 | 53 | print '<div class="column">'; |
54 | 54 | print '<h2>'._("Most Common Airlines").'</h2>'; |
55 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
55 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
56 | 56 | |
57 | 57 | $airline_array = $Spotter->countAllAirlinesByAircraft($aircraft_type); |
58 | 58 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | print '</thead>'; |
71 | 71 | print '<tbody>'; |
72 | 72 | $i = 1; |
73 | - foreach($airline_array as $airline_item) |
|
73 | + foreach ($airline_array as $airline_item) |
|
74 | 74 | { |
75 | 75 | print '<tr>'; |
76 | 76 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Departure Airports from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer); |
49 | 49 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
50 | 50 | <script> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ["'._("Airport").'", "'._("# of times").'"],'; |
60 | 60 | |
61 | 61 | $airport_data = ''; |
62 | - foreach($airport_airport_array as $airport_item) |
|
62 | + foreach ($airport_airport_array as $airport_item) |
|
63 | 63 | { |
64 | 64 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
65 | 65 | $name = str_replace("'", "", $name); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | print '</thead>'; |
99 | 99 | print '<tbody>'; |
100 | 100 | $i = 1; |
101 | - foreach($airport_airport_array as $airport_item) |
|
101 | + foreach ($airport_airport_array as $airport_item) |
|
102 | 102 | { |
103 | 103 | print '<tr>'; |
104 | 104 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines by Country from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Airlines by Country from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer); |
49 | 49 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
50 | 50 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ["'._("Country").'", "'._("# of times").'"], '; |
57 | 57 | |
58 | 58 | $country_data = ''; |
59 | - foreach($airline_array as $airline_item) |
|
59 | + foreach ($airline_array as $airline_item) |
|
60 | 60 | { |
61 | 61 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
62 | 62 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | print '</thead>'; |
91 | 91 | print '<tbody>'; |
92 | 92 | $i = 1; |
93 | - foreach($airline_array as $airline_item) |
|
93 | + foreach ($airline_array as $airline_item) |
|
94 | 94 | { |
95 | 95 | print '<tr>'; |
96 | 96 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
20 | 20 | $previous = null; |
21 | 21 | print '<div class="alphabet-legend">'; |
22 | - foreach($aircraft_types as $value) { |
|
22 | + foreach ($aircraft_types as $value) { |
|
23 | 23 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
24 | 24 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
25 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
25 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
26 | 26 | { |
27 | 27 | if ($previous !== null) print ' | '; |
28 | 28 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | } |
32 | 32 | print '</div>'; |
33 | 33 | $previous = null; |
34 | - foreach($aircraft_types as $value) { |
|
34 | + foreach ($aircraft_types as $value) { |
|
35 | 35 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
36 | 36 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
37 | 37 | if ($firstLetter != "") |
38 | 38 | { |
39 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
39 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
40 | 40 | { |
41 | 41 | if ($previous !== null) print '</div>'; |
42 | 42 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |