Exemplo n.º 1
0
} else {
    GWF3::onLoadConfig(GWF_CONFIG_PATH);
}
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallWizard.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallFunctions.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallConfig.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallWizardLanguage.php';
GWF_InstallWizardLanguage::init();
GWF_Log::init(false, true, GWF_PATH . '/protected/installlog');
$lang = new GWF_LangTrans(GWF_CORE_PATH . 'lang/install/install');
if (isset($write_a_config)) {
    GWF_InstallConfig::writeConfig($lang);
    echo 'I have written a default config to protected/config.php' . PHP_EOL;
    echo 'Please edit that config.php, before installing gwf3.' . PHP_EOL;
    die(0);
}
if (false === gdo_db()) {
    file_put_contents('php://stderr', 'Cannot connect to the database. Check your protected/config.php!' . PHP_EOL);
    die(1);
}
echo "Installing gwf util core..." . PHP_EOL;
if (!GWF_InstallFunctions::core(false)) {
    file_put_contents('php://stderr', 'Cannot install core... giving up!');
    die(2);
}
echo "Installing Language,Country,IP2Country..." . PHP_EOL;
GWF_InstallFunctions::createLanguage(true, true, false);
echo "Installing all modules..." . PHP_EOL;
echo GWF_InstallFunctions::all_modules(false);
echo "Thank you for trying GWF!" . PHP_EOL;
die(0);
Exemplo n.º 2
0
 /**
  * Install Language + Country + IP2Country
  */
 public static function wizard_4_2()
 {
     $back = self::wizard_h2('4');
     $back .= sprintf('<p>%s</p>', self::$gwfil->lang('step_4_2'));
     $back .= '<pre>';
     $back .= GWF_InstallFunctions::createLanguage(true, true, true);
     $back .= '</pre>';
     $back .= self::wizard_btn('5');
     return $back;
 }