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

class Security_Model extends CI_Model
{
    //Constructor 
    function __construct()
    {
        parent::__construct();
        //$this->load->library('encryption');
    }

    
    //Buscar Permisos por parametros
    public function getAllSecurityProfile($data)
    {
		//Variables de Busqueda
		$Opcion   = $data[0];
		$PerfilId = $data[1];

        //Utilizar la libreria
        $this->db->select( 'p.*,
							m.Nombre');
        $this->db->from('permisos as p');
		$this->db->join('modulos as m','p.IdModulo = m.IdModulo','left');  
		$this->db->where('p.IdPerfil', $PerfilId);

		//Enviar Respuesta
        $query= $this->db->get();
        $str = $this->db->last_query();
	    return $query->result();
    }

   
   
  
}
?>