Ejemplo n.º 1
0
 public static function setup($name, $value = "")
 {
     if (is_array($name)) {
         self::$config = $name;
     } else {
         self::$config[$name] = $value;
     }
 }
 public function __construct()
 {
     //Construct Padre
     parent::__construct();
     //Instancia del core de CI
     self::$ci =& get_instance();
     /*
      * Cargar el id del modulo actual
      */
     self::$id_modulo = $this->id_modulo();
     /*
      * Cargar el uuid del usuario que esta loguiado.
      */
     self::$uuid_usuario = $this->uuid_usuario();
     /*
      * Cargar el id categoria a la que pertenece el
      * usuario que esta loguiado.
      */
     self::$id_categoria_usuario = $this->categoria_usuario("id_categoria");
     /*
      * Cargar el uuid categoria a la que pertenece el
      * usuario que esta loguiado.
      */
     self::$uuid_categoria_usuario = $this->categoria_usuario("uuid_categoria");
     self::$categoria_usuario_key = $this->categoria_usuario("key");
     //roles del usuario
     self::$user_role = $this->getRole();
     /*
      * Verificando que este usuario este en estado pendiente para redireccionar
      */
     if ($this->session->userdata('id_usuario') && $this->session->userdata('status') == 'Pendiente') {
         if (self::$ci->router->fetch_method() != 'ver_usuario' && self::$ci->router->fetch_method() != 'logout') {
             redirect('/usuarios/ver-usuario/' . $this->session->userdata('id_usuario'));
         }
     }
     //Cargar Libreria Assets
     $this->load->library('assets');
     //carga la libreria de notificaciones
     //$this->load->library('notificaciones');
     //Cargar Libreria para usuario
     $this->load->library('grafica_usuario');
     //Cargar Libreria template
     $this->load->library('template');
     //Cargar Libreria de Autenticacion
     //Verifica el rol y los permisos
     //que tiene el usuario.
     $this->load->library('auth');
     $this->load->library('core');
     /**
      * Cargar libreria Subpanel
      */
     $this->load->library('subpanel');
     /**
      * Cargar libreria para utility
      */
     $this->load->library('util');
     /**
      * Cargar libreria para modales
      */
     $this->load->library('modal');
     /**
      * Cargar libreria para jqgrid
      */
     $this->load->library('jqgrid');
     /**
      * Cargar libreria para catalogos
      */
     $this->load->library('catalogos');
     /**
      * carga libreria de jobs
      */
     $this->load->library('jobs');
     $this->load->library('notificaciones');
     /**
      * Cargar libreria phpFastCache
      *
      * phpFastCache is Lightweight, Fastest & Security,
      * supported many caching class (APC, MemCached, MemCache, Files, PDO, WinCache)
      */
     $this->load->library('phpfastcache/3.0.0/phpfastcache');
     phpFastCache::setup("storage", "auto");
     phpFastCache::$config = array("storage" => "auto", "default_chmod" => 0777, "htaccess" => true, "path" => "application/cache", "securityKey" => "auto", "memcache" => array(array("127.0.0.1", 11211, 1)), "redis" => array("host" => "127.0.0.1", "port" => "", "password" => "", "database" => "", "timeout" => ""), "extensions" => array(), "fallback" => "files");
     if (self::$cache == "") {
         self::$cache = phpFastCache("auto");
     }
 }
Ejemplo n.º 3
0
<?php

// phpFastCache Library
require_once dirname(__FILE__) . "/phpfastcache/3.0.0/phpfastcache.php";
// OK, setup your cache
phpFastCache::$config = array("storage" => "auto", "default_chmod" => 0777, "htaccess" => true, "path" => "", "securityKey" => "auto", "memcache" => array(array("127.0.0.1", 11211, 1)), "redis" => array("host" => "127.0.0.1", "port" => "", "password" => "", "database" => "", "timeout" => ""), "extensions" => array(), "fallback" => "files");
// temporary disabled phpFastCache
phpFastCache::$disabled = false;
Ejemplo n.º 4
0
<?php

// phpFastCache Library
require_once dirname(__FILE__) . "/phpfastcache/3.0.0/phpfastcache.php";
// OK, setup your cache
phpFastCache::$config = array("storage" => "auto", "default_chmod" => 0777, "htaccess" => true, "path" => dirname(__FILE__) . '/cache/', "securityKey" => "auto", "extensions" => array(), "fallback" => "files");
// temporary disabled phpFastCache
phpFastCache::$disabled = false;