summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-12-27 15:03:19 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-12-27 15:03:19 +0000
commita95958e564bcd16f44395ed7d45f7994b198e9b2 (patch)
tree11d574d75d9d132f569fbfa3f4dc387b03a78703 /frontends/php/items.php
parentaecf783b642e2f37d349daf2190e2e9dc7e9cee9 (diff)
- added severity to pre-defined triggers (Alexei)
- many misc changes (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@610 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
-rw-r--r--frontends/php/items.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php
index 457f0272..e72596b3 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -23,7 +23,7 @@
{
$result=update_item($HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["description"],$HTTP_GET_VARS["key"],$HTTP_GET_VARS["hostid"],$HTTP_GET_VARS["delay"],$HTTP_GET_VARS["history"],$HTTP_GET_VARS["status"],$HTTP_GET_VARS["type"],$HTTP_GET_VARS["snmp_community"],$HTTP_GET_VARS["snmp_oid"],$HTTP_GET_VARS["value_type"],$HTTP_GET_VARS["trapper_hosts"]);
show_messages($result,"Item updated","Cannot update item");
- unset($itemid);
+// unset($itemid);
}
if($HTTP_GET_VARS["register"]=="changestatus")
{
@@ -43,6 +43,19 @@
show_messages($result,"Item deleted","Cannot delete item");
unset($itemid);
}
+ if($HTTP_GET_VARS["register"]=="Delete selected")
+ {
+ $result=DBselect("select itemid from items where hostid=".$HTTP_GET_VARS["hostid"]);
+ while($row=DBfetch($result))
+ {
+// $$ is correct here
+ if(isset($$row["itemid"]))
+ {
+ $result2=delete_item($row["itemid"]);
+ }
+ }
+ show_messages($result2,"Items deleted","Cannot delete items");
+ }
}
?>
@@ -92,10 +105,13 @@
}
echo "<br>";
show_table_header("<A HREF='items.php?hostid=".$row["hostid"]."'>".$row["host"]."</A>");
+ echo "<form method=\"get\" action=\"items.php\">";
+ echo "<input class=\"biginput\" name=\"hostid\" type=hidden value=".$HTTP_GET_VARS["hostid"]." size=8>";
echo "<TABLE BORDER=0 COLS=13 align=center WIDTH=100% BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
echo "<TR>";
+ echo "<TD WIDTH=3% NOSAVE><B>Sel</B></TD>";
echo "<TD WIDTH=3% NOSAVE><B>Id</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>Host</B></TD>";
+// echo "<TD WIDTH=10% NOSAVE><B>Host</B></TD>";
echo "<TD WIDTH=10% NOSAVE><B>Key</B></TD>";
echo "<TD WIDTH=10% NOSAVE><B>Description</B></TD>";
echo "<TD WIDTH=5% NOSAVE><B>Update interval</B></TD>";
@@ -110,8 +126,9 @@
if($col++%2 == 1) { echo "<TR BGCOLOR=#DDDDDD>"; }
else { echo "<TR BGCOLOR=#EEEEEE>"; }
+ echo "<TD><INPUT TYPE=\"CHECKBOX\" class=\"biginput\" NAME=\"".$row["itemid"]."\"></TD>";
echo "<TD>".$row["itemid"]."</TD>";
- echo "<TD>".$row["host"]."</TD>";
+// echo "<TD>".$row["host"]."</TD>";
echo "<TD>".$row["key_"]."</TD>";
echo "<TD>".$row["description"]."</TD>";
echo "<TD>".$row["delay"]."</TD>";
@@ -194,6 +211,10 @@
echo "</TR>";
}
echo "</TABLE>";
+ show_table2_header_begin();
+ echo "<input type=\"submit\" name=\"register\" value=\"Delete selected\">";
+ show_table2_header_end();
+ echo "</form>";
}
else
{