sourceforge/nodemin/trunk/dhcp/smaz.php @ 308
4 | batix | <?
|
|
$pocet=$_SESSION["pocet_".$_GET["smazat"]];
|
|||
//echo $pocet;
|
|||
if ($_GET['smazat']=="group") $what="popis_g";
|
|||
else $what=$_GET["smazat"];
|
|||
if ($pocet>0) {
|
|||
echo "<div align=\"center\">";
|
|||
echo "<form name=\"formSmaz\" action=\"dhcp/uloz.php?id=dhcp&smazat=".$_GET['smazat']."&lng=".$_GET['lng']."&ss=".$_GET["ss"]."&".SID."\" method=\"post\" enctype=\"multipart/form-data\">";
|
|||
echo "<select name=\"smazat_co\">";
|
|||
for ($i=0;$i<$pocet;$i++) {
|
|||
for ($u=0;$u<$_SESSION['pocet_group'];$u++)
|
|||
if ($_SESSION["pridelit_group".$u]==$_GET['smazat'].$i) $vnorene_group[$i]++;
|
|||
for ($u=0;$u<$_SESSION['pocet_host'];$u++)
|
|||
if ($_SESSION["pridelit_hosta".$u]==$_GET['smazat'].$i) $vnorene_host[$i]++;
|
|||
if ($what=="subnet") {
|
|||
for ($u=0;$u<$_SESSION['pocet_host'];$u++)
|
|||
if ($_SESSION["pridelit_hosta".$u]=="group".$i) $vnorene_host[$i]++;
|
|||
}
|
|||
if ($vnorene_group[$i]=="") $vnorene_group[$i]=0;
|
|||
if ($vnorene_host[$i]=="") $vnorene_host[$i]=0;
|
|||
if ($what=="host") {
|
|||
$potvrd_what=$lngDhcp_hostSmazat;
|
|||
echo "<option value=\"".$what.$i."\">".$_SESSION[$what.$i]."</option>";
|
|||
}
|
|||
if ($_GET["smazat"]=="group") {
|
|||
$potvrd_what=$lngDhcp_groupSmazat;
|
|||
echo "<option value=\"".$what.$i."\">".$_SESSION[$what.$i]." [H-".$vnorene_host[$i]."]</option>";
|
|||
}
|
|||
if ($what=="subnet") {
|
|||
$potvrd_what=$lngDhcp_subnetSmazat;
|
|||
echo "<option value=\"".$what.$i."\">".$_SESSION[$what.$i]." [G-".$vnorene_group[$i].", H-".$vnorene_host[$i]."]</option>";
|
|||
}
|
|||
}
|
|||
echo "</select>";
|
|||
echo "<input type=\"hidden\" name=\"smazano\" value=\"".$lng_delete."\" />";
|
|||
echo " <input type=\"button\" value=\"".$lng_delete."\" onclick=\"potvrd('".$potvrd_what."');\" />";
|
|||
echo "</form>";
|
|||
echo "</div>";
|
|||
}
|
|||
?>
|