-
Notifications
You must be signed in to change notification settings - Fork 2
/
logout.php
59 lines (48 loc) · 1.69 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
<?php
if(session_status()!=PHP_SESSION_ACTIVE)
session_start();
if (!isset($_SESSION['user']) or $_SESSION['user']==""){
session_unset();
session_destroy();
echo "<script>location.replace('login.php');</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/popup.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- IMPORT FONTS -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300|Lato&display=swap" rel="stylesheet">
<!-- ICONS !-->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css'>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<!-- Menu -->
<title>Logged Out | <?php echo $_SESSION['user']['name']?></title>
</head>
<body>
<?php
include "db_connect.php";
$con=Connect();
$t=mysqli_query($con,"UPDATE info set active=SYSDATE() where username='".$_SESSION['user']['username']."'");
Close($con);
session_unset();
session_destroy();
?>
<div class="popup" id="logout">
<div class="popup-content animate">
<div class="box">
<div class="h">Logged Out</div>
<div>Logged out successfully! Kindly go back and login again.</div>
<a class="btn" href="login.php">Home</a>
</div>
</div>
</div>
<?php echo"<script>document.getElementById('logout').style.display='block';</script>";
?>
</body>
</html>