<?php
class MAK extends Database
{

	protected $mSqlFile= 'module/pengadaan/business/MAK.sql.php';
	
	function __construct($connectionNumber=1)
   {
		parent::__construct($connectionNumber);
	}
   
   function ThnAktif ()
   {
      if (isset($this->ThnAktif)) return $this->ThnAktif;
      $result = $this->Open($this->mSqlQueries['tahun_aktif'], array());
      return $result[0]['id'];
   }
   
   function ComboThnAnggaran ()
   {
      return $this->Open($this->mSqlQueries['combo_tahun_anggaran'], array());
   }
   
   function ComboProgram ()
   {
      return $this->Open($this->mSqlQueries['combo_program'], array());
   }
   
   function ComboJnsKeg ()
   {
      return $this->Open($this->mSqlQueries['combo_jenis_kegiatan'], array());
   }
   
   function ComboKegiatan ()
   {
      return $this->Open($this->mSqlQueries['combo_kegiatan'], array());
   }
   
   function PopUpListCount ($filter)
   {
      $arg = array
      (
         $filter['thnAnggaran'],$filter['thnAnggaran'],
         $filter['program'], $filter['program'],
         $filter['jnskeg'], $filter['jnskeg']
      );
      
      $result = $this->Open($this->mSqlQueries['pop_up_list_count'], $arg);
      return $result[0]['total'];
   }
		
	function PopUpList ($filter)
   {
      
      $arg = array
      (
         $filter['thnAnggaran'],$filter['thnAnggaran'],
         $filter['program'], $filter['program'],
         $filter['jnskeg'], $filter['jnskeg']
      );
      
      return $this->Open($this->mSqlQueries['pop_up_list'], $arg);
	}
}
?>
