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

class ControllerLunas extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        //validasi jika user belum login
        check_not_login();
        if ($this->session->userdata('level') != 1) {
            redirect();
        }
        $this->set_timezone();
        $this->load->library('encrypt');
        $this->load->library('form_validation');
        $this->load->library('Mycustom');
        $this->load->library('pdfgenerator');
        $this->load->library('Notifikasi');
        $this->load->model('bagian_owner/insert_model');
        $this->load->model('bagian_owner/select_model');
        $this->load->model('bagian_owner/update_model');
    }
    public function set_timezone()
    {
        date_default_timezone_set("Asia/Jakarta");
    }
    public function index()
    {
        $notif                 = $this->notifikasi->notif_owner();
        // Data Login
        $data_login            = $this->userlogin->user_login();
        $data_id_login         = $this->session->userdata('isloggedin');
        // Data Isian Konten
        // Tampilkan Jenis Pinjaman
        $pinjaman_lunas        = $this->select_model->vd_PinjamanLunas();
        $data_jaminan          = $this->select_model->vd_jaminanPinjaman();
        $data = array(
            // Untuk memanggil halaman sesuai menu
            'folder'              => 'laporan/koperasi/lunas',
            'page'                => 'index',
            'judul'               => 'Pinjaman Lunas || Bagian Owner',
            'data_id_login'       => $data_id_login,
            'data_login'          => $data_login,
            'notif'               => $notif,
            // Isi dalam konten
            'pinjaman_lunas'      => $pinjaman_lunas,
            'data_jaminan'        => $data_jaminan
        );
        $this->load->view('owner/index', $data);
    }
}

/* End of file ControllerLunas.php and path \application\controllers\kabag_marketing\operasional\ControllerLunas.php */