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