summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-05-06 17:28:11 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-05-06 17:28:11 +0000
commit1112b0fa600b593eae24719e942509d2d8ef68cd (patch)
tree5937a64f89faf3e3301efaa19485bd00bc82b1fe /frontends/php/include
parent26ee00a8526a15de827768c715a0fc27a4cee925 (diff)
downloadzabbix-1112b0fa600b593eae24719e942509d2d8ef68cd.tar.gz
zabbix-1112b0fa600b593eae24719e942509d2d8ef68cd.tar.xz
zabbix-1112b0fa600b593eae24719e942509d2d8ef68cd.zip
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1758 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php26
-rw-r--r--frontends/php/include/items.inc.php2
2 files changed, 28 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 3ddc6d3e..a8e41003 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -22,6 +22,7 @@
// GLOBALS
$USER_DETAILS ="";
$ERROR_MSG ="";
+ $INFO_MSG ="";
// END OF GLOBALS
include_once "include/defines.inc.php";
@@ -40,6 +41,20 @@
include_once "include/services.inc.php";
include_once "include/maps.inc.php";
+ function info($msg)
+ {
+ global $INFO_MSG;
+
+ if(is_array($INFO_MSG))
+ {
+ array_push($INFO_MSG,$msg);
+ }
+ else
+ {
+ $INFO_MSG=array($msg);
+ }
+ }
+
function error($msg)
{
global $ERROR_MSG;
@@ -694,6 +709,7 @@
function show_messages($bool,$msg,$errmsg)
{
global $ERROR_MSG;
+ global $INFO_MSG;
if(!$bool)
{
@@ -710,6 +726,16 @@
echo "</font>";
echo "</p>";
+ if(is_array($INFO_MSG))
+ {
+ echo "<p align=center class=\"info\">";
+ while(list($key, $val)=each($INFO_MSG))
+ {
+ echo $val."<br>";
+ }
+ echo "</p>";
+ }
+
if(is_array($ERROR_MSG))
{
echo "<p align=center class=\"error\">";
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php
index 56e4a3f0..ec793a75 100644
--- a/frontends/php/include/items.inc.php
+++ b/frontends/php/include/items.inc.php
@@ -139,6 +139,8 @@
if(DBnum_rows($result2)==0)
{
add_item($item["description"],$item["key_"],$row["hostid"],$item["delay"],$item["history"],$item["status"],$item["type"],$item["snmp_community"],$item["snmp_oid"],$item["value_type"],$item["trapper_hosts"],$item["snmp_port"],$item["units"],$item["multiplier"],$item["delta"],$item["snmpv3_securityname"],$item["snmpv3_securitylevel"],$item["snmpv3_authpassphrase"],$item["snmpv3_privpassphrase"],$item["formula"],$item["trends"]);
+ $host=get_host_by_hostid($row["hostid"]);
+ info("Added to host ".$host["host"]);
}
}
}