summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-27 11:56:36 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-27 11:56:36 +0000
commit1fb44c22f51cccab8f5c32b51fd8b52969c36073 (patch)
treeabac8d01bac879156b1d1ea654d4eaccd0d8a69b /frontends/php/include
parent4606e2b5acf4fd9527d106e01c87bba1a263a166 (diff)
downloadzabbix-1fb44c22f51cccab8f5c32b51fd8b52969c36073.tar.gz
zabbix-1fb44c22f51cccab8f5c32b51fd8b52969c36073.tar.xz
zabbix-1fb44c22f51cccab8f5c32b51fd8b52969c36073.zip
- added popup menu for quick hosts controlling in configuration screen (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3941 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/classes/cpumenu.inc.php16
-rw-r--r--frontends/php/include/config.inc.php2
-rw-r--r--frontends/php/include/hosts.inc.php9
3 files changed, 26 insertions, 1 deletions
diff --git a/frontends/php/include/classes/cpumenu.inc.php b/frontends/php/include/classes/cpumenu.inc.php
index 1b697941..95cb104e 100644
--- a/frontends/php/include/classes/cpumenu.inc.php
+++ b/frontends/php/include/classes/cpumenu.inc.php
@@ -30,6 +30,22 @@
function CPUMenu($items=array(), $width=null)
{
$this->InsertJavaScript();
+ /*********************** ITEM ARRAY ***********************
+ ITEM: array(name, url, param, css, submenu1, submenu2, ... , submenuN)
+
+ name: text
+ url: text (url for href perameter)
+ param: array(tw => t_val, sb => s_val)
+ tw: target parameter
+ t_val: one of '_blank', '_parent', '_self', '_top'
+ sb: text for statusbar)
+ s_val: text
+ css: array(outer => cssarray, inner => cssarray)
+ outer -> style for outer div element
+ inner -> style for inner link element with text
+ cssarray -> array(normal, mouseover, mousedown)
+ submen1-N: list of subitems
+ **********************************************************/
$this->items = $items;
$this->width = $width;
}
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index c3c1b316..76c273f2 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -224,7 +224,7 @@ function TODO($msg) { echo "TODO: ".$msg.BR; } // DEBUG INFO!!!
if(!is_array($value))
{
if(is_object($value)) return unpack_object($value);
- if(is_string($value)) return '\''.str_replace('\'','\\\'',zbx_jsstr($value)).'\'';
+ if(is_string($value)) return '\''.str_replace('\'','\\\'',str_replace("\n", '\n', str_replace("\r", '', ($value)))).'\'';
if(is_null($value)) return 'null';
return strval($value);
}
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index 044df43a..6d37652b 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -38,6 +38,15 @@ require_once "include/items.inc.php";
return $hostgroupid;
}
+ function delete_host_from_group($hostid, $groupid)
+ {
+ if(!is_numeric($hostid) || !is_numeric($groupid)){
+ error("incorrect parameters for 'add_host_to_group' [hostid:".$hostid."][groupid:".$groupid."]");
+ return false;
+ }
+ return DBexecute('delete from hosts_groups where hostid='.$hostid.' and groupid='.$groupid);
+ }
+
function db_save_group($name,$groupid=null)
{
if(!is_string($name)){