public function __construct($parent)
 {
     parent::__construct($parent);
     $this->middleware('Auth');
     $this->middleware('Active');
     $this->loadHelper('User');
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     if (!Login::verificaLogin()) {
         $this->redir("Login/index");
     }
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
     $this->middleware('Auth');
     $this->middleware('Admin');
     $load = new Database();
     $this->db = $load->conn();
 }
Esempio n. 4
0
 protected function before()
 {
     parent::before();
     $userId = Session::get('userId');
     if ($userId) {
         $this->user = new Model_User();
         $this->user->get($userId);
     }
 }
Esempio n. 5
0
 /**
  * Verifica se usuários esta logado antes de executar operação
  */
 public function __construct()
 {
     parent::__construct();
     if (!Login::verificaLogin()) {
         $this->redir('Login/index');
     } else {
         $this->model = new ModelEmpresas();
     }
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
     if (file_exists(APP_PATH . 'install/lock')) {
         exit('App is Installed.');
     }
     $load = new Database();
     $this->db = $load->conn();
 }
Esempio n. 7
0
 /**
  * Método construtor verifica se usuário
  * esta logado caso esteja instancia objeto
  * de conexão com banco de dados
  */
 public function __construct()
 {
     parent::__construct();
     if (!Login::verificaLogin()) {
         $this->redir("Login/index");
     } else {
         $this->model = new ModelFeedback();
     }
 }
Esempio n. 8
0
 public function display()
 {
     /**
      * É passado um array associativo como parametro
      * para ser usado na View
      * 
      * Neste exemplo foi criado uma chave dados que tem como valor
      * o retorno de uma consulta ao banco de dados
      */
     //$data = ['dados' => $this->getModel()->select(['autor_nome'])];
     /**
      * Aqui é selecionado o View, atribuido o nome do arquivo que está
      * no diretorios de Views que representa essa página e por ultimo é
      * setado o $data para ser usado dentro da página home (view).
      */
     //$this->getView()->setContent('home')->setData($data);
     $this->getView()->setContent('home');
     parent::display();
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
     $this->middleware('Auth');
     $this->middleware('Active');
     $this->loadHelper('User');
     $this->user_path = APP_PATH . 'contents/users/ledger/' . auth('id') . '/';
     $this->current_name = date('Y') . '.bl';
     $this->current_month = date('m');
     if (!file_exists($this->user_path)) {
         mkdir($this->user_path, 0755, true);
     }
     if (!file_exists($this->user_path . 'install.lock')) {
         redirect('home/ledger/install');
     }
     if (!file_exists($this->user_path . $this->current_name)) {
         file_put_contents($this->user_path . $this->current_name, json_encode(['lists' => null]));
     }
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
     $this->user = new User();
 }
Esempio n. 12
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('NewsModel');
 }
Esempio n. 13
0
 public function __construct()
 {
     parent::__construct();
 }
 public function __construct($parent)
 {
     parent::__construct($parent);
     $this->middleware('Auth');
     $this->middleware('Admin');
 }