summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-02-07 07:22:57 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-02-07 07:22:57 +0000
commite14eda7ca352ebd02630351979a783f7a98668ae (patch)
tree9f5231123e9863a8e553202b7fbdcf9e74dfc53f /frontends/php/include/forms.inc.php
parentb6505a882597eee385998b6c0f07ab4512121b5e (diff)
downloadzabbix-e14eda7ca352ebd02630351979a783f7a98668ae.tar.gz
zabbix-e14eda7ca352ebd02630351979a783f7a98668ae.tar.xz
zabbix-e14eda7ca352ebd02630351979a783f7a98668ae.zip
- Minor changes (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2613 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 1217b36e..01e2729d 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -312,6 +312,12 @@
{
global $_REQUEST;
+ $frmItem = new CFormTable(S_ITEM,"items.php#form");
+ $frmItem->SetHelp("web.items.item.php");
+
+ if(isset($_REQUEST["groupid"]))
+ $frmItem->AddVar("groupid",$_REQUEST["groupid"]);
+
$description = get_request("description" ,"");
$key = get_request("key" ,"");
$host = get_request("host", NULL);
@@ -346,8 +352,10 @@
$host = $host_info["host"];
}
- if(isset($_REQUEST["itemid"]) && !isset($_REQUEST["form_refresh"]))
+ if(isset($_REQUEST["itemid"]))
{
+ $frmItem->AddVar("itemid",$_REQUEST["itemid"]);
+
$result=DBselect("select i.description, i.key_, h.host, i.delay,".
" i.history, i.status, i.type, i.snmp_community,i.snmp_oid,i.value_type,".
" i.trapper_hosts,i.snmp_port,i.units,i.multiplier,h.hostid,i.delta,".
@@ -356,7 +364,12 @@
" from items i,hosts h where i.itemid=".$_REQUEST["itemid"].
" and h.hostid=i.hostid");
$row=DBfetch($result);
-
+
+ $frmItem->SetTitle(S_ITEM." \"". $row["description"]."\"");
+ }
+
+ if(isset($_REQUEST["itemid"]) && !isset($_REQUEST["form_refresh"]))
+ {
$description = $row["description"];
$key = $row["key_"];
$host = $row["host"];
@@ -384,14 +397,6 @@
$logtimefmt = $row["logtimefmt"];
}
- $frmItem = new CFormTable(S_ITEM,"items.php#form");
- $frmItem->SetHelp("web.items.item.php");
-
- if(isset($_REQUEST["itemid"]))
- $frmItem->AddVar("itemid",$_REQUEST["itemid"]);
- if(isset($_REQUEST["groupid"]))
- $frmItem->AddVar("groupid",$_REQUEST["groupid"]);
-
$frmItem->AddRow(S_DESCRIPTION, new CTextBox("description",$description,40));
$frmItem->AddVar("hostid",$hostid);