Пример #1
0
                        }
                    }
                }
            }
        }
    }
    $_SESSION['INSTALL']['default_email'] = '*****@*****.**';
    $_SESSION['INSTALL']['version'] = '';
    $_SESSION['INSTALL']['db_host'] = 'localhost';
    $_SESSION['INSTALL']['db_user'] = '******';
    $_SESSION['INSTALL']['db_pass'] = '******';
    $_SESSION['INSTALL']['db_driver'] = 'mysql';
    $_SESSION['INSTALL']['db_db'] = 'tanphu_tracnghiem';
    $_SESSION['INSTALL']['table_prefix'] = 'tracnghiem_';
    $_SESSION['INSTALL']['title_postfix'] = 'TanPhu.Net | Mạng giải trí, học tập trực tuyến tốc đô nhanh !';
    $i_url = getScriptURL();
    $i_pos = strpos($i_url, '/install.php');
    $i_url = substr($i_url, 0, $i_pos + 1);
    $_SESSION['INSTALL']['url_root'] = $i_url;
    if (!ereg('/$', dirname(__FILE__))) {
        $i_fullpath = dirname(__FILE__) . "/";
    } else {
        $i_fullpath = dirname(__FILE__);
    }
    $i_fullpath = str_replace("//", "/", str_replace("\\", "/", $i_fullpath));
    $_SESSION['INSTALL']['dir_root_full'] = $i_fullpath;
    $_SESSION['INSTALL']['url_files'] = $i_url . "files/";
    $_SESSION['INSTALL']['dir_files_full'] = $i_fullpath . "files/";
}
require_once dirname(__FILE__) . "/inc/languages/" . $_SESSION['INSTALL']['language'] . ".lng.php";
if (isset($_POST['stage'])) {
function getFullScriptURL()
{
    $i_hostname = getServerName();
    if ($i_hostname != false) {
        $i_protocol = (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
        $i_url_prefix = $i_protocol . $i_hostname;
        return $i_url_prefix . getScriptURL();
    } else {
        return false;
    }
}