-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
96 lines (82 loc) · 2.31 KB
/
index.php
File metadata and controls
96 lines (82 loc) · 2.31 KB
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
90
91
92
93
94
95
96
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Dashboard</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f8f8;
color: #333;
margin: 0;
padding: 0;
}
header {
background-color: #2c3e50;
color: #ecf0f1;
padding: 1rem;
text-align: center;
}
main {
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
footer {
background-color: #2c3e50;
color: #ecf0f1;
text-align: center;
padding: 1rem;
position: fixed;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<?php
if (isset($_SESSION["name"])) {
?>
<header>
<h1>Welcome, <?php echo $_SESSION["name"]; ?>!</h1>
<a href="logout.php"><img src="logout.png" alt="logout"></a>
</header>
<main>
<?php
if ($_SESSION["hasGoldSubscription"]) {
echo "<p>You are a gold member. Enjoy exclusive benefits!</p>";
} else {
echo "<p>You are not a gold member. <a href='purchase_gold.php'>Purchase Gold Subscription</a></p>";
}
?>
<main>
<h2>Menu</h2>
<p>Explore our delicious menu and place your order.</p>
<a href="menu.php">View Menu</a>
<h2>Order System</h2>
<p>Place your order here for a quick and convenient service.</p>
<a href="order.php">Place Order</a>
<h2>Feedback</h2>
<p>Share your experience with us. Your feedback is valuable!</p>
<a href="feedback.php">Give Feedback</a>
<!-- Other content for the user dashboard can be added here -->
</main>
</main>
<?php
} else {
header("Location: login.php");
exit; // Ensure that the rest of the page doesn't get executed
}
?>
<footer>
© <?php echo date("Y"); ?> CafeConnect by Kushal
</footer>
</body>
</html>