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

/**
 * 
 * Clasa care extinde clasa nativa CodeIgniter CI_Controller pentru adaugarea de noi functionalitati.
 * 
 * 
 */
class MY_Controller extends CI_Controller
{
    
    function __construct() {

        parent::__construct();
         
        if($this->config->item('maintenance_mode') == TRUE) {
            redirect('maintenance');
        }
        //error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));

        $this->load->library('login_library');
            
        // if the user is not logged in then he will be redirected to login page 
        if(!$this->login_library->loggedIn())
            redirect('one', 'refresh');
        
    }  
    
}
?>