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

class MY_Controller extends CI_Controller {
    
    function __construct() {
        parent::__construct();
        
        if($this->session->userdata('userLevel') === FALSE) {
            //redirect('login/logout', 'refresh');	
        }
        if ($this->session->userdata('site_lang')) {
            $this->lang->load('app', $this->session->userdata('site_lang'));
        } else {
            $this->lang->load('app', 'hebrew');
        } 
/**
 * Loads and instantiates native session class
 */    
/*
if ( ! class_exists('Native_session'))
{
    require_once(APPPATH.'libraries/native_session'.EXT);
}

// sessions engine should run on cookies to minimize opportunities
// of session fixation attack
ini_set('session.use_only_cookies', 1);

$obj =& get_instance();
$obj->session = new Native_session();
$obj->ci_is_loaded[] = 'session';        
        //die();*/
    }
    
}