Ejemplo n.º 1
0
        }
    }
    ?>
</head>
<body onload="zbxCallPostScripts();">
<?php 
}
define('PAGE_HEADER_LOADED', 1);
if (isset($_REQUEST['print'])) {
    define('ZBX_PAGE_NO_MENU', 1);
    $req = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'print') - 1);
    $link = new CLink(bold('&laquo;' . S_BACK_BIG), $req, 'small_font');
    $link->setAttribute('style', 'padding-left: 10px;');
    $printview = new CDiv($link, 'printless');
    $printview->setAttribute('style', 'border: 1px #333 dotted;');
    $printview->Show();
}
if (!defined('ZBX_PAGE_NO_MENU')) {
    COpt::compare_files_with_menu($ZBX_MENU);
    $help = new CLink(S_HELP, 'http://www.zabbix.com/documentation.php', 'small_font', null, 'nosid');
    $help->setTarget('_blank');
    $support = new CLink(S_GET_SUPPORT, 'http://www.zabbix.com/support.php', 'small_font', null, 'nosid');
    $support->setTarget('_blank');
    $printview = new CLink(S_PRINT, $_SERVER['REQUEST_URI'] . (empty($_GET) ? '?' : '&') . 'print=1', 'small_font', null, 'nosid');
    $page_header_r_col = array($help, '|', $support, '|', $printview);
    if ($USER_DETAILS['alias'] != ZBX_GUEST_USER) {
        $page_header_r_col[] = array('|');
        array_push($page_header_r_col, new CLink(S_PROFILE, 'profile.php', 'small_font', null, 'nosid'), '|');
        if ($USER_DETAILS['debug_mode'] == GROUP_DEBUG_MODE_ENABLED) {
            $debug = new CLink(S_DEBUG, '#debug', 'small_font', null, 'nosid');
            $debug->setAttribute('onclick', "javascript: ShowHide('zbx_gebug_info');");
Ejemplo n.º 2
0
$gridForm = new CDiv(array($gridSize, $gridAlignAll));
$gridForm->setAttribute('id', 'gridalignblock');
$saveButton = new CSubmit('save', _('Save'));
$saveButton->setAttribute('id', 'sysmap_save');
$menuRow = array(_s('Map "%s"', $sysmap['name']), SPACE . SPACE, _('Icon'), SPACE, $el_add, SPACE, $el_rmv, SPACE . SPACE, _('Link'), SPACE, $cn_add, SPACE, $cn_rmv, SPACE . SPACE, _('Expand macros') . ' [ ', $expandMacros, ' ]', SPACE . SPACE, _('Grid') . SPACE . '[', $gridShow, '|', $gridAutoAlign, ']', SPACE, $gridForm, SPACE . '|' . SPACE, $saveButton);
$elcn_tab = new CTable(null, 'textwhite');
$elcn_tab->addRow($menuRow);
show_table_header($elcn_tab);
$sysmap_img = new CImg('images/general/tree/zero.gif', 'Sysmap');
$sysmap_img->setAttribute('id', 'sysmap_img', $sysmap['width'], $sysmap['height']);
$table = new CTable();
$table->addRow($sysmap_img);
$table->Show();
$container = new CDiv();
$container->setAttribute('id', 'sysmap_cnt');
$container->Show();
insert_show_color_picker_javascript();
add_elementNames($sysmap['selements']);
foreach ($sysmap['links'] as &$link) {
    foreach ($link['linktriggers'] as $lnum => $linktrigger) {
        $dbTrigger = API::Trigger()->get(array('triggerids' => $linktrigger['triggerid'], 'output' => array('description', 'expression'), 'selectHosts' => API_OUTPUT_EXTEND, 'preservekeys' => true, 'expandDescription' => true));
        $dbTrigger = reset($dbTrigger);
        $host = reset($dbTrigger['hosts']);
        $link['linktriggers'][$lnum]['desc_exp'] = $host['name'] . ':' . $dbTrigger['description'];
    }
    order_result($link['linktriggers'], 'desc_exp');
}
unset($link);
if ($sysmap['iconmapid']) {
    $iconMaps = API::IconMap()->get(array('iconmapids' => $sysmap['iconmapid'], 'output' => array('default_iconid'), 'preservekeys' => true));
    $iconMap = reset($iconMaps);