initial
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
class login_model extends CI_Model
|
||||
{
|
||||
function cek_login($where)
|
||||
{
|
||||
return $this->db->get_where('admin', $where)->row_array();
|
||||
}
|
||||
|
||||
function ambil_menu($data)
|
||||
{
|
||||
// $this->db->where('id_role', $data['admin_role']);
|
||||
// return $this->db->get('admin_menu_role')->result_array();
|
||||
|
||||
$this->db->select('amr.*, ap.nama_fitur, ap.url,ap.nama_fitur,ap.urut,ap.foregn,ap.nama_fitur,ap.icon');
|
||||
$this->db->from('admin_menu_role amr');
|
||||
$this->db->join('admin_privilage ap', 'ap.id = amr.id_privilage', 'left');
|
||||
$this->db->where('amr.id_role', $data['admin_role']);
|
||||
return $this->db->get()->result_array();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user