diff options
Diffstat (limited to 'frontends/php/items.html')
| -rw-r--r-- | frontends/php/items.html | 37 |
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); |
