/** * Creates a small login-field * * @return string */ protected function actionLogin() { if ($this->objSession->isLoggedin() && $this->objSession->isAdmin()) { $this->loadPostLoginSite(); return; } //Save the requested URL if ($this->getParam("loginerror") == "") { //Store some of the last requests' data $this->objSession->setSession(self::SESSION_REFERER, getServer("QUERY_STRING")); $this->objSession->setSession(self::SESSION_PARAMS, getArrayPost()); } //Loading a small login-form $strTemplateID = $this->objTemplate->readTemplate("/elements.tpl", "login_form"); $arrTemplate = array(); $strForm = ""; $strForm .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($this->getArrModule("modul"), "adminLogin")); $strForm .= $this->objToolkit->formInputText("name", $this->getLang("login_loginUser", "user"), "", "input-large"); $strForm .= $this->objToolkit->formInputPassword("passwort", $this->getLang("login_loginPass", "user"), "", "input-large"); $strForm .= $this->objToolkit->formInputSubmit($this->getLang("login_loginButton", "user")); $strForm .= $this->objToolkit->formClose(); $arrTemplate["form"] = $strForm; $arrTemplate["loginTitle"] = $this->getLang("login_loginTitle", "user"); $arrTemplate["loginJsInfo"] = $this->getLang("login_loginJsInfo", "user"); $arrTemplate["loginCookiesInfo"] = $this->getLang("login_loginCookiesInfo", "user"); //An error occurred? if ($this->getParam("loginerror") == 1) { $arrTemplate["error"] = $this->getLang("login_loginError", "user"); } $strReturn = $this->objTemplate->fillTemplate($arrTemplate, $strTemplateID); return $strReturn; }
/** * Internal helper, loads and merges all params passed with the current request. * * @static * @return void */ private static function initParamsArray() { if (self::$arrParams === null) { self::$arrParams = array_merge(getArrayGet(), getArrayPost(), getArrayFiles()); } }