define('GWF_LOGGING_PATH', getcwd() . '/protected/installog'); $gwf = new GWF3(getcwd(), array('website_init' => false, 'autoload_modules' => false, 'load_module' => false, 'load_config' => false, 'start_debug' => true, 'get_user' => false, 'do_logging' => true, 'log_request' => true, 'blocking' => false, 'no_session' => true, 'store_last_url' => false, 'ignore_user_abort' => true)); GWF_Debug::setDieOnError(false); # Website init GWF_InstallWizardLanguage::init(); GWF_HTML::init(); # Set install language $il = new GWF_LangTrans(GWF_CORE_PATH . 'lang/install/install'); GWF_InstallWizard::setGWFIL($il); # Design init GWF3::setDesign('install'); GWF_Website::addCSS(GWF_WEB_ROOT . 'tpl/install/css/install.css'); GWF_Website::addCSS(GWF_WEB_ROOT . 'tpl/install/css/design.css'); GWF_Website::setPageTitle('GWF Install Wizard'); $tVars = array('gwfpath' => GWF_PATH, 'gwfwebpath' => GWF_WWW_PATH, 'step' => GWF_STEP, 'il' => $il, 'steps' => 11, 'timings' => GWF_DebugInfo::getTimings()); GWF_Template::addMainTvars($tVars); if (false !== Common::getPost('create_admin')) { $page = GWF_InstallWizard::wizard_9_1(); } elseif (false !== Common::getPost('test_db')) { $page = GWF_InstallWizard::wizard_1a(); } elseif (false !== Common::getPost('write_config')) { $page = GWF_InstallWizard::wizard_1b(); } elseif (false !== Common::getPost('install_modules')) { $page = GWF_InstallWizard::wizard_6_1(); } else { switch (GWF_STEP) { case '1': $page = GWF_InstallWizard::wizard_1(); break; # Create Config # Create Config
/** * Initialize by ConfigOptions * @return GWF3 */ public function init() { $config =& self::$CONFIG; if (true === $config['start_debug']) { GWF_Debug::enableErrorHandler(); GWF_Debug::setMailOnError((GWF_DEBUG_EMAIL & 2) > 0); } if (true === $config['kick_banned_ip']) { $this->onKickBannedIP(); } if (true === defined('GWF_WEBSITE_DOWN')) { $this->setConfig('load_module', false); $this->setConfig('autoload_modules', false); $this->setConfig('no_session', true); } // $db = gdo_db(); if (false === $config['no_session']) { $this->onStartSession($config['blocking']); } if (true === $config['website_init']) { $db = gdo_db(); GWF_Website::init(); } if (true === $config['do_logging']) { $this->onStartLogging($config['no_session']); } if (true === $config['autoload_modules']) { $this->onAutoloadModules(); } if (true === $config['get_user']) { GWF_Template::addMainTvars(array('user' => self::$user = GWF_User::getStaticOrGuest())); } if (true === $config['load_module']) { $this->onLoadModule(); } if (true === defined('GWF_WEBSITE_DOWN')) { die($this->onDisplayPage(GWF_WEBSITE_DOWN)); } return $this; }
public static function displayAll() { $errors = self::$static->getAll(); if (GWF_ERRORS_TO_SMARTY) { GWF_Template::addMainTvars(array('errors' => $errors)); } elseif (!isset($_GET['ajax'])) { GWF_Website::addDefaultOutput($errors); GWF_Template::addMainTvars(array('errors' => '')); } }