From be3035e34f2f12c401d068c4f3d5bf669b650a42 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 26 Apr 2003 11:43:57 +0000 Subject: [PATCH] replaced new/delete links with buttons and fixed deleting of groups --- lam/templates/lists/listgroups.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index c5bda950..cbba98ab 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -29,6 +29,23 @@ include_once("../../lib/ldap.inc"); session_save_path("../../sess"); @session_start(); +// check if button was pressed and if we have to add/delete a group +if ($_POST['new_group'] || $_POST['del_group']){ + // add new group + if ($_POST['new_group']){ + echo(""); + exit; + } + // delete group(s) + if ($_POST['del_group']){ + // search for checkboxes + $groups = array_keys($_POST, "on"); + $groupstr = implode(";", $groups); + echo(""); + } + exit; +} + echo "listgroups\n"; echo "\n"; echo "\n"; @@ -68,7 +85,7 @@ if ($sr) { } else echo ("

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


"); -echo ("
\n"); +echo ("\n"); // delete first array entry which is "count" array_shift($info); @@ -125,8 +142,8 @@ for ($i = 0; $i < sizeof($info); $i++) { // ignore last entry in array which is echo (""); echo ("

 

\n"); echo (""); -echo ("\n"); +echo (""); +echo (""); echo ("
" . _("New Group") . ""); -echo ("   " . _("Delete Group(s)") . "
\n"); echo ("
\n"); echo "\n";