$frmForm->addItem(new CButton('form', S_CREATE_HOST)); $frmForm->addItem(new CButton('form', S_IMPORT_HOST)); } $hosts_wdgt = new CWidget(); $hosts_wdgt->addPageHeader(S_CONFIGURATION_OF_HOSTS, $frmForm); $options = array('groups' => array('real_hosts' => 1, 'editable' => 1), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = get_request('hostid', 0); // echo SBR; if ($_REQUEST['go'] == 'massupdate' && isset($_REQUEST['hosts'])) { $hosts_wdgt->addItem(insert_mass_update_host_form()); } else { if (isset($_REQUEST['form'])) { if ($_REQUEST['form'] == S_IMPORT_HOST) { $hosts_wdgt->addItem(import_host_form()); } else { $hosts_wdgt->addItem(insert_host_form()); } } else { $frmForm = new CForm(); $frmForm->setMethod('get'); $frmForm->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB())); $numrows = new CDiv(); $numrows->setAttribute('name', 'numrows'); $hosts_wdgt->addHeader(S_HOSTS_BIG, $frmForm); $hosts_wdgt->addHeader($numrows); // HOSTS FILTER {{{ $filter_table = new CTable('', 'filter_config'); $filter_table->addRow(array(array(array(bold(S_HOST), SPACE . S_LIKE_SMALL . ': '), new CTextBox('filter_host', $_REQUEST['filter_host'], 20)), array(array(bold(S_DNS), SPACE . S_LIKE_SMALL . ': '), new CTextBox('filter_dns', $_REQUEST['filter_dns'], 20)), array(array(bold(S_IP), SPACE . S_LIKE_SMALL . ': '), new CTextBox('filter_ip', $_REQUEST['filter_ip'], 20)), array(bold(S_PORT . ': '), new CTextBox('filter_port', $_REQUEST['filter_port'], 20)))); $reset = new CSpan(S_RESET, 'biglink');
$path = $url->getPath(); insert_js('cookie.eraseArray("' . $path . '")'); } $frmForm = new CForm(); if (!isset($_REQUEST['form'])) { $frmForm->addItem(new CButton('form', S_CREATE_TEMPLATE)); $frmForm->addItem(new CButton('form', S_IMPORT_TEMPLATE)); } $template_wdgt = new CWidget(); $template_wdgt->addPageHeader(S_CONFIGURATION_OF_TEMPLATES, $frmForm); $options = array('config' => array('individual' => 1), 'groups' => array('templated_hosts' => 1, 'editable' => 1), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; if (isset($_REQUEST['form'])) { if ($_REQUEST['form'] == S_IMPORT_TEMPLATE) { $template_wdgt->addItem(import_host_form(true)); } else { $templateid = get_request('templateid', 0); $template_name = get_request('template_name', ''); $newgroup = get_request('newgroup', ''); $templates = get_request('templates', array()); $clear_templates = get_request('clear_templates', array()); $frm_title = S_TEMPLATE; if ($templateid > 0) { $db_host = get_host_by_hostid($templateid); $template_name = $db_host['host']; $frm_title .= SPACE . ' [' . $template_name . ']'; $original_templates = get_templates_by_hostid($templateid); } else { $original_templates = array(); }