From 5e6b57c4d29601c81adaf7b28db58eeb33fa8dc0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 5 May 2003 15:55:57 +0000 Subject: [PATCH] added status messages --- lam/templates/lists/listgroups.php | 7 ++++--- lam/templates/lists/listhosts.php | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index dd03ef27..13bfa034 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -23,7 +23,8 @@ $Id$ */ include_once ("../../lib/config.inc"); -include_once("../../lib/ldap.inc"); +include_once ("../../lib/ldap.inc"); +include_once ("../../lib/status.inc"); // start session session_save_path("../../sess"); @@ -81,13 +82,13 @@ $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 ("

" . _("No Grous found!") . "

"); + if ($info["count"] == 0) StatusMessage("WARN", "", _("No Groups found!")); // delete first array entry which is "count" array_shift($info); // sort rows by sort column ($list) usort($info, "cmp_array"); } -else echo ("

" . _("LDAP Search failed! Please check your preferences.
No Groups found!") . "


"); +else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Groups found!")); echo ("
\n"); diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 0e1c1d7f..2ed9b6de 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -23,7 +23,8 @@ $Id$ */ include_once ("../../lib/config.inc"); -include_once("../../lib/ldap.inc"); +include_once ("../../lib/ldap.inc"); +include_once ("../../lib/status.inc"); // start session session_save_path("../../sess"); @@ -81,13 +82,13 @@ $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 ("

" . _("No Samba Hosts found!") . "

"); + if ($info["count"] == 0) StatusMessage("WARN", "", _("No Samba Hosts found!")); // delete first array entry which is "count" array_shift($info); // sort rows by sort column ($list) usort($info, "cmp_array"); } -else echo ("

" . _("LDAP Search failed! Please check your preferences.
No Samba Hosts found!") . "


"); +else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Hosts found!")); echo ("\n");