-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinance.php
More file actions
35 lines (29 loc) · 811 Bytes
/
finance.php
File metadata and controls
35 lines (29 loc) · 811 Bytes
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
<?php
session_start();
$title = "Finance";
require_once "includes/header.php";
if (isset($_SESSION['role'])) {
if ($_SESSION['role'] == "President" || $_SESSION['role'] == "VP Finance" || $_SESSION['role'] == "Finance") {
// User can be here
} else {
setMsg("You cannot visit this page.", 2);
header("location:".ROOT);
die();
}
} else {
setMsg("Please log in first.", 2);
header("location:".ROOT);
die();
}
?>
<h1>Welcome, <?= $_SESSION['firstName'] ?>!</h1>
<h2>This is the <b>Finance</b> page.</h2>
<p>Click <a href="<?= ROOT ?>/logout/">here</a> to log out again.</p>
<?php
if ($_SESSION['role'] == "President") {
echo "<a href='".ROOT."/admin/'>Back to the admin page</a>";
}
require_once "includes/footer.php";
unset($_SESSION['msg']);
unset($_SESSION['lvl']);
?>