-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaff_doc.php
90 lines (72 loc) · 2.22 KB
/
staff_doc.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
<?php
include('header_staff.php');
session_start();
if(!isset($_SESSION["id"]) || $_SESSION["status"] != 2){
header("location: logout.php");
} else {
$id = $_SESSION["id"];
}
?>
<div class="jumbotron">
<div class="container">
<h1 class="text-center">Patients to see</h1>
</div>
</div>
<div class="container">
<div class="col-md-12">
<table class="table table-responsive table-bordered">
<thead>
<tr>
<th>Student's ID</th>
<th>Name</th>
<th>Age</th>
<th>Blood Group</th>
<th>Weight (kg)</th>
<th>Height (m)</th>
<th>Symptoms</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$sql = "select * from patients order by status asc, id asc";
$result=mysql_query($sql);
$count = mysql_num_rows($result);
while( $row =mysql_fetch_assoc( $result )){
$id = $row['id'];
$roll = $row['roll'];
$name = $row['name'];
$age = $row['age'];
$blood_group = $row['blood_group'];
$weight = $row['weight'];
$height = $row['height'];
$symptoms = $row['symptoms'];
$status = $row['status'];
if($status == 0){
$status = "<b><font color='red'>Not Seen</font></b>";
} else {
$status = "<b><font color='green'>Seen</font></b>";
}
echo "<td><a href=\"staff_doc_patient.php?id=$id\"><b>$roll</b></a> </td>
<td>$name</td>
<td>$age</td>
<td>$blood_group</td>
<td>$weight</td>
<td>$height</td>
<td>$symptoms</td>
<td>$status</td>
</tr>
";
}
?>
</tbody>
</table>
</div>
</div>
<?php include('footer.php') ?>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>