if ($_REQUEST['go'] != 'none' && isset($go_result) && $go_result) { $url = new CUrl(); $path = $url->getPath(); insert_js('cookie.eraseArray("' . $path . '")'); } $options = array('groups' => array('editable' => 1), 'hosts' => array('editable' => 1, 'templated_hosts' => 1), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = $pageFilter->hostid; $app_wdgt = new CWidget(); $frmForm = new CForm(null, 'get'); $frmForm->addVar('hostid', get_request('hostid', 0)); if (!isset($_REQUEST['form'])) { $frmForm->addItem(new CButton('form', S_CREATE_APPLICATION)); } $app_wdgt->addPageheader(S_CONFIGURATION_OF_APPLICATIONS, $frmForm); if (isset($_REQUEST['form'])) { $frm_title = S_NEW_APPLICATION; if (isset($_REQUEST['applicationid'])) { $result = DBselect('SELECT * FROM applications WHERE applicationid=' . $_REQUEST['applicationid']); $row = DBfetch($result); $frm_title = S_APPLICATION . ': "' . $row['name'] . '"'; } if (isset($_REQUEST["applicationid"]) && !isset($_REQUEST["form_refresh"])) { $appname = $row["name"]; $apphostid = $row['hostid']; } else { $appname = get_request("appname", ""); $apphostid = get_request("apphostid", get_request("hostid", 0)); } $db_host = get_host_by_hostid($apphostid, 1);