-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.php
More file actions
61 lines (50 loc) · 1.68 KB
/
logout.php
File metadata and controls
61 lines (50 loc) · 1.68 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
session_start(); // Access the existing session.
// If no session variable exists, redirect the user:
if (!isset($_SESSION['employee_id'])) {
require_once ('includes/login_functions.inc.php');
$url = absolute_url();
header("Location: $url");
exit();
} else { // Cancel the session.
$_SESSION = array(); // Clear the variables.
session_destroy(); // Destroy the session itself.
setcookie ('PHPSESSID', '', time()-3600, '/', '', 0, 0); // Destroy the cookie.
}
// Set the page title and include the HTML header:
$page_title = 'Logged Out!';
include ('includes/header.html');
// Print a customized message:
echo ' <div id="content">
<div class="container">
<div class="inside">
<!-- box begin -->
<div class="box alt">
<div class="left-top-corner">
<div class="right-top-corner">
<div class="border-top"></div>
</div>
</div>
<div class="border-left">
<div class="border-right">
<div class="inner">
<div class="wrapper">
<dl class="special fright">
</dl>
<h2>Log Out!</h2>
<p></p>';
echo '<p>You are now logged out!</p><br /></p>
</div>
</div>
</div>
<div class="left-bot-corner">
<div class="right-bot-corner">
<div class="border-bot"></div>
</div>
</div>
</div>
</div>
</div></div>
</div>';
include ('includes/footer.html');
?>