forked from myyychal/Appointment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logout.php
52 lines (49 loc) · 1.42 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
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>ApPOINTment - Logout</title>
<script src="alertify/lib/alertify.min.js"></script>
<link rel="stylesheet" href="css/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/layouts/side-menu-old-ie.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/layouts/side-menu.css">
<link rel="stylesheet" href="alertify/themes/alertify.core.css" />
<link rel="stylesheet" href="alertify/themes/alertify.default.css" />
<!--<![endif]-->
</head>
<?php
include 'php_libs/utils.php';
session_start();
?>
<body>
<div id="layout">
<a href="#menu" id="menuLink" class="menu-link">
<!-- Hamburger icon -->
<span></span>
</a>
<?php generateMenu(); ?>
<div id="main">
<div class="header">
<h1>Ankietour</h1>
<h2>Logout</h2>
</div>
<div class="content">
<?php
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
session_unset();
session_destroy();
echo "<p>You were logged out.</p>";
} else {
echo "<p>You weren't logged in.</p>";
}
?>
<a class="button-secondary pure-button" href="index.php">Back to menu</a>
</div>
</div>
</div>
<script src="js/ui.js"></script>
</body>
</html>