".S_NO_PERMISSIONS."");
show_footer();
exit;
}
?>
[Success for '$hosts_ok']
[Failed for '$hosts_notok'","Cannot add item");
unset($_GET["itemid"]);
}
if($_GET["register"]=="delete")
{
$result=delete_item($_GET["itemid"]);
show_messages($result, S_ITEM_DELETED, S_CANNOT_DELETE_ITEM);
unset($itemid);
}
if($_GET["register"]=="Delete selected")
{
$result=DBselect("select itemid from items where hostid=".$_GET["hostid"]);
while($row=DBfetch($result))
{
// $$ is correct here
if(isset($_GET[$row["itemid"]]))
{
$result2=delete_item($row["itemid"]);
}
}
show_messages(TRUE, S_ITEMS_DELETED, S_CANNOT_DELETE_ITEMS);
}
if($_GET["register"]=="Activate selected")
{
$result=DBselect("select itemid from items where hostid=".$_GET["hostid"]);
while($row=DBfetch($result))
{
// $$ is correct here
if(isset($_GET[$row["itemid"]]))
{
$result2=activate_item($row["itemid"]);
}
}
show_messages(TRUE, S_ITEMS_ACTIVATED, S_CANNOT_ACTIVATE_ITEMS);
}
if($_GET["register"]=="Disable selected")
{
$result=DBselect("select itemid from items where hostid=".$_GET["hostid"]);
while($row=DBfetch($result))
{
// $$ is correct here
if(isset($_GET[$row["itemid"]]))
{
$result2=disable_item($row["itemid"]);
}
}
show_messages(TRUE, S_ITEMS_DISABLED, S_CANNOT_DISABLE_ITEMS);
}
}
?>
";
$h2=$h2."