-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_report_list_view.php
74 lines (60 loc) · 1.68 KB
/
admin_report_list_view.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
<?php
include 'admin_sidebar.php';
include 'connection_link.php';
echo'<h1 class="Dashboard" >Report list</h1>';
$sql = "SELECT * FROM sample";
$result = mysqli_query($conn, $sql);
if ($result->num_rows > 0)
{
echo "<br>";
echo "<table align=center>
<tr>
<th>Patient name</th>
<th>Email</th>
<th>Sample type</th>
<th>Cost</th>
<th>Date_of_delivery</th>
<th>Date_of_payment</th>
<th>Report Status</th>
<th>Payment Status</th>
<th>Open</th>
</tr>";
while($row = $result->fetch_assoc())
{
if($row["Sample_status"]=="Done")
{
echo "<tr>
<td>".$row["Patient_name"]. "</td>
<td>".$row["Email"]. "</td>
<td>".$row["Sample_type"]. "</td>
<td>".$row["Cost"]. "</td>
<td>".$row["Date_of_delivery"]. "</td>
<td>".$row["Date_of_payment"]. "</td>
<td>".$row["Sample_status"]. "</td>
<td>".$row["Payment_status"]. "</td>
<td>"."<a href='admin_view_prescription.php?Sample_id=".$row["Sample_id"]."'>View"."</td>
</tr>";
}
else
{
echo "<tr>
<td>".$row["Patient_name"]. "</td>
<td>".$row["Email"]. "</td>
<td>".$row["Sample_type"]. "</td>
<td>".$row["Cost"]. "</td>
<td>".$row["Date_of_delivery"]. "</td>
<td>".$row["Date_of_payment"]. "</td>
<td>".$row["Sample_status"]. "</td>
<td>Processing</td>
<td>Processing</td>
</tr>";
}
}
echo "</table>";
}
else
{
echo "0 results";
}
mysqli_close($conn);
?>