From 704c558763e09521b1262d890ebb51ebc4e406a8 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 30 Apr 2003 17:20:36 +0000 Subject: [PATCH] changed new/delete links to buttons --- lam/templates/lists/listgroups.php | 2 +- lam/templates/lists/listhosts.php | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index d076f7ff..dd03ef27 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -89,7 +89,7 @@ if ($sr) { } else echo ("

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


"); -echo ("
\n"); +echo ("\n"); // print group table header echo "\n"; diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 4b5287cf..0e1c1d7f 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.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 host +if ($_POST['new_host'] || $_POST['del_host']){ + // add new host + if ($_POST['new_host']){ + echo(""); + exit; + } + // delete host(s) + if ($_POST['del_host']){ + // search for checkboxes + $hosts = array_keys($_POST, "on"); + $hoststr = implode(";", $hosts); + echo(""); + } + exit; +} + echo "listhosts\n"; echo "\n"; echo "\n"; @@ -72,7 +89,7 @@ if ($sr) { } else echo ("

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


"); -echo ("\n"); +echo ("\n"); // print host table header echo "
\n"; @@ -106,8 +123,8 @@ for ($i = 0; $i < sizeof($info); $i++) { echo ("
"); echo ("

 

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