示例#1
0
 public function before()
 {
     $auth = Auth::instance();
     if ($auth->logged_in()) {
         $session = Session::instance();
         $this->user = $session->get('auth_user');
         $oNivel = new Model_niveles();
         $this->menus = $oNivel->menus($this->user->nivel);
         parent::before();
         $this->template->titulo = '<v>Supervisar / </v>';
         $this->template->username = $this->user->nombre;
         if ($this->user->theme != null) {
             $this->template->theme = $this->user->theme;
         }
     } else {
         $url = substr($_SERVER['REQUEST_URI'], 1);
         $this->request->redirect('/registroempresas/selecciontipo?url=' . $url);
     }
 }
示例#2
0
 public function before()
 {
     parent::before();
     $auth = Auth::instance();
     //si el usuario esta logeado entonces mostramos el menu
     if ($auth->logged_in()) {
         //menu top de acuerdo al nivel
         $session = Session::instance();
         $this->user = $session->get('auth_user');
         $oNivel = new Model_niveles();
         $this->menus = $oNivel->menus($this->user->nivel);
         $this->template->username = $this->user->nombre;
         if ($this->user->theme != null) {
             $this->template->theme = $this->user->theme;
         }
     } else {
         $this->request->redirect('/login');
     }
 }
示例#3
0
 public function before()
 {
     $auth = Auth::instance();
     //si el usuario esta logeado entocnes mostramos el menu
     if ($auth->logged_in()) {
         //menu top de acuerdo al nivel
         $session = Session::instance();
         $this->user = $session->get('auth_user');
         $oNivel = new Model_niveles();
         $this->menus = $oNivel->menus($this->user->nivel);
         parent::before();
         $this->template->title = 'Usuario /';
         $this->template->titulo = '<v>Usuario / </v>';
         if ($this->user->theme != null) {
             $this->template->theme = $this->user->theme;
         }
     } else {
         $url = substr($_SERVER['REQUEST_URI'], 1);
         $this->request->redirect('/registroempresas/selecciontipo/?url=' . $url);
     }
 }