Commit 17f5e78b authored by Laurent Joly's avatar Laurent Joly
Browse files

Update maintenance_gestion_poste.php : checkbox

parent 49d2ebc5
......@@ -46,6 +46,21 @@ else
$page_id=1;
include("maintenance_top.php");
echo "<script>\n";
echo "function checkAll()\n";
echo "{\n";
echo " var checkboxes = document.getElementsByTagName('input'), val = null; \n";
echo " for (var i = 0; i < checkboxes.length; i++)\n";
echo " {\n";
echo " if (checkboxes[i].type == 'checkbox')\n";
echo " {\n";
echo " if (val === null) val = checkboxes[i].checked;\n";
echo " checkboxes[i].checked = val;\n";
echo " }\n";
echo " }\n";
echo " }\n";
echo "</script>\n";
function maintenance_liste_poste($config,$flag,$uuid)
{
$wpkg_link = connexion_db_wpkg($config);
......@@ -164,6 +179,7 @@ if ($liste_poste) {
echo "<table cellspadding='2' cellspacing='1' border='0' align='center' bgcolor='black'>\n";
echo "<tr style='color:white'>\n";
echo "<th width='10' rowspan='2'></th>\n";
echo "<th width='120' rowspan='2'><a href='?flag=".$get_flag."&uuid=".$get_uuid."&tri=";
if ($tri == 0)
echo "1";
......@@ -249,6 +265,17 @@ echo "</tr>\n";
echo "<input type='hidden' name='tri' value='" . $tri . "'>\n";
echo "</form>\n";
echo "<form method='post' action='?tri2=" . $tri2 . "&flag=" . $get_flag . "&uuid=" . $get_uuid . "'>\n";
echo "<tr>\n";
echo "<td colspan='4'>";
echo "</td>\n";
echo "<td colspan='3' style='color:white'>";
echo "<input type='checkbox' onchange='checkAll()' name='chk[]' /> Tous/Aucun";
echo "</td>\n";
echo "<td colspan='3'>";
echo "</td>\n";
echo "</tr>\n";
foreach ($liste_poste as $nom_poste => $lp)
{
$affichage = 0;
......@@ -275,6 +302,9 @@ foreach ($liste_poste as $nom_poste => $lp)
if ($affichage == 1)
{
echo "<tr bgcolor='" . $bg . "' style='color: " . $txt . "'>";
echo "<td align='center'>";
echo "<input type='checkbox' id='poste_id[]' name='poste_id[]' value='" . $lp["id_poste"] . "' />";
echo "</td>";
echo "<td align='center'><a href='poste_statuts.php?id_host=" . $nom_poste . "' style='color: " . $lnk . "'>" . $nom_poste . "</a></td>";
echo "<td align='center' bgcolor='" . $wintype_txt . "'>";
echo '<img src="images/';
......@@ -319,6 +349,7 @@ foreach ($liste_poste as $nom_poste => $lp)
}
}
echo "</table>\n";
echo "</form>\n";
include ("pdp.inc.php");
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment