Beispiel #1
0
 function __construct()
 {
     $this->conf = array('path' => 'wall');
     parent::__construct();
     $this->load->library('hc_time');
     /* check user level */
     $remote_integration = $this->remote_integration();
     if ($remote_integration) {
         $user_level = 0;
     } else {
         $user_level = $this->app_conf->get('wall_schedule_display');
     }
     if ($user_level) {
         $this->check_level($user_level);
     }
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
 }
 function __construct()
 {
     parent::__construct();
 }
 function __construct()
 {
     parent::__construct();
     $this->load->model('Location_model', 'model');
     $this->model->strict_search = TRUE;
 }
Beispiel #4
0
}
?>
			
		</section>
	</section>
    
	<section class="default_container">
        
        <!--Incluindo o Menu left-->
	        <?php 
require_once 'menu_left.php';
?>

        <!--Incluindo o front controller e definindo a primeira página-->
            <?php 
Front_controller::manipulator("login.login");
?>
 

	    <section class="hidden"></section>
	</section>

	<!-- script references -->
	<script src=<?php 
Helper::script('js.jquery');
?>
></script>
	<script src=<?php 
Helper::script('js.bootstrap');
?>
></script>
Beispiel #5
0
 function __construct()
 {
     parent::__construct();
     $app = $this->config->item('nts_app');
     if (!$this->auth->check()) {
         if (isset($GLOBALS['NTS_CONFIG'][$app]['FORCE_LOGIN_ID'])) {
             $id = $GLOBALS['NTS_CONFIG'][$app]['FORCE_LOGIN_ID'];
             $this->auth->login($id);
         }
     }
     // sync user account
     $ri = $this->remote_integration();
     if ($ri) {
         $id = $this->auth->check();
         if ($id) {
             $model_name = $ri . '_User_Model';
             $um = new $model_name();
             $um->sync($id);
             $this->auth->reset_user();
         }
     }
     // check user level
     $user_level = 0;
     $user_id = 0;
     if ($this->auth->check()) {
         if ($test_user = $this->auth->user()) {
             $user_id = $test_user->id;
             $user_level = $test_user->level;
         }
     }
     if (isset($GLOBALS['NTS_CONFIG'][$app]['FORCE_USER_LEVEL'])) {
         $user_level = $GLOBALS['NTS_CONFIG'][$app]['FORCE_USER_LEVEL'];
     }
     $remote_integration = $this->remote_integration();
     if ($remote_integration) {
         $wall_schedule_display = 0;
     } else {
         $wall_schedule_display = $this->app_conf->get('wall_schedule_display');
     }
     $allowed = FALSE;
     switch ($user_level) {
         case 0:
             if ($wall_schedule_display <= $user_level) {
                 $to = 'wall';
             } else {
                 if ($user_id) {
                     $to = 'auth/notallowed';
                 } else {
                     $to = 'auth/login';
                 }
             }
             break;
         case USER_MODEL::LEVEL_ADMIN:
             $to = 'admin/schedules';
             break;
         case USER_MODEL::LEVEL_MANAGER:
             $to = 'admin/schedules';
             break;
         case USER_MODEL::LEVEL_STAFF:
             $to = 'staff/shifts';
             break;
     }
     ci_redirect($to);
     exit;
 }