Пример #1
0
$dbms = isset($HTTP_POST_VARS['dbms']) ? $HTTP_POST_VARS['dbms'] : '';
$dbhost = !empty($HTTP_POST_VARS['dbhost']) ? $HTTP_POST_VARS['dbhost'] : 'localhost';
$dbuser = !empty($HTTP_POST_VARS['dbuser']) ? $HTTP_POST_VARS['dbuser'] : '';
$dbpasswd = !empty($HTTP_POST_VARS['dbpasswd']) ? $HTTP_POST_VARS['dbpasswd'] : '';
$dbname = !empty($HTTP_POST_VARS['dbname']) ? $HTTP_POST_VARS['dbname'] : '';
$table_prefix = !empty($HTTP_POST_VARS['prefix']) ? $HTTP_POST_VARS['prefix'] : '';
$admin_name = !empty($HTTP_POST_VARS['admin_name']) ? $HTTP_POST_VARS['admin_name'] : '';
$admin_pass1 = !empty($HTTP_POST_VARS['admin_pass1']) ? $HTTP_POST_VARS['admin_pass1'] : '';
$admin_pass2 = !empty($HTTP_POST_VARS['admin_pass2']) ? $HTTP_POST_VARS['admin_pass2'] : '';
$ftp_path = !empty($HTTP_POST_VARS['ftp_path']) ? $HTTP_POST_VARS['ftp_path'] : '';
$ftp_user = !empty($HTTP_POST_VARS['ftp_user']) ? $HTTP_POST_VARS['ftp_user'] : '';
$ftp_pass = !empty($HTTP_POST_VARS['ftp_pass']) ? $HTTP_POST_VARS['ftp_pass'] : '';
if (isset($HTTP_POST_VARS['lang']) && preg_match('#^[a-z_]+$#', $HTTP_POST_VARS['lang'])) {
    $language = strip_tags($HTTP_POST_VARS['lang']);
} else {
    $language = guess_lang();
}
$board_email = !empty($HTTP_POST_VARS['board_email']) ? $HTTP_POST_VARS['board_email'] : '';
$script_path = !empty($HTTP_POST_VARS['script_path']) ? $HTTP_POST_VARS['script_path'] : str_replace('install', '', dirname($HTTP_SERVER_VARS['PHP_SELF']));
if (!empty($HTTP_POST_VARS['server_name'])) {
    $server_name = $HTTP_POST_VARS['server_name'];
} else {
    // Guess at some basic info used for install..
    if (!empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME'])) {
        $server_name = !empty($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : $HTTP_ENV_VARS['SERVER_NAME'];
    } else {
        if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) || !empty($HTTP_ENV_VARS['HTTP_HOST'])) {
            $server_name = !empty($HTTP_SERVER_VARS['HTTP_HOST']) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_ENV_VARS['HTTP_HOST'];
        } else {
            $server_name = '';
        }
Пример #2
0
function get_lang()
{
    $lang = guess_lang();
    if ($lang != null) {
        return $lang;
    }
    return get_default_lang();
}