made user and group list optional

This commit is contained in:
Roland Gruber 2005-01-22 11:05:44 +00:00
parent e6beeaa933
commit 667e849002
2 changed files with 9 additions and 9 deletions

View File

@ -148,23 +148,17 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
for ($i = 0; $i < sizeof($fail); $i++) {
StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . $error[$i], $fail[$i]);
}
echo "<p>&nbsp;</p>\n";
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "</body></html>\n";
}
else {
// print success message
StatusMessage("INFO", "", _("All changes were successful."));
echo "<p>&nbsp;</p>\n";
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "</body></html>\n";
}
}
else {
// no suffixes were created
StatusMessage("INFO", "", _("No changes were made."));
echo "<p>&nbsp;</p>\n";
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "</body></html>\n";
}
exit;

View File

@ -40,7 +40,9 @@ setlanguage();
echo $_SESSION['header'];
// number of list views (users, groups, ...)
$lists = 2;
$lists = 0;
if ($_SESSION['config']->get_Usersuffix() != "") $lists++;
if ($_SESSION['config']->get_Groupsuffix() != "") $lists++;
if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
?>
@ -71,8 +73,12 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
<tr>
<td></td>
<?php
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
if ($_SESSION['config']->get_Usersuffix() != "") {
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
}
if ($_SESSION['config']->get_Groupsuffix() != "") {
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
}
if ($_SESSION['config']->get_Hostsuffix() != "") {
echo '<td width="120" align="center"><a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
}