} $cmbElements->addItem($row['elementid'], get_node_name_by_elid($row['elementid']) . $row['name']); if (bccomp($elementid, $row['elementid']) == 0) { $element_correct = 1; } if (!isset($first_element)) { $first_element = $row['elementid']; } } if (!isset($element_correct) && isset($first_element)) { $elementid = $first_element; } if (isset($elementid) && !slideshow_accessible($elementid, PERM_READ_ONLY)) { access_deny(); } if ($cmbElements->ItemsCount() > 0) { $form->addItem(array(SPACE . S_SLIDESHOW . SPACE, $cmbElements)); } if (2 != $_REQUEST['fullscreen'] && !empty($elementid) && check_dynamic_items($elementid, 1)) { if (!isset($_REQUEST['hostid'])) { $_REQUEST['groupid'] = $_REQUEST['hostid'] = 0; } $options = array('allow_all_hosts', 'monitored_hosts', 'with_items'); if (!$ZBX_WITH_ALL_NODES) { array_push($options, 'only_current_node'); } $params = array(); foreach ($options as $option) { $params[$option] = 1; } $PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
update_profile("web.maps.sysmapid", $_REQUEST["sysmapid"]); } $p_elements = array(); $text = null; if (isset($_REQUEST["sysmapid"])) { $sysmap = get_sysmap_by_sysmapid($_REQUEST["sysmapid"]); $text = $all_maps[$_REQUEST["sysmapid"]]; } $form = new CForm(); $form->SetMethod('get'); $form->AddVar("fullscreen", $_REQUEST["fullscreen"]); $cmbMaps = new CComboBox("sysmapid", get_request("sysmapid", 0), "submit()"); foreach ($all_maps as $id => $name) { $cmbMaps->AddItem($id, $name); } if ($cmbMaps->ItemsCount() > 0) { $form->AddItem($cmbMaps); $p_elements[] = get_table_header($text, $form); } $table = new CTable(S_NO_MAPS_DEFINED, "map"); if (isset($_REQUEST["sysmapid"])) { $action_map = get_action_map_by_sysmapid($_REQUEST["sysmapid"]); $table->AddRow($action_map); $imgMap = new CImg("map.php?noedit=1&sysmapid=" . $_REQUEST["sysmapid"]); $imgMap->SetMap($action_map->GetName()); $table->AddRow($imgMap); } $p_elements[] = $table; $icon = null; $fs_icon = null; if (isset($_REQUEST["sysmapid"])) {
$l_header->AddVar('mark_color', $_REQUEST['mark_color']); } $cmbLogList = new CComboBox('cmbloglist'); if (is_array($_REQUEST['itemid'])) { $cmbLogList->AddItem(0, $main_header); foreach ($_REQUEST['itemid'] as $itemid) { if (!($item = get_item_by_itemid($itemid)) || $item['value_type'] != ITEM_VALUE_TYPE_LOG) { invalid_url(); } $host = get_host_by_hostid($item['hostid']); $cmbLogList->AddItem($itemid, $host['host'] . ': ' . item_description($item)); } } else { $cmbLogList->AddItem($_REQUEST['itemid'], $main_header); } $l_header->AddItem(array("Log files list", SPACE, $cmbLogList, SPACE, new CButton("add_log", "Add", "return PopUp('popup.php?" . "dstfrm=" . $l_header->GetName() . "&srctbl=logitems&dstfld1=itemid&srcfld1=itemid');"), SPACE, $cmbLogList->ItemsCount() > 1 ? new CButton("remove_log", "Remove selected") : null)); } $form = new CForm(); $form->SetMethod('get'); $form->AddVar("itemid", $_REQUEST["itemid"]); if (isset($_REQUEST["filter_task"])) { $form->AddVar("filter_task", $_REQUEST["filter_task"]); } if (isset($_REQUEST["filter"])) { $form->AddVar("filter", $_REQUEST["filter"]); } if (isset($_REQUEST["mark_color"])) { $form->AddVar("mark_color", $_REQUEST["mark_color"]); } $cmbAction = new CComboBox("action", $_REQUEST["action"], "submit()"); if (str_in_array($item_type, array(ITEM_VALUE_TYPE_FLOAT, ITEM_VALUE_TYPE_UINT64))) {
$table->setCellPadding(5); $table->addRow($top_page_row); $table->show(); $menu_table = new CTable(NULL, 'menu'); $menu_table->setCellSpacing(0); $menu_table->setCellPadding(5); $menu_table->addRow($main_menu); $node_form = null; if (ZBX_DISTRIBUTED) { $lst_nodes = new CComboBox('switch_node', get_current_nodeid(false), 'submit()'); $available_nodes = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_LIST); $db_nodes = DBselect('SELECT * ' . ' FROM nodes ' . ' WHERE ' . DBcondition('nodeid', $available_nodes) . ' ORDER BY name '); while ($node_data = DBfetch($db_nodes)) { $lst_nodes->addItem($node_data['nodeid'], $node_data['name']); } if ($lst_nodes->ItemsCount() > 0) { $node_form = new CForm(); $node_form->addItem(array(new CSpan(S_CURRENT_NODE, 'textcolorstyles'), $lst_nodes)); unset($lst_nodes); if (!defined('ZBX_DISABLE_SUBNODES')) { global $ZBX_WITH_SUBNODES; $cmd_show_subnodes = new CComboBox('show_subnodes', !empty($ZBX_WITH_SUBNODES) ? 1 : 0, 'submit()'); $cmd_show_subnodes->addItem(0, S_CURRENT_NODE_ONLY); $cmd_show_subnodes->addItem(1, S_WITH_SUBNODES); $node_form->addItem(array(SPACE, new CSpan(S_SHOW, 'textcolorstyles'), $cmd_show_subnodes)); } } } $table = new CTable(); $table->setCellSpacing(0); $table->setCellPadding(0);