<html>
<head>
<title>LAP Keu</title>
</head>
<body>
<?
include "connect.php";
include "rp.php";
include "indo.php";
$id = $_GET['id'];
$sqlkeu1 = mysql_query("SELECT tb_byr.nim,mhs.nm_mhs,tb_byr.no_kwi,tb_byr.tgl_byr,jns_byr.nm_byr,tb_byr.jum_byr FROM tb_byr,jns_byr,mhs WHERE tb_byr.kd_byr=jns_byr.kd_byr and tb_byr.nim=mhs.nim and tb_byr.nim='$id'") or die("Query failed with error: ".mysql_error());
$total= mysql_num_rows($sqlkeu1);
$sqljum=mysql_query("select sum(jum_byr) from tb_byr where nim='$id'");
$datajum=mysql_fetch_row($sqljum);
?>
<h3><center> 
<a href="index.php">RIWAYAT ADMINISTRASI KEUANGAN / MHS</a> </h3>
<table align="center" width="812" border="0">
			<tr bgcolor="#000000">
				<td width="88" align="center"><b><font face="verdana" size="2" color="#FFFFFF">NIM</font></b></td>
				<td width="192" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Nama</font></b></td>
				<td width="74" align="center"><b><font face="verdana" size="2" color="#FFFFFF">No.Kwi</font></b></td>
				<td width="119" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Tgl Byr </font></b></td>
				<td width="227" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Biaya</font></b></td>
				<td width="86" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Jml Byr </font></b></td>
			</tr>
	<?
	if ($total){
		while ($row=mysql_fetch_array($sqlkeu1))
		{
		?>
			<tr>
				<td valign="top"><font face="verdana" size="2"><? echo $row[0]; ?></font></td>
				<td valign="top"><font face="verdana" size="2"><? echo $row[1]; ?></font></a></td>
			    <td valign="top"><div align="center"><font face="verdana" size="2"><? echo $row[2]; ?></font></div></td>
				<td valign="top"><div align="center"><font face="verdana" size="1"><? echo $ftgl=TanggalIndo($row[3]); ?></font></div></td>
				<td valign="top"><div align="center"><font face="verdana" size="2"><? echo $row[4]; ?></font></div></td>
				<td valign="top"><div align="right"><font face="verdana" size="2"><? echo rp($row[5]); ?></font></div></td>
			</tr>
		<?	
		} 
	}else{
		?><p align="center"><font color="#FF0000" face="verdana" size="2"><b>Belum ada pembayaran!!</b></font></p><?
	}
	?>
		<tr>
		<td colspan="8" align="left"><div align="right"><font face="verdana" size="2"><strong>TOTAL: <? echo rp($datajum[0]); ?> </strong></font></div></td>
		</tr>

</table>
</body>
</html>
