function __construct($id = -1)
 {
     parent::__construct();
     $this->controller = $this;
     $this->load->helper("loader");
     $this->load->helper("javascript_loader");
     $this->load->helper("stylesheet_loader");
     $this->load->helper("system");
     $this->load->helper("alert");
     $this->load->helper("url_helper");
     // check if user is authenticated
     if (get_class($this) != "Login" && get_class($this) != "User" && !FUTURI_Session::isLogged()) {
         redirect(base_url() . "login");
     }
     // Code Igniter native Helper and library
     //$this->load->helper(array('form', 'url'));
     //$this->load->library('form_validation');
     include_once "FUTURI_Component.php";
     $this->modelName = strtolower($this->getType()) . "_model";
     $this->load->model($this->modelName);
     //, "loadedModel");
     $model_class = $this->getType() . "_Model";
     $this->loadedModel = new $model_class();
     if (!defined("ROOT_PATH")) {
         define("ROOT_PATH", "");
     }
     if (!defined("NO_JS")) {
         SystemHelper::setJSROOTPATH(ROOT_PATH);
         $JS = new JavascriptLoader(ROOT_PATH);
         $JS->loadCores();
         $JS->loadPlugins();
     }
     if (!defined("NO_CSS")) {
         $CSS = new StylesheetLoader(ROOT_PATH);
         $CSS->loadStyles();
     }
     include_once "application/controllers/Permission.php";
     $this->objectID = $id;
     $this->defineLeftMenu();
     $this->defineActionOptions();
     $this->definePagerLimits();
     if ($this->objectID > 0 && isset($this->loadedModel)) {
         //print_r($this->loadedModel);
         $this->loadObjectDataFields();
     }
 }