require("../SiteTranslatorAdmin.php"); $translator = new SiteTranslatorAdmin(); $blnShowForm = true; if ($_POST["submit"]) { if ($translator->login($_POST["username"], $_POST["password"])) { $blnShowForm = false; //redirect to the specified page. if ($_POST["redir"]) header("Location: ".$_POST["redir"]); else header("Location: index.php"); } else $strAdditionalInfo = "Login failed - go away."; } if ($blnShowForm) { ?>