Exemplo n.º 1
0
function httpAuthCredentials()
{
    $auth = authHeaders();
    if (isset($_SERVER['HTTP_EMAIL'])) {
        $user = strstr($_SERVER['HTTP_EMAIL'], "@", true);
        $host = substr(strrchr($_SERVER['HTTP_EMAIL'], "@"), 1);
    } else {
        $user = $auth['user'];
        $host = HOST_MAIN;
    }
    return array('user' => $user, 'password' => $auth['password'], 'host' => $host);
}
Exemplo n.º 2
0
function httpAuthentication()
{
    $auth = authHeaders();
    if (isset($_SERVER['HTTP_EMAIL'])) {
        $user = strstr($_SERVER['HTTP_EMAIL'], "@", true);
        $host = substr(strrchr($_SERVER['HTTP_EMAIL'], "@"), 1);
    } else {
        $user = $auth['user'];
        $host = HOST_MAIN;
    }
    echo '<script type="text/javascript">
            jQuery(document).ready(function() {
                HTTPAuth.go(' . json_encode($user) . ', ' . json_encode($auth['password']) . ', ' . json_encode($host) . ', 10);
            });
          </script>';
}