コード例 #1
0
 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")));
         }
     }
 }
コード例 #2
0
 /**
  * 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')));
 }
コード例 #3
0
 public function indexAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     header("Location: " . $this->view->url(General::mUrl("home")));
 }
コード例 #4
0
ファイル: General.php プロジェクト: clagomess/trashofweb
 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);
 }