From 1cada83eeb3ba7c6c44666df9365feb81aa88337 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 14 Aug 2003 17:19:10 +0000 Subject: [PATCH] fixed html code, print LDAP entries via utf8_decode --- lam/templates/lists/listusers.php | 123 ++++++++++++++---------------- 1 file changed, 59 insertions(+), 64 deletions(-) diff --git a/lam/templates/lists/listusers.php b/lam/templates/lists/listusers.php index 39ff84e4..ea00f6b1 100644 --- a/lam/templates/lists/listusers.php +++ b/lam/templates/lists/listusers.php @@ -198,46 +198,47 @@ if ($user_count != 0) { // print input boxes for filters for ($k = 0; $k < sizeof ($desc_array); $k++) { - echo ""; + echo "\n"; echo (""); - echo ""; + "\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">\n"); + echo "\n"; } echo "\n"; if ($user_count != 0) { - // print user list - $userinfo = array_slice ($userinfo, ($page - 1) * $max_pageentrys, - $max_pageentrys); - for ($i = 0; $i < sizeof ($userinfo); $i++) { // ignore last entry in array which is "count" - echo("" . - " " . - " " . _("Edit") . "\n"); - for ($k = 0; $k < sizeof($attr_array); $k++) { - echo ("\n"); - // print all attribute entries seperated by "; " - if (sizeof($userinfo[$i][strtolower($attr_array[$k])]) > 0) { - // delete first array entry which is "count" - if (is_array($userinfo[$i][strtolower($attr_array[$k])])) { - array_shift($userinfo[$i][strtolower($attr_array[$k])]); - echo implode("; ", $userinfo[$i][strtolower($attr_array[$k])]); + // print user list + $userinfo = array_slice ($userinfo, ($page - 1) * $max_pageentrys, $max_pageentrys); + for ($i = 0; $i < sizeof ($userinfo); $i++) { // ignore last entry in array which is "count" + echo("\n" . + "\n\n\n" . + "\n" . + _("Edit") . "\n\n"); + for ($k = 0; $k < sizeof($attr_array); $k++) { + echo ("\n"); + // print all attribute entries seperated by "; " + if (sizeof($userinfo[$i][strtolower($attr_array[$k])]) > 0) { + // delete first array entry which is "count" + if (is_array($userinfo[$i][strtolower($attr_array[$k])])) { + array_shift($userinfo[$i][strtolower($attr_array[$k])]); + echo utf8_decode(implode("; ", $userinfo[$i][strtolower($attr_array[$k])])) . "\n"; + } + else echo utf8_decode($userinfo[$i][strtolower($attr_array[$k])]) . "\n"; + } + echo ("\n"); + } + echo("\n"); } - else echo $userinfo[$i][strtolower($attr_array[$k])]; - } - } - echo (""); - } - echo("\n"); } -echo (""); +echo ("\n"); -echo ("
"); +echo ("
"); if ($user_count != 0) { draw_navigation_bar ($user_count); - echo ("
"); + echo ("
"); } if (! $_GET['norefresh']) { @@ -271,44 +272,38 @@ echo "\n"; * @return void */ function draw_navigation_bar ($user_count) { - global $max_pageentrys; - global $page; - global $sortattrib; - global $searchfilter; + global $max_pageentrys; + global $page; + global $sortattrib; + global $searchfilter; - echo (""); - echo ("\n
  "); - if ($page != 1) - echo ("<="); - else - echo ("<="); - echo (" "); + echo ("\n"); + echo (""); - echo (""); + if ($page < ($user_count / $max_pageentrys)) + echo ("=>\n"); + else echo ("=>"); + echo ("\n"); + echo ("\n"); - echo ("
\n\n  "); + if ($page != 1) + echo ("<=\n"); + else echo ("<="); + echo (" "); - if ($page < ($user_count / $max_pageentrys)) - echo ("=>"); - else - echo ("=>"); - echo (""); - echo " " . $user_count . " " . _("User(s) found"); - echo ("\n"); + echo " " . $user_count . " " . _("User(s) found") . "\n"; + echo (""); - for ($i = 0; $i < ($user_count / $max_pageentrys); $i++) { - if ($i == $page - 1) - echo (" " . ($i + 1)); - else - echo (" " . ($i + 1) . ""); - } - echo ("
"); + echo ("
"); + for ($i = 0; $i < ($user_count / $max_pageentrys); $i++) { + if ($i == $page - 1) echo (" " . ($i + 1)); + else echo (" " . ($i + 1) . "\n"); + } + echo ("
\n"); }