<?php
/**
* @package : ViewPopupSPK
* @copyright : Copyright (c) PT Gamatechno Indonesia
* @Analyzed By : Didi Zuliansyah
* @author : Didi Zuliansyah
* @version : 01
* @startDate : 2013-01-01
* @lastUpdate : 2013-01-01
* @description : Popup preview file SPK
*/

require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/'.Dispatcher::Instance()->mModule.'/business/Pengadaan.class.php';

class ViewPopupSPK extends HtmlResponse {

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

	function ProcessRequest() {
		$id = (int) $_SESSION['mod=pengadaan']['id'];
		$obj = new Pengadaan();
		$return['data'] = $obj->GetPengadaanMstById($id);
		
		return $return;
	}

	function ParseTemplate($data = NULL) {
		$this->mrTemplate->AddVar('content', 'URL_IMG', 'file/'.$data['data']['pengadaanFileSPK']);
		$this->mrTemplate->AddVar('content', 'NO_SPK', $data['data']['pengadaanNoSPK']); 
		$this->mrTemplate->AddVar('content', 'NAMA_SPK', $data['data']['pengadaanNama']);
	}
}
?>