-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewall.php
59 lines (55 loc) · 2.02 KB
/
viewall.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
<?php
include('driver/config.php');
include('driver/functions.php');
include('driver/auth.php');
session_start();
$update = mysqli_query($db, "update radiographs set seen = '1' where radiologist = '{$_SESSION['userid']}' and status = '1'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="css/form.css" />
<script type="text/javascript">
function open_win(url_add)
{
window.open(url_add,"","toolbar=no, close=no, channelmode=no,titlebar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, top=100,left=350, resizable=no, copyhistory=no, width=700, height=500");
}
</script>
</head>
<body>
<table width="100%">
<?php
$rad = mysqli_query($db, "select * from radiographs");
if(mysqli_num_rows($rad) > 0){
?>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><strong>PATIENT</strong></td>
<td><strong>DATE</strong></td>
<td><strong>RADIOTHERAPIST</strong></td>
<td width="40%"><strong>DESCRIPTION</strong></td>
<td><strong>STATUS</strong></td>
<td><strong>DETAILS</strong></td>
</tr>
<?php while($radiographs = mysqli_fetch_array($rad, MYSQLI_ASSOC)){ ?>
<tr>
<td><?php echo $radiographs['patient']; ?></td>
<td><?php echo $radiographs['date']; ?></td>
<td><?php echo name($radiographs['radiologist'], $db); ?></td>
<td><?php echo $radiographs['description']; ?></td>
<td><?php echo ($radiographs['status'] > 0)?($radiographs['status'] == 1)?"Pending":"Referred":"Interpreted" ; ?></td>
<td><a href="javascript:" onclick="open_win('print.php?id=<?php echo $radiographs['radid']; ?>')">Details</a></td>
</tr>
<?php }} else {?>
<tr>
<td colspan="4" align="center">NO RADIOGRAPHS FOUND!</td>
</tr>
<?php } ?>
</table>
</form>
</body>
</html>