Esempio n. 1
0
function jsRedirect($url, $timeout = null)
{
    zbx_flush_post_cookies();
    $script = '';
    if (is_numeric($timeout)) {
        $script .= 'setTimeout(\'window.location="' . $url . '"\',' . $timeout * 1000 . ')';
    } else {
        $script .= 'window.location.replace("' . $url . '");';
    }
    insert_js($script);
}
Esempio n. 2
0
            } else {
                if (!empty($ZBX_NODES)) {
                    $page_title .= ' (' . $ZBX_NODES[$ZBX_CURRENT_NODEID]['name'] . ')';
                }
            }
        }
        if ((defined('ZBX_PAGE_DO_REFRESH') || defined('ZBX_PAGE_DO_JS_REFRESH')) && $USER_DETAILS['refresh']) {
            $page_title .= ' [refreshed every ' . $USER_DETAILS['refresh'] . ' sec]';
        }
        break;
}
// construc menu
$main_menu = array();
$sub_menus = array();
$denyed_page_requested = zbx_construct_menu($main_menu, $sub_menus);
zbx_flush_post_cookies($denyed_page_requested);
if ($page['type'] == PAGE_TYPE_HTML) {
    ?>
<!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>
<?php 
    if (defined('ZBX_PAGE_DO_REFRESH') && $USER_DETAILS["refresh"]) {
        echo '<meta http-equiv="refresh" content="' . $USER_DETAILS["refresh"] . '" />';
    }
    ?>
Esempio n. 3
0
        unset($sub_menus[$label]);
        continue;
    }
    $menu_url = get_profile('web.menu.' . $label . '.last', false);
    //		if(ZBX_DISABLE_MENU_CACHE == 1) $menu_url = $menu['pages'][$sub_menus['default_page_id']]['url'];
    $mmenu_entry = new CCol($menu['label'], $menu_class);
    $mmenu_entry->addOption('id', $label);
    $mmenu_entry->addAction('onclick', "javascript: location.href = '{$menu_url}';");
    $mmenu_entry->addAction('onmouseover', 'javascript: MMenu.mouseOver("' . $label . '");');
    $mmenu_entry->addAction('onmouseout', 'javascript: MMenu.mouseOut();');
    array_push($main_menu, $mmenu_entry);
}
if (!isset($page_exists) && $page['type'] != PAGE_TYPE_XML) {
    $denyed_page_requested = true;
}
zbx_flush_post_cookies(isset($denyed_page_requested));
if ($page['type'] == PAGE_TYPE_HTML) {
    ?>
<!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>
<?php 
    if (defined('ZBX_PAGE_DO_REFRESH') && $USER_DETAILS["refresh"]) {
        echo '<meta http-equiv="refresh" content="' . $USER_DETAILS["refresh"] . '" />';
    }
    ?>