<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
ini_set('memory_limit', '-1');
class Reportes extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->load->model('reportes/Administrador/RFranquicias_model');
		$this->load->library(array('session','form_validation'));
	}
	public function index()
	{
		if($this->session->userdata('Rol_IdRol')==FALSE || 
			$this->session->userdata('Rol_IdRol') == '2'|| 
			$this->session->userdata('Rol_IdRol') == '3')
		{
			redirect(base_url().'acceso/acceso');
		} else {
    		$this->db->select('*');
			$this->db->join('modelo','Modelo_IdModelo = IdModelo','inner');
			$data['consulta']=$this->db->get('franquicias')->result();
		$this->load->view('layout/header');
		$this->load->view('layout/menuAdmin');
		$this->load->view('reportes/Administrador/reportes_view',$data);
		$this->load->view('layout/footer');
		}
	}
		
}