Example #1
0
 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();
 }
Example #2
0
            $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();