-
Notifications
You must be signed in to change notification settings - Fork 0
/
log-out.php
89 lines (80 loc) · 3.05 KB
/
log-out.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
78
79
80
81
82
83
84
85
86
87
88
89
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customer</title>
<link rel="stylesheet" type="text/CSS" href="css/main.css">
<link rel="stylesheet" type="text/CSS" href="css/log-out.css">
<script src="js/responsiveNavigation.js" defer></script>
</head>
<body class="my-body">
<!-- menu start -->
<nav class="nav-bar" responsiveNavigation=false>
<ul>
<a href="index.php" class="no-text-decoration">
<li class="index ">home</li>
</a>
<a href="search.php" class="no-text-decoration">
<li class="category">search</li>
</a>
<a href="order.php" class="no-text-decoration">
<li class="order">orders</li>
</a>
<a href="profile.php" class="no-text-decoration">
<li class="profile">profile</li>
</a>
<a href="log-out.php" class="no-text-decoration">
<li class="login highlight">log out</li>
</a>
<?php
if (isset($_SESSION['customer-id'])) {
include('data-base/constant.php');
$id = $_SESSION['customer-id'];
$sql1 = "select profile_image from customer where id=$id";
$res = mysqli_query($conn, $sql1);
while ($row = $res->fetch_assoc()) {
echo "
<li class='sre-icon-list'>
<a href='profile.php' class='sre-icon-link'>
<div class='sre-main-small-image-container'>
<div class='sre-profile-image-small-container'>
<img src='" . $row['profile_image'] . "' class='sre-img'>
</div>
</div>
</a></li>
";
}
}
?>
</ul>
<button class="nav-button"></button>
</nav>
<!-- menu end -->
<!--body-->
<div class="body1 main-height">
<?php
if (isset($_POST['submit'])) {
unset($_SESSION['customer-id']);
header("location:index.php?from=logging_out&duration=2000");
}
?>
<div class="logout-container">
<div class="image-container">
<?php include('animated/customer-logout-confirmation.html'); ?>
</div>
<div class="confirmation-message">
Are you sure you want to log out ...?
</div><br>
<div class="yesno-container">
<div class="btn">
<a href="index.php" class="noBtn">no</a>
</div>
<form action="" method="POST">
<input type="submit" name="submit" class="btn-confirm" value="yes">
</form>
</div>
</div>
</div>
<!--footer-->
<?php include('elements/footer.html') ?>