} } else { if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') { unset($_SESSION['install']); if (update_schema::check_version(false) == '0') { print '<div class="info column"><ul>'; foreach ($_SESSION['done'] as $done) { print '<li>' . $done . '....<strong>SUCCESS</strong></li>'; } print '<li>Create and import tables....<img src="../images/loading.gif" /></li></ul></div>'; flush(); @ob_flush(); if ($globalDBdriver == 'mysql') { $error .= create_db::import_all_db('../db/'); } elseif ($globalDBdriver == 'pgsql') { $error .= create_db::import_all_db('../db/pgsql/'); } if ($error != '') { print '<div class="info column"><span class="error"><strong>Error</strong>' . $error . '</span></div>'; require '../footer.php'; exit; } $_SESSION['done'] = array_merge($_SESSION['done'], array('Create and import tables')); if ($globalSBS1) { $_SESSION['install'] = 'populate'; } else { $_SESSION['install'] = 'sources'; } } else { print '<div class="info column"><ul>'; foreach ($_SESSION['done'] as $done) {
#!/usr/bin/php <?php require_once '../require/settings.php'; if ($globalInstalled) { echo '$globalInstalled must be set to FALSE in require/settings.php'; exit; } require 'class.create_db.php'; echo "Create and import all tables..."; create_db::import_all_db('../db/'); echo "Done !\n"; require 'class.update_db.php'; echo "Populate all tables...\n"; update_db::update_all(); echo "\nInstall waypoints...(VERY slow!)"; update_db::update_waypoints(); echo "Done !\n"; echo "Install airspace..."; update_db::update_airspace(); echo "Done !\n"; echo 'All is now installed ! Thanks' . "\n"; if ($globalSBS1) { echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.' . "\n"; } if ($globalACARS) { echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.' . "\n"; }