public function render()
{
$sActionUrl = \Flake\Util\Tools::getCurrentUrl();
$sSubmittedFlagName = "auth";
$sMessage = "";
if (self::isSubmitted() && !\BaikalAdmin\Core\Auth::isAuthenticated()) {
$sMessage = \Formal\Core\Message::error("The login/password you provided is invalid. Please retry.", "Authentication error");
} elseif (self::justLoggedOut()) {
$sMessage = \Formal\Core\Message::notice("You have been disconnected from your session.", "Session ended", FALSE);
}
$sLogin = htmlspecialchars(\Flake\Util\Tools::POST("login"));
$sPassword = htmlspecialchars(\Flake\Util\Tools::POST("password"));
if (trim($sLogin) === "") {
$sLogin = "******";
}
$oView = new \BaikalAdmin\View\Login();
$oView->setData("message", $sMessage);
$oView->setData("actionurl", $sActionUrl);
$oView->setData("submittedflagname", $sSubmittedFlagName);
$oView->setData("login", $sLogin);
$oView->setData("password", $sPassword);
return $oView->render();
}