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

class ControllerMacetPinjaman extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        check_not_login();
        if ($this->session->userdata('level') != 6) {
            redirect();
        }
        $this->load->library('encrypt');
        $this->load->library('form_validation');
        $this->load->library('mycustom');
        $this->load->library('Notifikasi');
        $this->load->library('pdfgenerator');
        $this->load->model('kabag_marketing/insert_model');
        $this->load->model('kabag_marketing/select_model');
        $this->load->model('kabag_marketing/update_model');
        $this->set_timezone();
    }
    public function set_timezone()
    {
        date_default_timezone_set("Asia/Jakarta");
    }
    public function index()
    {
        $notif                 = $this->notifikasi->notif_kabag_marketing();
        // Data Login
        $data_login            = $this->userlogin->user_login();
        $data_id_login         = $this->session->userdata('isloggedin');
        // Data Isian Konten
        // Tampilkan Jenis Pinjaman
        $pinjaman_macet        = $this->select_model->vd_PinjamanMacet();
        $data_jaminan          = $this->select_model->vd_jaminanPinjaman();
        // echo '<pre>';
        // var_dump($pinjaman_macet);
        // die;
        $data = array(
            // Untuk memanggil halaman sesuai menu
            'folder'              => 'operasional/macet',
            'page'                => 'index',
            'judul'               => 'Pinjaman Macet || Bagian Kabag Marketing',
            'data_id_login'       => $data_id_login,
            'data_login'          => $data_login,
            'notif'               => $notif,
            // Isi dalam konten
            'pinjaman_macet'      => $pinjaman_macet,
            'data_jaminan'        => $data_jaminan
        );
        $this->load->view('kabag_marketing/index', $data);
    }
}

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