diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-18 10:27:57 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-18 10:27:57 +0000 |
commit | f9d1dc16f4be4db410cb9aeced999aeb68d35409 (patch) | |
tree | f53d2e46b8594da9ed0ff3bde715e7ebdafd701d /frontends/php/popup.php | |
parent | 39c24b061f617c4a405b14f8bbb432523517662b (diff) | |
download | zabbix-f9d1dc16f4be4db410cb9aeced999aeb68d35409.tar.gz zabbix-f9d1dc16f4be4db410cb9aeced999aeb68d35409.tar.xz zabbix-f9d1dc16f4be4db410cb9aeced999aeb68d35409.zip |
- new table 'help_items' (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2853 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/popup.php')
-rw-r--r-- | frontends/php/popup.php | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/frontends/php/popup.php b/frontends/php/popup.php index 412bbe14..ba8c4228 100644 --- a/frontends/php/popup.php +++ b/frontends/php/popup.php @@ -29,9 +29,10 @@ $srcfld1 = get_request("srcfld1", 0); // source table field [can be different from fields of source table] $srcfld2 = get_request("srcfld2", 0); // second source table field [can be different from fields of source table] - if($srctbl == "hosts") { $page["title"] = "S_HOSTS_BIG"; $right_src = "Host"; } - if($srctbl == "triggers"){ $page["title"] = "S_TRIGGERS_BIG"; $right_src = "Triggers"; } - if($srctbl == "logitems"){ $page["title"] = "S_ITEMS_BIG"; $right_src = "Items"; } + if($srctbl == "hosts") { $page["title"] = "S_HOSTS_BIG"; $right_src = "Host"; } + if($srctbl == "triggers") { $page["title"] = "S_TRIGGERS_BIG"; $right_src = "Triggers"; } + if($srctbl == "logitems") { $page["title"] = "S_ITEMS_BIG"; $right_src = "Items"; } + if($srctbl == "help_items") { $page["title"] = "S_STANDARD_ITEMS_BIG"; $right_src = "Standard items"; } if(!isset($page["title"])) { @@ -177,6 +178,29 @@ } $table->show(); } + if($srctbl == "help_items") + { + $table = new CTableInfo(S_NO_ITEMS); + $table->SetHeader(array(S_KEY,S_DESCRIPTION)); + + $sql = "select key_,key_ from items limit 10"; + + $result = DBselect($sql); + while($row = DBfetch($result)) + { + $name = new CLink($row["key_"],"#","action"); + $name->SetAction( + "window.opener.document.forms['".$dstfrm."'].".$dstfld1.".value='".$row[$srcfld1]."';". +// " window.opener.document.forms['".$dstfrm."'].".$dstfld2.".value='".$row[$srcfld2]."';". + " window.close();"); + + $table->addRow(array( + $name, + $row["key_"] + )); + } + $table->show(); + } elseif($srctbl == "triggers") { $table = new CTableInfo(S_NO_TRIGGERS_DEFINED); |