Exemple #1
0
    if ($step < 3 and $nextstep == 1) {
        $nv_Request->set_Session('maxstep', 3);
    }
    $title = $lang_module['check_chmod'];
    $contents = nv_step_2($array_dir_check, $array_ftp_data, $nextstep);
} elseif ($step == 3) {
    if ($step < 4) {
        $nv_Request->set_Session('maxstep', 4);
    }
    $title = $lang_module['license'];
    if (file_exists(NV_ROOTDIR . '/install/licenses_' . NV_LANG_DATA . '.html')) {
        $license = file_get_contents(NV_ROOTDIR . '/install/licenses_' . NV_LANG_DATA . '.html');
    } else {
        $license = file_get_contents(NV_ROOTDIR . '/install/licenses.html');
    }
    $contents = nv_step_3($license);
} elseif ($step == 4) {
    $nextstep = 0;
    $title = $lang_module['check_server'];
    $array_resquest = array();
    $array_resquest['pdo_support'] = $lang_module['not_compatible'];
    $array_resquest['class_pdo_support'] = 'highlight_red';
    if (class_exists('PDO', false)) {
        $PDODrivers = PDO::getAvailableDrivers();
        foreach ($PDODrivers as $_driver) {
            if (file_exists(NV_ROOTDIR . '/install/action_' . $_driver . '.php')) {
                $array_resquest['pdo_support'] = $lang_module['compatible'];
                $array_resquest['class_pdo_support'] = 'highlight_green';
                $nextstep = 1;
                break;
            }
        $nv_Request->set_Session('maxstep', 4);
    }
    $array_suport = array();
    $array_support['supports_rewrite'] = empty($sys_info['supports_rewrite']) ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['safe_mode'] = $sys_info['safe_mode'] ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['register_globals'] = ini_get('register_globals') == '1' || strtolower(ini_get('register_globals')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['magic_quotes_runtime'] = ini_get('magic_quotes_runtime') == '1' || strtolower(ini_get('magic_quotes_runtime')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['magic_quotes_gpc'] = ini_get('magic_quotes_gpc') == '1' || strtolower(ini_get('magic_quotes_gpc')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['magic_quotes_sybase'] = ini_get('magic_quotes_sybase') == '1' || strtolower(ini_get('magic_quotes_sybase')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['output_buffering'] = ini_get('output_buffering') == '1' || strtolower(ini_get('output_buffering')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['session_auto_start'] = ini_get('session.auto_start') == '1' || strtolower(ini_get('session.auto_start')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['display_errors'] = ini_get('display_errors') == '1' || strtolower(ini_get('display_errors')) == 'on' ? $lang_module['not_compatible'] : $lang_module['compatible'];
    $array_support['allowed_set_time_limit'] = $sys_info['allowed_set_time_limit'] ? $lang_module['compatible'] : $lang_module['not_compatible'];
    $array_support['zlib_support'] = $sys_info['zlib_support'] ? $lang_module['compatible'] : $lang_module['not_compatible'];
    $array_support['zip_support'] = extension_loaded('zip') ? $lang_module['compatible'] : $lang_module['not_compatible'];
    $contents = nv_step_3($array_resquest, $array_support, $nextstep);
} elseif ($step == 4) {
    $array_dir = array(NV_DATADIR, NV_SESSION_SAVE_PATH, NV_LOGS_DIR, NV_LOGS_DIR . "/data_logs", NV_LOGS_DIR . "/dump_backup", NV_LOGS_DIR . "/error_logs", NV_LOGS_DIR . "/error_logs/errors256", NV_LOGS_DIR . "/error_logs/old", NV_LOGS_DIR . "/error_logs/tmp", NV_LOGS_DIR . "/ip_logs", NV_LOGS_DIR . "/ref_logs", NV_LOGS_DIR . "/voting_logs", NV_CACHEDIR, NV_UPLOADS_DIR, NV_TEMP_DIR);
    $array_dir[] = $file_config_temp;
    if (!empty($sys_info['supports_rewrite'])) {
        if ($sys_info['supports_rewrite'] == "rewrite_mode_apache") {
            $array_dir[] = ".htaccess";
        } else {
            $array_dir[] = "web.config";
        }
    }
    $ftp_check_login = 0;
    $global_config['ftp_server'] = $nv_Request->get_string('ftp_server', 'post', 'localhost');
    $global_config['ftp_port'] = $nv_Request->get_int('ftp_port', 'post', 21);
    $global_config['ftp_user_name'] = $nv_Request->get_string('ftp_user_name', 'post', '');
    $global_config['ftp_user_pass'] = $nv_Request->get_string('ftp_user_pass', 'post', '');