Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('sessions');
     without_stored_cache();
     session_inactivity_logout();
     //        if ($this->session->all_userdata('language') != '') {
     //            $this->language = $this->session->userdata('language');
     //        } else {
     //            $this->language = $this->config->item('default_language');
     //        }
     $this->language = 'spanish';
     $this->role = $this->session->userdata('role');
     //$this->language = ($this->session->all_userdata('language')) ? $this->session->userdata('language') : $this->config->item('default_language');
     if (!$this->session->userdata('username')) {
         redirect('site/home/login', 'refresh');
         // the user is not logged in, redirect them!
     }
     $this->lang->load($this->language, $this->language);
     $this->load->model('groups/groups_model');
     $this->load->model('roles/roles_model');
     $this->load->model('applications/application_model');
     if ($this->session->userdata('role') == 'write' || $this->session->userdata('role') == 'read') {
         $action = $this->uri->segment(2);
         if ($action != 'logout' && $action != 'login') {
             redirect('noaccess', 'refresh');
         }
     }
     //         $this->lang->load('leftmenu', 'english');
     //        $this->lang->load('dashboard', 'english');
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('sessions');
     without_stored_cache();
     session_inactivity_logout();
     /*
             if($this->session->all_userdata('language') != ''){
                  if($this->session->userdata('language') != '')
                     $this->language = $this->session->userdata('language');
                  else
                     $this->language = 'english'; 
             }else{
                 $this->language = 'english';
             }
     */
     $this->language = 'spanish';
     $this->role = $this->session->userdata('role');
     //$this->language = ($this->session->all_userdata('language')) ? $this->session->userdata('language') : $this->config->item('default_language');
     if (!$this->session->userdata('username') && $uristring != 'users/login') {
         redirect('site/home/login', 'refresh');
         // the user is not logged in, redirect them!
     }
     $this->lang->load($this->language, $this->language);
     // $this->lang->load($this->language, $this->language);
     $this->load->model('inventory/inventory_model');
     // $this->lang->load('dashboard', 'english');
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('sessions');
     without_stored_cache();
     session_inactivity_logout();
     //        if($this->session->all_userdata('language') != '')
     //        {
     //            $this->language = $this->session->userdata('language');
     //        }
     //        else
     //        {
     //            $this->language = $this->config->item('default_language');
     //        }
     $this->language = 'spanish';
     $this->role = $this->session->userdata('role');
     //$this->language = ($this->session->all_userdata('language')) ? $this->session->userdata('language') : $this->config->item('default_language');
     if (!$this->session->userdata('username')) {
         redirect('site/home/login', 'refresh');
         // the user is not logged in, redirect them!
     }
     $this->lang->load($this->language, $this->language);
     $this->load->model('location/location_model');
     //         $this->lang->load('leftmenu', 'english');
     //        $this->lang->load('dashboard', 'english');
 }
Esempio n. 4
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('sessions');
     without_stored_cache();
     session_inactivity_logout();
     $this->language = 'spanish';
     $this->role = $this->session->userdata('role');
     if (!$this->session->userdata('username') && $uristring != 'users/login') {
         redirect('site/home/login', 'refresh');
         // the user is not logged in, redirect them!
     }
     $this->lang->load($this->language, $this->language);
     $this->load->model('agreements_model');
 }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('sessions');
     without_stored_cache();
     session_inactivity_logout();
     $uristring = uri_string();
     $this->language = 'spanish';
     $this->role = $this->session->userdata('role');
     if (!$this->session->userdata('username') && $uristring != 'users/login') {
         redirect('site/home/login', 'refresh');
         // the user is not logged in, redirect them!
     }
     $this->lang->load($this->language, $this->language);
     if ($this->session->userdata('role') == 'write' || $this->session->userdata('role') == 'read') {
         $action = $this->uri->segment(2);
         if ($action != 'logout' && $action != 'login') {
             redirect('noaccess', 'refresh');
         }
     }
     $this->load->model('users/user_model', 'user_model');
     $this->load->library('form_validation');
 }