<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];
$exp	= explode("-",$kode);
$kodekb	= $exp['0'];
$nourut	= $exp['1'];

$text	= "SELECT * FROM jurkrsb WHERE kode_kb= '$kodekb' AND no_urut='$nourut'";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);

if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['nourut']= $r['no_urut'];
	$data['kodest']= $r['kode_st'];
	$data['namast']= $r['nama_st'];
	$data['satuan']= $r['satuan'];
	$data['jmlunit']= $r['jml_unit'];
	$data['hgpokok']= $r['hg_pokok'];
	$data['nilaikr']= $r['nilai_kr'];
	$data['ket']= $r['keterangan'];
	echo json_encode($data);
}
}else{
	$data['nourut']= '';
	$data['kodest']= '';
	$data['namast']= '';
	$data['satuan']= '';
	$data['jmlunit']= '';
	$data['ket']= '';
	echo json_encode($data);	
}
?>