diff --git a/lam/templates/login.php b/lam/templates/login.php index d836c863..c187e905 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -1,4 +1,4 @@ - + + + + "; + echo _("LDAP Account Manager -Login-"); + echo " + + + + +

+ + + + +
+ "; + echo _("Configuration Login"); + echo " + +
+


+

"; + echo _("Enter Username and Password for Account:"); + echo " +

"; + if($error_message != "") + { + echo "

"; + echo _($error_message); + echo "

"; + } + echo " +
+ + + + + + + + + + + + + "; + if($message != "") + { + echo " "; + } + else + { + echo " + + "; + } + echo " + + + + +
"; + echo _("Username:"); + echo " + + + +
"; + echo _("Password:"); + echo " + + + +
"; + echo _($message); + echo " + "; + echo _("Your Language:"); + echo " + + + +
+ "; + echo " +
+


+ + + + + + + + + + +
"; + echo _("You are connecting to the server specified below:"); + echo " +

+ ServerURL: "; + echo $config_object->get_ServerURL(); + echo " +
+
+ + "; +} + // checking if the submitted username/password is correct. if($action == "checklogin") { - include_once("../lib/ldap.php"); // Include ldap.php which provides Ldap class + include_once("../lib/ldap.inc"); // Include ldap.php which provides Ldap class $ldap = new Ldap($config); //$config); // Create new Ldap object $result = $ldap->connect($username,$passwd); // Connect to LDAP server for verifing username/password @@ -51,7 +212,6 @@ if($action == "checklogin") setlocale(LC_ALL, $language[0]); bindtextdomain("lam", "../locale"); textdomain("lam"); - include("./main.php"); // Load main frame session_register("ldap"); // Register $ldap object in session @@ -62,12 +222,12 @@ if($action == "checklogin") if($ldap->server) { $error_message = "Wrong Password/Username combination. Try again."; - include("./login.inc"); // Username/password invalid. Return to login page. + display_LoginPage($config); // Username/password invalid. Return to login page. } else { $error_message = "Cannot connect to specified LDAP-Server. Try again."; - include("./login.inc"); // Server not reachable. Return to login page. + display_LoginPage($config); // Username/password invalid. Return to login page. } } } @@ -76,10 +236,8 @@ else { session_register("config"); // Register $config object in session - include_once("../lib/ldap.php"); // Includ ldap.php which provides Ldap class - $config = new Config; // Create new Config object - include("./login.inc"); // Load login page + display_LoginPage($config); // Load Login page } ?>