<html><body bgcolor="#d2e9ff">
  <?php
include('koneksimonitor.php');

$strSQL1="select * from moni";
$strSQL2="select * from monibor";
$result =  $koneksi->query($strSQL1);
$result2 =  $koneksi->query($strSQL2);

?>
<table width=100% border=0 ><tr><td align=left><img src="kopnu.png" alt="RSINU DEMAK"></td>
<td align=center><font face="Arial, Helvetica, sans-serif"><b>KETERSEDIAAN TEMPAT TIDUR RUMAH SAKIT ISLAM NU DEMAK</b></font></td>
</tr>
<tr><td></td></tr>
<tr>
</tr>
</table>

<table width=100% border=1 >
<td width=30% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>RUANG</b></font></td>
<td width=30% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>KELAS</b></font></td>
<td width=15% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>TOTAL</b></font></td>
<td width=15% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>TERISI</b></font></td>
<td width=15% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>KOSONG</b></font></td>
</tr>
<?php
while ($row=mysqli_fetch_array ($result)) {
	echo "<tr>";
	echo "<td bgcolor=#f7efde><font face=Arial>" . $row["ruang"] . "</font></td>";
	echo "<td bgcolor=#f7efde><font face=Arial>" . $row["kelas"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["total"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["terisi"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["kosong"] . "</font></td>";
	
}
?>
</table>
<br>
<table align=right width=50% border=1 >
<td width=20% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>KAPASITAS</b></font></td>
<td width=20% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>TERISI</b></font></td>
<td width=20% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>KOSONG</b></font></td>
<td width=20% align=center bgcolor=#f32142><font face="Arial, Helvetica, sans-serif" color=white><b>BOR (%)</b></font></td>
</tr>
<?php
while ($row=mysqli_fetch_array ($result2)) {
	echo "<tr>";
	echo "<td bgcolor=#f7efde><font face=Arial>" . $row["kapasitas"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["terisi"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["kosong"] . "</font></td>";
	echo "<td align=center bgcolor=#f7efde><font face=Arial>" . $row["bor"] . "</font></td>";
	
}
?>
</tr></table></body></html>