updated warning if no objects were found

This commit is contained in:
Roland Gruber 2003-04-26 18:51:05 +00:00
parent 0e30ef10f6
commit bb00ddc760
2 changed files with 8 additions and 10 deletions

View File

@ -82,16 +82,15 @@ if ($sr) {
$info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
ldap_free_result($sr);
if ($info["count"] == 0) echo ("<br><br><font color=\"red\"><b>" . _("No Grous found!") . "</b></font><br><br>");
// delete first array entry which is "count"
array_shift($info);
// sort rows by sort column ($list)
usort($info, "cmp_array");
}
else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please check your preferences. <br> No Groups found!") . "</b></font><br><br>");
echo ("<form action=\"listgroups.php?type=group\" method=\"post\">\n");
// delete first array entry which is "count"
array_shift($info);
// sort rows by sort column ($list)
usort($info, "cmp_array");
// print group table header
echo "<table rules=\"all\" class=\"grouplist\" width=\"100%\">\n";
echo "<tr class=\"grouplist_head\"><th width=22 height=34></th><th></th>";

View File

@ -65,16 +65,15 @@ if ($sr) {
$info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
ldap_free_result($sr);
if ($info["count"] == 0) echo ("<br><br><font color=\"red\"><b>" . _("No Samba Hosts found!") . "</b></font><br><br>");
// delete first array entry which is "count"
array_shift($info);
// sort rows by sort column ($list)
usort($info, "cmp_array");
}
else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please check your preferences. <br> No Samba Hosts found!") . "</b></font><br><br>");
echo ("<form action=\"../account.php?type=host\" method=\"post\">\n");
// delete first array entry which is "count"
array_shift($info);
// sort rows by sort column ($list)
usort($info, "cmp_array");
// print host table header
echo "<table rules=\"all\" class=\"hostlist\" width=\"100%\">\n";
echo "<tr class=\"hostlist_head\"><th width=22 height=34></th><th></th>";