Пример #1
0
                $s = dirname($s);
                $u = dirname($u);
                break;
            }
            $s = dirname($s);
            $u = dirname($u);
        }
    }
    gb::$site_dir = realpath($s);
}
# gb::$site_path -- must end in a slash ("/").
if (isset($gb_site_path)) {
    gb::$site_path = $gb_site_path;
    unset($gb_site_path);
} else {
    gb::$site_path = $u === '/' ? $u : $u . '/';
}
# gb::$site_url -- URL to the base of the site. Must end in a slash ("/").
if (isset($gb_site_url)) {
    gb::$site_url = $gb_site_url;
    unset($gb_site_url);
} else {
    gb::$site_url = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] !== '80' && $_SERVER['SERVER_PORT'] !== '443' ? ':' . $_SERVER['SERVER_PORT'] : '') . gb::$site_path;
}
# only set the following when called externally
if (!gb::$is_internal_call) {
    # gb::$theme_dir
    if (isset($gb_theme_dir)) {
        gb::$theme_dir = $gb_theme_dir;
        unset($gb_theme_dir);
    } else {