diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-01-07 13:29:16 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-01-07 13:29:16 +0000 |
| commit | d82f4f660f480ecbc7eaf5e7fd42140803908cfb (patch) | |
| tree | b930c8c59d2e26f3304da5a234a5c8ca78f58458 /frontends/php/include | |
| parent | 5bbc8ab6911eeeb79bc6f88dab5f53394de3b630 (diff) | |
| download | zabbix-d82f4f660f480ecbc7eaf5e7fd42140803908cfb.tar.gz zabbix-d82f4f660f480ecbc7eaf5e7fd42140803908cfb.tar.xz zabbix-d82f4f660f480ecbc7eaf5e7fd42140803908cfb.zip | |
- [ZBX-246] fixed header error in Monitoring->slideshows (Artem)
- added history view in ackowledge screen (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5231 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc.php | 35 | ||||
| -rw-r--r-- | frontends/php/include/js.inc.php | 13 | ||||
| -rw-r--r-- | frontends/php/include/locales/en_gb.inc.php | 1 | ||||
| -rw-r--r-- | frontends/php/include/page_header.php | 2 | ||||
| -rw-r--r-- | frontends/php/include/perm.inc.php | 9 | ||||
| -rw-r--r-- | frontends/php/include/screens.inc.php | 2 | ||||
| -rw-r--r-- | frontends/php/include/users.inc.php | 1 |
7 files changed, 31 insertions, 32 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 2be1d66f..64996a32 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -251,21 +251,20 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!! define('ZBX_DISABLE_SUBNODES', 1); } - function get_current_nodeid( $forse_with_subnodes = null, $perm = null ) - { + function get_current_nodeid( $forse_with_subnodes = null, $perm = null ){ global $ZBX_CURRENT_NODEID, $ZBX_CURRENT_SUBNODES, $ZBX_WITH_SUBNODES; - if ( !isset($ZBX_CURRENT_NODEID) ) init_nodes(); + if(!isset($ZBX_CURRENT_NODEID)) + init_nodes(); + $result = ( is_show_subnodes($forse_with_subnodes) ? $ZBX_CURRENT_SUBNODES : $ZBX_CURRENT_NODEID ); - if ( !is_null($perm) ) - { + if(!is_null($perm)){ global $USER_DETAILS; - $result = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_ONLY, null, null, $result); } - return $result; + return $result; } function get_node_name_by_elid($id_val, $forse_with_subnodes = null) @@ -700,8 +699,8 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!! if($msg_count > $msg_show) $msg_count = $msg_show; - $msg_count = ($msg_count * $msg_font_size *2) + 2; - $lst_error->AddOption('style','font-size: '.$msg_font_size.'pt; height: '.$msg_count.';'); + $msg_count = ($msg_count * $msg_font_size *4) + 2; + $lst_error->AddOption('style','font-size: '.$msg_font_size.'pt; height: '.$msg_count.'px;'); //--- $lst_error->Show(); @@ -1608,9 +1607,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!! * * author: Eugene Grigorjev */ - function get_cookie($name, $default_value=null) - { - global $_COOKIE; + function get_cookie($name, $default_value=null){ if(isset($_COOKIE[$name])) return $_COOKIE[$name]; // else return $default_value; @@ -1624,10 +1621,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!! * * author: Eugene Grigorjev */ - function zbx_setcookie($name, $value, $time=null) - { - global $_COOKIE; - + function zbx_setcookie($name, $value, $time=null){ setcookie($name, $value, isset($time) ? $time : (0)); $_COOKIE[$name] = $value; } @@ -1653,14 +1647,11 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!! * * author: Eugene Grigorjev */ - function zbx_flush_post_cookies($unset=false) - { + function zbx_flush_post_cookies($unset=false){ global $ZBX_PAGE_COOKIES; - if(isset($ZBX_PAGE_COOKIES)) - { - foreach($ZBX_PAGE_COOKIES as $cookie) - { + if(isset($ZBX_PAGE_COOKIES)){ + foreach($ZBX_PAGE_COOKIES as $cookie){ if($unset) zbx_unsetcookie($cookie[0]); else diff --git a/frontends/php/include/js.inc.php b/frontends/php/include/js.inc.php index e7f27d43..2d2879f3 100644 --- a/frontends/php/include/js.inc.php +++ b/frontends/php/include/js.inc.php @@ -115,7 +115,7 @@ function insert_showhint_javascript(){ echo '<script type="text/javascript" src="js/showhint.js"></script>'; } -function Redirect($url,$timeout=null){ +function redirect($url,$timeout=null){ zbx_flush_post_cookies(); echo '<script language="JavaScript" type="text/javascript">'; @@ -128,6 +128,17 @@ function Redirect($url,$timeout=null){ echo '</script>'; } +function simple_js_redirect($url,$timeout=null){ + echo '<script language="JavaScript" type="text/javascript">'; + if( is_numeric($timeout) ) { + echo 'setTimeout(\'window.location="'.$url.'"\','.($timeout*1000).')'; + } + else { + echo 'window.location = "'.$url.'";'; + } + echo '</script>'; +} + function play_sound($filename){ echo '<script language="javascript" type="text/javascript"> diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php index 6331711b..d858be68 100644 --- a/frontends/php/include/locales/en_gb.inc.php +++ b/frontends/php/include/locales/en_gb.inc.php @@ -188,6 +188,7 @@ 'S_WITH_SUBNODES'=> 'With subnodes', // acknow.php + 'S_NO_EVENTS_TO_ACKNOWLEDGE'=> 'No events to acknowledge', 'S_ACKNOWLEDGES'=> 'Acknowledges', 'S_ACKNOWLEDGE'=> 'Acknowledge', 'S_RETURN'=> 'Return', diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php index 9b2cfac1..ae182e68 100644 --- a/frontends/php/include/page_header.php +++ b/frontends/php/include/page_header.php @@ -348,7 +348,7 @@ COpt::profiling_start("page"); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title><?php echo $page['title'] ?></title> + <title><?php echo $page['title']; ?></title> <?php if(defined('ZBX_PAGE_DO_REFRESH') && $USER_DETAILS["refresh"]) { echo '<meta http-equiv="refresh" content="'.$USER_DETAILS["refresh"].'" />'; diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php index 5354e087..c3451358 100644 --- a/frontends/php/include/perm.inc.php +++ b/frontends/php/include/perm.inc.php @@ -69,8 +69,7 @@ } } - if(!$USER_DETAILS) - { + if(!$USER_DETAILS){ if(!($USER_DETAILS = DBfetch(DBselect("select u.* from users u where u.alias=".zbx_dbstr(ZBX_GUEST_USER). " and ".DBin_node('u.userid', $ZBX_LOCALNODEID))))) { @@ -78,8 +77,7 @@ } } - if($USER_DETAILS) - { + if($USER_DETAILS){ $USER_DETAILS['node'] = DBfetch(DBselect('select * from nodes where nodeid='.id2nodeid($USER_DETAILS['userid']))); if(empty($USER_DETAILS['node'])) { @@ -87,8 +85,7 @@ $USER_DETAILS['node']['nodeid'] = $ZBX_LOCALNODEID; } } - else - { + else{ $USER_DETAILS = array( "alias" =>ZBX_GUEST_USER, "userid"=>0, diff --git a/frontends/php/include/screens.inc.php b/frontends/php/include/screens.inc.php index 8c71f7d8..45c03230 100644 --- a/frontends/php/include/screens.inc.php +++ b/frontends/php/include/screens.inc.php @@ -211,7 +211,7 @@ $slide_data['delay'] = $slide_data['ss_delay']; } - Redirect('screens.php?config=1&fullscreen=2&elementid='.$slideshowid.'&step='.($curr_step + 1). + simple_js_redirect('screens.php?config=1&fullscreen=2&elementid='.$slideshowid.'&step='.($curr_step + 1). '&period='.$effectiveperiod.url_param('stime').url_param('from'), $slide_data['delay']); diff --git a/frontends/php/include/users.inc.php b/frontends/php/include/users.inc.php index 44419f94..96276660 100644 --- a/frontends/php/include/users.inc.php +++ b/frontends/php/include/users.inc.php @@ -42,7 +42,6 @@ error("Insufficient permissions"); return 0; } - if(DBfetch(DBselect("select * from users where alias=".zbx_dbstr($alias)." and ".DBin_node('userid', get_current_nodeid(false))))) { error('User "'.$alias.'" already exists'); |
