<?php
require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/aset_ref_bank/business/Bank.class.php';

class ViewDetilBank extends HtmlResponse {

   function TemplateModule() {
      $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application','docroot') .
         'module/aset_ref_bank/template');
      $this->SetTemplateFile('detil_bank.html');
   }
   
   function ProcessRequest() {  
	 $obj = new Bank();
	 
	   $grp = Dispatcher::Instance()->Decrypt($_GET['grp']);
	 
        $this->data = $obj ->GetDataById($grp);					
		
		if(sizeof(@$data) > 0 ) {
	     $return['data']=$data[0];		  
	    }			  
	        
      return @$return;
   }

   function ParseTemplate($data = NULL) {     
 
	  $this->mrTemplate->AddVar('content', 'DATA_BANK_NAMA', $this->data['bank_nama']);
	  $this->mrTemplate->AddVar('content', 'DATA_BANK_CABANG', $this->data['bank_cabang']);
	   $this->mrTemplate->AddVar('content', 'DATA_BANK_ALAMAT', $this->data['bank_alamat']);
	  $this->mrTemplate->AddVar('content', 'DATA_BANK_ACCOUNT', $this->data['bank_account']);
	  $this->mrTemplate->AddVar('content', 'DATA_BANK_PEMILIK', $this->data['bank_pemilik']);
	  
	   $this->data['bank_logo']="document/logobank/".$this->data['bank_logo'];
	  
	  $this->mrTemplate->AddVar('content', 'DATA_BANK_LOGO', $this->data['bank_logo']);
	  
	  $this->mrTemplate->AddVar('content', 'URL_BACK', Dispatcher::Instance()->GetUrl('aset_ref_bank','bank' , 'view' ,'html'));
	
   }
}
?>
