  <?php 

class Kasir_new extends CI_Controller{


  function __construct(){

    parent::__construct();
    $this->load->model('m_kontak');/* sesuaikan dengan nama file pada model */
    $this->load->model('m_login'); 
    $this->load->model('m_admin'); 
    $this->load->model('m_kasir');
    $this->load->model('m_metode');
    $this->load->model('m_kat_member'); 
    $this->load->model('m_member');
    $this->load->model('m_kantor');
    $this->load->model('m_supliyer'); 
    $this->load->model('m_transaksi');
    $this->load->library('session');
    $this->load->library('upload');
    

    $this->load->helper(array('form', 'url','tanggal'));
    if($this->session->userdata('status') != "loginbro"  and empty($this->session->userdata('email')) ){
      $this->session->set_flashdata('msg','<div class="alert alert-danger alert-dismissible">
        <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
        <strong> Admin Bukan Admin </strong>Ulangi Kembali
        </div> ');

      redirect(base_url("")); 
      
    }


  }


 
  function log_in(){    
        date_default_timezone_set('Asia/Jakarta');
        $tgl = date('Ymd');

        $username = $this->session->userdata("username");  
        $this->db->where('username',$username);
        $query = $this->db->get('tb_admin');
        $row = $query->row();
        $data['id_admin']= $row->id;
        $data['nama_admin']= $row->nama_admin;
        $data['id_kantor']= $row->id_kantor;
        $id_admin = $row->id;
        $id_kantor = $row->id_kantor;

       
          $this->load->view('master/kasirq/index',$data); 
 




      }
      
      

      


}