added support for selecting rows in host list
fixed some syntax errors in HTML
This commit is contained in:
parent
e5dfbccd06
commit
9261c21894
|
@ -29,9 +29,9 @@ include_once("ldap.php");
|
||||||
session_save_path("../sess");
|
session_save_path("../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
echo "<html><head><title>hjhj</title>";
|
echo "<html><head><title>hjhj</title>\n";
|
||||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n";
|
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n";
|
||||||
echo "</head><body bgcolor=\"#F4F4F4\">\n";
|
echo "</head><body>\n";
|
||||||
echo "<script src=\"./functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
|
echo "<script src=\"./functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
|
||||||
|
|
||||||
// generate attribute-description table
|
// generate attribute-description table
|
||||||
|
@ -70,14 +70,15 @@ else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please che
|
||||||
|
|
||||||
echo ("<form action=\"../templates/account.php?type=group\" method=\"post\">\n");
|
echo ("<form action=\"../templates/account.php?type=group\" method=\"post\">\n");
|
||||||
|
|
||||||
// print host table header
|
// print group table header
|
||||||
echo "<table rules='all' class=\"grouplist\" width=\"100%\">\n";
|
echo "<table rules=\"all\" class=\"grouplist\" width=\"100%\">\n";
|
||||||
echo "<tr class=\"grouplist_head\"><th width=22 height=34></th><th></th>";
|
echo "<tr class=\"grouplist_head\"><th width=22 height=34></th><th></th>";
|
||||||
// table header
|
// table header
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
echo "<th>" . $desc_array[$k] . "</th>";
|
echo "<th>" . $desc_array[$k] . "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
// print group list
|
// print group list
|
||||||
for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which is "count"
|
for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which is "count"
|
||||||
echo("<tr class=\"grouplist\" onMouseOver=\"group_over(this, '" . $info[$i]["dn"] . "')\"" .
|
echo("<tr class=\"grouplist\" onMouseOver=\"group_over(this, '" . $info[$i]["dn"] . "')\"" .
|
||||||
|
|
|
@ -29,7 +29,10 @@ include_once("ldap.php");
|
||||||
session_save_path("../sess");
|
session_save_path("../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\" />";
|
echo "<html><head><title>hjhj</title>\n";
|
||||||
|
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n";
|
||||||
|
echo "</head><body>\n";
|
||||||
|
echo "<script src=\"./functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
|
||||||
|
|
||||||
// generate attribute-description table
|
// generate attribute-description table
|
||||||
$attr_array; // list of LDAP attributes to show
|
$attr_array; // list of LDAP attributes to show
|
||||||
|
@ -66,19 +69,26 @@ if ($sr) {
|
||||||
else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please check your preferences. <br> No Samba Hosts found!") . "</b></font><br><br>");
|
else echo ("<br><br><font color=\"red\"><b>" . _("LDAP Search failed! Please check your preferences. <br> No Samba Hosts found!") . "</b></font><br><br>");
|
||||||
|
|
||||||
echo ("<form action=\"../templates/account.php?type=host\" method=\"post\">\n");
|
echo ("<form action=\"../templates/account.php?type=host\" method=\"post\">\n");
|
||||||
// print host table
|
|
||||||
echo "<table width=\"100%\">\n";
|
// print host table header
|
||||||
echo "<tr><th class=\"hostlist\" width=12></th>";
|
echo "<table rules=\"all\" class=\"hostlist\" width=\"100%\">\n";
|
||||||
|
echo "<tr class=\"hostlist_head\"><th width=22 height=34></th><th></th>";
|
||||||
// table header
|
// table header
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
echo "<th class=\"hostlist\">" . $desc_array[$k] . "</th>";
|
echo "<th>" . $desc_array[$k] . "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
// print host list
|
// print host list
|
||||||
for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which is "count"
|
for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which is "count"
|
||||||
echo("<tr><td class=\"hostlist\"><input type=\"radio\" name=\"DN\" value=\"" . $info[$i]["dn"] . "\"></td>");
|
echo("<tr class=\"hostlist\" onMouseOver=\"host_over(this, '" . $info[$i]["dn"] . "')\"" .
|
||||||
|
" onMouseOut=\"host_out(this, '" . $info[$i]["dn"] . "')\"" .
|
||||||
|
" onClick=\"host_click(this, '" . $info[$i]["dn"] . "')\"" .
|
||||||
|
" onDblClick=parent.frames[1].location.href=\"../templates/account.php?type=host,DN='" . $info[$i]["dn"] . "'\">" .
|
||||||
|
" <td height=22><input type=\"checkbox\" name=\"" . $info[$i]["dn"] . "\"></td>" .
|
||||||
|
" <td align='center'><a href=\"../templates/account.php?type=host,DN='" . $info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
|
||||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||||
echo ("<td class=\"hostlist\">");
|
echo ("<td>");
|
||||||
// print all attribute entries seperated by "; "
|
// print all attribute entries seperated by "; "
|
||||||
if (sizeof($info[$i][strtolower($attr_array[$k])]) > 0) {
|
if (sizeof($info[$i][strtolower($attr_array[$k])]) > 0) {
|
||||||
array_shift($info[$i][strtolower($attr_array[$k])]);
|
array_shift($info[$i][strtolower($attr_array[$k])]);
|
||||||
|
@ -90,11 +100,10 @@ for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which i
|
||||||
}
|
}
|
||||||
echo ("</table>");
|
echo ("</table>");
|
||||||
echo ("<p> </p>\n");
|
echo ("<p> </p>\n");
|
||||||
echo ("<p> </p>\n");
|
|
||||||
echo ("<table align=\"left\" border=\"0\">");
|
echo ("<table align=\"left\" border=\"0\">");
|
||||||
echo ("<tr><td align=\"left\"><input type=\"submit\" name=\"edithost\" value=\"" . _("Edit Host") . "\">");
|
echo ("<tr><td align=\"left\"><input type=\"button\" name=\"newhost\" value=\"" . _("New Host") . "\" onClick=\"self.location.href='../templates/account.php?type=host'\">");
|
||||||
echo (" <input type=\"button\" name=\"newhost\" value=\"" . _("New Host") . "\" onClick=\"self.location.href='../templates/account.php?type=host'\">");
|
echo (" <input type=\"button\" name=\"delhost\" value=\"" . _("Delete Host(s)") . "\" onClick=\"self.location.href='../templates/account.php?type=delete'\"></td></tr>\n");
|
||||||
echo (" <input type=\"button\" name=\"delhost\" value=\"" . _("Delete Host") . "\" onClick=\"self.location.href='../templates/account.php?type=delete'\"></td></tr>\n");
|
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</form>\n");
|
echo ("</form>\n");
|
||||||
|
echo "</body></html>\n";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -130,22 +130,33 @@ tr.grouplist_checked {
|
||||||
* table style for hostlist.php
|
* table style for hostlist.php
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
th.hostlist {
|
|
||||||
|
/* table preferences */
|
||||||
|
table.hostlist {
|
||||||
border-width:1px;
|
border-width:1px;
|
||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-color:#B7C7B7;
|
border-color:#911a1a;
|
||||||
padding:10px;
|
|
||||||
background-color:#ffc4ba;
|
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* color of entry rows */
|
||||||
|
tr.hostlist {
|
||||||
|
background-color:#ffe2dd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* color of head row */
|
||||||
|
tr.hostlist_head {
|
||||||
|
background-color:#ffc4ba;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.hostlist {
|
/* color of rows on mouseOver */
|
||||||
border-width:1px;
|
tr.hostlist_over {
|
||||||
border-style:solid;
|
background-color:#ffe265;
|
||||||
border-color:#C7D7C7;
|
}
|
||||||
padding:4px;
|
|
||||||
background-color:#ffe2dd;
|
/* color of checked rows */
|
||||||
font-size:14px;
|
tr.hostlist_checked {
|
||||||
|
background-color:#f27c71;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue