<?php

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

class Login extends MY_Controller {

    protected $template = "app";

    public function __construct() 
    {
        parent::__construct();
    }

    public function index()
    {
        $id_group = $this->session->userdata('id_group');
        var_dump($id_group); die();
        if($id_group && isset($id_group)){
            redirect('index');
        }
        if($this->input->get()){
            $i_get = $this->input->get();
            
            if (!empty($i_get["logout"])) {
                $message = "Anda telah berhasil keluar dari aplikasi Simlapak";
                $notif = 'success';
            } 
            if (!empty($i_get["failed"])) {
                $message = "Akun yang anda masukkan salah, silahkan cek username dan password Anda.";
                $notif = 'danger';
            } 
            $data["message"] = $message;
            $data["notif"]   = $notif;
        }
        $this->load->view("template/login", $data);
    }
    
}