<?php
require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/laporan_rinci_heregistrasi/business/AppLaporanRinciHeregistrasi.class.php';
require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'main/function/date.php';

class ViewUpdateCombo extends HtmlResponse{

	function TemplateModule() {
		$this->SetTemplateBasedir(GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/laporan_rinci_heregistrasi/template');
		$this->SetTemplateFile('update_combo.html');
	}
	
	function ProcessRequest() {
		$lapObj = new AppLaporanRinciHeregistrasi();
      
      
      $tanggal = Dispatcher::Instance()->Decrypt($_REQUEST['tanggal']);
      $periode = Dispatcher::Instance()->Decrypt($_REQUEST['periode']);
      $name=Dispatcher::Instance()->Decrypt($_REQUEST['name']);

      $dataTanggal = $lapObj->GetTanggalRinciHeregistrasiByPeriode($periode);
      for($i=0; $i<sizeof($dataTanggal); $i++){
         $dataTanggal[$i]['name'] = IndonesianDate($dataTanggal[$i]['name'],'YYYY-MM-DD');
      }
      Messenger::Instance()->SendToComponent('combobox', 'Combobox', 'view', 'html', 'combo',
         array('tanggal',$dataTanggal,$tanggal,'true',''), Messenger::CurrentRequest);
      
   }
   
}
?>