fixed checkbox names so they fit to $info from session
This commit is contained in:
parent
a0607974bf
commit
de019cd773
|
@ -108,6 +108,8 @@ if ($refresh) {
|
|||
ldap_free_result($sr);
|
||||
// delete first array entry which is "count"
|
||||
unset($info['count']);
|
||||
// save position in original $info
|
||||
for ($i = 0; $i < sizeof($info); $i++) $info[$i]['LAM_ID'] = $i;
|
||||
// save results
|
||||
$_SESSION[$scope . 'info'] = $info;
|
||||
}
|
||||
|
@ -158,19 +160,19 @@ else $table_end = ($page * $max_page_entries);
|
|||
if (sizeof($info) > 0) {
|
||||
// print group list
|
||||
for ($i = $table_begin; $i < $table_end; $i++) {
|
||||
echo("<tr class=\"grouplist\" onMouseOver=\"list_over(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onMouseOut=\"list_out(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=group&DN=" . $info[$i]['dn'] . "'\">");
|
||||
echo("<tr class=\"grouplist\" onMouseOver=\"list_over(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onMouseOut=\"list_out(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=group&DN=" . $info[$i]['dn'] . "'\">\n");
|
||||
if (isset($_GET['selectall'])) {
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $i . "\" checked></td>";
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $info[$i]['LAM_ID'] . "\" checked></td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $i . "\"></td>";
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $info[$i]['LAM_ID'] . "\"></td>\n";
|
||||
}
|
||||
echo (" <td align='center'><a href=\"../account/edit.php?type=group&DN='" . $info[$i]['dn'] . "'\">" . _("Edit") . "</a></td>");
|
||||
echo (" <td align='center'><a href=\"../account/edit.php?type=group&DN='" . $info[$i]['dn'] . "'\">" . _("Edit") . "</a></td>\n");
|
||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||
echo ("<td>");
|
||||
// print all attribute entries seperated by "; "
|
||||
|
@ -201,7 +203,7 @@ if (sizeof($info) > 0) {
|
|||
else echo $info[$i][strtolower($attr_array[$k])];
|
||||
}
|
||||
}
|
||||
echo ("</td>");
|
||||
echo ("</td>\n");
|
||||
}
|
||||
echo("</tr>\n");
|
||||
}
|
||||
|
|
|
@ -108,6 +108,8 @@ if ($refresh) {
|
|||
ldap_free_result($sr);
|
||||
// delete first array entry which is "count"
|
||||
unset($info['count']);
|
||||
// save position in original $info
|
||||
for ($i = 0; $i < sizeof($info); $i++) $info[$i]['LAM_ID'] = $i;
|
||||
// save results
|
||||
$_SESSION[$scope . 'info'] = $info;
|
||||
}
|
||||
|
@ -158,19 +160,19 @@ else $table_end = ($page * $max_page_entries);
|
|||
if (sizeof($info) > 0) {
|
||||
// print host list
|
||||
for ($i = $table_begin; $i < $table_end; $i++) {
|
||||
echo("<tr class=\"hostlist\" onMouseOver=\"list_over(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onMouseOut=\"list_out(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=host&DN=" . $info[$i]['dn'] . "'\">");
|
||||
echo("<tr class=\"hostlist\" onMouseOver=\"list_over(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onMouseOut=\"list_out(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=host&DN=" . $info[$i]['dn'] . "'\">\n");
|
||||
if (isset($_GET['selectall'])) {
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" type=\"checkbox\" checked name=\"" . $i . "\"></td>";
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"" .
|
||||
" type=\"checkbox\" checked name=\"" . $info[$i]['LAM_ID'] . "\"></td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\"" .
|
||||
" type=\"checkbox\" name=\"" . $i . "\"></td>";
|
||||
echo " <td height=22 align=\"center\"><input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"" .
|
||||
" type=\"checkbox\" name=\"" . $info[$i]['LAM_ID'] . "\"></td>\n";
|
||||
}
|
||||
echo (" <td align='center'><a href=\"../account/edit.php?type=host&DN='" . $info[$i]['dn'] . "'\">" . _("Edit") . "</a></td>");
|
||||
echo (" <td align='center'><a href=\"../account/edit.php?type=host&DN='" . $info[$i]['dn'] . "'\">" . _("Edit") . "</a></td>\n");
|
||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||
echo ("<td>");
|
||||
// print all attribute entries seperated by "; "
|
||||
|
@ -184,7 +186,7 @@ if (sizeof($info) > 0) {
|
|||
}
|
||||
else echo $info[$i][strtolower($attr_array[$k])];
|
||||
}
|
||||
echo ("</td>");
|
||||
echo ("</td>\n");
|
||||
}
|
||||
echo("</tr>\n");
|
||||
}
|
||||
|
|
|
@ -135,6 +135,8 @@ if ($refresh) {
|
|||
ldap_free_result ($sr);
|
||||
// delete first array entry which is "count"
|
||||
unset($info['count']);
|
||||
// save position in original $info
|
||||
for ($i = 0; $i < sizeof($info); $i++) $info[$i]['LAM_ID'] = $i;
|
||||
// save results
|
||||
$_SESSION[$scope . 'info'] = $info;
|
||||
}
|
||||
|
@ -202,18 +204,18 @@ if (sizeof($info) != 0) {
|
|||
}
|
||||
// print user list
|
||||
for ($i = $table_begin; $i < $table_end; $i++) {
|
||||
echo("<tr class=\"userlist\"\nonMouseOver=\"list_over(this, '" . $i . "', '" . $scope . "')\"\n" .
|
||||
"onMouseOut=\"list_out(this, '" . $i . "', '" . $scope . "')\"\n" .
|
||||
"onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\"\n" .
|
||||
echo("<tr class=\"userlist\"\nonMouseOver=\"list_over(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
"onMouseOut=\"list_out(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
"onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\"\n" .
|
||||
"onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=user&DN=" . $info[$i]['dn'] . "'\">\n");
|
||||
// checkboxes if selectall = "yes"
|
||||
if (isset($_GET['selectall'])) {
|
||||
echo "<td height=22 align=\"center\">\n<input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\" type=\"checkbox\" name=\"" .
|
||||
$i . "\" checked>\n</td>\n";
|
||||
echo "<td height=22 align=\"center\">\n<input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\" type=\"checkbox\" name=\"" .
|
||||
$info[$i]['LAM_ID'] . "\" checked>\n</td>\n";
|
||||
}
|
||||
else {
|
||||
echo "<td height=22 align=\"center\">\n<input onClick=\"list_click(this, '" . $i . "', '" . $scope . "')\" type=\"checkbox\" name=\"" .
|
||||
$i . "\">\n</td>\n";
|
||||
echo "<td height=22 align=\"center\">\n<input onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $scope . "')\" type=\"checkbox\" name=\"" .
|
||||
$info[$i]['LAM_ID'] . "\">\n</td>\n";
|
||||
}
|
||||
echo ("<td align='center'>\n<a href=\"../account/edit.php?type=user&DN='" . $info[$i]['dn'] . "'\">" .
|
||||
_("Edit") . "</a>\n</td>\n");
|
||||
|
|
Loading…
Reference in New Issue