sort entries, convert UTF-8
This commit is contained in:
parent
6c0c5b85fa
commit
ad2cb0d103
|
@ -201,10 +201,12 @@ for ($i = $table_begin; $i < $table_end; $i++) {
|
||||||
if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]);
|
if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]);
|
||||||
// generate links for group members
|
// generate links for group members
|
||||||
if (strtolower($attr_array[$k]) == "memberuid") {
|
if (strtolower($attr_array[$k]) == "memberuid") {
|
||||||
|
// sort array
|
||||||
|
sort($grp_info[$i][strtolower($attr_array[$k])]);
|
||||||
|
// make a link for each member of the group
|
||||||
$linklist = array();
|
$linklist = array();
|
||||||
for ($d = 0; $d < sizeof($grp_info[$i][strtolower($attr_array[$k])]); $d++) {
|
for ($d = 0; $d < sizeof($grp_info[$i][strtolower($attr_array[$k])]); $d++) {
|
||||||
$user = $grp_info[$i][strtolower($attr_array[$k])][$d]; // user name
|
$user = $grp_info[$i][strtolower($attr_array[$k])][$d]; // user name
|
||||||
// make a link for each member of the group
|
|
||||||
$linklist[$d] = "<a href=\"userlink.php?user='" . $user . "' \">" . $user . "</a>";
|
$linklist[$d] = "<a href=\"userlink.php?user='" . $user . "' \">" . $user . "</a>";
|
||||||
}
|
}
|
||||||
echo implode("; ", $linklist);
|
echo implode("; ", $linklist);
|
||||||
|
@ -212,9 +214,11 @@ for ($i = $table_begin; $i < $table_end; $i++) {
|
||||||
// print all other attributes
|
// print all other attributes
|
||||||
else {
|
else {
|
||||||
if (is_array($grp_info[$i][strtolower($attr_array[$k])])) {
|
if (is_array($grp_info[$i][strtolower($attr_array[$k])])) {
|
||||||
echo implode("; ", $grp_info[$i][strtolower($attr_array[$k])]);
|
// sort array
|
||||||
|
sort($grp_info[$i][strtolower($attr_array[$k])]);
|
||||||
|
echo utf8_decode(implode("; ", $grp_info[$i][strtolower($attr_array[$k])]));
|
||||||
}
|
}
|
||||||
else echo $grp_info[$i][strtolower($attr_array[$k])];
|
else echo utf8_decode($grp_info[$i][strtolower($attr_array[$k])]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo ("</td>");
|
echo ("</td>");
|
||||||
|
|
|
@ -204,8 +204,12 @@ for ($i = $table_begin; $i < $table_end; $i++) {
|
||||||
if (sizeof($hst_info[$i][strtolower($attr_array[$k])]) > 0) {
|
if (sizeof($hst_info[$i][strtolower($attr_array[$k])]) > 0) {
|
||||||
// delete first array entry which is "count"
|
// delete first array entry which is "count"
|
||||||
if ((! $_GET['norefresh']) && (is_array($hst_info[$i][strtolower($attr_array[$k])]))) array_shift($hst_info[$i][strtolower($attr_array[$k])]);
|
if ((! $_GET['norefresh']) && (is_array($hst_info[$i][strtolower($attr_array[$k])]))) array_shift($hst_info[$i][strtolower($attr_array[$k])]);
|
||||||
if (is_array($hst_info[$i][strtolower($attr_array[$k])])) echo implode("; ", $hst_info[$i][strtolower($attr_array[$k])]);
|
if (is_array($hst_info[$i][strtolower($attr_array[$k])])) {
|
||||||
else echo $hst_info[$i][strtolower($attr_array[$k])];
|
// sort array
|
||||||
|
sort($hst_info[$i][strtolower($attr_array[$k])]);
|
||||||
|
echo utf8_decode(implode("; ", $hst_info[$i][strtolower($attr_array[$k])]));
|
||||||
|
}
|
||||||
|
else echo utf8_decode($hst_info[$i][strtolower($attr_array[$k])]);
|
||||||
}
|
}
|
||||||
echo ("</td>");
|
echo ("</td>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,6 +270,8 @@ if ($user_count != 0) {
|
||||||
if (is_array($userinfo[$i][strtolower($attr_array[$k])])) {
|
if (is_array($userinfo[$i][strtolower($attr_array[$k])])) {
|
||||||
// delete first array entry which is "count"
|
// delete first array entry which is "count"
|
||||||
array_shift($userinfo[$i][strtolower($attr_array[$k])]);
|
array_shift($userinfo[$i][strtolower($attr_array[$k])]);
|
||||||
|
// sort array
|
||||||
|
sort($userinfo[$i][strtolower($attr_array[$k])]);
|
||||||
if (($trans_primary == "on") && (strtolower($attr_array[$k]) == "gidnumber")) {
|
if (($trans_primary == "on") && (strtolower($attr_array[$k]) == "gidnumber")) {
|
||||||
// translate GID number to group name
|
// translate GID number to group name
|
||||||
if ($trans_primary_hash[$userinfo[$i][strtolower($attr_array[$k])][0]]) {
|
if ($trans_primary_hash[$userinfo[$i][strtolower($attr_array[$k])][0]]) {
|
||||||
|
|
Loading…
Reference in New Issue