parent
9d1f815c6e
commit
88152ba4ed
|
@ -90,6 +90,9 @@ class lamList {
|
||||||
|
|
||||||
/** configuration options */
|
/** configuration options */
|
||||||
private $configOptions;
|
private $configOptions;
|
||||||
|
|
||||||
|
/** tabindex for GUI elements */
|
||||||
|
protected $tabindex = 1;
|
||||||
|
|
||||||
/** ID for list size config option */
|
/** ID for list size config option */
|
||||||
const LIST_SIZE_OPTION_NAME = "L_SIZE";
|
const LIST_SIZE_OPTION_NAME = "L_SIZE";
|
||||||
|
@ -144,6 +147,7 @@ class lamList {
|
||||||
* Prints the HTML code to display the list view.
|
* Prints the HTML code to display the list view.
|
||||||
*/
|
*/
|
||||||
public function showPage() {
|
public function showPage() {
|
||||||
|
$this->tabindex = 1;
|
||||||
// do POST actions
|
// do POST actions
|
||||||
$postFragment = $this->listDoPost();
|
$postFragment = $this->listDoPost();
|
||||||
// get some parameters
|
// get some parameters
|
||||||
|
@ -396,8 +400,7 @@ class lamList {
|
||||||
else {
|
else {
|
||||||
$classes = ' ' . $this->type . 'list-dark';
|
$classes = ' ' . $this->type . 'list-dark';
|
||||||
}
|
}
|
||||||
echo("<tr class=\"$classes\" onMouseOver=\"list_over(this)\"\n" .
|
echo("<tr class=\"$classes\"" .
|
||||||
" onMouseOut=\"list_out(this)\"\n" .
|
|
||||||
" onClick=\"list_click('" . $rowID . "')\"\n" .
|
" onClick=\"list_click('" . $rowID . "')\"\n" .
|
||||||
" onDblClick=\"top.location.href='../account/edit.php?type=" . $this->type . "&DN=" . rawurlencode($info[$i]['dn']) . "'\">\n");
|
" onDblClick=\"top.location.href='../account/edit.php?type=" . $this->type . "&DN=" . rawurlencode($info[$i]['dn']) . "'\">\n");
|
||||||
echo " <td align=\"center\"><input class=\"accountBoxUnchecked\" onClick=\"list_click('" . $rowID . "')\"" .
|
echo " <td align=\"center\"><input class=\"accountBoxUnchecked\" onClick=\"list_click('" . $rowID . "')\"" .
|
||||||
|
@ -659,8 +662,7 @@ class lamList {
|
||||||
$buttonContainer->addElement(new htmlButton('createPDFCancel', _('Cancel')));
|
$buttonContainer->addElement(new htmlButton('createPDFCancel', _('Cancel')));
|
||||||
$container->addElement($buttonContainer);
|
$container->addElement($buttonContainer);
|
||||||
|
|
||||||
$tabindex = 1;
|
parseHtml(null, $container, array(), false, $this->tabindex, $this->type);
|
||||||
parseHtml(null, $container, array(), false, $tabindex, $this->type);
|
|
||||||
|
|
||||||
$this->listPrintFooter();
|
$this->listPrintFooter();
|
||||||
}
|
}
|
||||||
|
@ -670,14 +672,19 @@ class lamList {
|
||||||
*/
|
*/
|
||||||
protected function listShowOUSelection() {
|
protected function listShowOUSelection() {
|
||||||
if (sizeof($this->possibleSuffixes) > 1) {
|
if (sizeof($this->possibleSuffixes) > 1) {
|
||||||
echo ("<select title=\"" . _("Suffix") . "\" class=\"" . $this->type . " rightToLeftText\" size=1 name=\"suffix\" onchange=\"listOUchanged('" . $this->type . "', this)\">\n");
|
$group = new htmlGroup();
|
||||||
|
$suffixList = array();
|
||||||
for ($i = 0; $i < sizeof($this->possibleSuffixes); $i++) {
|
for ($i = 0; $i < sizeof($this->possibleSuffixes); $i++) {
|
||||||
if ($this->suffix == $this->possibleSuffixes[$i]) {
|
$suffixList[getAbstractDN($this->possibleSuffixes[$i])] = $this->possibleSuffixes[$i];
|
||||||
echo ("<option value=\"" . $this->possibleSuffixes[$i] . "\" selected>" . getAbstractDN($this->possibleSuffixes[$i]) . "</option>\n");
|
|
||||||
}
|
|
||||||
else echo("<option value=\"" . $this->possibleSuffixes[$i] . "\">" . getAbstractDN($this->possibleSuffixes[$i]) . "</option>\n");
|
|
||||||
}
|
}
|
||||||
echo ("</select> \n");
|
$suffixSelect = new htmlSelect('suffix', $suffixList, array($this->suffix));
|
||||||
|
$suffixSelect->setOnchangeEvent("listOUchanged('" . $this->type . "', this)");
|
||||||
|
$suffixSelect->setRightToLeftTextDirection(true);
|
||||||
|
$suffixSelect->setSortElements(false);
|
||||||
|
$suffixSelect->setHasDescriptiveElements(true);
|
||||||
|
$group->addElement($suffixSelect);
|
||||||
|
$group->addElement(new htmlSpacer('5px', null));
|
||||||
|
parseHtml(null, $group, array(), true, $this->tabindex, $this->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -921,14 +928,13 @@ class lamList {
|
||||||
echo "<form id=\"settingsDialogForm\" action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n";
|
echo "<form id=\"settingsDialogForm\" action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n";
|
||||||
echo '<table width="100%"><tr><td>';
|
echo '<table width="100%"><tr><td>';
|
||||||
|
|
||||||
$tabindex = 1;
|
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlTable();
|
||||||
for ($i = 0; $i < sizeof($this->configOptions); $i++) {
|
for ($i = 0; $i < sizeof($this->configOptions); $i++) {
|
||||||
$configContainer->mergeTableElements($this->configOptions[$i]->getMetaHTML());
|
$configContainer->mergeTableElements($this->configOptions[$i]->getMetaHTML());
|
||||||
}
|
}
|
||||||
$configContainer->addElement(new htmlHiddenInput('saveConfigOptions', 'ok'));
|
$configContainer->addElement(new htmlHiddenInput('saveConfigOptions', 'ok'));
|
||||||
|
|
||||||
parseHtml('', $configContainer, array(), false, $tabindex, $this->type);
|
parseHtml('', $configContainer, array(), false, $this->tabindex, $this->type);
|
||||||
|
|
||||||
echo "</td></tr></table>\n";
|
echo "</td></tr></table>\n";
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
|
@ -899,6 +899,7 @@ class accountContainer {
|
||||||
* @param boolean $stopProcessing true if page should end after displaying the messages
|
* @param boolean $stopProcessing true if page should end after displaying the messages
|
||||||
*/
|
*/
|
||||||
private function printModuleContent($result, $stopProcessing) {
|
private function printModuleContent($result, $stopProcessing) {
|
||||||
|
$tabindex = 1;
|
||||||
$this->printPageHeader();
|
$this->printPageHeader();
|
||||||
$this->printPasswordPromt();
|
$this->printPasswordPromt();
|
||||||
// display error messages
|
// display error messages
|
||||||
|
@ -915,7 +916,7 @@ class accountContainer {
|
||||||
echo "<table class=\"".$this->type."list-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
|
echo "<table class=\"".$this->type."list-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
|
||||||
if (checkIfWriteAccessIsAllowed()) {
|
if (checkIfWriteAccessIsAllowed()) {
|
||||||
echo "<tr class=\"".$this->type."list-bright\"><td style=\"padding: 15px 15px 0px 15px;\">\n";
|
echo "<tr class=\"".$this->type."list-bright\"><td style=\"padding: 15px 15px 0px 15px;\">\n";
|
||||||
$this->printCommonControls();
|
$this->printCommonControls($tabindex);
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
}
|
}
|
||||||
echo "<tr class=\"".$this->type."list-bright\" valign=\"top\"><td style=\"padding: 15px;\">";
|
echo "<tr class=\"".$this->type."list-bright\" valign=\"top\"><td style=\"padding: 15px;\">";
|
||||||
|
@ -926,35 +927,28 @@ class accountContainer {
|
||||||
echo $this->titleBarTitle;
|
echo $this->titleBarTitle;
|
||||||
echo '</div></td>';
|
echo '</div></td>';
|
||||||
echo '<td align="right">';
|
echo '<td align="right">';
|
||||||
echo _('Suffix');
|
$group = new htmlGroup();
|
||||||
echo " <select class=\"rightToLeftText\" name=\"accountContainerSuffix\" size=1>\n";
|
// suffix
|
||||||
// loop through all suffixes
|
$group->addElement(new htmlOutputText(_('Suffix')));
|
||||||
$rootsuffix = $_SESSION['config']->get_Suffix($this->type);
|
$suffixList = array();
|
||||||
foreach ($this->getOUs() as $suffix) {
|
foreach ($this->getOUs() as $suffix) {
|
||||||
echo '<option value="' . $suffix . '" ';
|
$suffixList[getAbstractDN($suffix)] = $suffix;
|
||||||
if ($this->dnSuffix == $suffix) {
|
}
|
||||||
echo 'selected';
|
if (!($this->dnSuffix == '') && !in_array($this->dnSuffix, $this->getOUs())) {
|
||||||
}
|
$suffixList[getAbstractDN($this->dnSuffix)] = $this->dnSuffix;
|
||||||
echo ">" . getAbstractDN($suffix) . "</option>\n";
|
}
|
||||||
}
|
$selectedSuffix = array($this->dnSuffix);
|
||||||
if (!($this->dnSuffix == '') && !in_array($this->dnSuffix, $this->getOUs())) {
|
$suffixSelect = new htmlSelect('accountContainerSuffix', $suffixList, $selectedSuffix);
|
||||||
echo '<option value="' . $this->dnSuffix . '" selected>' . getAbstractDN($this->dnSuffix) . "</option>\n";;
|
$suffixSelect->setHasDescriptiveElements(true);
|
||||||
}
|
$suffixSelect->setRightToLeftTextDirection(true);
|
||||||
echo "</select>\n";
|
$group->addElement($suffixSelect);
|
||||||
echo ' ';
|
$group->addElement(new htmlSpacer('10px', null));
|
||||||
// RDN selection
|
// RDN selection
|
||||||
|
$group->addElement(new htmlOutputText(_('RDN identifier')));
|
||||||
$rdnlist = getRDNAttributes($this->type);
|
$rdnlist = getRDNAttributes($this->type);
|
||||||
echo _('RDN identifier');
|
$group->addElement(new htmlSelect('accountContainerRDN', $rdnlist, array($this->rdn)));
|
||||||
echo " <select name=\"accountContainerRDN\" size=1>\n";
|
$group->addElement(new htmlHelpLink('301'));
|
||||||
for ($i = 0; $i < sizeof($rdnlist); $i++) {
|
parseHtml(null, $group, array(), true, $tabindex, $this->type);
|
||||||
echo "<option ";
|
|
||||||
if ($this->rdn === $rdnlist[$i]) {
|
|
||||||
echo 'selected';
|
|
||||||
}
|
|
||||||
echo ">" . $rdnlist[$i] . "</option>\n";
|
|
||||||
}
|
|
||||||
echo "</select>\n";
|
|
||||||
printHelpLink(getHelp('', '301'), '301');
|
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr></table>';
|
echo '</tr></table>';
|
||||||
if ($this->titleBarSubtitle != null) {
|
if ($this->titleBarSubtitle != null) {
|
||||||
|
@ -1129,64 +1123,51 @@ class accountContainer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints common controls like the save button and the ou selection.
|
* Prints common controls like the save button and the ou selection.
|
||||||
|
*
|
||||||
|
* @param int $tabindex tabindex for GUI elements
|
||||||
*/
|
*/
|
||||||
private function printCommonControls() {
|
private function printCommonControls(&$tabindex) {
|
||||||
echo "<table style=\"border-width:0px;\" width=\"100%\"><tr>";
|
$table = new htmlTable('100%');
|
||||||
echo "<td align=\"left\">";
|
$leftButtonGroup = new htmlGroup();
|
||||||
|
$leftButtonGroup->alignment = htmlElement::ALIGN_LEFT;
|
||||||
// save button
|
// save button
|
||||||
echo "<button id=\"modSaveButton\" name=\"accountContainerSaveAccount\">" . _('Save') . "</button> \n";
|
$saveButton = new htmlButton('accountContainerSaveAccount', _('Save'));
|
||||||
|
$saveButton->setIconClass('saveButton');
|
||||||
|
$leftButtonGroup->addElement($saveButton);
|
||||||
|
$leftButtonGroup->addElement(new htmlSpacer('1px', null));
|
||||||
// reset button
|
// reset button
|
||||||
if ($this->dn_orig!='') {
|
$resetButton = new htmlButton('accountContainerReset', _('Reset changes'));
|
||||||
echo "<button id=\"modResetButton\" name=\"accountContainerReset\">" . _('Reset changes') . "</button>\n";
|
$resetButton->setIconClass('undoButton');
|
||||||
}
|
$leftButtonGroup->addElement($resetButton);
|
||||||
|
// set password button
|
||||||
if ($this->showSetPasswordButton()) {
|
if ($this->showSetPasswordButton()) {
|
||||||
echo " ";
|
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
||||||
echo '<button type="button" onclick="passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
|
$passwordButton = new htmlButton('accountContainerPassword', _('Set password'));
|
||||||
. _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange\');" id="modPasswordButton">' . _('Set password') . "</button> \n";
|
$passwordButton->setIconClass('passwordButton');
|
||||||
|
$passwordButton->setOnClick('passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
|
||||||
|
. _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange\');');
|
||||||
|
$leftButtonGroup->addElement($passwordButton);
|
||||||
}
|
}
|
||||||
echo "</td>";
|
$table->addElement($leftButtonGroup);
|
||||||
echo "<td align=\"right\">";
|
|
||||||
|
$rightGroup = new htmlGroup();
|
||||||
|
$rightGroup->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
// profile selection
|
// profile selection
|
||||||
$profilelist = getAccountProfiles($this->type);
|
$profilelist = getAccountProfiles($this->type);
|
||||||
if (sizeof($profilelist) > 0) {
|
if (sizeof($profilelist) > 0) {
|
||||||
sort($profilelist);
|
$rightGroup->addElement(new htmlSelect('accountContainerSelectLoadProfile', $profilelist, array($this->lastLoadedProfile)));
|
||||||
echo "<select name=\"accountContainerSelectLoadProfile\" size=1>\n";
|
$profileButton = new htmlButton('accountContainerLoadProfile', _('Load profile'));
|
||||||
for ($i = 0; $i < sizeof($profilelist); $i++) {
|
$profileButton->setIconClass('loadProfileButton');
|
||||||
$selected = '';
|
$rightGroup->addElement($profileButton);
|
||||||
if ($profilelist[$i] === $this->lastLoadedProfile) {
|
$rightGroup->addElement(new htmlSpacer('1px', null));
|
||||||
$selected = 'selected';
|
$rightGroup->addElement(new htmlHelpLink('401'));
|
||||||
}
|
|
||||||
echo "<option $selected>" . $profilelist[$i] . "</option>\n";
|
|
||||||
}
|
|
||||||
echo "</select> \n";
|
|
||||||
echo "<button id=\"modLoadProfileButton\" name=\"accountContainerLoadProfile\">" . _('Load profile') . "</button> \n";
|
|
||||||
printHelpLink(getHelp('', '401'), '401');
|
|
||||||
}
|
}
|
||||||
echo "</td>";
|
$table->addElement($rightGroup);
|
||||||
echo "</tr></table>";
|
|
||||||
|
parseHtml(null, $table, array(), false, $tabindex, $this->type);
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery('#modSaveButton').button({
|
|
||||||
icons: {
|
|
||||||
primary: 'saveButton'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
jQuery('#modResetButton').button({
|
|
||||||
icons: {
|
|
||||||
primary: 'undoButton'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
jQuery('#modPasswordButton').button({
|
|
||||||
icons: {
|
|
||||||
primary: 'passwordButton'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
jQuery('#modLoadProfileButton').button({
|
|
||||||
icons: {
|
|
||||||
primary: 'loadProfileButton'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var maxHeight = 0;
|
var maxHeight = 0;
|
||||||
jQuery('.lamEqualHeightTabContent').each(function() {
|
jQuery('.lamEqualHeightTabContent').each(function() {
|
||||||
if (jQuery(this).height() > maxHeight) {
|
if (jQuery(this).height() > maxHeight) {
|
||||||
|
@ -1945,7 +1926,6 @@ class accountContainer {
|
||||||
if ($this->cachedOUs != null) {
|
if ($this->cachedOUs != null) {
|
||||||
return $this->cachedOUs;
|
return $this->cachedOUs;
|
||||||
}
|
}
|
||||||
$rootsuffix = $_SESSION['config']->get_Suffix($this->type);
|
|
||||||
$typeObj = new $this->type();
|
$typeObj = new $this->type();
|
||||||
$this->cachedOUs = $typeObj->getSuffixList();
|
$this->cachedOUs = $typeObj->getSuffixList();
|
||||||
return $this->cachedOUs;
|
return $this->cachedOUs;
|
||||||
|
|
|
@ -116,12 +116,6 @@ table.lamHeader {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.highlight {
|
|
||||||
border-color: red;
|
|
||||||
border-style: dotted;
|
|
||||||
border-width: 1px 0px 1px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rightToLeftText {
|
.rightToLeftText {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,24 +21,6 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to highlight the row under the mouse cursor.
|
|
||||||
*
|
|
||||||
* @param list table row
|
|
||||||
*/
|
|
||||||
function list_over(list) {
|
|
||||||
jQuery(list).addClass('highlight');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to unhighlight a row if the mouse cursor leaves it.
|
|
||||||
*
|
|
||||||
* @param list table row
|
|
||||||
*/
|
|
||||||
function list_out(list) {
|
|
||||||
jQuery(list).removeClass('highlight');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when user clicks on a table row. This toggles the checkbox in the row.
|
* Called when user clicks on a table row. This toggles the checkbox in the row.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Michael Duergner
|
Copyright (C) 2003 - 2006 Michael Duergner
|
||||||
2005 - 2011 Roland Gruber
|
2005 - 2012 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -198,6 +198,21 @@ function display_LoginPage($config_object) {
|
||||||
echo "</script>\n";
|
echo "</script>\n";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
var equalWidthElements = new Array('#username', '#password', '#language');
|
||||||
|
var maxWidth = 0;
|
||||||
|
for (var i = 0; i < equalWidthElements.length; ++i) {
|
||||||
|
if (jQuery(equalWidthElements[i]).width() > maxWidth) {
|
||||||
|
maxWidth = jQuery(equalWidthElements[i]).width();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
for (var i = 0; i < equalWidthElements.length; ++i) {
|
||||||
|
jQuery(equalWidthElements[i]).css({'width': maxWidth});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<table border=0 width="100%" class="lamHeader ui-corner-all">
|
<table border=0 width="100%" class="lamHeader ui-corner-all">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" height="30">
|
<td align="left" height="30">
|
||||||
|
@ -209,7 +224,7 @@ function display_LoginPage($config_object) {
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br><br><br><br>
|
<br><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// check extensions
|
// check extensions
|
||||||
|
@ -253,155 +268,138 @@ function display_LoginPage($config_object) {
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<br><br>
|
||||||
<div style="position:relative; z-index:5;">
|
<div style="position:relative; z-index:5;">
|
||||||
<table width="650" align="center" border="2" rules="none" bgcolor="white">
|
<table width="650" align="center" border="2" rules="none" bgcolor="white">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-style:none" width="70" rowspan="2">
|
<td style="border-style:none" width="70" rowspan="2">
|
||||||
<img src="../graphics/lam.png" alt="Logo">
|
<img src="../graphics/lam.png" alt="Logo" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
</td>
|
</td>
|
||||||
<td style="border-style:none" width="580">
|
<td style="border-style:none" width="580px">
|
||||||
<form action="login.php" method="post">
|
<form action="login.php" method="post">
|
||||||
<table width="580">
|
<?php
|
||||||
<tr>
|
$table = new htmlTable('580px');
|
||||||
<td style="border-style:none" height="30" colspan="2" align="center">
|
$spacer = new htmlSpacer(null, '30px');
|
||||||
</td>
|
$spacer->colspan = 3;
|
||||||
</tr>
|
$table->addElement($spacer, true);
|
||||||
<tr>
|
// user name
|
||||||
<td style="border-style:none" height="35" align="right"><b>
|
$userLabel = new htmlOutputText(_("User name"));
|
||||||
<?php
|
$userLabel->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
echo _("User name");
|
$table->addElement($userLabel);
|
||||||
?>
|
$gap = new htmlSpacer('5px', '30px');
|
||||||
</b> </td>
|
$table->addElement($gap);
|
||||||
<td style="border-style:none" height="35" align="left">
|
if ($config_object->getLoginMethod() == LAMConfig::LOGIN_LIST) {
|
||||||
<?php
|
$admins = $config_object->get_Admins();
|
||||||
if ($config_object->getLoginMethod() == LAMConfig::LOGIN_LIST) {
|
$adminList = array();
|
||||||
echo '<select name="username" size="1" tabindex="1">';
|
for($i = 0; $i < count($admins); $i++) {
|
||||||
$admins = $config_object->get_Admins();
|
$text = explode(",", $admins[$i]);
|
||||||
for($i = 0; $i < count($admins); $i++) {
|
$text = explode("=", $text[0]);
|
||||||
$text = explode(",", $admins[$i]);
|
$adminList[$text[1]] = $admins[$i];
|
||||||
$text = explode("=", $text[0]);
|
}
|
||||||
echo '<option value="' . $admins[$i] . '">' . $text[1] . '</option>';
|
$userSelect = new htmlSelect('username', $adminList);
|
||||||
}
|
$userSelect->setHasDescriptiveElements(true);
|
||||||
echo '</select>';
|
$userSelect->alignment = htmlElement::ALIGN_LEFT;
|
||||||
}
|
$table->addElement($userSelect);
|
||||||
else {
|
}
|
||||||
if ($config_object->getHttpAuthentication() == 'true') {
|
else {
|
||||||
echo htmlspecialchars($_SERVER['PHP_AUTH_USER']);
|
if ($config_object->getHttpAuthentication() == 'true') {
|
||||||
}
|
$httpAuth = new htmlOutputText($_SERVER['PHP_AUTH_USER']);
|
||||||
else {
|
$httpAuth->alignment = htmlElement::ALIGN_LEFT;
|
||||||
echo '<input type="text" name="username" tabindex="1">';
|
$table->addElement($httpAuth);
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
?>
|
$userInput = new htmlInputField('username');
|
||||||
</td>
|
$userInput->alignment = htmlElement::ALIGN_LEFT;
|
||||||
</tr>
|
$table->addElement($userInput);
|
||||||
<tr>
|
}
|
||||||
<td style="border-style:none" height="35" align="right"><b>
|
}
|
||||||
<?php
|
$table->addNewLine();
|
||||||
echo _("Password");
|
// password
|
||||||
?>
|
$passwordLabel = new htmlOutputText(_("Password"));
|
||||||
</b> </td>
|
$passwordLabel->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
<td style="border-style:none" height="35" align="left">
|
$table->addElement($passwordLabel);
|
||||||
<?php
|
$table->addElement($gap);
|
||||||
if (($config_object->getLoginMethod() == LAMConfig::LOGIN_SEARCH) && ($config_object->getHttpAuthentication() == 'true')) {
|
if (($config_object->getLoginMethod() == LAMConfig::LOGIN_SEARCH) && ($config_object->getHttpAuthentication() == 'true')) {
|
||||||
echo '**********';
|
$passwordInputFake = new htmlOutputText('**********');
|
||||||
}
|
$passwordInputFake->alignment = htmlElement::ALIGN_LEFT;
|
||||||
else {
|
$table->addElement($passwordInputFake);
|
||||||
echo '<input type="password" name="passwd" tabindex="2">';
|
}
|
||||||
}
|
else {
|
||||||
?>
|
$passwordInput = new htmlInputField('passwd');
|
||||||
</td>
|
$passwordInput->alignment = htmlElement::ALIGN_LEFT;
|
||||||
</tr>
|
$passwordInput->setIsPassword(true);
|
||||||
<tr>
|
$passwordInput->setFieldSize('20px');
|
||||||
<td style="border-style:none" align="right"><b>
|
$table->addElement($passwordInput);
|
||||||
<?php
|
}
|
||||||
echo _("Language");
|
$table->addNewLine();
|
||||||
?>
|
// language
|
||||||
</b> </td>
|
$languageLabel = new htmlOutputText(_("Language"));
|
||||||
<td style="border-style:none" height="35" align="left">
|
$languageLabel->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
<select name="language" size="1" tabindex="3">
|
$table->addElement($languageLabel);
|
||||||
<?php
|
$table->addElement($gap);
|
||||||
for($i = 0; $i < count($languages); $i++) {
|
$languageList = array();
|
||||||
if($languages[$i]["default"] == "YES") {
|
$defaultLanguage = array();
|
||||||
?>
|
for($i = 0; $i < count($languages); $i++) {
|
||||||
<option selected value="<?php echo $languages[$i]["link"] . ":" . $languages[$i]["descr"]; ?>"><?php echo $languages[$i]["descr"]; ?></option>
|
$languageList[$languages[$i]["descr"]] = $languages[$i]["link"] . ":" . $languages[$i]["descr"];
|
||||||
<?php
|
if($languages[$i]["default"] == "YES") {
|
||||||
}
|
$defaultLanguage[] = $languages[$i]["link"] . ":" . $languages[$i]["descr"];
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
?>
|
$languageSelect = new htmlSelect('language', $languageList, $defaultLanguage);
|
||||||
<option value="<?php echo $languages[$i]["link"] . ":" . $languages[$i]["descr"]; ?>"><?php echo $languages[$i]["descr"]; ?></option>
|
$languageSelect->setHasDescriptiveElements(true);
|
||||||
<?php
|
$languageSelect->alignment = htmlElement::ALIGN_LEFT;
|
||||||
}
|
$table->addElement($languageSelect, true);
|
||||||
}
|
// login button
|
||||||
?>
|
$table->addElement(new htmlSpacer(null, '35px'));
|
||||||
</select>
|
$table->addElement(new htmlHiddenInput('checklogin', 'checklogin'));
|
||||||
</td>
|
$loginButton = new htmlButton('submit', _("Login"));
|
||||||
</tr>
|
$loginButton->alignment = htmlElement::ALIGN_LEFT;
|
||||||
<tr>
|
$table->addElement($loginButton, true);
|
||||||
<td style="border-style:none" height="50" colspan="2" align="center">
|
// error message
|
||||||
<input name="checklogin" type="hidden" value="checklogin">
|
if($error_message != "") {
|
||||||
<button type="submit" id="loginButton" class="smallPadding" name="submit" tabindex="4"><?php echo _("Login"); ?></button>
|
$message = new htmlStatusMessage('ERROR', $error_message);
|
||||||
</td>
|
$message->colspan = 3;
|
||||||
</tr>
|
$table->addElement($message, true);
|
||||||
<tr>
|
}
|
||||||
<td style="border-style:none" colspan="2" align="center">
|
|
||||||
<?php
|
$tabindex = 1;
|
||||||
if($error_message != "") {
|
parseHtml(null, $table, array(), false, $tabindex, 'user');
|
||||||
echo "<font color=\"red\"><b>" . $error_message . "</b></font>";
|
?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-style:none">
|
<td align="left" style="border-style:none">
|
||||||
<form action="login.php" method="post">
|
<form action="login.php" method="post">
|
||||||
<table width="580">
|
<?php
|
||||||
<tr>
|
$table = new htmlTable('580px');
|
||||||
<td height="30" colspan=2>
|
$line = new htmlHorizontalLine();
|
||||||
<hr>
|
$line->colspan = 2;
|
||||||
</td>
|
$table->addElement($line, true);
|
||||||
</tr>
|
$subTable = new htmlTable();
|
||||||
<tr>
|
$subTable->alignment = htmlElement::ALIGN_LEFT;
|
||||||
<td height="30" style="white-space: nowrap">
|
// LDAP server
|
||||||
<b>
|
$serverLabel = new htmlOutputText(_("LDAP server"));
|
||||||
<?php
|
$serverLabel->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
echo _("LDAP server");
|
$subTable->addElement($serverLabel);
|
||||||
?></b>
|
$subTable->addElement($gap);
|
||||||
</td>
|
$serverName = new htmlOutputText($config_object->get_ServerURL());
|
||||||
<td width="100%" height="30">
|
$serverName->alignment = htmlElement::ALIGN_LEFT;
|
||||||
<?php echo $config_object->get_ServerURL(); ?>
|
$subTable->addElement($serverName, true);
|
||||||
</td>
|
// server profile
|
||||||
</tr>
|
$profileLabel = new htmlOutputText(_("Server profile"));
|
||||||
<tr>
|
$profileLabel->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
<td height="30" style="white-space: nowrap">
|
$subTable->addElement($profileLabel);
|
||||||
<b>
|
$subTable->addElement($gap);
|
||||||
<?php
|
$profileSelect = new htmlSelect('profile', $profiles, array($_SESSION['config']->getName()));
|
||||||
echo _("Server profile");
|
$profileSelect->alignment = htmlElement::ALIGN_LEFT;
|
||||||
?></b>
|
$profileSelect->setOnchangeEvent('loginProfileChanged(this)');
|
||||||
</td>
|
$subTable->addElement($profileSelect, true);
|
||||||
<td height="30">
|
$subTable->addElement(new htmlSpacer(null, '10px'));
|
||||||
<select name="profile" size="1" tabindex="5" onchange="loginProfileChanged(this)">
|
$table->addElement($subTable);
|
||||||
<?php
|
|
||||||
for($i=0;$i<count($profiles);$i++) {
|
parseHtml(null, $table, array(), true, $tabindex, 'user');
|
||||||
$selected = '';
|
?>
|
||||||
if ($profiles[$i] == $_SESSION['config']->getName()) {
|
|
||||||
$selected = ' selected';
|
|
||||||
}
|
|
||||||
echo '<option value="' . $profiles[$i] . '"' . $selected . '>' . $profiles[$i] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td height="10" colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue