Some last errors corrected; added to session; calling setlanguage()
This commit is contained in:
parent
80e8cdc479
commit
6c1af3c28a
|
@ -61,8 +61,10 @@ function display_LoginPage($config_object)
|
||||||
$message = _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site.");
|
$message = _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site.");
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
setlanguage(); // setting correct language
|
||||||
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
|
||||||
|
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
|
@ -92,7 +94,7 @@ function display_LoginPage($config_object)
|
||||||
if($error_message != "")
|
if($error_message != "")
|
||||||
{
|
{
|
||||||
echo "<p align=\"center\">";
|
echo "<p align=\"center\">";
|
||||||
echo _($error_message);
|
echo $error_message;
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
|
@ -133,7 +135,7 @@ function display_LoginPage($config_object)
|
||||||
if($message != "")
|
if($message != "")
|
||||||
{
|
{
|
||||||
echo " <td width=\"100%\" colspan=\"3\" align=\"center\">";
|
echo " <td width=\"100%\" colspan=\"3\" align=\"center\">";
|
||||||
echo _($message);
|
echo $message;
|
||||||
echo " <input type=\"hidden\" name=\"language\" value=\"english\">
|
echo " <input type=\"hidden\" name=\"language\" value=\"english\">
|
||||||
</td>";
|
</td>";
|
||||||
}
|
}
|
||||||
|
@ -197,16 +199,11 @@ if($_POST['action'] == "checklogin")
|
||||||
$result = $ldap->connect($_POST['username'],$_POST['passwd']); // Connect to LDAP server for verifing username/password
|
$result = $ldap->connect($_POST['username'],$_POST['passwd']); // Connect to LDAP server for verifing username/password
|
||||||
if($result == True) // Username/password correct. Do some configuration and load main frame.
|
if($result == True) // Username/password correct. Do some configuration and load main frame.
|
||||||
{
|
{
|
||||||
// setting language
|
session_register('language'); // store selected language in session
|
||||||
$language = explode(":", $language);
|
|
||||||
putenv("LANG=" . $language[1]);
|
|
||||||
setlocale(LC_ALL, $language[0]);
|
|
||||||
bindtextdomain("lam", "../locale");
|
|
||||||
textdomain("lam");
|
|
||||||
include("./main.php"); // Load main frame
|
|
||||||
|
|
||||||
session_register("ldap"); // Register $ldap object in session
|
session_register("ldap"); // Register $ldap object in session
|
||||||
session_register("language"); // Register $language in session
|
session_register("language"); // Register $language in session
|
||||||
|
|
||||||
|
include("./main.php"); // Load main frame
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue