/
logout.php
46 lines (42 loc) · 1.12 KB
/
logout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
// Setup
require_once 'cassowary-setup.php';
// logout if necessary
if (phpCAS::isAuthenticated()) {
if (isset($_REQUEST['service'])) {
$service = $_REQUEST['service'];
} else {
$service = (empty($_SERVER["HTTPS"]) ? "http://" : "https://" )
. $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
}
phpCAS::logoutWithRedirectService($service);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Logged Out</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<style>
<?php if ($cassowary_show_pics): ?>
html {
height: 100%;
background: url(<?php echo $cassowary_dir ?>/casuarius-egg.jpg) no-repeat center center;
background-size: cover;
}
<?php endif ?>
body {
max-width: 40em;
margin: auto;
background-color: rgba(255,255,255,0.5);
}
</style>
</head>
<body>
<h1>Logout successful</h1>
<p>You have successfully logged out.
<P><a href="<?php echo $cassowary_parent ?>/">Click here to login to <strong><?php echo $_SERVER["HTTP_HOST"] ?></strong> again</a>
<p>For security reasons, exit your web browser.
</body>
</html>