diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-12-18 12:54:25 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-12-18 12:54:25 +0000 |
| commit | 5da5f464180147ff1c28db495dc13149c79f4060 (patch) | |
| tree | 677e193b7459a5894539fca92c6bdeca1ddb7318 /frontends/php/include | |
| parent | 653533cb7714ecaab944eb1b483f20f6e14a3858 (diff) | |
| download | zabbix-5da5f464180147ff1c28db495dc13149c79f4060.tar.gz zabbix-5da5f464180147ff1c28db495dc13149c79f4060.tar.xz zabbix-5da5f464180147ff1c28db495dc13149c79f4060.zip | |
- [DEV-88] duplicated entry "Login" removed (Artem)
- [ZBX-208] fixes related to html parse (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5191 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/locales/en_gb.inc.php | 3 | ||||
| -rw-r--r-- | frontends/php/include/page_header.php | 74 | ||||
| -rw-r--r-- | frontends/php/include/services.inc.php | 29 |
3 files changed, 49 insertions, 57 deletions
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php index 80fa4bff..9ca9d8c4 100644 --- a/frontends/php/include/locales/en_gb.inc.php +++ b/frontends/php/include/locales/en_gb.inc.php @@ -1093,6 +1093,9 @@ 'S_DELETE_SLIDESHOW_Q'=> 'Delete slideshow?', // services.php + 'S_AVERAGE_PROBLEM'=> 'Average problem', + 'S_SERIOUS_PROBLEM'=> 'Serious problem', + 'S_MINOR_PROBLEM'=> 'Minor problem', 'S_ROOT_SMALL'=> 'root', 'S_IT_SERVICE'=> 'IT service', 'S_IT_SERVICES'=> 'IT services', diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php index 21b9e70a..5162c3c9 100644 --- a/frontends/php/include/page_header.php +++ b/frontends/php/include/page_header.php @@ -225,38 +225,42 @@ COpt::profiling_start("page"); $deny = true; } - if(isset($sub['node_perm'])) - { + if(isset($sub['node_perm'])){ if ( 0 == count(get_accessible_nodes_by_user( - $USER_DETAILS,$sub['node_perm'],null, - PERM_RES_IDS_ARRAY,get_current_nodeid(false)))) - $deny = true; + $USER_DETAILS, + $sub['node_perm'], + null, + PERM_RES_IDS_ARRAY, + get_current_nodeid(false)))) + { + $deny = true; + } } - if($label=='login') - { - unset($deny); + if($label=='login'){ + $deny = true; +/* if(isset($USER_DETAILS['sessionid'])) + $sub['label'] = S_LOGOUT; + else + unset($deny); +*/ } } // End of main menu permissions checking unset($menu_url); - foreach($sub['pages'] as $id => $sub_pages) - { - if(!defined('ZBX_PAGE_NO_AUTHERIZATION')) - { - if(isset($sub_pages['user_type'])) - { - if($USER_DETAILS['type'] < $sub_pages['user_type']) - { + foreach($sub['pages'] as $id => $sub_pages){ + + if(!defined('ZBX_PAGE_NO_AUTHERIZATION')){ + if(isset($sub_pages['user_type'])){ + if($USER_DETAILS['type'] < $sub_pages['user_type']){ unset($sub['pages'][$id]); continue; } } - if(isset($sub_pages['node_perm'])) - { + if(isset($sub_pages['node_perm'])){ if ( 0 == count(get_accessible_nodes_by_user( $USER_DETAILS,$sub_pages['node_perm'],null, PERM_RES_IDS_ARRAY,get_current_nodeid(false)))) @@ -269,21 +273,17 @@ COpt::profiling_start("page"); if(isset($page_exist)) continue; - if($page['file'] == $sub_pages['url']) - { - if(isset($sub_pages['label'])) - { + if($page['file'] == $sub_pages['url']){ + if(isset($sub_pages['label'])){ $menu_url = $sub_pages['url']; } + $page_exist = true; $sub['pages'][$id]['active'] = true; /* mark as active */ } - else if(isset($sub_pages['sub_pages'])) - { - if(in_array($page['file'], $sub_pages['sub_pages'])) - { - if(isset($sub_pages['label'])) - { + else if(isset($sub_pages['sub_pages'])){ + if(in_array($page['file'], $sub_pages['sub_pages'])){ + if(isset($sub_pages['label'])){ $menu_url = $sub_pages['url']; } $page_exist = true; @@ -293,27 +293,23 @@ COpt::profiling_start("page"); if ( isset($page_exist) && ( isset($sub['forse_disable_subnodes']) || isset($sub_pages['forse_disable_subnodes']) ) && - !defined('ZBX_DISABLE_SUBNODES') - ) + !defined('ZBX_DISABLE_SUBNODES')) { define('ZBX_DISABLE_SUBNODES', 1); } } - if(isset($menu_url)) /* active menu */ - { + if(isset($menu_url)){ /* active menu */ $class = "active"; update_profile('web.menu.'.$label.'.last', $menu_url); - if(isset($deny)) - { + if(isset($deny)){ $denyed_page_requested = true; continue; } - foreach($sub['pages'] as $sub_pages) - { + foreach($sub['pages'] as $sub_pages){ if(!isset($sub_pages['label'])) continue; $label = new CLink($sub_pages['label'], $sub_pages['url'],'highlight'); @@ -325,8 +321,7 @@ COpt::profiling_start("page"); ); } } - else - { + else{ if(isset($deny)) continue; $class = "horizontal_menu_n"; @@ -341,8 +336,7 @@ COpt::profiling_start("page"); unset($menu_url, $class); } - if((!isset($page_exist) && $page['type']!=PAGE_TYPE_XML)) - { + if((!isset($page_exist) && $page['type']!=PAGE_TYPE_XML)){ $denyed_page_requested = true; } diff --git a/frontends/php/include/services.inc.php b/frontends/php/include/services.inc.php index 8f4e484a..b1b7f782 100644 --- a/frontends/php/include/services.inc.php +++ b/frontends/php/include/services.inc.php @@ -570,30 +570,25 @@ $dt = 0; return $sla_time; } - function get_service_status_description($status) - { - $desc='<font color="#00AA00">OK</a>'; + function get_service_status_description($status){ + $desc=new CSpan(S_OK_BIG,'green'); if($status==5) { - $desc='<div class="disaster">Disaster</div>'; + $desc=new CTag('div','yes',S_DISASTER,'disaster'); } - elseif($status==4) - { - $desc='<div class="high">Serious'.SPACE.'problem</div> '; + else if($status==4){ + $desc=new CTag('div','yes',S_SERIOUS_PROBLEM,'high'); } - elseif($status==3) - { - $desc='<div class="average">Average'.SPACE.'problem</div> '; + else if($status==3){ + $desc=new CTag('div','yes',S_AVERAGE_PROBLEM,'average'); } - elseif($status==2) - { - $desc='<div class="warning">Minor'.SPACE.'problem</div> '; + else if($status==2){ + $desc=new CTag('div','yes',S_MINOR_PROBLEM,'warning'); } - elseif($status==1) - { - $desc='<font color="#00AA00">OK</font>'; + else if($status==1){ + $desc=new CSpan(S_OK_BIG,'green'); } - return $desc; + return $desc; } function get_num_of_service_childs($serviceid) |
