Some bugs corrected

This commit is contained in:
duergner 2003-05-18 18:59:02 +00:00
parent ae63cec198
commit 2762f0fdb3
1 changed files with 24 additions and 25 deletions

View File

@ -43,7 +43,6 @@ function display_LoginPage($config_object)
$_SESSION["language"] = $config_object->get_defaultLanguage();
// loading available languages from language.conf file
$languagefile = "../config/language.conf";
if(is_file($languagefile) == True)
{
@ -87,7 +86,7 @@ function display_LoginPage($config_object)
<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">
</head>
<body>
<p align=\"center\"><img src=\"../graphics/banner.jpg\" border=\"1\"></p>
<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\"><img src=\"../graphics/banner.jpg\" border=\"1\"></a></p>
<table width=\"100%\" border=\"0\">
<tr>
<td width=\"100%\" align=\"right\">
@ -99,7 +98,7 @@ function display_LoginPage($config_object)
</tr>
</table>
<hr><br><br>
<b><p align=\"center\">";
<p align=\"center\"><b>";
echo _("Enter Username and Password for Account:");
echo "
</b></p>";
@ -186,19 +185,11 @@ function display_LoginPage($config_object)
</tr>
</table>
<br><br><br>
<table width=\"310\" align=\"center\" bgcolor=\"#C7E7C7\" border=\"0\">
<table width=\"345\" align=\"center\" bgcolor=\"#C7E7C7\" border=\"0\">
<tr>
<td width=\"100%\" align=\"center\">";
echo _("You are connecting to the server specified below:");
echo "
</td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td width=\"100%\" align=\"center\">
ServerURL: <b>";
echo _("You are connecting to ServerURL: ");
echo " <b>";
echo $config_object->get_ServerURL();
echo "
</b></td>
@ -215,6 +206,13 @@ if($_POST['action'] == "checklogin")
include_once("../lib/ldap.inc"); // Include ldap.php which provides Ldap class
$ldap = new Ldap($_SESSION['config']); //$config); // Create new Ldap object
if($_POST['passwd'] == "")
{
$error_message = _("Empty Password submitted. Try again.");
display_LoginPage($_SESSION['config']); // Empty password submitted. Return to login page.
}
else
{
$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.
{
@ -237,6 +235,7 @@ if($_POST['action'] == "checklogin")
}
}
}
}
// Load login page
else
{