Esempio n. 1
0
	
	$tmpl->setBasedir("module/pengeluaran_bon/templates");
	$tmpl->readTemplatesFromFile("edit_view.html");

	$tmpl->addVar("article", "HEADLINE", "Pembayaran Cicilan");
	$tmpl->addVar("article", "URL_PROSES", "module/pengeluaran_bon/process_request.php");
	
	//print_r($code);
	$idBn=$code['idBn'];
	
	$edit = new Peminjaman;
	$edit->connect();
	$edit->get_detil_data_peminjaman($idBn);
	
	$row=0;
	while($result=$edit->get_array()){
		$disp[$row]=array(
						'NO'=>$number,
						'ID'=>$result['ID'],
						'NAMA'=>$result['NAMA'], 
						'TANGGAL'=>$result['TANGGAL'],
						'JUMLAH_PINJAM'=>$result['JUMLAH_PINJAM'], 
						'JUMLAH_BAYAR'=>$result['JUMLAH_BAYAR']); 
		$row++;
	}
	//print_r($disp);
	foreach($disp as $data){
		$tmpl->addVars("data", $data);
		$tmpl->parseTemplate("data", "a");
	}
?>
	$tmpl->setBasedir("module/pengeluaran_bon/templates");
	$tmpl->readTemplatesFromFile("detil_bayar_view.html");
	
	//print_r($code);
	$idBn=$code['idBn'];
	$nama=$code['nama'];

   $tmpl->addVar("article", "HEADLINE", "Histori Pembayaran ".$nama);
	
	$view = new Peminjaman;
	$view->connect();
	
	$view->get_pembayaran_detil($idBn);

	$row=0;
	while($result=$view->get_array()){
		$number=$row+1;
		if ($number % 2 ==0){
			$class_name='table-common-even';
		}else{
			$class_name='';
		}
		
		$disp[$row]=array('NO'=>$number,
								'IDBYR'=>$result['IDBYR'],
								'TANGGAL'=>format_tanggal($result['TANGGAL']),
								'NOMINAL'=>number_format($result['NOMINAL'],2,',','.'), 
								'CLASS_NAME'=>$class_name); 
		$row++;
	}
	#print_r($disp);