-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
84 lines (71 loc) · 1.75 KB
/
Copy pathdashboard.php
File metadata and controls
84 lines (71 loc) · 1.75 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
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body {
min-height: 100vh;
background: #ffffff;
display: flex;
justify-content: center;
align-items: center;
}
.card {
width: 100%;
max-width: 500px;
padding: 2.5rem;
border: 1px solid #e5e7eb;
border-radius: 12px;
text-align: center;
}
h1 {
font-size: 1.8rem;
margin-bottom: 0.5rem;
color: #111827;
}
.role {
font-size: 0.95rem;
color: #6b7280;
margin-bottom: 2rem;
}
.logout-btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border-radius: 8px;
background: #111827;
color: white;
text-decoration: none;
transition: 0.2s ease;
}
.logout-btn:hover {
background: #1f2937;
}
</style>
</head>
<body>
<div class="card">
<h1>
Hello, <?php echo htmlspecialchars($_SESSION['username']); ?>
</h1>
<div class="role">
Logged in as <?php echo htmlspecialchars($_SESSION['role']); ?>
</div>
<a class="logout-btn" href="logout.php">Logout</a>
</div>
</body>
</html>