Пример #1
0
    ******************************************************************/
$ARLoader = 'webdav';
require_once 'ariadne.inc';
require_once $ariadne . "/bootstrap.php";
require_once $ariadne . "/configs/webdav/default.phtml";
require_once $store_config['code'] . "modules/mod_webdav.php";
$AR_PATH_INFO = $_SERVER["PATH_INFO"];
if (!$AR_PATH_INFO) {
    $AR_PATH_INFO = '/';
}
// needed for IIS: it doesn't set the PHP_SELF variable.
if (!isset($_SERVER["PHP_SELF"])) {
    $_SERVER["PHP_SELF"] = $_SERVER["SCRIPT_NAME"] . $AR_PATH_INFO;
}
if (Headers_sent()) {
    error("The loader has detected that PHP has already sent the HTTP Headers. This error is usually caused by trailing white space or newlines in the configuration files. See the following error message for the exact file that is causing this:");
    Header("Misc: this is a test header");
}
@ob_end_clean();
// just in case the output buffering is set on in php.ini, disable it here, as Ariadne's cache system gets confused otherwise.
$root = $AR->root;
$session_id = 0;
$ARCookie = stripslashes($_COOKIE["ARCookie"]);
$cookie = @unserialize($ARCookie);
if (is_array($cookie)) {
    $session_id = current(array_keys($cookie));
}
$args = array_merge($_GET, $_POST);
$nls = $AR->nls->default;
// instantiate the store
Пример #2
0
function ldHeader($header)
{
    global $ARCurrent;
    $result = false;
    if (!Headers_sent()) {
        $result = true;
        Header($header);
        $ARCurrent->ldHeaders[strtolower($header)] = $header;
    } else {
        debug("Headers already sent, couldn't send {$header}", "all");
    }
    return $result;
}
Пример #3
0
function ldHeader($header, $replace = true)
{
    global $ARCurrent;
    $result = false;
    if (!Headers_sent() && !$ARCurrent->arNoHeaders) {
        $result = true;
        list($key, $value) = explode(':', $header, 2);
        Header($header, $replace);
        if ($replace) {
            $ARCurrent->ldHeaders[strtolower($key)] = $header;
        } else {
            $ARCurrent->ldHeaders[strtolower($key)] .= $header;
        }
    }
    return $result;
}