<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
ini_set('memory_limit', '-1');
class ReportesF extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->load->model('reportes/Franquiciatario/Usuarios_model');
		$this->load->library(array('session','form_validation'));
	}

	public function index()
	{
		if($this->session->userdata('Rol_IdRol')==FALSE || 
			$this->session->userdata('Rol_IdRol') == '1'|| 
			$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/headerFran');
		$this->load->view('layout/menuFranquicia');
		$this->load->view('reportes/Franquiciatario/reportes_view',$data);
		$this->load->view('layout/footer');
		}
	}		
}