diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php
index 358dc22c..fe3ef0b4 100644
--- a/lam/templates/lists/listgroups.php
+++ b/lam/templates/lists/listgroups.php
@@ -35,6 +35,9 @@ setlanguage();
// get sorting column when register_globals is off
$list = $_GET['list'];
+// copy HTTP-GET variables to HTTP-POST
+$_POST = $_POST + $_GET;
+
// check if button was pressed and if we have to add/delete a group
if ($_POST['new_group'] || $_POST['del_group']){
// add new group
@@ -88,6 +91,15 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
}
}
+// generate search filter for sort links
+$searchfilter = "";
+for ($k = 0; $k < sizeof($desc_array); $k++) {
+ if ($_POST["filter" . strtolower($attr_array[$k])]) {
+ $searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
+ $_POST["filter" . strtolower($attr_array[$k])];
+ }
+}
+
// configure search filter
// Groups have the attribute "posixGroup"
$filter = "(&(objectClass=posixGroup)";
@@ -125,9 +137,11 @@ echo "
| | ";
// table header
for ($k = 0; $k < sizeof($desc_array); $k++) {
if (strtolower($attr_array[$k]) == $list) {
- echo "" . $desc_array[$k] . " | ";
+ echo "" . $desc_array[$k] . " | ";
}
- else echo "" . $desc_array[$k] . " | ";
+ else echo "" . $desc_array[$k] . " | ";
}
echo "
\n";
diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php
index a1045efb..d7ff91c1 100644
--- a/lam/templates/lists/listhosts.php
+++ b/lam/templates/lists/listhosts.php
@@ -35,6 +35,9 @@ setlanguage();
// get sorting column when register_globals is off
$list = $_GET['list'];
+// copy HTTP-GET variables to HTTP-POST
+$_POST = $_POST + $_GET;
+
// check if button was pressed and if we have to add/delete a host
if ($_POST['new_host'] || $_POST['del_host']){
// add new host
@@ -88,6 +91,15 @@ else {
}
}
+// generate search filter for sort links
+$searchfilter = "";
+for ($k = 0; $k < sizeof($desc_array); $k++) {
+ if ($_POST["filter" . strtolower($attr_array[$k])]) {
+ $searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
+ $_POST["filter" . strtolower($attr_array[$k])];
+ }
+}
+
// configure search filter
// Samba hosts have the attribute "sambaAccount" and end with "$"
$filter = "(&(objectClass=sambaAccount) (uid=*$)";
@@ -125,9 +137,11 @@ echo " | | ";
// table header
for ($k = 0; $k < sizeof($desc_array); $k++) {
if (strtolower($attr_array[$k]) == $list) {
- echo "" . $desc_array[$k] . " | ";
+ echo "" . $desc_array[$k] . " | ";
}
- else echo "" . $desc_array[$k] . " | ";
+ else echo "" . $desc_array[$k] . " | ";
}
echo "
\n";