first commit
This commit is contained in:
35
application/controllers/welcome.php
Normal file
35
application/controllers/welcome.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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'] = 'App Antrian RSSA';
|
||||
$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/login');
|
||||
}
|
||||
}
|
||||
public function do_logout(){
|
||||
$this->session->sess_destroy();
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user