-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
141 lines (135 loc) · 4.83 KB
/
admin.php
File metadata and controls
141 lines (135 loc) · 4.83 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
session_start();
// Check if fname and lname are set in the session
if (isset($_SESSION['fname']) && isset($_SESSION['lname'])) {
$fname = $_SESSION['fname'];
$lname = $_SESSION['lname'];
} else {
// Redirect to login if session variables are not set
header("Location: login.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>::: Admin :::</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, sans-serif;
background: url("main.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
color: #333;
text-align: center;
padding: 20px;
}
h1 {
color: #0078D7;
font-size: 2.5em;
text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}
h4 {
color: #0078D7;
font-size: 1.5em;
margin-top: 20px;
text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}
button {
display: inline-flex;
align-items: center;
background: rgba(255, 255, 255, 0.7);
border: 2px solid #0078D7;
border-radius: 20px;
padding: 10px 20px;
margin: 5px;
font-size: 1em;
color: #0078D7;
cursor: pointer;
transition: background 0.3s ease;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.5);
}
button:hover {
background: #0078D7;
color: #fff;
box-shadow: 0px 8px 20px rgba(0, 120, 215, 0.5);
}
button img {
width: 20px;
height: 20px;
margin-right: 8px;
filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}
.top-right-icon {
position: absolute;
top: 20px;
right: 50px;
width: 80px;
height: 80px;
cursor: pointer;
}
.menu {
display: none; /* Hidden by default */
position: absolute;
top: 95px; /* Adjust as needed to place the menu below the icon */
right: 20px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 150px;
z-index: 1000;
}
.menu a {
display: block;
padding: 10px;
text-decoration: none;
color: #333;
font-size: 14px;
}
.menu a:hover {
background-color: #f0f0f0;
}
</style>
</head>
<body>
<img src="a.png" alt="Icon" class="top-right-icon" onclick="toggleMenu()">
<div id="dropdownMenu" class="menu">
<a href="about.php">About</a>
<a href="chng_pwd.php">Change Password</a>
<a href="report_problem.html">Report a Problem</a>
<a href="logout.php">Logout</a>
</div>
<h1>Welcome, <?php echo htmlspecialchars($fname . ' ' . $lname); ?>!</h1>
<p>This is the admin dashboard.</p>
<h4>Accounts Management</h4>
<button onclick="window.location.href='add_user.php'"><img src="397.png" alt="icon"> Add User</button>
<button onclick="window.location.href='del_user.html'"><img src="487.png" alt="icon"> Delete User</button>
<button onclick="window.location.href='admin_chng_pwd.php'"><img src="354.png" alt="icon"> Change Password</button><br>
<h4>Communications</h4>
<button onclick="window.location.href='send_notices.php'"><img src="336.png" alt="icon"> Send Notices</button>
<button onclick="window.location.href='msgs.php'"><img src="335.png" alt="icon"> Personal Messages</button>
<h4>Financial</h4>
<button onclick="window.location.href='fee_payments.php'"><img src="191.png" alt="icon"> Fee Payments</button>
<script>
// Function to toggle the visibility of the menu
function toggleMenu() {
var menu = document.getElementById("dropdownMenu");
menu.style.display = (menu.style.display === "none" || menu.style.display === "") ? "block" : "none";
}
// Close the menu if clicking outside of it
document.addEventListener("click", function(event) {
var menu = document.getElementById("dropdownMenu");
var icon = document.querySelector(".top-right-icon");
if (!menu.contains(event.target) && !icon.contains(event.target)) {
menu.style.display = "none";
}
});
</script>
</body>
</html>