示例#1
0
function GetAskLoginPage()
{
    global $lastLoginResult;
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("ask_login.tpl.html", true, true);
    $msg = "";
    if ($lastLoginResult != LLR_NOT_LOGGED_IN) {
        $msg = LastLoginResultMessage();
    }
    $tpl->setVariable("MESSAGE", $msg);
    // print the output
    return $tpl->get();
}
示例#2
0
    Logout();
}
// get the page to which we should return to, or default to index.php
if (array_key_exists("returnTo", $_GET)) {
    $returnTo = $_GET["returnTo"];
} else {
    $returnTo = "index.php";
}
// force the check of the currently checked user
GetLoggedUserName();
if ($lastLoginResult == LLR_LOGGED_IN) {
    print GetLoginSuccessfulPage($returnTo);
} elseif ($lastLoginResult == LLR_INVALID_LOGIN) {
    print GetLoginFailedPage();
} elseif ($lastLoginResult == LLR_NOW_LOGGED_OUT) {
    print GetLoggedOutPage();
} else {
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("login.tpl.html", true, true);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->setVariable("RETURN_TO", urlencode($returnTo));
    $msg = "";
    if ($lastLoginResult != LLR_NOT_LOGGED_IN) {
        $msg = LastLoginResultMessage();
    }
    $tpl->setVariable("MESSAGE", $msg);
    // print the output
    $tpl->show();
}