summaryrefslogtreecommitdiffstats
path: root/frontends/php
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
parent26ee00a8526a15de827768c715a0fc27a4cee925 (diff)
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1758 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/css.css9
-rw-r--r--frontends/php/include/config.inc.php26
-rw-r--r--frontends/php/include/items.inc.php2
3 files changed, 37 insertions, 0 deletions
diff --git a/frontends/php/css.css b/frontends/php/css.css
index 0e933a4f..c3c34149 100644
--- a/frontends/php/css.css
+++ b/frontends/php/css.css
@@ -255,6 +255,15 @@ p.uppercase {text-transform: uppercase}
p.margin {margin-left: 10pt}
+p.info
+{
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8pt;
+ border: 1px dashed #000000;
+ color:#000000;
+ background-color: #FFFFFF;
+}
+
p.error
{
font-family: Verdana, Arial, Helvetica, sans-serif;
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"]);
}
}
}