added check for filters; replaced select all image
This commit is contained in:
parent
3ef2a2ac4b
commit
a782e5b4c8
Binary file not shown.
Before Width: | Height: | Size: 440 B |
Binary file not shown.
After Width: | Height: | Size: 181 B |
|
@ -104,7 +104,7 @@ else $grp_suffix = $_SESSION["config"]->get_GroupSuffix(); // default suffix
|
||||||
// generate search filter for sort links
|
// generate search filter for sort links
|
||||||
$searchfilter = "";
|
$searchfilter = "";
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])]) {
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])])) {
|
||||||
$searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
|
$searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
|
||||||
$_POST["filter" . strtolower($attr_array[$k])];
|
$_POST["filter" . strtolower($attr_array[$k])];
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ if (! $_GET['norefresh']) {
|
||||||
// Groups have the attribute "posixGroup"
|
// Groups have the attribute "posixGroup"
|
||||||
$filter = "(&(objectClass=posixGroup)";
|
$filter = "(&(objectClass=posixGroup)";
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])])
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
||||||
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
||||||
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
||||||
else
|
else
|
||||||
|
@ -241,7 +241,7 @@ if (sizeof($grp_info) > 0) {
|
||||||
// display select all link
|
// display select all link
|
||||||
$colspan = sizeof($attr_array) + 1;
|
$colspan = sizeof($attr_array) + 1;
|
||||||
echo "<tr class=\"grouplist\">\n";
|
echo "<tr class=\"grouplist\">\n";
|
||||||
echo "<td align=\"center\"><img src=\"../../graphics/select.jpg\" alt=\"select all\"></td>\n";
|
echo "<td align=\"center\"><img src=\"../../graphics/select.png\" alt=\"select all\"></td>\n";
|
||||||
echo "<td colspan=$colspan> <a href=\"listgroups.php?norefresh=y&page=" . $page . "&sort=" . $sort .
|
echo "<td colspan=$colspan> <a href=\"listgroups.php?norefresh=y&page=" . $page . "&sort=" . $sort .
|
||||||
$searchfilter . "&selectall=yes\">" .
|
$searchfilter . "&selectall=yes\">" .
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
|
|
|
@ -104,7 +104,7 @@ else $hst_suffix = $_SESSION["config"]->get_HostSuffix(); // default suffix
|
||||||
// generate search filter for sort links
|
// generate search filter for sort links
|
||||||
$searchfilter = "";
|
$searchfilter = "";
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])]) {
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])])) {
|
||||||
$searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
|
$searchfilter = $searchfilter . "&filter" . strtolower($attr_array[$k]) . "=".
|
||||||
$_POST["filter" . strtolower($attr_array[$k])];
|
$_POST["filter" . strtolower($attr_array[$k])];
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ if (! $_GET['norefresh']) {
|
||||||
$filter = "(&(objectClass=sambaAccount) (uid=*$)";
|
$filter = "(&(objectClass=sambaAccount) (uid=*$)";
|
||||||
}
|
}
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])])
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
||||||
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
||||||
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
||||||
else
|
else
|
||||||
|
@ -230,7 +230,7 @@ if (sizeof($hst_info) > 0) {
|
||||||
// display select all link
|
// display select all link
|
||||||
$colspan = sizeof($attr_array) + 1;
|
$colspan = sizeof($attr_array) + 1;
|
||||||
echo "<tr class=\"hostlist\">\n";
|
echo "<tr class=\"hostlist\">\n";
|
||||||
echo "<td align=\"center\"><img src=\"../../graphics/select.jpg\" alt=\"select all\"></td>\n";
|
echo "<td align=\"center\"><img src=\"../../graphics/select.png\" alt=\"select all\"></td>\n";
|
||||||
echo "<td colspan=$colspan> <a href=\"listhosts.php?norefresh=y&page=" . $page . "&sort=" . $sort .
|
echo "<td colspan=$colspan> <a href=\"listhosts.php?norefresh=y&page=" . $page . "&sort=" . $sort .
|
||||||
$searchfilter . "&selectall=yes\">" .
|
$searchfilter . "&selectall=yes\">" .
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
|
|
|
@ -154,7 +154,7 @@ else $usr_suffix = $_SESSION["config"]->get_UserSuffix(); // default suffix
|
||||||
// generate search filter for sort links
|
// generate search filter for sort links
|
||||||
$searchfilter = "";
|
$searchfilter = "";
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])]) {
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])])) {
|
||||||
$searchfilter = $searchfilter . "&filter" .
|
$searchfilter = $searchfilter . "&filter" .
|
||||||
strtolower($attr_array[$k]) . "=".
|
strtolower($attr_array[$k]) . "=".
|
||||||
$_POST["filter" . strtolower($attr_array[$k])];
|
$_POST["filter" . strtolower($attr_array[$k])];
|
||||||
|
@ -165,7 +165,7 @@ for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
// Unix/Samba3 users have the attribute "posixAccount" and do not end with "$"
|
// Unix/Samba3 users have the attribute "posixAccount" and do not end with "$"
|
||||||
$filter = "(&(objectClass=posixAccount) (!(uid=*$))";
|
$filter = "(&(objectClass=posixAccount) (!(uid=*$))";
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if ($_POST["filter" . strtolower($attr_array[$k])])
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
||||||
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
||||||
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
$_POST["filter" . strtolower($attr_array[$k])] . ")";
|
||||||
else
|
else
|
||||||
|
@ -299,7 +299,7 @@ if ($user_count != 0) {
|
||||||
// display select all link
|
// display select all link
|
||||||
$colspan = sizeof($attr_array) + 1;
|
$colspan = sizeof($attr_array) + 1;
|
||||||
echo "<tr class=\"userlist\">\n";
|
echo "<tr class=\"userlist\">\n";
|
||||||
echo "<td align=\"center\"><img src=\"../../graphics/select.jpg\" alt=\"select all\"></td>\n";
|
echo "<td align=\"center\"><img src=\"../../graphics/select.png\" alt=\"select all\"></td>\n";
|
||||||
echo "<td colspan=$colspan> <a href=\"listusers.php?norefresh=1&page=" . $page . "&sortattrib=" . $sortattrib .
|
echo "<td colspan=$colspan> <a href=\"listusers.php?norefresh=1&page=" . $page . "&sortattrib=" . $sortattrib .
|
||||||
$searchfilter . "&trans_primary=" . $trans_primary . "&selectall=yes\">" .
|
$searchfilter . "&trans_primary=" . $trans_primary . "&selectall=yes\">" .
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
|
@ -350,7 +350,7 @@ echo ("<p align=\"left\">\n");
|
||||||
echo ("<input type=\"submit\" name=\"new_user\" value=\"" . _("New user") . "\">\n");
|
echo ("<input type=\"submit\" name=\"new_user\" value=\"" . _("New user") . "\">\n");
|
||||||
if ($user_count != 0) {
|
if ($user_count != 0) {
|
||||||
echo ("<input type=\"submit\" name=\"del_user\" value=\"" . _("Delete user(s)") . "\">\n");
|
echo ("<input type=\"submit\" name=\"del_user\" value=\"" . _("Delete user(s)") . "\">\n");
|
||||||
echo (" ");
|
echo ("<br><br>\n");
|
||||||
echo ("<input type=\"submit\" name=\"pdf_user\" value=\"" . _("Create PDF for selected user(s)") . "\">\n");
|
echo ("<input type=\"submit\" name=\"pdf_user\" value=\"" . _("Create PDF for selected user(s)") . "\">\n");
|
||||||
echo ("<input type=\"submit\" name=\"pdf_all\" value=\"" . _("Create PDF for all users") . "\">\n");
|
echo ("<input type=\"submit\" name=\"pdf_all\" value=\"" . _("Create PDF for all users") . "\">\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue