<?php
class ViewTransferMasuk extends HtmlResponse {

   function TemplateModule() {
      $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application','docroot').'module/kdp_transfer_masuk/template');
      $this->SetTemplateFile('view_transfer_masuk.html');
   }

   function ProcessRequest() {
	   	//PAGING
	   	$totalData = 2;
	   	$itemViewed = 20;
	   	$currPage = 1;
	   	$startRec = 0;
	   	
	   	if(isset ($_GET['page'])){
	   		$currPage = (string)$_GET['page']->StripHtmlTags()->SqlString()->Raw();
	   		$startRec = ($currPage - 1) * $itemViewed;
	   	}
	   	
	   	$url = Dispatcher::Instance()->GetUrl(
	   			Dispatcher::Instance()->mModule,
	   			Dispatcher::Instance()->mSubModule,
	   			Dispatcher::Instance()->mAction,
	   			Dispatcher::Instance()->mType);
	   	Messenger::Instance()->SendToComponent('paging','Paging','view','html','paging_top',
	   			array($itemViewed,$totalData,$url,$currPage),
	   			Messenger::CurrentRequest);
	   	//END PAGING
   }

   function ParseTemplate($data = NULL) {
   	  $urlUpdate = Dispatcher::Instance()->GetUrl('kdp_transfer_masuk', 'UpdateTransferMasuk', 'view', 'html');
   	  $label = 'Transfer Masuk KDP';
   	  $urlAccept = '';
      $urlReturn = 'kdp_transfer_masuk|TransferMasuk|view|html';
   	  $urlDelete = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html').'&urlDelete='.$urlAccept.'&urlReturn='.$urlReturn.'&label='.$label;
      $this->mrTemplate->AddVar('content','URL_UPDATE', $urlUpdate);
	  $this->mrTemplate->AddVar('content','URL_DELETE', $urlDelete);
   }
}
?>
