fixed error messages if no entries were found

This commit is contained in:
Roland Gruber 2003-04-03 13:37:53 +00:00
parent 84edb939c7
commit eb33604b2f
2 changed files with 4 additions and 2 deletions

View File

@ -61,8 +61,9 @@ $sr = @ldap_search($_SESSION["ldap"]->server(),
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>");
}
else echo ("<br><br><font color=\"red\"><b>" . _("No Groups found!") . "</b></font><br><br>");
else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please check your preferences. <br> No Groups found!") . "</b></font><br><br>");
// print host table header
echo "<table width=\"100%\">\n";

View File

@ -61,8 +61,9 @@ $sr = @ldap_search($_SESSION["ldap"]->server(),
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>");
}
else echo ("<br><br><font color=\"red\"><b>" . _("No Samba Hosts found!") . "</b></font><br><br>");
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=\"../templates/account.php?type=host\" method=\"post\">\n");
// print host table