public function indexAction() { $this->view->indexpage = true; if ($this->getRequest()->isPost()) { $auth = General::login(array('no_email' => $this->getRequest()->getParam('twa_email'), 'tx_senha' => $this->getRequest()->getParam('twa_senha'))); if ($auth) { header("Location: " . $this->view->url(General::mUrl("home"))); } else { $this->view->login_error = _("Login ou senha incorretos!"); } } if (General::isAuth()) { $goto = $this->getRequest()->getParam('goto'); $goto = urldecode($goto); if ($goto) { header("Location: {$goto}"); } else { header("Location: " . $this->view->url(General::mUrl("home"))); } } }
/** * Sair do sistema */ public function logoutAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); // por preucação unset($_SESSION['tw_auth']); session_destroy(); header("Location: " . $this->view->url(General::mUrl('index'))); }
public function indexAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); header("Location: " . $this->view->url(General::mUrl("home"))); }
public function url_post($param) { if (is_object($param)) { $nu_post = $param->nu_post; } else { $nu_post = $param['nu_post']; } return $this->url(General::mUrl("home/post/id/{$nu_post}"), null, true); }