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

//set Label for module
require_once GTFWConfiguration::GetValue( 'application', 'docroot') .
   'module/label/response/Label.proc.class.php';

class PopUpFotoDenah extends HtmlResponse
{
	function TemplateBase()
   {
      if (isset($_GET['popup']))
      {
         $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application', 'docroot') . 'main/template/');
         $this->SetTemplateFile('document-common-popup.html');
         $this->SetTemplateFile('layout-common-popup.html');
         return;
      }
      parent::TemplateBase();
   }
   
   function TemplateModule()
   {
      $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application','docroot').'module/gedung/template');
      $this->SetTemplateFile('view_popup_foto_denah.html');
   }
   
	function ProcessRequest()
   {
      $Obj = new AppGedung;
		$id = $_GET['gId'];
      $detail = $Obj->GetGedungById($id);
		return $detail;
	}
	
	function ParseTemplate($data = NULL)
   {
   		$this->mrTemplate->AddVar('content', 'URL_IMG', Dispatcher::Instance()->GetUrl('download', 'ReadFile', 'view', 'html').'&pid=1&file='.$data['gd_denah']);
		$this->mrTemplate->AddVar('content', 'ASET_NAMA', $data['gd_nama']);
		$this->mrTemplate->parseTemplate('content', '');
	}
}
?>
