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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }