Some code modification done for po/make_po to work

This commit is contained in:
duergner 2003-07-23 08:08:25 +00:00
parent b99b8277ad
commit e105a02162
1 changed files with 152 additions and 135 deletions

View File

@ -80,149 +80,166 @@ function display_LoginPage($config_object,$profile)
setlanguage(); // setting correct language setlanguage(); // setting correct language
echo $_SESSION["header"] . " echo $_SESSION["header"];
<html> ?>
<head> <html>
<title> <head>
"; <title>LDAP Account Manager -Login-</title>
echo "LDAP Account Manager -Login-"; <link rel="stylesheet" type="text/css" href="../style/layout.css">
echo " </head>
</title> <body>
<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\"> <p align="center">
</head> <a href="http://lam.sf.net" target="_blank"><img src="../graphics/banner.jpg" border="1"></a>
<body> </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>
<td width="100%" align="right">
<a href="./config/conflogin.php" target="_self"><?php echo _("Configuration Login"); ?></a>
</td>
</tr>
</table>
<hr><br><br>
<p align="center">
<b><?php echo _("Enter Username and Password for Account:"); ?></b>
</p>
<?php
if($error_message != "") {
?>
<p align="center">
<?php
echo $error_message;
?>
</p>
<?php
}
?>
<form action="login.php" method="post">
<input type="hidden" name="action" value="checklogin">
<table width="500" align="center" border="0">
<tr> <tr>
<td width=\"100%\" align=\"right\"> <td width="45%" align="right">
<a href=\"./config/conflogin.php\" target=\"_self\">"; <?php
echo _("Configuration Login"); echo _("Username:");
echo " ?>
</a> </td>
<td width="10%">
</td>
<td width="45%" align="left">
<select name="username" size="1">
<?php
for($i = 0; $i < count($config_object->Admins); $i++) {
$text = explode(",", $config_object->Admins[$i]);
$text = explode("=", $text[0]);
?>
<option value="<?php echo $config_object->Admins[$i]; ?>"><?php echo $text[1]; ?></option>
<?php
}
?>
</select>
</td> </td>
</tr> </tr>
</table> <tr>
<hr><br><br> <td width="45%" align="right">
<p align=\"center\"><b>"; <?php
echo _("Enter Username and Password for Account:"); echo _("Password:");
echo " ?>
</b></p>"; </td>
if($error_message != "") <td width="10%">
{ </td>
echo "<p align=\"center\">"; <td width="45%" align="left">
echo $error_message; <input type="password" name="passwd">
echo "</p>"; </td>
</tr>
<tr>
<?php
if($message != "") {
?>
<td width="100%" colspan="3" align="center">
<?php
echo $message;
?>
<input type=\"hidden\" name=\"language\" value=\"english\">
</td>
<?php
} }
echo " else
<form action=\"login.php\" method=\"post\"> {
<input type=\"hidden\" name=\"action\" value=\"checklogin\"> ?>
<table width=\"500\" align=\"center\" border=\"0\"> <td width="45%" align="right">
<tr> <?php
<td width=\"45%\" align=\"right\">"; echo _("Your Language:");
echo _("Username:"); ?>
echo " </td>
</td> <td width="10%">
<td width=\"10%\"> </td>
</td> <td width="45%" align="left">
<td width=\"45%\" align=\"left\"> <select name="language" size="1">
<select name=\"username\" size=\"1\">"; <?php
for($i = 0; $i < count($config_object->Admins); $i++) for($i = 0; $i < count($languages); $i++) {
{ if($languages[$i]["default"] == "YES") {
$text = explode(",", $config_object->Admins[$i]); ?>
$text = explode("=", $text[0]); <option selected value="<?php echo $languages[$i]["link"] . ":" . $languages[$i]["descr"]; ?>"><?php echo $languages[$i]["descr"]; ?></option>
echo "<option value=\"" . $config_object->Admins[$i] . "\">" . $text[1] . "</option>"; <?php
}
echo "
</select>
</td>
</tr>
<tr>
<td width=\"45%\" align=\"right\">";
echo _("Password:");
echo "
</td>
<td width=\"10%\">
</td>
<td width=\"45%\" align=\"left\">
<input type=\"password\" name=\"passwd\">
</td>
</tr>
<tr>";
if($message != "")
{
echo " <td width=\"100%\" colspan=\"3\" align=\"center\">";
echo $message;
echo " <input type=\"hidden\" name=\"language\" value=\"english\">
</td>";
} }
else else
{ {
echo " <td width=\"45%\" align=\"right\">"; ?>
echo _("Your Language:"); <option value="<?php echo $languages[$i]["link"] . ":" . $languages[$i]["descr"]; ?>"><?php echo $languages[$i]["descr"]; ?></option>
echo " <?php
</td>
<td width=\"10%\">
</td>
<td width=\"45%\" align=\"left\">
<select name=\"language\" size=\"1\">";
for($i = 0; $i < count($languages); $i++)
{
if($languages[$i]["default"] == "YES")
{
echo "<option selected value=\"" . $languages[$i]["link"] . ":" . $languages[$i]["descr"] . "\">" . $languages[$i]["descr"] . "</option>";
}
else
{
echo "<option value=\"" . $languages[$i]["link"] . ":" . $languages[$i]["descr"] . "\">" . $languages[$i]["descr"] . "</option>";
}
}
echo " </select>
</td>";
} }
echo " }
</tr> ?>
<tr> </select>
<td width=\"100%\" colspan=\"3\" align=\"center\"> </td>
<input type=\"submit\" name=\"submit\" value=\""; <?php
echo _("Login") . "\">"; }
echo " ?>
</td> </tr>
</tr> <tr>
</table> <td width="100%" colspan="3" align="center">
<br><br> <input type="submit" name="submit" value="<?php echo _("Login"); ?>">
<table width=\"345\" align=\"center\" bgcolor=\"#C7E7C7\" border=\"0\"> </td>
<tr> </tr>
<td width=\"100%\" align=\"center\">"; </table>
echo _("You are connecting to ServerURL: "); <br><br>
echo " <b>"; <table width="345" align="center" bgcolor="#C7E7C7" border="0">
echo $config_object->get_ServerURL(); <tr>
echo " <td width="100%" align="center">
</b></td> <?php
</tr> echo _("You are connecting to ServerURL: ");
</table> ?>
</form> <b><?php echo $config_object->get_ServerURL(); ?></b>
<br><br> </td>
<form action=\"" . $PHP_SELF . "\" method=\"post\" enctype=\"plain/text\"> </tr>
<input type=\"hidden\" name=\"action\" value=\"profileChange\"> </table>
<p align=\"center\">"; </form>
echo _("You are currently using Profile: "); <br><br>
if(!$_POST['profile']) { <form action="./login.php" method="post" enctype="plain/text">
$_POST['profile'] = $profile; <input type="hidden" name="action" value="profileChange">
} <p align="center">
echo "<b>" . $_POST['profile'] . "</b>"; <?php
echo " echo _("You are currently using Profile: ");
<br><select name=\"profile\" size=\"1\">"; if(!$_POST['profile']) {
for($i=0;$i<count($profiles);$i++) { $_POST['profile'] = $profile;
echo " <option value=\"" . $profiles[$i] . "\">" . $profiles[$i] . "</option>"; }
} ?>
echo " </select> <b><?php echo $_POST['profile']; ?></b>
<input type=\"submit\" value=\""; <br>
echo _("Change Profile"); <select name="profile" size="1">
echo "\"> <?php
</p> for($i=0;$i<count($profiles);$i++) {
</form> ?>
</body> <option value="<?php echo $profiles[$i]; ?>"><?php echo $profiles[$i]; ?></option>
</html>"; <?php
}
?>
</select>
<input type="submit" value="<?php echo _("Change Profile"); ?>">
</p>
</form>
</body>
</html>
<?php
} }
// checking if the submitted username/password is correct. // checking if the submitted username/password is correct.