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 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 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(); }
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(); }
} StartAccessToDB(); $tpl = new HTML_Template_IT("./"); $tpl->loadTemplatefile("browse.tpl.html", true, true); SetCommonLoginStatus($tpl); SetCommonFooter($tpl); $projectInfos = GetProjectInfos($_GET["Id"]); if (!is_array($projectInfos)) { if ($projectInfos == "") { die("Project " . $_GET["Id"] . " does not exist in the database."); } else { die($projectInfos); } exit; } SetCommonToolbar($tpl, array("ProjectId" => $projectInfos["Id"])); SetLastChanged($tpl, $projectInfos["userId"], $projectInfos["LastChange"]); $tpl->setVariable("PROJECT_ID", $projectInfos["Id"]); $tpl->setVariable("PROJECT_NAME", $projectInfos["Name"]); $tpl->setVariable("PROJECT_DESCRIPTION", EncodeString($projectInfos["Description"])); // --------------------------------------------------------------- // Decide to display units or types // --------------------------------------------------------------- if (array_key_exists("types", $_GET) && $_GET["types"] == 1) { $limits = ProcessPagesLists(GetTypesInProjectCount($_GET["Id"]), $tpl, $projectInfos["Id"]); $projectTypes = GetTypesInProject($_GET["Id"], $limits[0], $limits[1]); if (!is_array($projectTypes)) { if ($projectTypes == "") { die("Project " . $_GET["Id"] . " does not exist in the database."); } else { die($projectTypes);