<?php
class AppPencarianMahasiswa extends Database{
	protected $mSqlFile= 'module/pencarian_mahasiswa/business/apppencarianmahasiswa.sql.php';
	function __construct($connectionNumber=0) {
		parent::__construct($connectionNumber);
		
	}   
   
   function GetStatusMahasiswa(){
      $dataStatus[0]['id']="1";
      $dataStatus[0]['name']="Calon Mahasiswa";
      $dataStatus[1]['id']="0";
      $dataStatus[1]['name']="Mahasiswa";      
      return $dataStatus;
   }
      function GetSemesterMasuk(){
   
      $dataSemester[0]['id']="1";
      $dataSemester[0]['name']="GANJIL";
      $dataSemester[1]['id']="2";
      $dataSemester[1]['name']="GENAP";
      
      return $dataSemester;
   }
   
   function GetTahunMasuk(){
      $result=$this->Open($this->mSqlQueries['get_tahun_masuk'],array());
      return $result;
   }
   
   function GetDataProdi(){
      $result=$this->Open($this->mSqlQueries['get_data_prodi'],array());
      return $result;
   }
   function GetFakultas(){
      $result=$this->Open($this->mSqlQueries['get_fakultas'],array());
      return $result;
   }
   function GetTahun($id) {
   
      $awalTahunAjaran = $id;
      $tahun = date("Y");
      $tahunAjaran = $tahun;
      $cnt = 0;
      
      while ($tahunAjaran >= $awalTahunAjaran) {
         $result_array[$cnt][id] = $tahunAjaran;
         $result_array[$cnt][name] = $tahunAjaran.'/'.($tahunAjaran+1);
         $tahunAjaran--;
         $cnt++;
      }
      return $result_array;
   }
}
?>