Bonjour,
j’ai un gros problème je voudrais faire une arborescence + / - (voir image)
http://nsa07.casimages.com/img/2009/08/24/090824041221511188.png
Le probleme c’est que j’arrive a « cacher » une partie mais seulement la cacher j’aimerai que " la partie remonte" que ça ne me fasse pas un blanc…
Ensuite, pour l’onglet knom.developpement seulle une partie ce « cache » j’aimerai que tout ce cache et que tout remonte ![]()
Je vous met le code (désolé c’est un long code)
Merci pour votre aide ![]()
<script type="text/javascript">
function afficher(i)
{
if (document.getElementById(i).style.visibility == "hidden") document.getElementById(i).style.visibility = "visible";
else document.getElementById(i).style.visibility="hidden";
}
</script>
<?php
echo "<table class='table_tree' width=100% cellpadding=0 cellspacing=0><tr><td colspan=8 class=menu_item_highlight>";
echo "Hardware list on my network</td></tr>";
echo "<tr><td>";
echo "<table width=100% cellpadding=2 cellspacing=0>";
$k=0;
//nombre de hardwares
$verif_query2="SELECT COUNT(opt_hardware.name) FROM opt_hardware";
$verif2 = mysql_query($verif_query2, $dbprotect) or die(mysql_error());
if(mysql_num_rows($verif2)>0)
{
while($row_verif2 = mysql_fetch_row($verif2))
{
$row_verif2[0]++;
echo "<input type=hidden name=nbrow value=$row_verif2[0]>";
$nbrowEdit=$row_verif2[0];
}
}
if(mysql_num_rows($verif)>0)
{
$i = 0;
while($row_verif = mysql_fetch_row($verif))
{
$i++;
echo "<tr height=22>";
echo "<td align=left>";
echo "<img src=./templates/default/folder.gif></td>"; //image dossier
echo "<td><a href=javascript:afficher($i)><img src='plus.jpg' border='0' width='15px' height='15px'></a>$row_verif[0] </td>";
echo "<td class=td_item_highlight_HW> </td>";
echo "<td class=td_item_highlight_HW> </td>";
echo "<td class=td_item_highlight_HW> </td>"; // case vide
echo "<td class=td_item_highlight_HW> </td>";
echo "<td class=td_item_highlight_HW> </td>";
echo "</tr>";
//recherche des hardwares dont la rdns est...
$verif6_query="SELECT LCASE(opt_hardware.name),opt_typeh.name FROM opt_hardware,opt_typeh WHERE opt_typeh.id_typeh=opt_hardware.type_hardware AND domain_space='$row_verif[0]'";
$verif6 = mysql_query($verif6_query, $dbprotect) or die(mysql_error());
$ttbox_group="<table border=0 cellspacing=2 cellpadding=0 width=100%>";
if(mysql_num_rows($verif6)>0)
{
while($row_verif6 = mysql_fetch_row($verif6))
{
//recherche du network cache du hardware
$verif7_query="SELECT nic_adapter,ipv4_adress,ipv6_adress,mac_adress,discover,last_update FROM opt_hwnetwork WHERE opt_hwnetwork.name='$row_verif6[0]' AND domain_space='$row_verif[0]'";
$verif7 = mysql_query($verif7_query, $dbprotect) or die(mysql_error());
$ttbox_group="<table border=0 cellspacing=2 cellpadding=0 width=100%>";
if(mysql_num_rows($verif7)>0)
{
$ipBox="";
$ttbox_group.="<tr><td width=100%><table class=table_tree border=0 cellspacing=2 cellpadding=0 width=100%>";
while($row_verif7 = mysql_fetch_row($verif7))
{
$row_verif7[0] = stripslashes($row_verif7[0]);
if($row_verif7[1]!='') { $ipBox.="IPv4: $row_verif7[1]"; }
if($row_verif7[2]!='') { $ipBox.="<br>IPv6: $row_verif7[2]"; }
if($row_verif7[3]!='') { $ipBox.="<br>MAC: $row_verif7[3]"; }
$ttbox_group.="<tr><td width=100% valign=top colspan=2>$row_verif7[0]</td></tr><tr><td width=30% valign=top>$ipBox</td><td width=20% valign=top>Last update:<br>$row_verif7[5]</td></tr>";
}
$ttbox_group.="</table></td></tr>";
//$ttbox_group.=$tmp_sprint[8];
}
else
{
$ttbox_group.="<tr><td><i>This hardware has no network cache</i></td></tr>";
}
$ttbox_group.="</table>";
echo '<ul id="niv1" class="niv1">';
echo "<tr height=22>";
echo "<td align=left width=0%>";
echo "<td width=75% class=menu_item_highlight_HW><input type=checkbox name=val$k onclick='checkedCheck(invAction,$k);'> <a href='./frameset.php?module=$_GET[module]&val$k=on&hwedit$k=$row_verif6[0]@$row_verif[0]&nbrow=$nbrowEdit&action=Edit' target='_self'>$row_verif6[0] ($row_verif6[1])</a></td>";
echo "<td align=center width=5% class=menu_item_highlight_HW td_item_highlight_HW><a href=\"frameset.php?module=698d51a19d8a121ce581499d7b701668&machineSelect=$row_verif6[0]@$row_verif[0]\" target=\"_self\"><img src=$imgpath/bbb/alert.gif border=0 alt='View all alerts' title='View all alerts'></a></td>";
echo "<td align=center width=5% class=menu_item_highlight_HW td_item_highlight_HW><a href=\"frameset.php?module=19ca14e7ea6328a42e0eb13d585e4c22&machineSelect=$row_verif6[0]@$row_verif[0]\" target=\"_self\"><img src=$imgpath/bbb/hardware.gif border=0 alt='View hardware configuration' title='View hardware configuration'></a></td>";
echo "<td align=center width=5% class=menu_item_highlight_HW td_item_highlight_HW><a href=\"frameset.php?module=1c383cd30b7c298ab50293adfecb7b18&machineSelect=$row_verif6[0]@$row_verif[0]\" target=\"_self\"><img src=$imgpath/bbb/share.gif border=0 alt='Remote desktop' title='Remote desktop'></a></td>";
echo "<td align=center width=5% class=menu_item_highlight_HW td_item_highlight_HW><a href='#' class='tooltip'><img src=$imgpath/bbb/network.gif border=0><em><span></span>$ttbox_group</em></a></td>";
echo "<td align=center width=5% class=menu_item_highlight_HW td_item_highlight_HW><img src=$imgpath/bbb/soft.gif border=0></td>";
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=2 height=1 bgcolor=#ffffff></td></tr>";
echo "<input type=hidden name='hwedit$k' value='$row_verif6[0]@$row_verif[0]'>";
$k++;
}
}
else
{
echo "<tr height=22>";
echo "<td align=left>";
echo "<img src=./templates/default/branch.gif border=0></td>";
echo "<td class=menu_item_highlight_HW2><i>There is no hardware in this domain space</i></td>";
echo "<td align=center class=td_item_highlight_HW><span class=menu_item_highlight_HW_none>-</span></td>";
echo "<td align=center class=td_item_highlight_HW><span class=menu_item_highlight_HW_none>-</span></td>";
echo "<td align=center class=td_item_highlight_HW><span class=menu_item_highlight_HW_none>-</span></td>";
echo "<td align=center class=td_item_highlight_HW><span class=menu_item_highlight_HW_none>-</span></td>";
echo "<td align=center class=td_item_highlight_HW><span class=menu_item_highlight_HW_none>-</span></td>";
echo "</td>";
echo "</tr>";
}
}
}
else
{
echo "<tr>";
echo "<td align=left width=100%>";
echo "<br><ul><li><i>There is no item in package type module</i></li></ul>";
echo "</td>";
echo "</tr>";
}
echo "<input type=hidden name=module value=$_GET[module]>";
echo "</table>";
echo "</td></tr></table>";
echo $tmp_sprint[4];
break;
}
echo $tmp_sprint[6];
?>