<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Welcome extends CI_Controller
{
    function __construct(){
		parent::__construct();
		$this->check_isvalidated();
	}
    public function index()
    {       
            $data['title'] = 'Antrian RS';
            $data['main_content'] = 'home/v_home';
            
            //$this->load->model('m_listpasien');
            //$listpasien = $this->m_listpasien->datenow();
            //$this->load->vars('lp', $listpasien);
            
            $this->load->view('includes/template', $data);
    }
    private function check_isvalidated(){
		if(! $this->session->userdata('validated')){
			redirect('index.php/ps_login');
		}
	}
    public function do_logout(){
		$this->session->sess_destroy();
		redirect('ps_login');
	}
    
    
}
