\' */ str_replace("\n", '\n', /* LF => \n */ str_replace("\\", "\\\\", /* \ => \\ */ str_replace("\r", '', /* CR => remove */ ($value))))).'\''; if(is_null($value)) return 'null'; return strval($value); } if(count($value) == 0) return '[]'; foreach($value as $id => $v) { if(!isset($is_object) && is_string($id)) $is_object = true; $value[$id] = (isset($is_object) ? '\''.$id.'\' : ' : '').zbx_jsvalue($v); } if(isset($is_object)) return '{'.implode(',',$value).'}'; else return '['.implode(',',$value).']'; } /* function: * zbx_add_post_js * * description: * add JavaScript for calling after page loaging. * * author: Eugene Grigorjev */ function zbx_add_post_js($script) { global $ZBX_PAGE_POST_JS; $ZBX_PAGE_POST_JS[] = $script; } function get_js_sizeable_graph($dom_graph_id,$url){ return new CScript(' '); } function get_dynamic_chart($dom_graph_id,$img_src,$width=0){ if(is_int($width) && $width > 0) $img_src.= url_param($width, false, 'width'); $result = new CScript(' '); return $result; } function insert_showhint_javascript(){ if(defined('SHOW_HINT_SCRIPT_INSERTTED')) return; define('SHOW_HINT_SCRIPT_INSERTTED', 1); echo ''; } function Redirect($url,$timeout=null){ zbx_flush_post_cookies(); echo ''; } function play_sound($filename){ echo ''; } function SetFocus($frm_name, $fld_name){ echo ''; } function Alert($msg){ echo ''; } function insert_js_function($fnct_name){ switch($fnct_name){ case 'add_item_variable': echo ''; break; default: break; } } function insert_js($script){ print(''); } ?>