<?php

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

class Index extends MY_Controller {

    protected $template = "app";

    public function __construct() 
    {
        parent::__construct();
        $this->load->model('m_grafik');

    }

    public function index() 
    {
        $this->data['halaman'] = "Dashboard";
        $this->data['grafik_jl'] = $this->m_grafik->get_jenis_layanan();
        $this->data['grafik_pad'] = $this->m_grafik->get_pad();
        $this->data['grafik_uji_sampel'] = $this->m_grafik->get_uji_sampel();
        $this->data['grafik_jenis_pengujian'] = $this->m_grafik->get_jenis_pengujian();
        $this->render('index');
    }

    public function logout() {
        $this->unset_userdata();
        $message = 'Anda telah keluar dari aplikasi Simlapak, silahkan login untuk masuk kembali.';
        $this->session->set_userdata('out_message', $message);
        redirect('');
    }
}
