<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class StronaGlowna extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->user_data = $this->ion_auth->check_user_privilege(array(),false);
        $this->base_url = base_url() . '/' . $this->router->fetch_method();
    }

    public function index() {
        $data['active'] = 'StronaGlowna';
        //$this->breadcrumbs->push('Start', '/StronaGlowna');
        if(isset($this->user_data['is_admin']) and $this->user_data['is_admin']) redirect('admin/index');
        if(isset($this->user_data['is_firma']) and $this->user_data['is_firma']) redirect('firma/index/'.$this->user_data['id']);        
        if(isset($this->user_data['is_student']) and $this->user_data['is_student']) {redirect('Student/');} 
        $this->load->view('Base_header', $data);
        $this->load->view('StronaGlowna', $data);
        $this->load->view('Base_footer', $data);
    }
    
    public function loadDefaults(){
        $this->load->model('defs');
    }

}
