@@ -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_fam(); |
| 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_fam(); |
| 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 |
@@ -7,22 +7,22 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | 17 | if ($sort != '') { |
| 18 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
| 18 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 19 | 19 | } else { |
| 20 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", '',$filter); |
|
| 20 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", '', $filter); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | if (!empty($spotter_array)) |
| 24 | 24 | { |
| 25 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 25 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 26 | 26 | require_once('header.php'); |
| 27 | 27 | print '<div class="info column">'; |
| 28 | 28 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | include('owner-sub-menu.php'); |
| 34 | 34 | print '<div class="column">'; |
| 35 | 35 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
| 36 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 36 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 37 | 37 | |
| 38 | - $aircraft_array = $Spotter->countAllAircraftTypesByOwner($owner,$filter); |
|
| 38 | + $aircraft_array = $Spotter->countAllAircraftTypesByOwner($owner, $filter); |
|
| 39 | 39 | if (!empty($aircraft_array)) |
| 40 | 40 | { |
| 41 | 41 | print '<div class="table-responsive">'; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | print '</thead>'; |
| 48 | 48 | print '<tbody>'; |
| 49 | 49 | $i = 1; |
| 50 | - foreach($aircraft_array as $aircraft_item) |
|
| 50 | + foreach ($aircraft_array as $aircraft_item) |
|
| 51 | 51 | { |
| 52 | 52 | print '<tr>'; |
| 53 | 53 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $hour_array = $Spotter->countAllHoursByOwner($owner,$filter); |
|
| 34 | + $hour_array = $Spotter->countAllHoursByOwner($owner, $filter); |
|
| 35 | 35 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 36 | 36 | print '<div id="chartHour" class="chart" width="100%"></div> |
| 37 | 37 | <script> |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | var data = google.visualization.arrayToDataTable([ |
| 42 | 42 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 43 | 43 | $hour_data = ''; |
| 44 | - foreach($hour_array as $hour_item) |
|
| 44 | + foreach ($hour_array as $hour_item) |
|
| 45 | 45 | { |
| 46 | 46 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 47 | 47 | } |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['pilot_name']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $hour_array = $Spotter->countAllHoursByPilot($pilot,$filter); |
|
| 34 | + $hour_array = $Spotter->countAllHoursByPilot($pilot, $filter); |
|
| 35 | 35 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 36 | 36 | print '<div id="chartHour" class="chart" width="100%"></div> |
| 37 | 37 | <script> |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | var data = google.visualization.arrayToDataTable([ |
| 42 | 42 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 43 | 43 | $hour_data = ''; |
| 44 | - foreach($hour_array as $hour_item) |
|
| 44 | + foreach ($hour_array as $hour_item) |
|
| 45 | 45 | { |
| 46 | 46 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 47 | 47 | } |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['pilot_name']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('pilot-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $airline_array = $Spotter->countAllAirlinesByPilot($pilot,$filter); |
|
| 34 | + $airline_array = $Spotter->countAllAirlinesByPilot($pilot, $filter); |
|
| 35 | 35 | if (!empty($airline_array)) |
| 36 | 36 | { |
| 37 | 37 | print '<div class="table-responsive">'; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | print '</thead>'; |
| 47 | 47 | print '<tbody>'; |
| 48 | 48 | $i = 1; |
| 49 | - foreach($airline_array as $airline_item) |
|
| 49 | + foreach ($airline_array as $airline_item) |
|
| 50 | 50 | { |
| 51 | 51 | print '<tr>'; |
| 52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $manufacturers_array = $Spotter->countAllAircraftManufacturerByOwner($owner,$filter); |
|
| 34 | + $manufacturers_array = $Spotter->countAllAircraftManufacturerByOwner($owner, $filter); |
|
| 35 | 35 | if (!empty($manufacturers_array)) |
| 36 | 36 | { |
| 37 | 37 | print '<div class="table-responsive">'; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | print '</thead>'; |
| 45 | 45 | print '<tbody>'; |
| 46 | 46 | $i = 1; |
| 47 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 47 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 48 | 48 | { |
| 49 | 49 | print '<tr>'; |
| 50 | 50 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Departure Airports by Owner of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports by Owner of %s"), $spotter_array[0]['pilot_name']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | include('owner-sub-menu.php'); |
| 29 | 29 | print '<div class="column">'; |
| 30 | 30 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 31 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 31 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 32 | 32 | |
| 33 | - $airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($pilot,$filter); |
|
| 33 | + $airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($pilot, $filter); |
|
| 34 | 34 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 35 | 35 | print '<div id="chartCountry" class="chart" width="100%"></div> |
| 36 | 36 | <script> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | var data = google.visualization.arrayToDataTable([ |
| 41 | 41 | ["'._("Country").'", "'._("# of times").'"], '; |
| 42 | 42 | $country_data = ''; |
| 43 | - foreach($airport_country_array as $airport_item) |
|
| 43 | + foreach ($airport_country_array as $airport_item) |
|
| 44 | 44 | { |
| 45 | 45 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 46 | 46 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | print '</thead>'; |
| 75 | 75 | print '<tbody>'; |
| 76 | 76 | $i = 1; |
| 77 | - foreach($airport_country_array as $airport_item) |
|
| 77 | + foreach ($airport_country_array as $airport_item) |
|
| 78 | 78 | { |
| 79 | 79 | print '<tr>'; |
| 80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Routes of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Routes of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from flights owner by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from flights owner by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $route_array = $Spotter->countAllRoutesByOwner($owner,$filter); |
|
| 34 | + $route_array = $Spotter->countAllRoutesByOwner($owner, $filter); |
|
| 35 | 35 | if (!empty($route_array)) |
| 36 | 36 | { |
| 37 | 37 | print '<div class="table-responsive">'; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | print '</thead>'; |
| 47 | 47 | print '<tbody>'; |
| 48 | 48 | $i = 1; |
| 49 | - foreach($route_array as $route_item) |
|
| 49 | + foreach ($route_array as $route_item) |
|
| 50 | 50 | { |
| 51 | 51 | print '<tr>'; |
| 52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $aircraft_array = $Spotter->countAllAircraftRegistrationByOwner($owner,$filter); |
|
| 34 | + $aircraft_array = $Spotter->countAllAircraftRegistrationByOwner($owner, $filter); |
|
| 35 | 35 | |
| 36 | 36 | if (!empty($aircraft_array)) |
| 37 | 37 | { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | print '</thead>'; |
| 48 | 48 | print '<tbody>'; |
| 49 | 49 | $i = 1; |
| 50 | - foreach($aircraft_array as $aircraft_item) |
|
| 50 | + foreach ($aircraft_array as $aircraft_item) |
|
| 51 | 51 | { |
| 52 | 52 | print '<tr>'; |
| 53 | 53 | print '<td><strong>'.$i.'</strong></td>'; |