Ejemplo n.º 1
0
function GetLoginFailedPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loginfailed.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    // print the output
    return $tpl->get();
}
Ejemplo n.º 2
0
function GetNotAPowerUserPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_a_power_user.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    // print the output
    return $tpl->get();
}
Ejemplo n.º 3
0
function GetLoggedOutPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loggedout.tpl.html", true, true);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    // return the output
    return $tpl->get();
}
Ejemplo n.º 4
0
function GetNotAllowedPage($reason)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_allowed.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->SetVariable("REASON", $reason);
    // print the output
    return $tpl->get();
}
Ejemplo n.º 5
0
function GetLoginSuccessfulPage($originPage)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loginsuccessful.tpl.html", true, true);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->setVariable("USERNAME", GetLoggedUserName());
    $tpl->setVariable("ORIGIN_PAGE", $originPage);
    // print the output
    return $tpl->get();
}
Ejemplo n.º 6
0
function GetNoAccessToProjectPage($projectId)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("no_access_to_project.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $projectInfos = GetProjectInfos($projectId);
    $tpl->setVariable("PROJECT_NAME", $projectInfos["Name"]);
    // print the output
    return $tpl->get();
}
Ejemplo n.º 7
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();
}