-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
54 lines (49 loc) · 1.29 KB
/
dashboard.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
<?php
// Page Title
$pageTitle = "Dashboard | Blood Bank";
// Header
include_once "header.php";
// If Not Logged In
if (!isset($_SESSION['userType'])) {
?>
<div class="container">
<div class="display-4 text-center mt-3">You are not logged in.</div>
</div>
<?php
die();
} else {
?>
<!-- Logged In -->
<div class="container display-4 text-center mt-3">Dashboard</div>
<?php
}
// If user is a Hospital
if ($_SESSION['userType'] == "hospitals") {
?>
<div class="container lead mt-3">
<p>Name - <?php echo $_SESSION['name'] ?></p>
<p>City - <?php echo $_SESSION['city'] ?></p>
</div>
<div class="container">
<a href="addBloodInfo.php">
<button class="btn btn-outline-danger" type="submit">Add Blood Info</button>
</a>
<br>
<a href="viewRequests.php">
<button class="btn btn-outline-danger mt-3" type="submit">View Requests</button>
</a>
</div>
<?php
// If User is a Receiver
} else if ($_SESSION['userType'] == "receivers") {
?>
<div class="container lead mt-3">
<p>Name - <?php echo $_SESSION['name'] ?></p>
<p>Blood Group - <?php echo $_SESSION['bloodGroup'] ?></p>
</div>
<?php
} else {
echo "Not selected a valid user type";
}
// Footer
require "footer.php";