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