public function execute() { $this->view->assign('title', $this->getTitle()); $this->view->assign('title_style', $this->getTitleStyle()); $this->view->setOptions(array('left_delimiter' => '{', 'right_delimiter' => '}')); if ($this->template === null) { if (waRequest::isMobile()) { $this->setLayout(null); $this->template = 'LoginMobile.html'; } else { $this->template = 'Login.html'; } $template_file = wa()->getDataPath('templates/' . $this->template, false, 'webasyst'); if (file_exists($template_file)) { $this->template = 'file:' . $template_file; } else { $this->template = wa()->getAppPath('templates/actions/login/', 'webasyst') . $this->template; } } $this->view->assign('login', waRequest::post('login', $this->getStorage()->read('auth_login'))); parent::execute(); if ($this->layout) { $this->layout->assign('error', $this->view->getVars('error')); } $ref = waRequest::server('HTTP_REFERER'); if (waRequest::get('back_to') && $ref) { $this->getStorage()->write('login_back_on_cancel', $ref); } else { if (!$ref) { $this->getStorage()->remove('login_back_on_cancel'); } } $this->view->assign('back_on_cancel', wa()->getStorage()->read('login_back_on_cancel')); }
public function execute() { $this->setLayout(new siteFrontendLayout()); $this->setThemeTemplate('login.html'); try { parent::execute(); } catch (waException $e) { if ($e->getCode() == 404) { $this->view->assign('error_code', $e->getCode()); $this->view->assign('error_message', $e->getMessage()); $this->setThemeTemplate('error.html'); } else { throw $e; } } }
public function execute() { $this->setLayout(new guestbook2FrontendLayout()); $this->setThemeTemplate('login.html'); parent::execute(); }