-
Notifications
You must be signed in to change notification settings - Fork 0
/
logout.php
42 lines (41 loc) · 1.44 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
<?php
session_start();
if(isset($_SESSION['username'])){
session_destroy();
}
require_once("include/connection.php");
?>
<html>
<head>
<title>WebStore Backend</title>
<link rel="stylesheet" type="text/css" href="css/outline.css" />
<link rel="stylesheet" type="text/css" href="css/menu.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/design.js"></script>
<script type="text/javascript" src="js/validate.js"></script>
</head>
<body>
<div class="container">
<div class="header">
<a href="#">
<strong>Logo WebStore</strong> Backend
</a>
<span class="right">
<?php echo "<a href='login.php'>Log In</a>"; ?>
</span>
<div class="clr"></div>
</div>
<div id="body">
<div align="center">
<div class="mcontent">
<?php if(isset($_SESSION['username'])){
echo "Logout Successful.<div id='data'>Click <a href='login.php'>here</a> to Login again</div>"; }
else echo "<h1><span>No session detected.</span></h1><div id='data'>Please login <a href='login.php'>here</a></div>";
?>
</div>
</div>
<!-- body ends -->
<?php
//require_once("include/footer.php");
?>