public function entrar() { $obj = new LoginHelper(); $dados = array('TITLE' => TITLE . ' - Painel de Login', 'DESCRIPTION' => 'Painel de Login para acessar a área restrita do sistema'); if ($obj->isLogged()) { header('Location: ' . PROJECT_DIR . 'Admin'); } else { $this->view('Painel/Entrar', false)->show($dados); } }
protected function isLogged() { parent::setUrl(); parent::setExplode(); parent::setController(); $module = parent::getModule(); if ($module == "admin") { $obj = new LoginHelper(); if ($obj->isLogged()) { if ($this->tp->exists('S_USERNAME')) { $this->tp->S_USERNAME = $_SESSION['usuario_nome']; } if ($this->tp->exists('S_EMAIL')) { $this->tp->S_EMAIL = $_SESSION['usuario_email']; } if ($this->tp->exists('S_LOGIN')) { $this->tp->S_LOGIN = $_SESSION['usuario_login']; } } else { throw new Exception_Login(); } } }