<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Getranap extends CI_Controller {

	public function __construct()
	{
		parent::__construct();		
		$this->load->library(array('session'));
		
		// Cek Sesi
		/* if(! $this->session->userdata('email'))
		{
			exit('Data tersebut tidak tersedia!');
		} */
		
		// Load Model
		
		$this->load->model('ranap/ranap_model');
		$this->load->model('admision/admision_panel_model');
		
	}

	public function index()
	{
		
		$idkamar=$this->input->post('idkamar',TRUE);
		
		//$idkamar='11';
		
		$rincik = $this->ranap_model->getKamar($idkamar);
		$this->output
			->set_content_type('application/json')
			->set_output(json_encode($rincik));
	}
	
	function getDataRegistrasi()
	{
		$idreg=$this->input->post('idreg',TRUE);		
		//$idkamar='11';
		
		$rincik = $this->admision_panel_model->getRegistrasiByID($idreg);
		$this->output
			->set_content_type('application/json')
			->set_output(json_encode($rincik));
	}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */