Ejemplo n.º 1
0
function ew_Header($cache, $charset = EW_CHARSET)
{
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // Always modified
    $export = @$_GET["export"];
    if ($cache || ew_IsHttps() && $export != "" && $export != "print") {
        // Allow cache
        header("Cache-Control: private, must-revalidate");
        header("Pragma: public");
    } else {
        // No cache
        header("Cache-Control: private, no-store, no-cache, must-revalidate");
        header("Cache-Control: post-check=0, pre-check=0", false);
        header("Pragma: no-cache");
    }
    header("X-UA-Compatible: IE=edge");
    if ($charset != "") {
        header("Content-Type: text/html; charset=" . $charset);
    }
    // Charset
}
Ejemplo n.º 2
0
function ew_Header($cache, $charset = EW_CHARSET)
{
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // Always modified
    if ($cache || !$cache && ew_IsHttps() && @$gsExport != "" && @$gsExport != "print") {
        // Allow cache
        header("Cache-Control: private, must-revalidate");
        // HTTP/1.1
    } else {
        // No cache
        header("Cache-Control: private, no-store, no-cache, must-revalidate");
        // HTTP/1.1
        header("Cache-Control: post-check=0, pre-check=0", false);
        header("Pragma: no-cache");
        // HTTP/1.0
    }
    if ($charset != "") {
        header("Content-Type: text/html; charset=" . $charset);
    }
    // Charset
}
Ejemplo n.º 3
0
function ew_DomainUrl()
{
    $sUrl = "http";
    $bSSL = ew_IsHttps();
    $sPort = strval(ew_ServerVar("SERVER_PORT"));
    $defPort = $bSSL ? "443" : "80";
    $sPort = $sPort == $defPort ? "" : ":{$sPort}";
    $sUrl .= $bSSL ? "s" : "";
    $sUrl .= "://";
    $sUrl .= ew_ServerVar("SERVER_NAME") . $sPort;
    return $sUrl;
}