<?php namespace App\Controllers;

use CodeIgniter\Controller;
use App\Libraries\Auth;

class Home extends BaseController
{

	public function __construct(){
        $this->session = \Config\Services::session();
        $this->auth = new Auth();
        $this->usuario = $this->session->get('dadoslogin');
        if($this->usuario == null){
            header('Location: '.base_url());
            exit(); 
        
        }
        helper('complementos'); 
    }

	public function index()
	{
        
        echo view('Commons/header');
        echo view('Commons/navbartop');
        echo view('Commons/navbarleft', getBarMenu($this->usuario));
        echo view('Home/dashboard');
        echo view('Commons/footer');
       
    }
    

	//--------------------------------------------------------------------
}
