本文整理汇总了PHP中CProfile::update方法的典型用法代码示例。如果您正苦于以下问题:PHP CProfile::update方法的具体用法?PHP CProfile::update怎么用?PHP CProfile::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProfile
的用法示例。
在下文中一共展示了CProfile::update方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doAction
protected function doAction()
{
$sortField = $this->getInput('sort', CProfile::get('web.proxies.php.sort', 'host'));
$sortOrder = $this->getInput('sortorder', CProfile::get('web.proxies.php.sortorder', ZBX_SORT_UP));
CProfile::update('web.proxies.php.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.proxies.php.sortorder', $sortOrder, PROFILE_TYPE_STR);
$config = select_config();
$data = ['uncheck' => $this->hasInput('uncheck'), 'sort' => $sortField, 'sortorder' => $sortOrder, 'config' => ['max_in_table' => $config['max_in_table']]];
$data['proxies'] = API::Proxy()->get(['output' => ['proxyid', 'host', 'status', 'lastaccess', 'tls_connect', 'tls_accept'], 'selectHosts' => ['hostid', 'name', 'status'], 'sortfield' => $sortField, 'limit' => $config['search_limit'] + 1, 'editable' => true, 'preservekeys' => true]);
// sorting & paging
order_result($data['proxies'], $sortField, $sortOrder);
$url = (new CUrl('zabbix.php'))->setArgument('action', 'proxy.list');
$data['paging'] = getPagingLine($data['proxies'], $sortOrder, $url);
foreach ($data['proxies'] as &$proxy) {
order_result($proxy['hosts'], 'name');
}
unset($proxy);
// get proxy IDs for a *selected* page
$proxyIds = array_keys($data['proxies']);
if ($proxyIds) {
// calculate performance
$dbPerformance = DBselect('SELECT h.proxy_hostid,SUM(1.0/i.delay) AS qps' . ' FROM hosts h,items i' . ' WHERE h.hostid=i.hostid' . ' AND h.status=' . HOST_STATUS_MONITORED . ' AND i.status=' . ITEM_STATUS_ACTIVE . ' AND i.delay<>0' . ' AND i.flags<>' . ZBX_FLAG_DISCOVERY_PROTOTYPE . ' AND ' . dbConditionInt('h.proxy_hostid', $proxyIds) . ' GROUP BY h.proxy_hostid');
while ($performance = DBfetch($dbPerformance)) {
$data['proxies'][$performance['proxy_hostid']]['perf'] = round($performance['qps'], 2);
}
// get items
$items = API::Item()->get(['proxyids' => $proxyIds, 'groupCount' => true, 'countOutput' => true, 'webitems' => true, 'monitored' => true]);
foreach ($items as $item) {
$data['proxies'][$item['proxy_hostid']]['item_count'] = $item['rowscount'];
}
}
$response = new CControllerResponseData($data);
$response->setTitle(_('Configuration of proxies'));
$this->setResponse($response);
}
示例2: login
/**
* Tries to login a user and populates self::$data on success.
*
* @param string $login user login
* @param string $password user password
*
* @throws Exception if user cannot be logged in
*
* @return bool
*/
public static function login($login, $password)
{
try {
self::setDefault();
self::$data = API::User()->login(array('user' => $login, 'password' => $password, 'userData' => true));
if (!self::$data) {
throw new Exception();
}
if (self::$data['gui_access'] == GROUP_GUI_ACCESS_DISABLED) {
error(_('GUI access disabled.'));
throw new Exception();
}
if (empty(self::$data['url'])) {
self::$data['url'] = CProfile::get('web.menu.view.last', 'index.php');
}
$result = (bool) self::$data;
if (isset(self::$data['attempt_failed']) && self::$data['attempt_failed']) {
CProfile::init();
CProfile::update('web.login.attempt.failed', self::$data['attempt_failed'], PROFILE_TYPE_INT);
CProfile::update('web.login.attempt.ip', self::$data['attempt_ip'], PROFILE_TYPE_STR);
CProfile::update('web.login.attempt.clock', self::$data['attempt_clock'], PROFILE_TYPE_INT);
$result &= CProfile::flush();
}
// remove guest session after successful login
$result &= DBexecute('DELETE FROM sessions WHERE sessionid=' . zbx_dbstr(get_cookie('zbx_sessionid')));
if ($result) {
self::setSessionCookie(self::$data['sessionid']);
add_audit_ext(AUDIT_ACTION_LOGIN, AUDIT_RESOURCE_USER, self::$data['userid'], '', null, null, null);
}
return $result;
} catch (Exception $e) {
self::setDefault();
return false;
}
}
示例3: doAction
protected function doAction()
{
$sortField = $this->getInput('sort', CProfile::get('web.media_types.php.sort', 'description'));
$sortOrder = $this->getInput('sortorder', CProfile::get('web.media_types.php.sortorder', ZBX_SORT_UP));
CProfile::update('web.media_type.php.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.media_types.php.sortorder', $sortOrder, PROFILE_TYPE_STR);
$config = select_config();
$data = ['uncheck' => $this->hasInput('uncheck'), 'sort' => $sortField, 'sortorder' => $sortOrder];
// get media types
$data['mediatypes'] = API::Mediatype()->get(['output' => ['mediatypeid', 'description', 'type', 'smtp_server', 'smtp_helo', 'smtp_email', 'exec_path', 'gsm_modem', 'username', 'status'], 'limit' => $config['search_limit'] + 1, 'editable' => true, 'preservekeys' => true]);
if ($data['mediatypes']) {
// get media types used in actions
$actions = API::Action()->get(['output' => ['actionid', 'name'], 'selectOperations' => ['operationtype', 'opmessage'], 'mediatypeids' => array_keys($data['mediatypes'])]);
foreach ($data['mediatypes'] as &$mediaType) {
$mediaType['typeid'] = $mediaType['type'];
$mediaType['type'] = media_type2str($mediaType['type']);
$mediaType['listOfActions'] = [];
foreach ($actions as $action) {
foreach ($action['operations'] as $operation) {
if ($operation['operationtype'] == OPERATION_TYPE_MESSAGE && $operation['opmessage']['mediatypeid'] == $mediaType['mediatypeid']) {
$mediaType['listOfActions'][$action['actionid']] = ['actionid' => $action['actionid'], 'name' => $action['name']];
}
}
}
order_result($mediaType['listOfActions'], 'name');
}
unset($mediaType);
order_result($data['mediatypes'], $sortField, $sortOrder);
}
$url = (new CUrl('zabbix.php'))->setArgument('action', 'mediatype.list');
$data['paging'] = getPagingLine($data['mediatypes'], $sortOrder, $url);
$response = new CControllerResponseData($data);
$response->setTitle(_('Configuration of media types'));
$this->setResponse($response);
}
示例4: local_generateHeader
function local_generateHeader($data)
{
// only needed for zbx_construct_menu
global $page;
header('Content-Type: text/html; charset=UTF-8');
// construct menu
$main_menu = [];
$sub_menus = [];
zbx_construct_menu($main_menu, $sub_menus, $page, $data['controller']['action']);
$pageHeader = new CView('layout.htmlpage.header', ['javascript' => ['files' => $data['javascript']['files']], 'page' => ['title' => $data['page']['title']], 'user' => ['lang' => CWebUser::$data['lang'], 'theme' => CWebUser::$data['theme']]]);
echo $pageHeader->getOutput();
if ($data['fullscreen'] == 0) {
global $ZBX_SERVER_NAME;
$pageMenu = new CView('layout.htmlpage.menu', ['server_name' => isset($ZBX_SERVER_NAME) ? $ZBX_SERVER_NAME : '', 'menu' => ['main_menu' => $main_menu, 'sub_menus' => $sub_menus, 'selected' => $page['menu']], 'user' => ['is_guest' => CWebUser::isGuest(), 'alias' => CWebUser::$data['alias'], 'name' => CWebUser::$data['name'], 'surname' => CWebUser::$data['surname']]]);
echo $pageMenu->getOutput();
}
echo '<div class="' . ZBX_STYLE_ARTICLE . '">';
// should be replaced with addPostJS() at some point
zbx_add_post_js('initMessages({});');
// if a user logs in after several unsuccessful attempts, display a warning
if ($failedAttempts = CProfile::get('web.login.attempt.failed', 0)) {
$attempt_ip = CProfile::get('web.login.attempt.ip', '');
$attempt_date = CProfile::get('web.login.attempt.clock', 0);
$error_msg = _n('%4$s failed login attempt logged. Last failed attempt was from %1$s on %2$s at %3$s.', '%4$s failed login attempts logged. Last failed attempt was from %1$s on %2$s at %3$s.', $attempt_ip, zbx_date2str(DATE_FORMAT, $attempt_date), zbx_date2str(TIME_FORMAT, $attempt_date), $failedAttempts);
error($error_msg);
CProfile::update('web.login.attempt.failed', 0, PROFILE_TYPE_INT);
}
show_messages();
}
示例5: login
public static function login($login, $password)
{
try {
self::setDefault();
self::$data = API::User()->login(array('user' => $login, 'password' => $password, 'userData' => true));
if (!self::$data) {
throw new Exception();
}
if (self::$data['gui_access'] == GROUP_GUI_ACCESS_DISABLED) {
error(_('GUI access disabled.'));
throw new Exception();
}
if (empty(self::$data['url'])) {
self::$data['url'] = CProfile::get('web.menu.view.last', 'index.php');
}
if (isset(self::$data['attempt_failed']) && self::$data['attempt_failed']) {
CProfile::init();
CProfile::update('web.login.attempt.failed', self::$data['attempt_failed'], PROFILE_TYPE_INT);
CProfile::update('web.login.attempt.ip', self::$data['attempt_ip'], PROFILE_TYPE_STR);
CProfile::update('web.login.attempt.clock', self::$data['attempt_clock'], PROFILE_TYPE_INT);
CProfile::flush();
}
// remove guest session after successful login
DBexecute('DELETE FROM sessions WHERE sessionid=' . zbx_dbstr(get_cookie('zbx_sessionid')));
zbx_setcookie('zbx_sessionid', self::$data['sessionid'], self::$data['autologin'] ? time() + SEC_PER_DAY * 31 : 0);
return true;
} catch (Exception $e) {
self::setDefault();
return false;
}
}
示例6: doAction
protected function doAction()
{
$sortField = $this->getInput('sort', CProfile::get('web.scripts.php.sort', 'name'));
$sortOrder = $this->getInput('sortorder', CProfile::get('web.scripts.php.sortorder', ZBX_SORT_UP));
CProfile::update('web.scripts.php.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.scripts.php.sortorder', $sortOrder, PROFILE_TYPE_STR);
$config = select_config();
$data = ['uncheck' => $this->hasInput('uncheck'), 'sort' => $sortField, 'sortorder' => $sortOrder];
// list of scripts
$data['scripts'] = API::Script()->get(['output' => ['scriptid', 'name', 'command', 'host_access', 'usrgrpid', 'groupid', 'type', 'execute_on'], 'editable' => true, 'limit' => $config['search_limit'] + 1]);
// sorting & paging
order_result($data['scripts'], $sortField, $sortOrder);
$url = (new CUrl('zabbix.php'))->setArgument('action', 'script.list');
$data['paging'] = getPagingLine($data['scripts'], $sortOrder, $url);
// find script host group name and user group name. set to '' if all host/user groups used.
$usrgrpids = [];
$groupids = [];
foreach ($data['scripts'] as &$script) {
$script['userGroupName'] = null;
// all user groups
$script['hostGroupName'] = null;
// all host groups
if ($script['usrgrpid'] != 0) {
$usrgrpids[] = $script['usrgrpid'];
}
if ($script['groupid'] != 0) {
$groupids[] = $script['groupid'];
}
}
unset($script);
if ($usrgrpids) {
$userGroups = API::UserGroup()->get(['output' => ['name'], 'usrgrpids' => $usrgrpids, 'preservekeys' => true]);
foreach ($data['scripts'] as &$script) {
if ($script['usrgrpid'] != 0 && array_key_exists($script['usrgrpid'], $userGroups)) {
$script['userGroupName'] = $userGroups[$script['usrgrpid']]['name'];
}
unset($script['usrgrpid']);
}
unset($script);
}
if ($groupids) {
$hostGroups = API::HostGroup()->get(['output' => ['name'], 'groupids' => $groupids, 'preservekeys' => true]);
foreach ($data['scripts'] as &$script) {
if ($script['groupid'] != 0 && array_key_exists($script['groupid'], $hostGroups)) {
$script['hostGroupName'] = $hostGroups[$script['groupid']]['name'];
}
unset($script['groupid']);
}
unset($script);
}
$response = new CControllerResponseData($data);
$response->setTitle(_('Configuration of scripts'));
$this->setResponse($response);
}
示例7: doAction
protected function doAction()
{
$sortField = $this->getInput('sort', CProfile::get('web.httpmon.php.sort', 'name'));
$sortOrder = $this->getInput('sortorder', CProfile::get('web.httpmon.php.sortorder', ZBX_SORT_UP));
CProfile::update('web.httpmon.php.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.httpmon.php.sortorder', $sortOrder, PROFILE_TYPE_STR);
$data = ['fullscreen' => $this->getInput('fullscreen', 0), 'sort' => $sortField, 'sortorder' => $sortOrder, 'page' => $this->getInput('page', 1)];
$data['pageFilter'] = new CPageFilter(['groups' => ['real_hosts' => true, 'with_httptests' => true], 'hosts' => ['with_monitored_items' => true, 'with_httptests' => true], 'hostid' => $this->hasInput('hostid') ? $this->getInput('hostid') : null, 'groupid' => $this->hasInput('groupid') ? $this->getInput('groupid') : null]);
$response = new CControllerResponseData($data);
$response->setTitle(_('Web monitoring'));
$this->setResponse($response);
}
示例8: init_nodes
function init_nodes()
{
/* Init CURRENT NODE ID */
if (defined('ZBX_NODES_INITIALIZED')) {
return;
}
global $USER_DETAILS;
global $ZBX_LOCALNODEID, $ZBX_LOCMASTERID, $ZBX_CURRENT_NODEID, $ZBX_CURMASTERID, $ZBX_NODES, $ZBX_NODES_IDS, $ZBX_AVAILABLE_NODES, $ZBX_VIEWED_NODES, $ZBX_WITH_ALL_NODES;
$ZBX_AVAILABLE_NODES = array();
$ZBX_NODES_IDS = array();
$ZBX_NODES = array();
$ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
$ZBX_WITH_ALL_NODES = !defined('ZBX_NOT_ALLOW_ALL_NODES');
if (!defined('ZBX_PAGE_NO_AUTHORIZATION') && ZBX_DISTRIBUTED) {
if ($USER_DETAILS['type'] == USER_TYPE_SUPER_ADMIN) {
$sql = 'SELECT DISTINCT n.nodeid,n.name,n.masterid FROM nodes n ';
} else {
$sql = 'SELECT DISTINCT n.nodeid,n.name,n.masterid ' . ' FROM nodes n, groups hg,rights r, users_groups g ' . ' WHERE r.id=hg.groupid ' . ' AND r.groupid=g.usrgrpid ' . ' AND g.userid=' . $USER_DETAILS['userid'] . ' AND n.nodeid=' . DBid2nodeid('hg.groupid');
}
$db_nodes = DBselect($sql);
while ($node = DBfetch($db_nodes)) {
$ZBX_NODES[$node['nodeid']] = $node;
$ZBX_NODES_IDS[$node['nodeid']] = $node['nodeid'];
}
$ZBX_AVAILABLE_NODES = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_LIST, PERM_RES_IDS_ARRAY, $ZBX_NODES_IDS);
$ZBX_VIEWED_NODES = get_viewed_nodes();
$ZBX_CURRENT_NODEID = $ZBX_VIEWED_NODES['selected'];
if ($node_data = DBfetch(DBselect('SELECT masterid FROM nodes WHERE nodeid=' . $ZBX_CURRENT_NODEID))) {
$ZBX_CURMASTERID = $node_data['masterid'];
}
if (!isset($ZBX_NODES[$ZBX_CURRENT_NODEID])) {
$ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
$ZBX_CURMASTERID = $ZBX_LOCMASTERID;
}
if (isset($_REQUEST['select_nodes'])) {
// CProfile::update('web.nodes.selected', $ZBX_VIEWED_NODES['nodeids'], PROFILE_TYPE_ARRAY_ID);
update_node_profile($ZBX_VIEWED_NODES['nodeids']);
}
if (isset($_REQUEST['switch_node'])) {
CProfile::update('web.nodes.switch_node', $ZBX_VIEWED_NODES['selected'], PROFILE_TYPE_ID);
}
} else {
$ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
$ZBX_CURMASTERID = $ZBX_LOCMASTERID;
}
// zbx_set_post_cookie('zbx_current_nodeid', $ZBX_CURRENT_NODEID);
define('ZBX_NODES_INITIALIZED', 1);
// reset profiles if node is different than local
if ($ZBX_CURRENT_NODEID != $ZBX_LOCALNODEID) {
CProfile::init();
}
}
示例9: doAction
protected function doAction()
{
foreach (CJs::decodeJson($this->getInput('grid')) as $col => $column) {
foreach ($column as $row => $widgetName) {
$widgetName = str_replace('_widget', '', $widgetName);
CProfile::update('web.dashboard.widget.' . $widgetName . '.col', $col, PROFILE_TYPE_INT);
CProfile::update('web.dashboard.widget.' . $widgetName . '.row', $row, PROFILE_TYPE_INT);
}
}
$data = ['main_block' => ''];
$response = new CControllerResponseData($data);
$this->setResponse($response);
}
示例10: doAction
protected function doAction()
{
CProfile::update('web.maps.sysmapid', $this->sysmapid, PROFILE_TYPE_ID);
$data = ['fullscreen' => $this->getInput('fullscreen', 0)];
$maps = API::Map()->get(['output' => ['name', 'severity_min'], 'sysmapids' => [$this->sysmapid]]);
$data['map'] = reset($maps);
$data['map']['editable'] = API::Map()->isWritable([$this->sysmapid]);
$data['pageFilter'] = new CPageFilter(['severitiesMin' => ['default' => $data['map']['severity_min'], 'mapId' => $this->sysmapid], 'severityMin' => $this->hasInput('severity_min') ? $this->getInput('severity_min') : null]);
$data['severity_min'] = $data['pageFilter']->severityMin;
$response = new CControllerResponseData($data);
$response->setTitle(_('Network maps'));
$this->setResponse($response);
}
示例11: doAction
protected function doAction()
{
$sortField = $this->getInput('sort', CProfile::get('web.discovery.php.sort', 'ip'));
$sortOrder = $this->getInput('sortorder', CProfile::get('web.discovery.php.sortorder', ZBX_SORT_UP));
CProfile::update('web.discovery.php.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.discovery.php.sortorder', $sortOrder, PROFILE_TYPE_STR);
/*
* Display
*/
$data = ['fullscreen' => $this->getInput('fullscreen', 0), 'druleid' => $this->getInput('druleid', 0), 'sort' => $sortField, 'sortorder' => $sortOrder];
$data['pageFilter'] = new CPageFilter(['drules' => ['filter' => ['status' => DRULE_STATUS_ACTIVE]], 'druleid' => $data['druleid']]);
$response = new CControllerResponseData($data);
$response->setTitle(_('Status of discovery'));
$this->setResponse($response);
}
示例12: doAction
protected function doAction()
{
$widget = $this->getInput('widget');
$data = ['main_block' => ''];
// refresh rate
if ($this->hasInput('refreshrate')) {
$refreshrate = $this->getInput('refreshrate');
CProfile::update('web.dashboard.widget.' . $widget . '.rf_rate', $refreshrate, PROFILE_TYPE_INT);
$data['main_block'] = 'PMasters["dashboard"].dolls["' . $widget . '"].frequency(' . CJs::encodeJson($refreshrate) . ');' . "\n" . 'PMasters["dashboard"].dolls["' . $widget . '"].restartDoll();';
}
// widget state
if ($this->hasInput('state')) {
CProfile::update('web.dashboard.widget.' . $widget . '.state', $this->getInput('state'), PROFILE_TYPE_INT);
}
$this->setResponse(new CControllerResponseData($data));
}
示例13: dirname
if (isset($_REQUEST['favid'])) {
CProfile::update('web.auditlogs.timelinefixed', $_REQUEST['favid'], PROFILE_TYPE_INT);
}
}
}
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
require_once dirname(__FILE__) . '/include/page_footer.php';
exit;
}
/*
* Filter
*/
if (hasRequest('filter_set')) {
CProfile::update('web.auditlogs.filter.alias', getRequest('alias', ''), PROFILE_TYPE_STR);
CProfile::update('web.auditlogs.filter.action', getRequest('action', -1), PROFILE_TYPE_INT);
CProfile::update('web.auditlogs.filter.resourcetype', getRequest('resourcetype', -1), PROFILE_TYPE_INT);
} elseif (hasRequest('filter_rst')) {
DBStart();
CProfile::delete('web.auditlogs.filter.alias');
CProfile::delete('web.auditlogs.filter.action');
CProfile::delete('web.auditlogs.filter.resourcetype');
DBend();
}
/*
* Display
*/
$effectivePeriod = navigation_bar_calc('web.auditlogs.timeline', 0, true);
$data = ['stime' => getRequest('stime'), 'actions' => [], 'action' => CProfile::get('web.auditlogs.filter.action', -1), 'resourcetype' => CProfile::get('web.auditlogs.filter.resourcetype', -1), 'alias' => CProfile::get('web.auditlogs.filter.alias', '')];
$from = zbxDateToTime($data['stime']);
$till = $from + $effectivePeriod;
// get audit
示例14: reset
}
$_REQUEST['hostid'] = $item['hostid'];
$host = reset($item['hosts']);
} else {
$hosts = API::Host()->get(array('hostids' => $_REQUEST['hostid'], 'output' => array('status', 'flags'), 'templated_hosts' => true, 'editable' => true));
$host = reset($hosts);
if (!$host) {
access_deny();
}
}
/*
* Ajax
*/
if (isset($_REQUEST['favobj'])) {
if ($_REQUEST['favobj'] == 'filter') {
CProfile::update('web.host_discovery.filter.state', $_REQUEST['favstate'], PROFILE_TYPE_INT);
}
}
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
require_once dirname(__FILE__) . '/include/page_footer.php';
exit;
}
/*
* Actions
*/
if (isset($_REQUEST['add_delay_flex']) && isset($_REQUEST['new_delay_flex'])) {
$timePeriodValidator = new CTimePeriodValidator(array('allowMultiple' => false));
$_REQUEST['delay_flex'] = get_request('delay_flex', array());
if ($timePeriodValidator->validate($_REQUEST['new_delay_flex']['period'])) {
array_push($_REQUEST['delay_flex'], $_REQUEST['new_delay_flex']);
unset($_REQUEST['new_delay_flex']);
示例15: validate_group
function validate_group(&$PAGE_GROUPS, &$PAGE_HOSTS, $reset_host = true)
{
global $page;
$config = select_config();
$dd_first_entry = $config['dropdown_first_entry'];
$group_var = 'web.latest.groupid';
$host_var = 'web.latest.hostid';
$_REQUEST['groupid'] = get_request('groupid', CProfile::get($group_var, -1));
if ($_REQUEST['groupid'] < 0) {
$PAGE_GROUPS['selected'] = $_REQUEST['groupid'] = 0;
$PAGE_HOSTS['selected'] = $_REQUEST['hostid'] = 0;
}
if (!isset($_REQUEST['hostid']) || $reset_host) {
$PAGE_HOSTS['selected'] = $_REQUEST['hostid'] = 0;
}
if ($PAGE_GROUPS['selected'] == 0 && $dd_first_entry == ZBX_DROPDOWN_FIRST_NONE) {
$PAGE_GROUPS['groupids'] = array();
}
$PAGE_GROUPS['selected'] = $_REQUEST['groupid'];
if ($PAGE_GROUPS['original'] > -1) {
CProfile::update('web.' . $page['menu'] . '.groupid', $_REQUEST['groupid'], PROFILE_TYPE_ID);
}
if ($PAGE_HOSTS['original'] > -1) {
CProfile::update('web.' . $page['menu'] . '.hostid', $_REQUEST['hostid'], PROFILE_TYPE_ID);
}
CProfile::update($group_var, $_REQUEST['groupid'], PROFILE_TYPE_ID);
CProfile::update($host_var, $_REQUEST['hostid'], PROFILE_TYPE_ID);
}