summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.html
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-05-01 16:01:40 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-05-01 16:01:40 +0000
commitba3fc7f6fabf0fa79fa48bf8039515244ee62a68 (patch)
tree081f2993cb0606d51d919458ccf3083c30994f9d /frontends/php/items.html
parent53dc3617b87ee0e05a7e9b14a37437f96fedf275 (diff)
Warnings elimination in PHP frontend.
git-svn-id: svn://svn.zabbix.com/trunk@61 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.html')
-rw-r--r--frontends/php/items.html37
1 files changed, 20 insertions, 17 deletions
diff --git a/frontends/php/items.html b/frontends/php/items.html
index dd4c33ee..4ae1dfe1 100644
--- a/frontends/php/items.html
+++ b/frontends/php/items.html
@@ -7,22 +7,24 @@
?>
<?
-
- if($register=="update")
- {
- update_item($itemid,$description,$key,$hostid,$delay,$history,$status);
- }
- if($register=="changestatus")
- {
- update_item_status($itemid,$status);
- }
- if($register=="add")
- {
- add_item($description,$key,$hostid,$delay,$history,$status);
- }
- if($register=="delete")
+ if(isset($register))
{
- delete_item($itemid);
+ if($register=="update")
+ {
+ update_item($itemid,$description,$key,$hostid,$delay,$history,$status);
+ }
+ if($register=="changestatus")
+ {
+ update_item_status($itemid,$status);
+ }
+ if($register=="add")
+ {
+ add_item($description,$key,$hostid,$delay,$history,$status);
+ }
+ if($register=="delete")
+ {
+ delete_item($itemid);
+ }
}
?>
@@ -46,12 +48,12 @@
{
$hid=DBget_field($result,$i,0);
$host=DBget_field($result,$i,1);
- if($hostid == $hid)
+ if(isset($hostid) && ($hostid == $hid))
{
echo "<b>[";
}
echo "<A HREF=\"items.html?hostid=$hid\">$host</A>";
- if($hostid == $hid)
+ if(isset($hostid) && ($hostid == $hid))
{
echo "]</b>";
}
@@ -71,6 +73,7 @@
}
$result=DBselect("select h.host,i.key_,i.itemid,i.description,h.port,i.delay,i.history,i.lastvalue,i.lastclock,i.status,i.lastdelete,i.nextcheck,h.hostid from hosts h,items i $whereonly order by h.host,i.key_,i.description");
echo "<CENTER>";
+ $col=0;
for($i=0;$i<DBnum_rows($result);$i++)
{
$host=DBget_field($result,$i,0);