fixed HTML errors

This commit is contained in:
Roland Gruber 2004-02-08 12:28:16 +00:00
parent fb128406d6
commit fb2268d53e
1 changed files with 15 additions and 25 deletions

View File

@ -129,20 +129,8 @@ function display_LoginPage($config_object,$profile)
<?php <?php
} }
?> ?>
<?php
if($error_message != "") {
?>
<p align="center">
<?php
echo $error_message;
?>
</p>
<?php
}
?>
<table width="650" align="center" border="2" rules="none" bgcolor="white">
<form action="login.php" method="post"> <form action="login.php" method="post">
<input type="hidden" name="action" value="checklogin"> <table width="650" align="center" border="2" rules="none" bgcolor="white">
<tr> <tr>
<td width="70" rowspan="9"> <td width="70" rowspan="9">
<img src="../graphics/lam.png" alt="Logo"> <img src="../graphics/lam.png" alt="Logo">
@ -193,7 +181,6 @@ function display_LoginPage($config_object,$profile)
<?php <?php
echo $message; echo $message;
?> ?>
<input type="hidden" name="language" value="english">
</td> </td>
<?php <?php
} }
@ -230,11 +217,17 @@ function display_LoginPage($config_object,$profile)
</tr> </tr>
<tr> <tr>
<td height="50" colspan="2" align="center"> <td height="50" colspan="2" align="center">
<input type="submit" name="submit" value="<?php echo _("Login"); ?>"> <input name="checklogin" type="submit" value="<?php echo _("Login"); ?>">
</td> </td>
</tr> </tr>
<tr> <tr>
<td height="50" colspan="2"></td> <td height="50" colspan="2" align="center">
<?php
if($error_message != "") {
echo "<font color=\"red\"><b>" . $error_message . "</b></font>";
}
?>
</td>
</tr> </tr>
<tr> <tr>
<td height="30" colspan="2"><b> <td height="30" colspan="2"><b>
@ -244,9 +237,6 @@ function display_LoginPage($config_object,$profile)
<?php echo $config_object->get_ServerURL(); ?> <?php echo $config_object->get_ServerURL(); ?>
</td> </td>
</tr> </tr>
</form>
<form action="./login.php" method="post" enctype="plain/text">
<input type="hidden" name="action" value="profileChange">
<tr> <tr>
<td height="30"><b> <td height="30"><b>
<?php <?php
@ -267,14 +257,14 @@ function display_LoginPage($config_object,$profile)
} }
?> ?>
</select> </select>
<input type="submit" value="<?php echo _("Change Profile"); ?>"> <input name="profileChange" type="submit" value="<?php echo _("Change Profile"); ?>">
</td> </td>
</tr> </tr>
<tr> <tr>
<td height="10" colspan="2"></td> <td height="10" colspan="2"></td>
</tr> </tr>
</form>
</table> </table>
</form>
<br><br> <br><br>
</body> </body>
</html> </html>
@ -282,7 +272,7 @@ function display_LoginPage($config_object,$profile)
} }
// checking if the submitted username/password is correct. // checking if the submitted username/password is correct.
if($_POST['action'] == "checklogin") if($_POST['checklogin'])
{ {
$_SESSION['lampath'] = realpath('../') . "/"; // Save full path to lam in session $_SESSION['lampath'] = realpath('../') . "/"; // Save full path to lam in session
@ -338,7 +328,7 @@ if($_POST['action'] == "checklogin")
} }
} }
// Reload loginpage after a profile change // Reload loginpage after a profile change
elseif($_POST['action'] == "profileChange") { elseif($_POST['profileChange']) {
$_SESSION['config'] = new Config($_POST['profile']); // Recreate the config object with the submited $_SESSION['config'] = new Config($_POST['profile']); // Recreate the config object with the submited
display_LoginPage($_SESSION['config'],""); // Load login page display_LoginPage($_SESSION['config'],""); // Load login page