$cmbConf->addItem('graphs.php', S_GRAPHS); $cmbConf->addItem('applications.php', S_APPLICATIONS); $form->addItem($cmbConf); if ($PAGE_HOSTS['selected'] > 0) { $form->addItem(array(SPACE, new CButton('form', S_CREATE_ITEM))); } show_table_header(S_CONFIGURATION_OF_ITEMS_BIG, $form); echo SBR; if (isset($_REQUEST['form'])) { // FORM if (str_in_array($_REQUEST['form'], array(S_CREATE_ITEM, 'update', 'clone')) || $_REQUEST['form'] == 'mass_update' && isset($_REQUEST['group_itemid'])) { insert_item_form(); } } if ($_REQUEST['go'] == 'massupdate' && isset($_REQUEST['group_itemid'])) { insert_mass_update_item_form('group_itemid'); } else { if ($_REQUEST['go'] == 'copy_to' && isset($_REQUEST['group_itemid'])) { insert_copy_elements_to_forms('group_itemid'); } else { if (!isset($_REQUEST['form']) || !str_in_array($_REQUEST['form'], array(S_CREATE_ITEM, 'update', 'clone'))) { $items_wdgt = new CWidget(); // Table HEADER $form = new CForm(); $form->setMethod('get'); $where_case = array(); $from_tables['h'] = 'hosts h'; $where_case[] = 'i.hostid=h.hostid'; $where_case[] = DBcondition('h.hostid', $available_hosts); // Items Header $form->addItem(array('[', new CLink($showdisabled ? S_HIDE_DISABLED_ITEMS : S_SHOW_DISABLED_ITEMS, '?showdisabled=' . ($showdisabled ? 0 : 1) . url_param('groupid') . url_param('hostid'), null), ']', SPACE));
} $items_wdgt = new CWidget(); $form = new CForm(null, 'get'); $form->setName('hdrform'); if (!isset($_REQUEST['form'])) { $form->addVar('form_hostid', $hostid); } // Config $form->addItem(array(SPACE, new CButton('form', S_CREATE_ITEM))); $items_wdgt->addPageHeader(S_CONFIGURATION_OF_ITEMS_BIG, $form); // show_table_header(S_CONFIGURATION_OF_ITEMS_BIG, $form); if (isset($_REQUEST['form']) && str_in_array($_REQUEST['form'], array(S_CREATE_ITEM, 'update', 'clone'))) { $items_wdgt->addItem(insert_item_form()); } else { if (($_REQUEST['go'] == 'massupdate' || isset($_REQUEST['massupdate'])) && isset($_REQUEST['group_itemid'])) { $items_wdgt->addItem(insert_mass_update_item_form()); } else { if ($_REQUEST['go'] == 'copy_to' && isset($_REQUEST['group_itemid'])) { $items_wdgt->addItem(insert_copy_elements_to_forms('group_itemid')); } else { $logtype['log'] = 0; $logtype['logrt'] = 1; $logtype['eventlog'] = 2; $logtype['snmptraps'] = 3; $dbkey[0] = 'log[%'; $dbkey[1] = 'logrt[%'; $dbkey[2] = 'eventlog[%'; $dbkey[3] = 'snmptraps'; $show_host = true; // Items Header $numrows = new CDiv();