-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogout.php
77 lines (64 loc) · 1.85 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<title>Upload Success | Kaitaia Publishing Collective</title>
<?php include 'templates/head-meta.html'; ?>
<?php include 'templates/head-css.html'; ?>
<!-- Auto-redirect to home.php after 3 seconds -->
<meta http-equiv="refresh" content="1;url=home.php">
<style>
/* Center content */
.success-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
}
/* Spinner styles */
.spinner {
border: 5px solid #f3f3f3;
border-top: 5px solid #3498db;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.redirect-message {
font-size: 1.5rem;
color: #333;
}
</style>
</head>
<body class="w3-light-grey">
<div class="success-container">
<div class="spinner"></div>
<h1 class="w3-text-green">Logging you out</h1>
</div>
<?php
session_start(); // Start the session to access session variables
// Unset all session variables
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
// Finally, destroy the session.
session_destroy();
// // Redirect to the login page or home page
// header("Location: home.php");
// exit;
?>
<p class="w3-center w3-bottom">Click here if not redirected: <a href="home.php">Home</a></p>
</body>
</html>