Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     if (!$this->role || (!in_array('login', $this->role->name) || count($this->role->name) <= 1 && url::current() != 'auth')) {
         return url::redirect('auth');
     }
     if ($this->input->get('no_html')) {
         $this->template = 'template/no_html';
     }
     $this->template = new View($this->template);
     if ($this->user) {
         $this->template->menu = new View('template/menu');
         $this->template->menu->acces = array();
         if (isset($this->user->username)) {
             $this->template->username = $this->user->username;
         }
         if (isset($this->role->name)) {
             $this->template->menu->acces = $this->role->name;
         }
     }
     $this->template->titre = false;
     $this->template->button = false;
     $this->template->add_element_button = false;
     $this->template->add_sauv = false;
     $this->template->navigation = false;
     $this->template->navigationURL = false;
     $this->template->msg = $this->input->get('msg');
     if ($this->auto_render == true) {
         Event::add('system.post_controller', array($this, '_render'));
     }
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $this->template = new View('template/global');
     $this->template->css = FALSE;
     $this->template->script = FALSE;
     Event::add('system.post_controller', array($this, '_render'));
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     parent::login();
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
 }