Example #1
0
\t</script>
</body>
</html>
HTML;
    print $page;
} elseif (isset($_GET['resu'])) {
    echo inst::unpackPackage();
} elseif (isset($_GET['step']) && file_exists(SD_ROOT_DIR . 'install/index.php')) {
    require_once SD_ROOT_DIR . 'install/index.php';
} elseif (isset($_GET['delInst'])) {
    include_once 'core/conf/const.config.site.php';
    include_once 'core/conf/const.config.adminfile.php';
    if (isset($_SESSION['sdinstall'])) {
        unset($_SESSION['sdinstall']);
    }
    inst::removeDir('install');
    unlink('load.gif');
    unlink('install.php');
    header('Location: ' . CONF_SCRIPT_URL . CONF_ADMIN_FILE);
} else {
    // первая страница
    // Проверяем, если PHP установлен как CGI не делаем проверку прав
    $sapi_type = php_sapi_name();
    if (substr($sapi_type, 0, 3) != 'cgi') {
        if (decoct(fileperms(SD_ROOT_DIR)) % 10000 < 757) {
            print '	<html>
						<head>
							<meta charset="UTF-8">
						</head>
						<body>
							<div style="text-align: center; font-size: 12px; font-weight: bold;">