use meta HTML classes
This commit is contained in:
parent
83ece2d2f3
commit
9d473cb268
|
@ -42,20 +42,25 @@ if (!checkIfWriteAccessIsAllowed()) die();
|
||||||
setlanguage();
|
setlanguage();
|
||||||
|
|
||||||
include '../main_header.php';
|
include '../main_header.php';
|
||||||
|
echo "<div class=\"userlist-bright smallPaddingContent\">\n";
|
||||||
|
|
||||||
echo "<h1>" . _("LAM tests") . "</h1>\n";
|
$container = new htmlTable();
|
||||||
|
$container->addElement(new htmlSubTitle(_("LAM tests")), true);
|
||||||
|
|
||||||
echo "<table class=\"userlist\" rules=\"none\">\n";
|
$container->addElement(new htmlLink(_("Lamdaemon test"), 'lamdaemonTest.php'));
|
||||||
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText(_("Check if quotas and homedirectories can be managed.")), true);
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><a href=\"lamdaemonTest.php\"><b>" . _("Lamdaemon test") . "</b> </a></td>";
|
$container->addElement(new htmlSpacer(null, '20px'), true);
|
||||||
echo "<td style=\"padding:10px;\">" . _("Check if quotas and homedirectories can be managed.") . "</td></tr>";
|
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><a href=\"schemaTest.php\"><b>" . _("Schema test") . "</b> </a></td>";
|
$container->addElement(new htmlLink(_("Schema test"), 'schemaTest.php'));
|
||||||
echo "<td style=\"padding:10px;\">" . _("Check if the LDAP schema fits the requirements of the selected account modules.") . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText(_("Check if the LDAP schema fits the requirements of the selected account modules.")), true);
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
|
$tabindex = 1;
|
||||||
|
parseHtml(null, $container, array(), true, $tabindex, 'user');
|
||||||
|
|
||||||
|
echo "</div>\n";
|
||||||
include '../main_footer.php';
|
include '../main_footer.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -43,8 +43,11 @@ if (!checkIfWriteAccessIsAllowed()) die();
|
||||||
setlanguage();
|
setlanguage();
|
||||||
|
|
||||||
include '../main_header.php';
|
include '../main_header.php';
|
||||||
|
echo "<div class=\"userlist-bright smallPaddingContent\">\n";
|
||||||
|
echo "<form action=\"lamdaemonTest.php\" method=\"post\">\n";
|
||||||
|
|
||||||
echo "<h1>" . _("Lamdaemon test") . "</h1>\n";
|
$container = new htmlTable();
|
||||||
|
$container->addElement(new htmlTitle(_("Lamdaemon test")), true);
|
||||||
|
|
||||||
$servers = explode(";", $_SESSION['config']->get_scriptServers());
|
$servers = explode(";", $_SESSION['config']->get_scriptServers());
|
||||||
$serverIDs = array();
|
$serverIDs = array();
|
||||||
|
@ -61,18 +64,11 @@ for ($i = 0; $i < sizeof($servers); $i++) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['runTest'])) {
|
if (isset($_POST['runTest'])) {
|
||||||
lamRunLamdaemonTestSuite($_POST['server'], $serverTitles[$_POST['server']] , isset($_POST['checkQuotas']));
|
lamRunLamdaemonTestSuite($_POST['server'], $serverTitles[$_POST['server']] , isset($_POST['checkQuotas']), $container);
|
||||||
}
|
}
|
||||||
else if ((sizeof($servers) > 0) && isset($servers[0]) && ($servers[0] != '')) {
|
else if ((sizeof($servers) > 0) && isset($servers[0]) && ($servers[0] != '')) {
|
||||||
echo "<form action=\"lamdaemonTest.php\" method=\"post\">\n";
|
$container->addElement(new htmlOutputText(_("Server")));
|
||||||
echo "<fieldset class=\"useredit\"><legend><b>" . _("Lamdaemon test") . "</b></legend><br>\n";
|
$serverOptions = array();
|
||||||
echo "<table>\n";
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo _("Server");
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<select name=\"server\">\n";
|
|
||||||
for ($i = 0; $i < sizeof($servers); $i++) {
|
for ($i = 0; $i < sizeof($servers); $i++) {
|
||||||
$servers[$i] = explode(":", $servers[$i]);
|
$servers[$i] = explode(":", $servers[$i]);
|
||||||
$serverName = $servers[$i][0];
|
$serverName = $servers[$i][0];
|
||||||
|
@ -80,32 +76,30 @@ else if ((sizeof($servers) > 0) && isset($servers[0]) && ($servers[0] != '')) {
|
||||||
if (isset($servers[$i][1])) {
|
if (isset($servers[$i][1])) {
|
||||||
$title = $servers[$i][1] . " (" . $serverName . ")";
|
$title = $servers[$i][1] . " (" . $serverName . ")";
|
||||||
}
|
}
|
||||||
echo "<option value=\"$serverName\">$title</option>\n";
|
$serverOptions[$title] = $serverName;
|
||||||
}
|
}
|
||||||
echo "</select>\n";
|
$serverSelect = new htmlSelect('server', $serverOptions);
|
||||||
echo "</td>\n";
|
$serverSelect->setHasDescriptiveElements(true);
|
||||||
echo "</tr>\n";
|
$container->addElement($serverSelect, true);
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo _("Check quotas");
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<input type=\"checkbox\" name=\"checkQuotas\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
echo "<br>";
|
$container->addElement(new htmlOutputText(_("Check quotas")));
|
||||||
|
$container->addElement(new htmlInputCheckbox('checkQuotas', false), true);
|
||||||
|
|
||||||
echo "<input type=\"submit\" name=\"runTest\" value=\"" . _("Ok") . "\">\n";
|
$container->addElement(new htmlSpacer(null, '10px'), true);
|
||||||
echo "</fieldset>\n";
|
|
||||||
echo "</form>\n";
|
$okButton = new htmlButton('runTest', _("Ok"));
|
||||||
|
$okButton->colspan = 2;
|
||||||
|
$container->addElement($okButton);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
StatusMessage("ERROR", _('No lamdaemon server set, please update your LAM configuration settings.'));
|
$container->addElement(new htmlStatusMessage("ERROR", _('No lamdaemon server set, please update your LAM configuration settings.')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tabindex = 1;
|
||||||
|
parseHtml(null, $container, array(), false, $tabindex, 'user');
|
||||||
|
|
||||||
|
echo "</form>\n";
|
||||||
|
echo "</div>\n";
|
||||||
include '../main_footer.php';
|
include '../main_footer.php';
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,14 +110,17 @@ include '../main_footer.php';
|
||||||
* @param boolean $stopTest specifies if test should be run
|
* @param boolean $stopTest specifies if test should be run
|
||||||
* @param connection $handle SSH connection
|
* @param connection $handle SSH connection
|
||||||
* @param string $testText describing text
|
* @param string $testText describing text
|
||||||
|
* @param htmlTable $container container for HTML output
|
||||||
* @return boolean true, if errors occured
|
* @return boolean true, if errors occured
|
||||||
*/
|
*/
|
||||||
function lamTestLamdaemon($command, $stopTest, $handle, $testText) {
|
function lamTestLamdaemon($command, $stopTest, $handle, $testText, $container) {
|
||||||
$okImage = "<img width=16 height=16 src=\"../../graphics/pass.png\" alt=\"\">\n";
|
$okImage = "../../graphics/pass.png";
|
||||||
$failImage = "<img width=16 height=16 src=\"../../graphics/fail.png\" alt=\"\">\n";
|
$failImage = "../../graphics/fail.png";
|
||||||
|
$spacer = new htmlSpacer('10px', null);
|
||||||
// run lamdaemon and get user quotas
|
// run lamdaemon and get user quotas
|
||||||
if (!$stopTest) {
|
if (!$stopTest) {
|
||||||
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . $testText . " </td>\n";
|
$container->addElement(new htmlOutputText($testText));
|
||||||
|
$container->addElement($spacer);
|
||||||
flush();
|
flush();
|
||||||
$lamdaemonOk = false;
|
$lamdaemonOk = false;
|
||||||
$output = $handle->exec("sudo " . $_SESSION['config']->get_scriptPath() . ' ' . escapeshellarg($command));
|
$output = $handle->exec("sudo " . $_SESSION['config']->get_scriptPath() . ' ' . escapeshellarg($command));
|
||||||
|
@ -131,24 +128,32 @@ function lamTestLamdaemon($command, $stopTest, $handle, $testText) {
|
||||||
$lamdaemonOk = true;
|
$lamdaemonOk = true;
|
||||||
}
|
}
|
||||||
if ($lamdaemonOk) {
|
if ($lamdaemonOk) {
|
||||||
echo "<td nowrap>" . $okImage . " </td>";
|
$container->addElement(new htmlImage($okImage));
|
||||||
echo "<td>" . _("Lamdaemon successfully run.") . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(_("Lamdaemon successfully run.")), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<td nowrap>" . $failImage . " </td>\n";
|
$container->addElement(new htmlImage($failImage));
|
||||||
echo "<td>\n";
|
$container->addElement($spacer);
|
||||||
if (!(strpos($output, 'ERROR,') === 0) && !(strpos($output, 'WARN,') === 0)) {
|
if (!(strpos($output, 'ERROR,') === 0) && !(strpos($output, 'WARN,') === 0)) {
|
||||||
// error messages from console (e.g. sudo)
|
// error messages from console (e.g. sudo)
|
||||||
StatusMessage('ERROR', $output);
|
$container->addElement(new htmlStatusMessage('ERROR', $output), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// error messages from lamdaemon
|
// error messages from lamdaemon
|
||||||
call_user_func_array('StatusMessage', explode(",", $output));
|
$parts = explode(",", $output);
|
||||||
|
if (sizeof($parts) == 2) {
|
||||||
|
$container->addElement(new htmlStatusMessage($parts[0], $parts[1]), true);
|
||||||
|
}
|
||||||
|
elseif (sizeof($parts) == 3) {
|
||||||
|
$container->addElement(new htmlStatusMessage($parts[0], $parts[1], $parts[2]), true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$container->addElement(new htmlOutputText($output), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
|
||||||
$stopTest = true;
|
$stopTest = true;
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
}
|
||||||
flush();
|
flush();
|
||||||
return $stopTest;
|
return $stopTest;
|
||||||
|
@ -160,41 +165,45 @@ function lamTestLamdaemon($command, $stopTest, $handle, $testText) {
|
||||||
* @param String $serverName server ID
|
* @param String $serverName server ID
|
||||||
* @param String $serverTitle server name
|
* @param String $serverTitle server name
|
||||||
* @param boolean $testQuota true, if Quotas should be checked
|
* @param boolean $testQuota true, if Quotas should be checked
|
||||||
|
* @param htmlTable $container container for HTML output
|
||||||
*/
|
*/
|
||||||
function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) {
|
function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota, $container) {
|
||||||
$SPLIT_DELIMITER = "###x##y##x###";
|
$SPLIT_DELIMITER = "###x##y##x###";
|
||||||
$okImage = "<img width=16 height=16 src=\"../../graphics/pass.png\" alt=\"\">\n";
|
$okImage = "../../graphics/pass.png";
|
||||||
$failImage = "<img width=16 height=16 src=\"../../graphics/fail.png\" alt=\"\">\n";
|
$failImage = "../../graphics/fail.png";
|
||||||
|
|
||||||
echo "<table class=\"userlist\" rules=\"none\">\n";
|
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
$stopTest = false;
|
$stopTest = false;
|
||||||
|
$spacer = new htmlSpacer('10px', null);
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\">\n<td colspan=\"3\" align=\"center\"><b>$serverTitle</b>\n</td>\n</tr>";
|
$container->addElement(new htmlSubTitle($serverTitle), true);
|
||||||
|
|
||||||
// check script server and path
|
// check script server and path
|
||||||
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("Lamdaemon server and path") . " </td>\n";
|
$container->addElement(new htmlOutputText(_("Lamdaemon server and path")));
|
||||||
|
$container->addElement(new htmlSpacer('10px', null));
|
||||||
if (!isset($serverName) || (strlen($serverName) < 3)) {
|
if (!isset($serverName) || (strlen($serverName) < 3)) {
|
||||||
echo "<td>" . $failImage . "</td>\n";
|
$container->addElement(new htmlImage($failImage));
|
||||||
echo "<td>" . _("No lamdaemon server set, please update your LAM configuration settings.") . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(_("No lamdaemon server set, please update your LAM configuration settings.")), true);
|
||||||
}
|
}
|
||||||
elseif (($_SESSION['config']->get_scriptPath() == null) || (strlen($_SESSION['config']->get_scriptPath()) < 10)) {
|
elseif (($_SESSION['config']->get_scriptPath() == null) || (strlen($_SESSION['config']->get_scriptPath()) < 10)) {
|
||||||
echo "<td nowrap>" . $failImage . " </td>\n";
|
$container->addElement(new htmlImage($failImage));
|
||||||
echo "<td>" . _("No lamdaemon path set, please update your LAM configuration settings.") . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(_("No lamdaemon path set, please update your LAM configuration settings.")), true);
|
||||||
$stopTest = true;
|
$stopTest = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<td nowrap>" . $okImage . " </td>\n";
|
$container->addElement(new htmlImage($okImage));
|
||||||
echo "<td>" . sprintf(_("Using %s as lamdaemon remote server."), $serverName) . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(sprintf(_("Using %s as lamdaemon remote server."), $serverName)), true);
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
// check Unix account of LAM admin
|
// check Unix account of LAM admin
|
||||||
if (!$stopTest) {
|
if (!$stopTest) {
|
||||||
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("Unix account") . " </td>\n";
|
$container->addElement(new htmlOutputText(_("Unix account")));
|
||||||
|
$container->addElement($spacer);
|
||||||
$credentials = $_SESSION['ldap']->decrypt_login();
|
$credentials = $_SESSION['ldap']->decrypt_login();
|
||||||
$unixOk = false;
|
$unixOk = false;
|
||||||
$sr = @ldap_read($_SESSION['ldap']->server(), $credentials[0], "objectClass=posixAccount", array('uid'));
|
$sr = @ldap_read($_SESSION['ldap']->server(), $credentials[0], "objectClass=posixAccount", array('uid'));
|
||||||
|
@ -206,22 +215,24 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($unixOk) {
|
if ($unixOk) {
|
||||||
echo "<td nowrap>" . $okImage . " </td>\n";
|
$container->addElement(new htmlImage($okImage));
|
||||||
echo "<td>" . sprintf(_("Using %s to connect to remote server."), $userName) . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(sprintf(_("Using %s to connect to remote server."), $userName)), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<td nowrap>" . $failImage . " </td>\n";
|
$container->addElement(new htmlImage($failImage));
|
||||||
echo "<td>" . sprintf(_("Your LAM admin user (%s) must be a valid Unix account to work with lamdaemon!"), $credentials[0]) . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(sprintf(_("Your LAM admin user (%s) must be a valid Unix account to work with lamdaemon!"), $credentials[0])), true);
|
||||||
$stopTest = true;
|
$stopTest = true;
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
// check SSH login
|
// check SSH login
|
||||||
if (!$stopTest) {
|
if (!$stopTest) {
|
||||||
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("SSH connection") . " </td>\n";
|
$container->addElement(new htmlOutputText(_("SSH connection")));
|
||||||
|
$container->addElement($spacer);
|
||||||
flush();
|
flush();
|
||||||
$sshOk = false;
|
$sshOk = false;
|
||||||
$handle = lamTestConnectSSH($serverName);
|
$handle = lamTestConnectSSH($serverName);
|
||||||
|
@ -231,35 +242,42 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($sshOk) {
|
if ($sshOk) {
|
||||||
echo "<td nowrap>" . $okImage . " </td>";
|
$container->addElement(new htmlImage($okImage));
|
||||||
echo "<td>" . _("SSH connection could be established.") . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(_("SSH connection could be established.")), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<td nowrap>" . $failImage . " </td>\n";
|
$container->addElement(new htmlImage($failImage));
|
||||||
echo "<td>" . _("Unable to connect to remote server!") . "</td>";
|
$container->addElement($spacer);
|
||||||
|
$container->addElement(new htmlOutputText(_("Unable to connect to remote server!")), true);
|
||||||
$stopTest = true;
|
$stopTest = true;
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "basic", $stopTest, $handle, _("Execute lamdaemon"));
|
if (!$stopTest) {
|
||||||
$handle = lamTestConnectSSH($serverName);
|
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "basic", $stopTest, $handle, _("Execute lamdaemon"), $container);
|
||||||
@$handle->login($userName, $credentials[1]);
|
|
||||||
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "nss" . $SPLIT_DELIMITER . "$userName", $stopTest, $handle, _("Lamdaemon: check NSS LDAP"));
|
|
||||||
if ($testQuota) {
|
|
||||||
$handle = lamTestConnectSSH($serverName);
|
|
||||||
@$handle->login($userName, $credentials[1]);
|
|
||||||
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "quota", $stopTest, $handle, _("Lamdaemon: Quota module installed"));
|
|
||||||
$handle = lamTestConnectSSH($serverName);
|
|
||||||
@$handle->login($userName, $credentials[1]);
|
|
||||||
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "quota" . $SPLIT_DELIMITER . "get" . $SPLIT_DELIMITER . "user", $stopTest, $handle, _("Lamdaemon: read quotas"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table><br>\n";
|
if (!$stopTest) {
|
||||||
|
$handle = lamTestConnectSSH($serverName);
|
||||||
|
@$handle->login($userName, $credentials[1]);
|
||||||
|
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "nss" . $SPLIT_DELIMITER . "$userName", $stopTest, $handle, _("Lamdaemon: check NSS LDAP"), $container);
|
||||||
|
if (!$stopTest && $testQuota) {
|
||||||
|
$handle = lamTestConnectSSH($serverName);
|
||||||
|
@$handle->login($userName, $credentials[1]);
|
||||||
|
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "test" . $SPLIT_DELIMITER . "quota", $stopTest, $handle, _("Lamdaemon: Quota module installed"), $container);
|
||||||
|
$handle = lamTestConnectSSH($serverName);
|
||||||
|
@$handle->login($userName, $credentials[1]);
|
||||||
|
$stopTest = lamTestLamdaemon("+" . $SPLIT_DELIMITER . "quota" . $SPLIT_DELIMITER . "get" . $SPLIT_DELIMITER . "user", $stopTest, $handle, _("Lamdaemon: read quotas"), $container);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "<h2>" . _("Lamdaemon test finished.") . "</h2>\n";
|
$container->addElement(new htmlSpacer(null, '10px'), true);
|
||||||
|
$endMessage = new htmlOutputText(_("Lamdaemon test finished."));
|
||||||
|
$endMessage->colspan = 5;
|
||||||
|
$container->addElement($endMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,24 +46,23 @@ if (!checkIfWriteAccessIsAllowed()) die();
|
||||||
setlanguage();
|
setlanguage();
|
||||||
|
|
||||||
include '../main_header.php';
|
include '../main_header.php';
|
||||||
|
echo "<div class=\"userlist-bright smallPaddingContent\">\n";
|
||||||
|
|
||||||
echo "<h1>" . _("Schema test") . "</h1>\n";
|
$container = new htmlTable();
|
||||||
|
|
||||||
|
$container->addElement(new htmlTitle(_("Schema test")), true);
|
||||||
|
|
||||||
get_schema_objectclasses();
|
get_schema_objectclasses();
|
||||||
$classes = get_cached_schema('objectclasses');
|
$classes = get_cached_schema('objectclasses');
|
||||||
|
|
||||||
if (!is_array($classes)) {
|
if (!is_array($classes)) {
|
||||||
StatusMessage('ERROR', _('Unable to retrieve schema!'), _('You do not have the required access rights or the LDAP schema is not published by your server.'));
|
$container->addElement(new htmlStatusMessage('ERROR', _('Unable to retrieve schema!'), _('You do not have the required access rights or the LDAP schema is not published by your server.')));
|
||||||
include '../main_footer.php';
|
|
||||||
die();
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
// loop for active account types
|
// loop for active account types
|
||||||
for ($t = 0; $t < sizeof($types); $t++) {
|
for ($t = 0; $t < sizeof($types); $t++) {
|
||||||
$modules = $_SESSION['config']->get_AccountModules($types[$t]);
|
$modules = $_SESSION['config']->get_AccountModules($types[$t]);
|
||||||
echo "<h2>" . getTypeAlias($types[$t]) . "</h2>\n";
|
$container->addElement(new htmlSubTitle(getTypeAlias($types[$t])), true);
|
||||||
echo "<table width=\"100%\" class=\"" . $types[$t] . "list\">\n";
|
|
||||||
|
|
||||||
for ($m = 0; $m < sizeof($modules); $m++) {
|
for ($m = 0; $m < sizeof($modules); $m++) {
|
||||||
$error = checkSchemaForModule($modules[$m], $types[$t]);
|
$error = checkSchemaForModule($modules[$m], $types[$t]);
|
||||||
$message = _("No problems found.");
|
$message = _("No problems found.");
|
||||||
|
@ -73,18 +72,21 @@ for ($t = 0; $t < sizeof($types); $t++) {
|
||||||
$message = $error;
|
$message = $error;
|
||||||
}
|
}
|
||||||
// module name
|
// module name
|
||||||
echo "<tr class=\"" . $types[$t] . "list\">\n";
|
$container->addElement(new htmlOutputText(getModuleAlias($modules[$m], $types[$t])));
|
||||||
echo "<td style=\"padding-left:10px;\" nowrap>" . getModuleAlias($modules[$m], $types[$t]) . "</td>\n";
|
$container->addElement(new htmlSpacer('10px', null));
|
||||||
// icon
|
// icon
|
||||||
echo "<td style=\"padding-left:10px;padding-right:10px;\"><img width=16 height=16 alt=\"\" src=\"" . $icon . "\"></td>\n";
|
$container->addElement(new htmlImage($icon));
|
||||||
|
$container->addElement(new htmlSpacer('10px', null));
|
||||||
// text
|
// text
|
||||||
echo "<td width=\"100%\">" . $message . "</td>\n";
|
$container->addElement(new htmlOutputText($message), true);
|
||||||
echo "</tr>\n";
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table>\n<br>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tabindex = 1;
|
||||||
|
parseHtml(null, $container, array(), true, $tabindex, 'user');
|
||||||
|
|
||||||
|
echo "</div>\n";
|
||||||
include '../main_footer.php';
|
include '../main_footer.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue