-
Notifications
You must be signed in to change notification settings - Fork 9
/
department_view.php
51 lines (47 loc) · 1.06 KB
/
department_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
<?php
############################################
# ThaiRIS (Thai Radiology Information System)
# Version: 1.0
# File last modified: 8 Nov 2016
# File name:
# Description :
# http://www.thairis.net
# Email : [email protected]
############################################
header("Content-type: text/html; charset=TIS-620");
include "connectdb.php";
$result = mysql_query("SELECT DEPARTMENT_ID,NAME_THAI,NAME_ENG FROM xray_department");
?>
<html>
<head>
<title>View Department</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
</head>
<body>
<?php
echo "<table border='1'>
<tr>
<th>Departmnet ID</th>
<th>NAME</th>
<th>English Name</th>
</tr>\n";
while($row = mysql_fetch_array($result))
{
if($bg == "#FFFFFF")
{ // Switch colour for background
$bg = "#FFCCCC";
}
else
{
$bg = "#FFFFFF";
}
echo "<tr bgcolor=$bg>";
echo "<td>" . $row['DEPARTMENT_ID'] . "</td>";
echo "<td>" . $row['NAME_THAI'] . "</td>";
echo "<td>" . $row['NAME_ENG'] . "</td>";
echo "</tr>\n";
}
echo "</table>";
?>
</body>
</html>