/** * (non-PHPdoc) * @see \tfc\mvc\interfaces\Action::run() */ public function run() { $ret = array(); $this->assignSystem(); $this->assignUrl(); $this->assignLanguage(); $req = Ap::getRequest(); $viw = Mvc::getView(); $mod = new Account(); if ($req->isPost()) { $loginName = $req->getTrim('login_name'); $password = $req->getTrim('password'); $rememberMe = (bool) $req->getInteger('remember_me'); $ret = $mod->login($loginName, $password, $rememberMe); } $httpReferer = PageHelper::getHttpReferer(); if ($httpReferer === '') { $httpReferer = 'administrator.php'; } $viw->assign('http_referer', $httpReferer); $viw->assign($ret); $tplName = $this->getDefaultTplName(); $viw->display($tplName); }
/** * (non-PHPdoc) * @see \tfc\mvc\interfaces\Action::run() */ public function run() { $mod = new Account(); $mod->logout(); $this->forward('login'); }