-
Notifications
You must be signed in to change notification settings - Fork 0
/
notifications.php
91 lines (86 loc) · 5.13 KB
/
notifications.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
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
<!DOCTYPE html>
<html>
<?php
include 'connect.php';
?>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Drug Monitoring System</title>
<link rel="icon" href="assets/img/icon.png">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/css/footer-basic.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.1.1/aos.css">
<link rel="stylesheet" href="assets/css/Login-Form-Clean.css">
<link rel="stylesheet" href="assets/css/styles.css">
</head>
<body class="text-monospace">
<nav class="navbar navbar-dark navbar-expand-md bg-success text-monospace text-center" style="font-size: 14px;">
<div class="container"><a class="navbar-brand" href="viewdrugs.php"><i class="fas fa-pills"></i> Drug Monitoring System</a><button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div
class="collapse navbar-collapse" id="navcol-1">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item" role="presentation"><a class="nav-link active" href="viewdrugs.php">Home</a></li>
<li class="nav-item" role="presentation"></li>
<li class="nav-item" role="presentation"><a class="nav-link active" href="notifications.php">Messages</a></li>
<li class="nav-item" role="presentation"><a class="nav-link active" href="drugs.php">Add Drugs</a></li>
<li class="nav-item" role="presentation"><a class="nav-link active" href="expired_drugs.php">Expired</a></li>
<li class="nav-item" role="presentation" style="padding-top: 5px;"><a class="btn btn-warning btn-sm text-monospace text-center text-white" role="button" style="font-weight: bold;letter-spacing: 1px;" href="logout.php">SignOut</a></li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron border rounded-0" style="background-image: url("assets/img/pills.jpg");background-position: center;background-size: cover;background-repeat: no-repeat;margin-bottom: 5px;">
<div class="text-center text-white border rounded" style="background-color: rgba(0,0,0,0.5);padding: 5px;">
<h2>Drug Monitoring System</h2>
<p style="font-size: 14px;">DCMS allows health experts in pharmacies and chemists to classify drugs in order and be able to get an alert when drugs are almost expiring or have expired. It aims at also reducing wastage of resource and wastage of money used to acquire
drugs.<br></p>
</div>
</div>
<div class="container border rounded shadow-sm">
<h4 class="text-center border rounded shadow" style="font-weight: bold; margin-top:10px;">Messages</h4>
<hr>
<p style="font-size: 14px;">The table show all messages received.</p>
<div class="table-responsive table-bordered text-monospace" style="height: 300px;font-size: 13px;">
<?php
//
$sql4="SELECT * FROM `notifications` order by `date_received` desc;";
$query4=mysqli_query($connect,$sql4) or die (mysqli_error($connect));
?>
<table class="table table-striped table-bordered table-sm">
<thead style="background-color: rgba(149,247,147,0.9);">
<tr>
<th>Date Received</th>
<th>Message</th>
</tr>
</thead>
<?php
while($result4=mysqli_fetch_assoc($query4)){
?>
<tbody>
<tr>
<td><?php echo $result4["date_received"]; ?></td>
<td><?php echo $result4["message"]; ?></td>
<td class="text-center"><a class="btn btn-danger btn-sm text-white" role="button" href="delete.php?not=<?php echo $result4["notification_id"]; ?>" style="padding-top:0px;padding-bottom:0px; font-size:12px;">Delete</a></td>
</tr>
</tbody>
<?php
};
?>
</table>
</div>
</div>
<div class="footer-basic" style="padding-top: 20px;padding-bottom: 20px;background-color: rgb(79,167,70);color: rgb(255,255,255);margin-top: 50px;">
<footer>
<p class="copyright" style="color: rgb(255,255,255);letter-spacing: 1px;">Drug Monitoring System © 2021</p>
</footer>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/smart-forms.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.1.1/aos.js"></script>
</body>
</html>