fixed some PHP notices
This commit is contained in:
parent
2287293f47
commit
55b4b9c995
|
@ -176,31 +176,32 @@ if (sizeof($info) > 0) {
|
||||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||||
echo ("<td>");
|
echo ("<td>");
|
||||||
// print all attribute entries seperated by "; "
|
// print all attribute entries seperated by "; "
|
||||||
if (sizeof($info[$i][strtolower($attr_array[$k])]) > 0) {
|
$attrName = strtolower($attr_array[$k]);
|
||||||
|
if (isset($info[$i][$attrName]) && sizeof($info[$i][$attrName]) > 0) {
|
||||||
// delete first array entry which is "count"
|
// delete first array entry which is "count"
|
||||||
if (is_array($info[$i][strtolower($attr_array[$k])])) unset($info[$i][strtolower($attr_array[$k])]['count']);
|
if (is_array($info[$i][$attrName])) unset($info[$i][$attrName]['count']);
|
||||||
// generate links for group members
|
// generate links for group members
|
||||||
if (strtolower($attr_array[$k]) == "memberuid") {
|
if ($attrName == "memberuid") {
|
||||||
// sort array
|
// sort array
|
||||||
sort($info[$i][strtolower($attr_array[$k])]);
|
sort($info[$i][$attrName]);
|
||||||
// make a link for each member of the group
|
// make a link for each member of the group
|
||||||
$linklist = array();
|
$linklist = array();
|
||||||
for ($d = 0; $d < sizeof($info[$i][strtolower($attr_array[$k])]); $d++) {
|
for ($d = 0; $d < sizeof($info[$i][$attrName]); $d++) {
|
||||||
$user = $info[$i][strtolower($attr_array[$k])][$d]; // user name
|
$user = $info[$i][$attrName][$d]; // user name
|
||||||
$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);
|
||||||
}
|
}
|
||||||
// print all other attributes
|
// print all other attributes
|
||||||
else {
|
else {
|
||||||
if (is_array($info[$i][strtolower($attr_array[$k])])) {
|
if (is_array($info[$i][$attrName])) {
|
||||||
// delete "count" entry
|
// delete "count" entry
|
||||||
unset($info[$i][strtolower($attr_array[$k])]['count']);
|
unset($info[$i][$attrName]['count']);
|
||||||
// sort array
|
// sort array
|
||||||
sort($info[$i][strtolower($attr_array[$k])]);
|
sort($info[$i][$attrName]);
|
||||||
echo implode("; ", $info[$i][strtolower($attr_array[$k])]);
|
echo implode("; ", $info[$i][$attrName]);
|
||||||
}
|
}
|
||||||
else echo $info[$i][strtolower($attr_array[$k])];
|
else echo $info[$i][$attrName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo ("</td>\n");
|
echo ("</td>\n");
|
||||||
|
|
|
@ -176,15 +176,16 @@ if (sizeof($info) > 0) {
|
||||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||||
echo ("<td>");
|
echo ("<td>");
|
||||||
// print all attribute entries seperated by "; "
|
// print all attribute entries seperated by "; "
|
||||||
if (sizeof($info[$i][strtolower($attr_array[$k])]) > 0) {
|
$attrName = strtolower($attr_array[$k]);
|
||||||
|
if (isset($info[$i][$attrName]) && sizeof($info[$i][$attrName]) > 0) {
|
||||||
// delete "count" entry
|
// delete "count" entry
|
||||||
unset($info[$i][strtolower($attr_array[$k])]['count']);
|
unset($info[$i][$attrName]['count']);
|
||||||
if (is_array($info[$i][strtolower($attr_array[$k])])) {
|
if (is_array($info[$i][$attrName])) {
|
||||||
// sort array
|
// sort array
|
||||||
sort($info[$i][strtolower($attr_array[$k])]);
|
sort($info[$i][$attrName]);
|
||||||
echo implode("; ", $info[$i][strtolower($attr_array[$k])]);
|
echo implode("; ", $info[$i][$attrName]);
|
||||||
}
|
}
|
||||||
else echo $info[$i][strtolower($attr_array[$k])];
|
else echo $info[$i][$attrName];
|
||||||
}
|
}
|
||||||
echo ("</td>\n");
|
echo ("</td>\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,16 +222,17 @@ if (sizeof($info) != 0) {
|
||||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||||
echo ("<td>\n");
|
echo ("<td>\n");
|
||||||
// print attribute values
|
// print attribute values
|
||||||
if (sizeof($info[$i][strtolower($attr_array[$k])]) > 0) {
|
$attrName = strtolower($attr_array[$k]);
|
||||||
if (is_array($info[$i][strtolower($attr_array[$k])])) {
|
if (isset($info[$i][$attrName]) && sizeof($info[$i][$attrName]) > 0) {
|
||||||
|
if (is_array($info[$i][$attrName])) {
|
||||||
// delete first array entry which is "count"
|
// delete first array entry which is "count"
|
||||||
unset($info[$i][strtolower($attr_array[$k])]['count']);
|
unset($info[$i][$attrName]['count']);
|
||||||
// sort array
|
// sort array
|
||||||
sort($info[$i][strtolower($attr_array[$k])]);
|
sort($info[$i][$attrName]);
|
||||||
// print all attribute entries seperated by "; "
|
// print all attribute entries seperated by "; "
|
||||||
echo implode("; ", $info[$i][strtolower($attr_array[$k])]) . "\n";
|
echo implode("; ", $info[$i][$attrName]) . "\n";
|
||||||
}
|
}
|
||||||
else echo $info[$i][strtolower($attr_array[$k])] . "\n";
|
else echo $info[$i][$attrName] . "\n";
|
||||||
}
|
}
|
||||||
echo ("</td>\n");
|
echo ("</td>\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue