<html>
<body>
<h3 align="center"><a href="fjpaket.php">:: F DPaket ::</a></h3>
<?php
include "connect.php";
$id=$_GET['id'];
$tambah = "select * from jns_byr where kd_byr ='$id'";
$hasil = mysql_query($tambah);
$row=mysql_fetch_array($hasil);

?>
<form method = post action ="inputdpaket.php" enctype="multipart/form-data">

<table border =0 align="center" width="639" bgcolor="#CC99FF">
<tr>
  <td colspan="2"><hr></td>
</tr>
<tr>
  <td width="260">Kode Biaya</td>
<td width="369">: <input type = text name="kd_byr" value="<? echo $row[0]; ?>"></td></tr>
<tr><td>Jenis Biaya</td>
<td>: <input type = text name="nm_dt" size="50"></td></tr>
<tr><td>Jumlah</td>
<td>: <input type = text name ="jum_dt" size="30"></td></tr>
<tr><td><input type=submit value ="Submit">
<input type=reset value="Reset"></td></tr>
</table>
</form>
<?
	//include "config.php"
	include "rp.php";
	$tampil="select * from dt_byr where kd_byr = '$id' order by kd_byr DESC";
	$hasil=mysql_query($tampil);
	$total= mysql_num_rows($hasil);
	$sqljum=mysql_query("select sum(jum_dt) from dt_byr where kd_byr='$id'");
	$datajum=mysql_fetch_row($sqljum);
	
?>
<table align="center" width="641" border="0">
			<tr bgcolor="#000000">
				<td width="127" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Kode</font></b></td>
				<td width="357" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Jenis</font></b></td>
				<td width="143" align="center"><b><font face="verdana" size="2" color="#FFFFFF">Jumlah</font></b></td>
			</tr>
	<?
	if ($total){
		while ($row=mysql_fetch_array($hasil))
		{
		?>
			<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></td>
			    <td valign="top"><div align="right"><font face="verdana" size="2"><? echo rp($row[2]); ?></font></div></td>
			</tr>
		<?	
		} 
	}else{
		?><p align="center"><font color="#FF0000" face="verdana" size="2"><b>Data tidak ditemukan!!</b></font></p><?
	}
	?>
			<tr>
			  <td colspan="3" valign="top"><div align="right"><font face="verdana" size="2"><strong><? echo rp($datajum[0]); ?></font></div></td>
			</tr>
</table>

</body>
</html>

