public function __construct() { global $db, $template, $user; global $quickinstall_path, $phpbb_root_path, $phpEx, $config, $qi_config; // list of boards $boards_arr = scandir($quickinstall_path . $qi_config['boards_dir']); $s_has_forums = false; foreach ($boards_arr as $board) { if (in_array($board, array('.', '..', '.svn', '.htaccess', '.git'), true) || is_file($quickinstall_path . 'boards/' . $board)) { continue; } $s_has_forums = true; $template->assign_block_vars('row', array('BOARD_NAME' => htmlspecialchars($board), 'BOARD_URL' => $quickinstall_path . $qi_config['boards_dir'] . urlencode($board))); } // list of alternate enviroments $alt_env = '<option value="">' . $user->lang['DEFAULT_ENV'] . '</option>'; $d = dir($quickinstall_path . 'sources/phpBB3_alt'); while (false !== ($file = $d->read())) { if (in_array($file, array('.', '..', '.svn', '.htaccess'), true) || is_file($quickinstall_path . 'sources/phpBB3_alt/' . $file)) { continue; } $alt_env .= '<option>' . htmlspecialchars($file) . '</option>'; } $d->close(); // Assign index specific vars $template->assign_vars(array('U_CREATE' => qi::url('create'), 'S_IN_INSTALL' => false, 'S_IN_SETTINGS' => false, 'S_HAS_FORUMS' => $s_has_forums, 'TABLE_PREFIX' => htmlspecialchars($qi_config['table_prefix']), 'SITE_NAME' => $qi_config['site_name'], 'SITE_DESC' => $qi_config['site_desc'], 'S_AUTOMOD' => empty($qi_config['automod']) ? false : true, 'S_MAKE_WRITABLE' => empty($qi_config['make_writable']) ? false : true, 'S_POPULATE' => empty($qi_config['populate']) ? false : true, 'S_REDIRECT' => empty($qi_config['redirect']) ? false : true, 'S_SUBSILVER' => empty($qi_config['subsilver']) ? false : $qi_config['subsilver'], 'ALT_ENV' => $alt_env, 'PAGE_MAIN' => true, 'NUM_USERS' => !empty($qi_config['num_users']) ? $qi_config['num_users'] : 0, 'NUM_NEW_GROUP' => !empty($qi_config['num_new_group']) ? $qi_config['num_new_group'] : 0, 'CREATE_MOD' => !empty($qi_config['create_mod']) ? 1 : 0, 'CREATE_ADMIN' => !empty($qi_config['create_admin']) ? 1 : 0, 'NUM_CATS' => !empty($qi_config['num_cats']) ? $qi_config['num_cats'] : 0, 'NUM_FORUMS' => !empty($qi_config['num_forums']) ? $qi_config['num_forums'] : 0, 'NUM_TOPICS_MIN' => !empty($qi_config['num_topics_min']) ? $qi_config['num_topics_min'] : 0, 'NUM_TOPICS_MAX' => !empty($qi_config['num_topics_max']) ? $qi_config['num_topics_max'] : 0, 'NUM_REPLIES_MIN' => !empty($qi_config['num_replies_min']) ? $qi_config['num_replies_min'] : 0, 'NUM_REPLIES_MAX' => !empty($qi_config['num_replies_max']) ? $qi_config['num_replies_max'] : 0, 'EMAIL_DOMAIN' => !empty($qi_config['email_domain']) ? $qi_config['email_domain'] : '')); // Output page qi::page_header($user->lang['QI_MAIN'], $user->lang['QI_MAIN_ABOUT']); $template->set_filenames(array('body' => 'main_body.html')); qi::page_footer(); }
public function __construct() { global $db, $template, $user, $settings; global $quickinstall_path, $phpbb_root_path, $phpEx, $config; get_installed_boards(); $profiles = $settings->get_profiles(); // Some error? if ($settings->get_config('error', 0)) { $error_msg = $settings->get_config('error_msg', '', true); $error_msg = htmlspecialchars_decode($error_msg); $template->assign_var('ERROR_MSG', $error_msg); } // Assign index specific vars $template->assign_vars(array('U_CREATE' => qi::url('create'), 'U_CHOOSE_PROFILE' => qi::url('main', array('mode' => 'change_profile')), 'TABLE_PREFIX' => $settings->get_config('table_prefix', ''), 'DB_PERFIX' => htmlspecialchars($settings->get_config('db_prefix', '')), 'SITE_NAME' => $settings->get_config('site_name', ''), 'SITE_DESC' => $settings->get_config('site_desc', ''), 'PROFILE_COUNT' => $profiles['count'], 'PROFILE_OPTIONS' => $profiles['options'], 'DBNAME' => $settings->get_config('dbname', ''), 'INSTALL_STYLES' => $settings->get_config('install_styles', 0), 'DEFAULT_STYLE' => $settings->get_config('default_style', ''), 'S_ERROR' => $settings->get_config('error', 0), 'ERROR_TITLE' => $settings->get_config('error_title', ''), 'S_AUTOMOD' => $settings->get_config('automod', 0), 'S_DELETE_FILES' => $settings->get_config('delete_files', 0), 'S_DROP_DB' => $settings->get_config('drop_db', 0), 'S_MAKE_WRITABLE' => $settings->get_config('make_writable', 0), 'S_POPULATE' => $settings->get_config('populate', 0), 'S_REDIRECT' => $settings->get_config('redirect', 0), 'S_ADMIN_NAME' => $settings->get_config('admin_name', false), 'S_ADMIN_PASS' => $settings->get_config('admin_pass', false), 'S_DBPASSWD' => $settings->get_config('dbpasswd', false), 'S_NODBPASSWD' => $settings->get_config('no_dbpasswd', false), 'S_DBUSER' => $settings->get_config('dbuser', false), 'S_MAIN' => true, 'ALT_ENV' => get_alternative_env($settings->get_config('alt_env')), 'CHUNK_POST' => $settings->get_config('chunk_post', 0), 'CHUNK_TOPIC' => $settings->get_config('chunk_topic', 0), 'CHUNK_USER' => $settings->get_config('chunk_user', 0), 'NUM_USERS' => $settings->get_config('num_users', 0), 'NUM_NEW_GROUP' => $settings->get_config('num_new_group', 0), 'CREATE_MOD' => $settings->get_config('create_mod', 0), 'CREATE_ADMIN' => $settings->get_config('create_admin', 0), 'NUM_CATS' => $settings->get_config('num_cats', 0), 'NUM_FORUMS' => $settings->get_config('num_forums', 0), 'NUM_TOPICS_MIN' => $settings->get_config('num_topics_min', 0), 'NUM_TOPICS_MAX' => $settings->get_config('num_topics_max', 0), 'NUM_REPLIES_MIN' => $settings->get_config('num_replies_min', 0), 'NUM_REPLIES_MAX' => $settings->get_config('num_replies_max', 0), 'EMAIL_DOMAIN' => $settings->get_config('email_domain', ''), 'GRANT_PERMISSIONS' => $settings->get_config('grant_permissions', ''), 'OTHER_CONFIG' => $settings->get_other_config())); // Output page qi::page_header($user->lang['QI_MANAGE'], $user->lang['QI_MANAGE_ABOUT']); $template->set_filenames(array('body' => 'main_body.html')); qi::page_footer(); }
/** * Error and message handler, call with trigger_error if reqd */ public static function msg_handler($errno, $msg_text, $errfile, $errline) { global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text, $quickinstall_path; global $user; // Message handler is stripping text. In case we need it, we are possible to define long text... if (isset($msg_long_text) && $msg_long_text && !$msg_text) { $msg_text = $msg_long_text; } switch ($errno) { case E_NOTICE: case E_WARNING: // Check the error reporting level and return if the error level does not match // Additionally do not display notices if we suppress them via @ // If DEBUG is defined the default level is E_ALL if (($errno & (defined('DEBUG') && error_reporting() ? E_ALL : error_reporting())) == 0) { return; } // remove complete path to installation, with the risk of changing backslashes meant to be there $errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); $msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; return; break; case E_USER_ERROR: case E_USER_WARNING: case E_USER_NOTICE: // uncomment for debug //echo "$errfile:$errline"; $msg_title = isset($msg_title) ? isset($user->lang[$msg_title]) ? $user->lang[$msg_title] : $msg_title : (isset($user->lang['GENERAL_ERROR']) ? $user->lang['GENERAL_ERROR'] : 'General Error'); $msg_text = isset($user->lang[$msg_text]) ? $user->lang[$msg_text] : $msg_text; $l_return_index = '<a href="' . qi::url('settings') . '">Go to settings</a> • '; $l_return_index .= '<a href="' . qi::url('main') . '">Go to QuickInstall main page</a>'; echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">'; echo '<head>'; echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />'; echo '<title>' . $msg_title . '</title>'; echo '<link href="' . $quickinstall_path . 'style/style.css" rel="stylesheet" type="text/css" media="screen" />'; echo '</head>'; echo '<body id="errorpage">'; echo '<div id="wrap">'; echo ' <div id="page-header">'; echo ' ' . $l_return_index; echo ' </div>'; echo ' <div id="page-body">'; echo ' <div id="acp">'; echo ' <div class="panel">'; echo ' <span class="corners-top"><span></span></span>'; echo ' <div id="content">'; echo ' <h1>' . $msg_title . '</h1>'; echo ' <div>' . $msg_text . '</div>'; echo ' </div>'; echo ' <div style="padding-left: 10px;">'; echo ' ' . $l_return_index; echo ' </div>'; echo ' <span class="corners-bottom"><span></span></span>'; echo ' </div>'; echo ' </div>'; echo ' </div>'; echo ' <div id="page-footer">'; echo ' Powered by phpBB © 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>'; echo ' </div>'; echo '</div>'; echo '</body>'; echo '</html>'; exit; break; } // If we notice an error not handled here we pass this back to PHP by returning false // This may not work for all php versions return false; }
$settings->set_profile_cookie($profile); $profile = ''; } } else { $s_settings_failure = true; } $qi_install = false; } $s_settings_writable = true; if ($settings->install) { // Don't show errors when installing QI $error = ''; } else { if (!is_writable($quickinstall_path . 'settings') || !is_dir($quickinstall_path . 'settings')) { $error .= $user->lang['SETTINGS_NOT_WRITABLE'] . '<br />'; $s_settings_writable = false; } } if ($alt_env_missing && !$attempted && !$saved) { $err_string = sprintf($user->lang['NO_ALT_ENV_FOUND'], $alt_env); $error .= $err_string . '<br />'; } $profiles = $settings->get_profiles(); $template->assign_vars(array('S_BOARDS_WRITABLE' => is_writable($settings->get_boards_dir()), 'S_CACHE_WRITABLE' => is_writable($settings->get_cache_dir()), 'S_CONFIG_WRITABLE' => is_writable($quickinstall_path . 'settings'), 'S_IN_INSTALL' => $settings->install, 'S_IS_CONVERTED' => $settings->is_converted, 'S_SETTINGS_WRITABLE' => $s_settings_writable, 'S_SETTINGS_SUCCESS' => $attempted && $saved ? true : false, 'S_SETTINGS_FAILURE' => $attempted && !$saved ? true : false, 'S_SETTINGS' => true, 'ERROR' => $error, 'U_UPDATE_SETTINGS' => qi::url('settings', array('mode' => 'update_settings')), 'U_CHOOSE_PROFILE' => qi::url('settings', array('mode' => 'change_profile')), 'SAVE_PROFILE' => $profile, 'TABLE_PREFIX' => htmlspecialchars($settings->get_config('table_prefix')), 'SITE_NAME' => $settings->get_config('site_name'), 'SITE_DESC' => $settings->get_config('site_desc'), 'ALT_ENV' => !empty($alt_env) ? $alt_env : false, 'PROFILE_COUNT' => $profiles['count'], 'PROFILE_OPTIONS' => $profiles['options'], 'QI_LANG' => $settings->get_lang_select("{$quickinstall_path}language/", 'qi_lang', 'lang'), 'PHPBB_LANG' => $settings->get_lang_select("{$quickinstall_path}sources/phpBB3/language/", 'default_lang'), 'CONFIG_SAVED' => $saved, 'CONFIG_TEXT' => htmlspecialchars($config_text), 'CHUNK_POST' => $settings->get_config('chunk_post', 0), 'CHUNK_TOPIC' => $settings->get_config('chunk_topic', 0), 'CHUNK_USER' => $settings->get_config('chunk_user', 0), 'CONFIG_ADMIN_EMAIL' => $settings->get_config('admin_email'), 'CONFIG_ADMIN_NAME' => $settings->get_config('admin_name'), 'CONFIG_ADMIN_PASS' => $settings->get_config('admin_pass'), 'CONFIG_ALT_ENV' => get_alternative_env($settings->get_config('alt_env')), 'CONFIG_AUTOMOD' => $settings->get_config('automod', 0), 'CONFIG_BOARD_EMAIL' => $settings->get_config('board_email'), 'CONFIG_BOARDS_DIR' => $settings->get_boards_dir(), 'CONFIG_BOARDS_URL' => $settings->get_boards_url(), 'CONFIG_CACHE_DIR' => $settings->get_cache_dir(), 'CONFIG_COOKIE_DOMAIN' => $settings->get_config('cookie_domain'), 'CONFIG_COOKIE_SECURE' => $settings->get_config('cookie_secure', 0), 'CONFIG_DB_PREFIX' => $settings->get_config('db_prefix'), 'CONFIG_DBHOST' => $settings->get_config('dbhost'), 'CONFIG_DBMS' => gen_dbms_options($settings->get_config('dbms')), 'CONFIG_DBPASSWD' => $settings->get_config('dbpasswd'), 'CONFIG_DBPORT' => $settings->get_config('dbport'), 'CONFIG_DBUSER' => $settings->get_config('dbuser'), 'CONFIG_DEFAULT_STYLE' => $settings->get_config('default_style', ''), 'CONFIG_DELETE_FILES' => $settings->get_config('delete_files', 0), 'CONFIG_DROP_DB' => $settings->get_config('drop_db', 0), 'CONFIG_EMAIL_ENABLE' => $settings->get_config('email_enable', 0), 'CONFIG_GRANT_PERMISSIONS' => $settings->get_config('grant_permissions'), 'CONFIG_INSTALL_STYLES' => $settings->get_config('install_styles', 0), 'CONFIG_MAKE_WRITABLE' => $settings->get_config('make_writable', 0), 'CONFIG_NO_PASSWORD' => $settings->get_config('no_dbpasswd', 0), 'CONFIG_POPULATE' => $settings->get_config('populate', 0), 'CONFIG_QI_DST' => $settings->get_config('qi_dst', 0), 'CONFIG_QI_TZ' => $settings->get_config('qi_tz', ''), 'CONFIG_REDIRECT' => $settings->get_config('redirect', 0), 'CONFIG_SERVER_NAME' => $settings->get_config('server_name'), 'CONFIG_SERVER_PORT' => $settings->get_config('server_port'), 'CONFIG_SHOW_CONFIRM' => $settings->get_config('show_confirm', 0), 'CONFIG_SITE_DESC' => $settings->get_config('site_desc'), 'CONFIG_SITE_NAME' => $settings->get_config('site_name'), 'CONFIG_SMTP_AUTH' => $settings->get_config('smtp_auth'), 'CONFIG_SMTP_DELIVERY' => $settings->get_config('smtp_delivery', 0), 'CONFIG_SMTP_HOST' => $settings->get_config('smtp_host'), 'CONFIG_SMTP_PASS' => $settings->get_config('smtp_pass'), 'CONFIG_SMTP_PORT' => $settings->get_config('smtp_port', 0), 'CONFIG_SMTP_USER' => $settings->get_config('smtp_user'), 'CONFIG_TABLE_PREFIX' => $settings->get_config('table_prefix'), 'CONFIG_NUM_USERS' => $settings->get_config('num_users', 0), 'CONFIG_NUM_NEW_GROUP' => $settings->get_config('num_new_group', 0), 'CONFIG_CREATE_ADMIN' => $settings->get_config('create_admin', 0), 'CONFIG_CREATE_MOD' => $settings->get_config('create_mod', 0), 'CONFIG_NUM_CATS' => $settings->get_config('num_cats', 0), 'CONFIG_NUM_FORUMS' => $settings->get_config('num_forums', 0), 'CONFIG_NUM_TOPICS_MIN' => $settings->get_config('num_topics_min', 0), 'CONFIG_NUM_TOPICS_MAX' => $settings->get_config('num_topics_max', 0), 'CONFIG_NUM_REPLIES_MIN' => $settings->get_config('num_replies_min', 0), 'CONFIG_NUM_REPLIES_MAX' => $settings->get_config('num_replies_max', 0), 'CONFIG_EMAIL_DOMAIN' => $settings->get_config('email_domain'), 'TIMEZONE_OPTIONS' => qi_timezone_select($user, $settings->get_config('qi_tz', 'UTC')), 'OTHER_CONFIG' => $settings->get_other_config(), 'SEL_LANG' => !empty($language) ? $language : '')); /* '' => $settings->get_config('', 0), */ // Output page qi::page_header($user->lang['PROFILES']); $template->set_filenames(array('body' => 'settings_body.html')); qi::page_footer();
/** * Error and message handler, call with trigger_error if reqd. * Mostly borrowed from phpBB includes/functions.php. */ public static function msg_handler($errno, $msg_text, $errfile, $errline) { global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text, $quickinstall_path; global $user; // Do not display notices if we suppress them via @ if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE) { return; } // Message handler is stripping text. In case we need it, we are possible to define long text... if (isset($msg_long_text) && $msg_long_text && !$msg_text) { $msg_text = $msg_long_text; } if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } switch ($errno) { case E_NOTICE: case E_WARNING: // Check the error reporting level and return if the error level does not match // If DEBUG is defined the default level is E_ALL if (($errno & (defined('DEBUG') ? E_ALL : error_reporting())) == 0) { return; } // remove complete path to installation, with the risk of changing backslashes meant to be there $errfile = str_replace(array(phpbb_functions::phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); $msg_text = str_replace(array(phpbb_functions::phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); $error_name = $errno === E_WARNING ? 'PHP Warning' : 'PHP Notice'; echo '<b>[QI Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; return; break; case E_USER_ERROR: case E_USER_WARNING: case E_USER_NOTICE: if (!empty($user) && !empty($user->lang)) { $msg_text = !empty($user->lang[$msg_text]) ? $user->lang[$msg_text] : $msg_text; $msg_title = !isset($msg_title) ? $user->lang['GENERAL_ERROR'] : (!empty($user->lang[$msg_title]) ? $user->lang[$msg_title] : $msg_title); $l_return_index = sprintf($user->lang['GO_QI_MAIN'], '<a href="' . qi::url('main') . '">', '</a> • '); $l_return_index .= sprintf($user->lang['GO_QI_SETTINGS'], '<a href="' . qi::url('settings') . '">', '</a>'); } else { $msg_title = 'General Error'; $l_return_index = '<a href="' . qi::url('main') . '">Go to QuickInstall main page</a> • '; $l_return_index .= '<a href="' . qi::url('settings') . '">Go to settings</a> • '; } $backtrace = phpbb_functions::get_backtrace(); if ($backtrace) { $msg_text .= '<br /><br />BACKTRACE<br />' . $backtrace; } phpbb_functions::send_status_line(503, 'Service Unavailable'); echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">'; echo '<head>'; echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />'; echo '<title>' . $msg_title . '</title>'; echo '<link href="' . $quickinstall_path . 'style/style.css" rel="stylesheet" type="text/css" media="screen" />'; echo '</head>'; echo '<body id="errorpage">'; echo '<div id="wrap">'; echo ' <div id="page-header">'; echo ' ' . $l_return_index; echo ' </div>'; echo ' <div id="page-body">'; echo ' <div id="acp">'; echo ' <div class="panel">'; echo ' <span class="corners-top"><span></span></span>'; echo ' <div id="content">'; echo ' <h1>' . $msg_title . '</h1>'; echo ' <div>' . $msg_text . '</div>'; echo ' </div>'; echo ' <div style="padding-left: 10px;">'; echo ' ' . $l_return_index; echo ' </div>'; echo ' <span class="corners-bottom"><span></span></span>'; echo ' </div>'; echo ' </div>'; echo ' </div>'; echo ' <div id="page-footer">'; echo ' <a href="https://www.phpbb.com/customise/db/official_tool/phpbb3_quickinstall/">phpBB QuickInstall</a> {QI_VERSION} for phpBB 3.0, 3.1 and 3.2 © <a href="https://www.phpbb.com/">phpBB Limited</a><br />'; echo ' Powered by phpBB® Forum Software © <a href="https://www.phpbb.com/">phpBB Limited</a>'; echo ' </div>'; echo '</div>'; echo '</body>'; echo '</html>'; // As a pre-caution... some setups display a blank page if the flush() is not there. ob_get_level() > 0 ? @ob_flush() : @flush(); // On a fatal error (and E_USER_ERROR *is* fatal) we never want other scripts to continue and force an exit here. exit; break; } // If we notice an error not handled here we pass this back to PHP by returning false // This may not work for all php versions return false; }
function gen_error_msg($msg_text, $msg_title = 'General error', $msg_explain = '', $update_profiles = false) { global $quickinstall_path, $user; $settings_url = qi::url('settings'); if ($update_profiles) { $settings_form = '<div style="margin: 10px 0 0 0; text-align: center;"><p><form action="" method="post"><input class="button2" type="submit" name="update_all" value="' . $user->lang['UPDATE_PROFILES'] . '" /></form></p></div>'; } else { $settings_form = ''; } if (!empty($user) && !empty($user->lang)) { $l_return_index = sprintf($user->lang['GO_QI_MAIN'], '<a href="' . qi::url('main') . '">', '</a> • '); $l_return_index .= sprintf($user->lang['GO_QI_SETTINGS'], '<a href="' . qi::url('settings') . '">', '</a>'); } else { $l_return_index = '<a href="' . qi::url('main') . '">Go to QuickInstall main page</a> • '; $l_return_index .= '<a href="' . qi::url('settings') . '">Go to settings</a> • '; } $qi_version = QI_VERSION; phpbb_functions::send_status_line(503, 'Service Unavailable'); echo <<<ERROR_PAGE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> \t<head> \t\t<meta http-equiv="content-type" content="text/html; charset=utf-8" /> \t\t<title>{$msg_title}</title> \t\t<link href="{$quickinstall_path}style/style.css" rel="stylesheet" type="text/css" media="screen" /> \t</head> \t<body id="errorpage"> \t\t<div id="wrap"> \t\t\t<div id="page-header"> \t\t\t\t{$l_return_index} \t\t\t</div> \t\t\t<div id="page-body"> \t\t\t\t<div id="acp"> \t\t\t\t\t<div class="panel"> \t\t\t\t\t\t<span class="corners-top"><span></span></span> \t\t\t\t\t\t<div id="content"> \t\t\t\t\t\t\t<h1 style="margin-bottom: 10px; text-align: center;">{$msg_title}</h1> \t\t\t\t\t\t\t<div style="font-weight: bold;">{$msg_explain}<br /><br /></div> \t\t\t\t\t\t\t<div>{$msg_text}</div> \t\t\t\t\t\t{$settings_form} \t\t\t\t\t\t</div> \t\t\t\t\t\t<div style="padding-left: 10px;"> \t\t\t\t\t\t\t{$l_return_index} \t\t\t\t\t\t</div> \t\t\t\t\t\t<span class="corners-bottom"><span></span></span> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t\t<div id="page-footer"> \t\t\t\t<a href="https://www.phpbb.com/customise/db/official_tool/phpbb3_quickinstall/">phpBB QuickInstall</a> {$qi_version} for phpBB 3.0, 3.1 and 3.2 © <a href="https://www.phpbb.com/">phpBB Limited</a><br /> \t\t\t\tPowered by phpBB® Forum Software © <a href="https://www.phpbb.com/">phpBB Limited</a> \t\t\t</div> \t\t</div> \t</body> </html> ERROR_PAGE; exit; }
*/ /** * @ignore */ if (!defined('IN_QUICKINSTALL')) { exit; } if ($mode == 'update_settings') { // Time to save some settings. $qi_config = utf8_normalize_nfc(request_var('qi_config', array('' => ''), true)); // make sure qi_config.php is writable if (is_writable($quickinstall_path . 'qi_config.cfg')) { $error = update_settings($qi_config); } if (empty($error)) { $s_settings_success = true; $qi_install = false; $language = $qi_config['qi_lang']; } else { $s_settings_failure = true; } } gen_lang_select($language); if ($qi_install) { // Fill some default vaues. } $template->assign_vars(array('S_BOARDS_WRITABLE' => is_writable($quickinstall_path . 'boards'), 'S_CACHE_WRITABLE' => is_writable($quickinstall_path . 'cache'), 'S_CONFIG_WRITABLE' => is_writable($quickinstall_path . 'qi_config.cfg'), 'S_IN_INSTALL' => $qi_install, 'S_IN_SETTINGS' => true, 'S_SETTINGS_SUCCESS' => !empty($s_settings_success) ? true : false, 'S_SETTINGS_FAILURE' => !empty($s_settings_failure) ? true : false, 'ERROR' => !empty($error) ? !$qi_install ? $error : '' : '', 'U_UPDATE_SETTINGS' => qi::url('update_settings'), 'TABLE_PREFIX' => htmlspecialchars($qi_config['table_prefix']), 'SITE_NAME' => $qi_config['site_name'], 'SITE_DESC' => $qi_config['site_desc'], 'ALT_ENV' => !empty($alt_env) ? $alt_env : false, 'PAGE_MAIN' => false, 'CONFIG_ADMIN_EMAIL' => !empty($qi_config['admin_email']) ? $qi_config['admin_email'] : '', 'CONFIG_ADMIN_NAME' => !empty($qi_config['admin_name']) ? $qi_config['admin_name'] : '', 'CONFIG_ADMIN_PASS' => !empty($qi_config['admin_pass']) ? $qi_config['admin_pass'] : '', 'CONFIG_AUTOMOD' => isset($qi_config['automod']) ? $qi_config['automod'] : 1, 'CONFIG_BOARD_EMAIL' => !empty($qi_config['board_email']) ? $qi_config['board_email'] : '', 'CONFIG_BOARDS_DIR' => !empty($qi_config['boards_dir']) ? $qi_config['boards_dir'] : 'boards/', 'CONFIG_COOKIE_DOMAIN' => !empty($qi_config['cookie_domain']) ? $qi_config['cookie_domain'] : 'localhost', 'CONFIG_COOKIE_SECURE' => !empty($qi_config['cookie_secure']) ? $qi_config['cookie_secure'] : 0, 'CONFIG_DB_PREFIX' => !empty($qi_config['db_prefix']) ? $qi_config['db_prefix'] : 'qi_', 'CONFIG_DBHOST' => !empty($qi_config['dbhost']) ? $qi_config['dbhost'] : 'localhost', 'CONFIG_DBMS' => !empty($qi_config['dbms']) ? $qi_config['dbms'] : 'mysql', 'CONFIG_DBPASSWD' => !empty($qi_config['dbpasswd']) ? $qi_config['dbpasswd'] : '', 'CONFIG_DBPORT' => !empty($qi_config['dbport']) ? $qi_config['dbport'] : '', 'CONFIG_DBUSER' => !empty($qi_config['dbuser']) ? $qi_config['dbuser'] : '', 'CONFIG_DEFAULT_LANG' => !empty($qi_config['default_lang']) ? $qi_config['default_lang'] : 'en', 'CONFIG_EMAIL_ENABLE' => !empty($qi_config['email_enable']) ? $qi_config['email_enable'] : 0, 'CONFIG_MAKE_WRITABLE' => !empty($qi_config['make_writable']) ? $qi_config['make_writable'] : 0, 'CONFIG_NO_PASSWORD' => isset($qi_config['no_dbpasswd']) ? $qi_config['no_dbpasswd'] : 0, 'CONFIG_POPULATE' => isset($qi_config['populate']) ? $qi_config['populate'] : 0, 'CONFIG_QI_DST' => !empty($qi_config['qi_dst']) ? $qi_config['qi_dst'] : 0, 'CONFIG_QI_TZ' => !empty($qi_config['qi_tz']) ? $qi_config['qi_tz'] : 0, 'CONFIG_REDIRECT' => isset($qi_config['redirect']) ? $qi_config['redirect'] : 1, 'CONFIG_SERVER_NAME' => !empty($qi_config['server_name']) ? $qi_config['server_name'] : 'localhost', 'CONFIG_SERVER_PORT' => !empty($qi_config['server_port']) ? $qi_config['server_port'] : '80', 'CONFIG_SITE_DESC' => !empty($qi_config['site_desc']) ? $qi_config['site_desc'] : 'eviLs testing hood', 'CONFIG_SITE_NAME' => !empty($qi_config['site_name']) ? $qi_config['site_name'] : 'Testing Board', 'CONFIG_SMTP_AUTH' => !empty($qi_config['smtp_auth']) ? $qi_config['smtp_auth'] : 'PLAIN', 'CONFIG_SMTP_DELIVERY' => !empty($qi_config['smtp_delivery']) ? $qi_config['smtp_delivery'] : 0, 'CONFIG_SMTP_HOST' => !empty($qi_config['smtp_host']) ? $qi_config['smtp_host'] : '', 'CONFIG_SMTP_PASS' => !empty($qi_config['smtp_pass']) ? $qi_config['smtp_pass'] : '', 'CONFIG_SMTP_PORT' => !empty($qi_config['smtp_port']) ? $qi_config['smtp_port'] : 25, 'CONFIG_SMTP_USER' => !empty($qi_config['smtp_user']) ? $qi_config['smtp_user'] : '', 'CONFIG_SUBSILVER' => isset($qi_config['subsilver']) ? $qi_config['subsilver'] : 0, 'CONFIG_TABLE_PREFIX' => !empty($qi_config['table_prefix']) ? $qi_config['table_prefix'] : 'phpbb_', 'CONFIG_NUM_USERS' => isset($qi_config['num_users']) ? $qi_config['num_users'] : 150, 'CONFIG_NUM_NEW_GROUP' => isset($qi_config['num_new_group']) ? $qi_config['num_new_group'] : 50, 'CONFIG_CREATE_ADMIN' => !empty($qi_config['create_admin']) ? 1 : 0, 'CONFIG_CREATE_MOD' => !empty($qi_config['create_mod']) ? 1 : 0, 'CONFIG_NUM_CATS' => isset($qi_config['num_cats']) ? $qi_config['num_cats'] : 2, 'CONFIG_NUM_FORUMS' => isset($qi_config['num_forums']) ? $qi_config['num_forums'] : 10, 'CONFIG_NUM_TOPICS_MIN' => isset($qi_config['num_topics_min']) ? $qi_config['num_topics_min'] : 1, 'CONFIG_NUM_TOPICS_MAX' => isset($qi_config['num_topics_max']) ? $qi_config['num_topics_max'] : 25, 'CONFIG_NUM_REPLIES_MIN' => isset($qi_config['num_replies_min']) ? $qi_config['num_replies_min'] : 1, 'CONFIG_NUM_REPLIES_MAX' => isset($qi_config['num_replies_max']) ? $qi_config['num_replies_max'] : 15, 'CONFIG_EMAIL_DOMAIN' => isset($qi_config['email_domain']) ? $qi_config['email_domain'] : '', 'SEL_LANG' => !empty($language) ? $language : '')); // Output page qi::page_header($user->lang['SETTINGS'], $user->lang['QI_MAIN_ABOUT']); $template->set_filenames(array('body' => 'settings_body.html')); qi::page_footer();