当前位置: 首页>>代码示例>>PHP>>正文


PHP CProfile::delete方法代码示例

本文整理汇总了PHP中CProfile::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CProfile::delete方法的具体用法?PHP CProfile::delete怎么用?PHP CProfile::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CProfile的用法示例。


在下文中一共展示了CProfile::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DBend

    CProfile::delete('web.items.filter_type');
    CProfile::delete('web.items.filter_key');
    CProfile::delete('web.items.filter_snmp_community');
    CProfile::delete('web.items.filter_snmpv3_securityname');
    CProfile::delete('web.items.filter_snmp_oid');
    CProfile::delete('web.items.filter_port');
    CProfile::delete('web.items.filter_value_type');
    CProfile::delete('web.items.filter_data_type');
    CProfile::delete('web.items.filter_delay');
    CProfile::delete('web.items.filter_history');
    CProfile::delete('web.items.filter_trends');
    CProfile::delete('web.items.filter_status');
    CProfile::delete('web.items.filter_state');
    CProfile::delete('web.items.filter_templated_items');
    CProfile::delete('web.items.filter_with_triggers');
    CProfile::delete('web.items.filter_ipmi_sensor');
    DBend();
}
$_REQUEST['filter_groupid'] = CProfile::get('web.items.filter_groupid', 0);
$_REQUEST['filter_hostid'] = CProfile::get('web.items.filter_hostid', 0);
$_REQUEST['filter_application'] = CProfile::get('web.items.filter_application', '');
$_REQUEST['filter_name'] = CProfile::get('web.items.filter_name', '');
$_REQUEST['filter_type'] = CProfile::get('web.items.filter_type', -1);
$_REQUEST['filter_key'] = CProfile::get('web.items.filter_key', '');
$_REQUEST['filter_snmp_community'] = CProfile::get('web.items.filter_snmp_community', '');
$_REQUEST['filter_snmpv3_securityname'] = CProfile::get('web.items.filter_snmpv3_securityname', '');
$_REQUEST['filter_snmp_oid'] = CProfile::get('web.items.filter_snmp_oid', '');
$_REQUEST['filter_port'] = CProfile::get('web.items.filter_port', '');
$_REQUEST['filter_value_type'] = CProfile::get('web.items.filter_value_type', -1);
$_REQUEST['filter_data_type'] = CProfile::get('web.items.filter_data_type', -1);
$_REQUEST['filter_delay'] = CProfile::get('web.items.filter_delay', '');
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:items.php

示例2: getRequest

    exit;
}
/*
 * Filter
 */
if (hasRequest('filter_set')) {
    CProfile::update('web.hosts.filter_ip', getRequest('filter_ip', ''), PROFILE_TYPE_STR);
    CProfile::update('web.hosts.filter_dns', getRequest('filter_dns', ''), PROFILE_TYPE_STR);
    CProfile::update('web.hosts.filter_host', getRequest('filter_host', ''), PROFILE_TYPE_STR);
    CProfile::update('web.hosts.filter_port', getRequest('filter_port', ''), PROFILE_TYPE_STR);
} elseif (hasRequest('filter_rst')) {
    DBStart();
    CProfile::delete('web.hosts.filter_ip');
    CProfile::delete('web.hosts.filter_dns');
    CProfile::delete('web.hosts.filter_host');
    CProfile::delete('web.hosts.filter_port');
    DBend();
}
$filter['ip'] = CProfile::get('web.hosts.filter_ip', '');
$filter['dns'] = CProfile::get('web.hosts.filter_dns', '');
$filter['host'] = CProfile::get('web.hosts.filter_host', '');
$filter['port'] = CProfile::get('web.hosts.filter_port', '');
// remove inherited macros data (actions: 'add', 'update' and 'form')
$macros = cleanInheritedMacros(getRequest('macros', []));
// remove empty new macro lines
foreach ($macros as $idx => $macro) {
    if (!array_key_exists('hostmacroid', $macro) && $macro['macro'] === '' && $macro['value'] === '') {
        unset($macros[$idx]);
    }
}
/*
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:hosts.php

示例3: order_result

    order_result($data['iconMaps'], 'name');
    // render view
    $mapView = new CView('monitoring.sysmap.edit', $data);
    $mapView->render();
    $mapView->show();
} else {
    CProfile::delete('web.maps.sysmapid');
    $sortField = getRequest('sort', CProfile::get('web.' . $page['file'] . '.sort', 'name'));
    $sortOrder = getRequest('sortorder', CProfile::get('web.' . $page['file'] . '.sortorder', ZBX_SORT_UP));
    CProfile::update('web.' . $page['file'] . '.sort', $sortField, PROFILE_TYPE_STR);
    CProfile::update('web.' . $page['file'] . '.sortorder', $sortOrder, PROFILE_TYPE_STR);
    if (hasRequest('filter_set')) {
        CProfile::update('web.sysmapconf.filter_name', getRequest('filter_name', ''), PROFILE_TYPE_STR);
    } elseif (hasRequest('filter_rst')) {
        DBStart();
        CProfile::delete('web.sysmapconf.filter_name');
        DBend();
    }
    $config = select_config();
    $data = ['filter' => ['name' => CProfile::get('web.sysmapconf.filter_name', '')], 'sort' => $sortField, 'sortorder' => $sortOrder];
    // get maps
    $data['maps'] = API::Map()->get(['output' => ['sysmapid', 'name', 'width', 'height'], 'sortfield' => $sortField, 'limit' => $config['search_limit'] + 1, 'search' => ['name' => $data['filter']['name'] === '' ? null : $data['filter']['name']], 'preservekeys' => true]);
    $user_type = CWebUser::getType();
    if ($user_type != USER_TYPE_SUPER_ADMIN && $user_type != USER_TYPE_ZABBIX_ADMIN) {
        $editable_maps = API::Map()->get(['output' => [], 'sysmapids' => array_keys($data['maps']), 'editable' => true, 'preservekeys' => true]);
        foreach ($data['maps'] as &$map) {
            $map['editable'] = array_key_exists($map['sysmapid'], $editable_maps);
        }
        unset($map);
    }
    order_result($data['maps'], $sortField, $sortOrder);
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:sysmaps.php

示例4: delete

 /**
  * Delete applications.
  *
  * @param array $applicationIds
  */
 public function delete(array $applicationIds)
 {
     // unset applications from http tests
     DB::update('httptest', array('values' => array('applicationid' => null), 'where' => array('applicationid' => $applicationIds)));
     // remove Monitoring > Latest data toggle profile values related to given applications
     CProfile::delete('web.latest.toggle', $applicationIds);
     DB::delete('applications', array('applicationid' => $applicationIds));
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:13,代码来源:CApplicationManager.php

示例5: getRequest

            CProfile::update('web.events.timelinefixed', getRequest('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.events.filter.triggerid', getRequest('triggerid', 0), PROFILE_TYPE_ID);
} elseif (hasRequest('filter_rst')) {
    DBStart();
    CProfile::delete('web.events.filter.triggerid');
    DBend();
}
$triggerId = CProfile::get('web.events.filter.triggerid', 0);
$source = $triggerId != 0 && hasRequest('filter_set') ? EVENT_SOURCE_TRIGGERS : getRequest('source', CProfile::get('web.events.source', EVENT_SOURCE_TRIGGERS));
CProfile::update('web.events.source', $source, PROFILE_TYPE_INT);
// calculate stime and period
if ($csvExport) {
    $period = getRequest('period', ZBX_PERIOD_DEFAULT);
    if (hasRequest('stime')) {
        $stime = getRequest('stime');
        if (bccomp($stime + $period, date(TIMESTAMP_FORMAT, time())) == 1) {
            $stime = date(TIMESTAMP_FORMAT, time() - $period);
        }
    } else {
        $stime = date(TIMESTAMP_FORMAT, time() - $period);
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:events.php

示例6: select_config

} else {
    $data = ['config' => select_config(), 'hosts' => [], 'sort' => $sortField, 'sortorder' => $sortOrder];
    // filter
    $data['pageFilter'] = new CPageFilter(['groups' => ['real_hosts' => true], 'groupid' => getRequest('groupid')]);
    /*
     * Filter
     */
    if (hasRequest('filter_set')) {
        CProfile::update('web.hostinventories.filter_field', getRequest('filter_field', ''), PROFILE_TYPE_STR);
        CProfile::update('web.hostinventories.filter_field_value', getRequest('filter_field_value', ''), PROFILE_TYPE_STR);
        CProfile::update('web.hostinventories.filter_exact', getRequest('filter_exact', 0), PROFILE_TYPE_INT);
    } elseif (hasRequest('filter_rst')) {
        DBStart();
        CProfile::delete('web.hostinventories.filter_field');
        CProfile::delete('web.hostinventories.filter_field_value');
        CProfile::delete('web.hostinventories.filter_exact');
        DBend();
    }
    $data['filterField'] = CProfile::get('web.hostinventories.filter_field', '');
    $data['filterFieldValue'] = CProfile::get('web.hostinventories.filter_field_value', '');
    $data['filterExact'] = CProfile::get('web.hostinventories.filter_exact', 0);
    if ($data['pageFilter']->groupsSelected) {
        // which inventory fields we will need for displaying
        $requiredInventoryFields = ['name', 'type', 'os', 'serialno_a', 'tag', 'macaddress_a'];
        // checking if correct inventory field is specified for filter
        $possibleInventoryFields = getHostInventories();
        $possibleInventoryFields = zbx_toHash($possibleInventoryFields, 'db_field');
        if ($data['filterField'] !== '' && $data['filterFieldValue'] !== '' && !isset($possibleInventoryFields[$data['filterField']])) {
            error(_s('Impossible to filter by inventory field "%s", which does not exist.', $data['filterField']));
        } else {
            // if we are filtering by field, this field is also required
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:hostinventories.php

示例7: getRequest

} else {
    CProfile::delete('web.screens.elementid');
    $sortField = getRequest('sort', CProfile::get('web.' . $page['file'] . '.sort', 'name'));
    $sortOrder = getRequest('sortorder', CProfile::get('web.' . $page['file'] . '.sortorder', ZBX_SORT_UP));
    CProfile::update('web.' . $page['file'] . '.sort', $sortField, PROFILE_TYPE_STR);
    CProfile::update('web.' . $page['file'] . '.sortorder', $sortOrder, PROFILE_TYPE_STR);
    $config = select_config();
    $data = ['templateid' => getRequest('templateid'), 'sort' => $sortField, 'sortorder' => $sortOrder];
    if ($data['templateid']) {
        $data['screens'] = API::TemplateScreen()->get(['output' => ['screenid', 'name', 'hsize', 'vsize'], 'templateids' => $data['templateid'], 'sortfield' => $sortField, 'limit' => $config['search_limit'], 'editable' => true, 'preservekeys' => true]);
    } else {
        if (hasRequest('filter_set')) {
            CProfile::update('web.screenconf.filter_name', getRequest('filter_name', ''), PROFILE_TYPE_STR);
        } elseif (hasRequest('filter_rst')) {
            DBStart();
            CProfile::delete('web.screenconf.filter_name');
            DBend();
        }
        $data['filter'] = ['name' => CProfile::get('web.screenconf.filter_name', '')];
        $data['screens'] = API::Screen()->get(['output' => ['screenid', 'name', 'hsize', 'vsize'], 'sortfield' => $sortField, 'limit' => $config['search_limit'], 'search' => ['name' => $data['filter']['name'] === '' ? null : $data['filter']['name']], 'preservekeys' => true]);
        $user_type = CWebUser::getType();
        if ($user_type != USER_TYPE_SUPER_ADMIN && $user_type != USER_TYPE_ZABBIX_ADMIN) {
            $editable_screens = API::Screen()->get(['output' => [], 'screenids' => array_keys($data['screens']), 'editable' => true, 'preservekeys' => true]);
            foreach ($data['screens'] as &$screen) {
                $screen['editable'] = array_key_exists($screen['screenid'], $editable_screens);
            }
            unset($screen);
        }
    }
    order_result($data['screens'], $sortField, $sortOrder);
    // paging
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:screenconf.php

示例8: CView

            $data['application_list'][$dbApp['applicationid']] = $dbApp['name'];
        }
    }
    // render view
    $httpView = new CView('configuration.httpconf.edit', $data);
    $httpView->render();
    $httpView->show();
} else {
    $sortField = getRequest('sort', CProfile::get('web.' . $page['file'] . '.sort', 'name'));
    $sortOrder = getRequest('sortorder', CProfile::get('web.' . $page['file'] . '.sortorder', ZBX_SORT_UP));
    CProfile::update('web.' . $page['file'] . '.sort', $sortField, PROFILE_TYPE_STR);
    CProfile::update('web.' . $page['file'] . '.sortorder', $sortOrder, PROFILE_TYPE_STR);
    if (hasRequest('filter_set')) {
        CProfile::update('web.httpconf.filter_status', getRequest('filter_status', -1), PROFILE_TYPE_INT);
    } elseif (hasRequest('filter_rst')) {
        CProfile::delete('web.httpconf.filter_status');
    }
    $pageFilter = new CPageFilter(['groups' => ['editable' => true], 'hosts' => ['editable' => true, 'templated_hosts' => true], 'hostid' => getRequest('hostid'), 'groupid' => getRequest('groupid')]);
    $data = ['hostid' => $pageFilter->hostid, 'pageFilter' => $pageFilter, 'filter_status' => CProfile::get('web.httpconf.filter_status', -1), 'httpTests' => [], 'httpTestsLastData' => [], 'paging' => null, 'sort' => $sortField, 'sortorder' => $sortOrder];
    // show the error column only for hosts
    if (getRequest('hostid') != 0) {
        $data['showInfoColumn'] = (bool) API::Host()->get(['hostids' => getRequest('hostid'), 'output' => ['status']]);
    } else {
        $data['showInfoColumn'] = true;
    }
    if ($data['pageFilter']->hostsSelected) {
        $config = select_config();
        $options = ['editable' => true, 'output' => ['httptestid', $sortField], 'limit' => $config['search_limit'] + 1];
        if ($data['filter_status'] != -1) {
            $options['filter']['status'] = $data['filter_status'];
        }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:httpconf.php

示例9: _initSeveritiesMin

 /**
  * Initialize minimum trigger severities.
  *
  * @param string $severityMin
  * @param array  $options
  * @param int    $options['default']
  * @param string $options['mapId']
  */
 private function _initSeveritiesMin($severityMin, array $options = array())
 {
     $default = isset($options['default']) ? $options['default'] : TRIGGER_SEVERITY_NOT_CLASSIFIED;
     $mapId = isset($options['mapId']) ? $options['mapId'] : 0;
     $severityMinProfile = isset($this->_profileIds['severityMin']) ? $this->_profileIds['severityMin'] : null;
     if ($severityMin === null && $severityMinProfile !== null) {
         $severityMin = $severityMinProfile;
     }
     if ($severityMin !== null) {
         if ($severityMin == $default) {
             CProfile::delete($this->_profileIdx['severityMin'], $mapId);
         } else {
             CProfile::update($this->_profileIdx['severityMin'], $severityMin, PROFILE_TYPE_INT, $mapId);
         }
     }
     $this->data['severitiesMin'] = getSeverityCaption();
     $this->data['severitiesMin'][$default] = $this->data['severitiesMin'][$default] . SPACE . '(' . _('default') . ')';
     $this->ids['severityMin'] = $severityMin === null ? $default : $severityMin;
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:27,代码来源:class.cpagefilter.php

示例10: CView

    $triggersView = new CView('configuration.copy.elements', $data);
    $triggersView->render();
    $triggersView->show();
} else {
    $sortField = getRequest('sort', CProfile::get('web.' . $page['file'] . '.sort', 'description'));
    $sortOrder = getRequest('sortorder', CProfile::get('web.' . $page['file'] . '.sortorder', ZBX_SORT_UP));
    CProfile::update('web.' . $page['file'] . '.sort', $sortField, PROFILE_TYPE_STR);
    CProfile::update('web.' . $page['file'] . '.sortorder', $sortOrder, PROFILE_TYPE_STR);
    if (hasRequest('filter_set')) {
        CProfile::update('web.triggers.filter_priority', getRequest('filter_priority', -1), PROFILE_TYPE_INT);
        CProfile::update('web.triggers.filter_state', getRequest('filter_state', -1), PROFILE_TYPE_INT);
        CProfile::update('web.triggers.filter_status', getRequest('filter_status', -1), PROFILE_TYPE_INT);
    } elseif (hasRequest('filter_rst')) {
        CProfile::delete('web.triggers.filter_priority');
        CProfile::delete('web.triggers.filter_state');
        CProfile::delete('web.triggers.filter_status');
    }
    $config = select_config();
    $data = ['filter_priority' => CProfile::get('web.triggers.filter_priority', -1), 'filter_state' => CProfile::get('web.triggers.filter_state', -1), 'filter_status' => CProfile::get('web.triggers.filter_status', -1), 'triggers' => [], 'sort' => $sortField, 'sortorder' => $sortOrder, 'config' => $config];
    $data['pageFilter'] = new CPageFilter(['groups' => ['with_hosts_and_templates' => true, 'editable' => true], 'hosts' => ['templated_hosts' => true, 'editable' => true], 'triggers' => ['editable' => true], 'groupid' => getRequest('groupid'), 'hostid' => getRequest('hostid')]);
    $data['groupid'] = $data['pageFilter']->groupid;
    $data['hostid'] = $data['pageFilter']->hostid;
    // get triggers
    if ($data['pageFilter']->hostsSelected) {
        $options = ['editable' => true, 'sortfield' => $sortField, 'limit' => $config['search_limit'] + 1];
        if ($sortField === 'status') {
            $options['output'] = ['triggerid', 'status', 'state'];
        } else {
            $options['output'] = ['triggerid', $sortField];
        }
        if ($data['filter_priority'] != -1) {
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:triggers.php

示例11: elseif

        $inventoryValues[] = $field['value'];
    }
    CProfile::updateArray('web.tr_status.filter.inventory.field', $inventoryFields, PROFILE_TYPE_STR);
    CProfile::updateArray('web.tr_status.filter.inventory.value', $inventoryValues, PROFILE_TYPE_STR);
} elseif (hasRequest('filter_rst')) {
    DBStart();
    CProfile::delete('web.tr_status.filter.show_triggers');
    CProfile::delete('web.tr_status.filter.show_details');
    CProfile::delete('web.tr_status.filter.show_maintenance');
    CProfile::delete('web.tr_status.filter.show_events');
    CProfile::delete('web.tr_status.filter.ack_status');
    CProfile::delete('web.tr_status.filter.show_severity');
    CProfile::delete('web.tr_status.filter.txt_select');
    CProfile::delete('web.tr_status.filter.status_change');
    CProfile::delete('web.tr_status.filter.status_change_days');
    CProfile::delete('web.tr_status.filter.application');
    CProfile::deleteIdx('web.tr_status.filter.inventory.field');
    CProfile::deleteIdx('web.tr_status.filter.inventory.value');
    DBend();
}
if (hasRequest('filter_set') && getRequest('show_triggers') == TRIGGERS_OPTION_ALL) {
    $showTriggers = TRIGGERS_OPTION_ALL;
} else {
    $showTriggers = CProfile::get('web.tr_status.filter.show_triggers', TRIGGERS_OPTION_RECENT_PROBLEM);
}
$showDetails = CProfile::get('web.tr_status.filter.show_details', 0);
$showMaintenance = CProfile::get('web.tr_status.filter.show_maintenance', 1);
$showSeverity = CProfile::get('web.tr_status.filter.show_severity', TRIGGER_SEVERITY_NOT_CLASSIFIED);
$txtSelect = CProfile::get('web.tr_status.filter.txt_select', '');
$showChange = CProfile::get('web.tr_status.filter.status_change', 0);
$statusChangeBydays = CProfile::get('web.tr_status.filter.status_change_days', 14);
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:tr_status.php

示例12: doAction

 protected function doAction()
 {
     $idx = $this->getInput('idx');
     $value_int = $this->getInput('value_int');
     DBstart();
     switch ($idx) {
         case 'web.latest.toggle':
         case 'web.latest.toggle_other':
             if ($value_int == 1) {
                 // default value
                 CProfile::delete($idx, $this->getInput('idx2'));
             } else {
                 foreach ($this->getInput('idx2') as $idx2) {
                     CProfile::update($idx, $value_int, PROFILE_TYPE_INT, $idx2);
                 }
             }
             break;
         default:
             if ($value_int == 1) {
                 // default value
                 CProfile::delete($idx);
             } else {
                 CProfile::update($idx, $value_int, PROFILE_TYPE_INT);
             }
     }
     DBend();
     $this->setResponse(new CControllerResponseData(['main_block' => '']));
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:28,代码来源:CControllerProfileUpdate.php

示例13: elseif

        }
        $inventoryFields[] = $field['field'];
        $inventoryValues[] = $field['value'];
    }
    CProfile::updateArray('web.overview.filter.inventory.field', $inventoryFields, PROFILE_TYPE_STR);
    CProfile::updateArray('web.overview.filter.inventory.value', $inventoryValues, PROFILE_TYPE_STR);
} elseif (hasRequest('filter_rst')) {
    DBStart();
    CProfile::delete('web.overview.filter.show_triggers');
    CProfile::delete('web.overview.filter.show_maintenance');
    CProfile::delete('web.overview.filter.ack_status');
    CProfile::delete('web.overview.filter.show_severity');
    CProfile::delete('web.overview.filter.txt_select');
    CProfile::delete('web.overview.filter.status_change');
    CProfile::delete('web.overview.filter.status_change_days');
    CProfile::delete('web.overview.filter.application');
    CProfile::deleteIdx('web.overview.filter.inventory.field');
    CProfile::deleteIdx('web.overview.filter.inventory.value');
    DBend();
}
// overview type
if (hasRequest('type')) {
    CProfile::update('web.overview.type', getRequest('type'), PROFILE_TYPE_INT);
}
$type = CProfile::get('web.overview.type', SHOW_TRIGGERS);
// overview style
if (hasRequest('view_style')) {
    CProfile::update('web.overview.view_style', getRequest('view_style'), PROFILE_TYPE_INT);
}
$viewStyle = CProfile::get('web.overview.view_style', STYLE_TOP);
if (hasRequest('filter_set') && getRequest('show_triggers') == TRIGGERS_OPTION_ALL) {
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:overview.php

示例14: _initSeveritiesMin

 /**
  * Initialize minimum trigger severities.
  *
  * @param string $severityMin			minimum trigger severity
  * @param array  $options				array of options
  * @param int    $options['default']	default severity
  * @param string $options['mapId']		ID of a map
  * @param array	 $config				array of configuration parameters for getting severity names
  *
  * @return void
  */
 private function _initSeveritiesMin($severityMin, array $options, array $config)
 {
     $default = isset($options['default']) ? $options['default'] : TRIGGER_SEVERITY_NOT_CLASSIFIED;
     $mapId = isset($options['mapId']) ? $options['mapId'] : 0;
     $severityMinProfile = isset($this->_profileIds['severityMin']) ? $this->_profileIds['severityMin'] : null;
     if ($severityMin === null && $severityMinProfile !== null) {
         $severityMin = $severityMinProfile;
     }
     if ($severityMin !== null) {
         if ($severityMin == $default) {
             CProfile::delete($this->_profileIdx['severityMin'], $mapId);
         } else {
             CProfile::update($this->_profileIdx['severityMin'], $severityMin, PROFILE_TYPE_INT, $mapId);
         }
     }
     $this->data['severitiesMin'] = [];
     for ($severity = TRIGGER_SEVERITY_NOT_CLASSIFIED; $severity < TRIGGER_SEVERITY_COUNT; $severity++) {
         $severityName = getSeverityName($severity, $config);
         if ($severity == $default) {
             $this->data['severitiesMin'][] = $severityName . SPACE . '(' . _('default') . ')';
         } else {
             $this->data['severitiesMin'][] = $severityName;
         }
     }
     $this->ids['severityMin'] = $severityMin === null ? $default : $severityMin;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:37,代码来源:CPageFilter.php

示例15: getRequest

/*
 * Filter
 */
if (hasRequest('filter_set')) {
    CProfile::update('web.latest.filter.select', getRequest('select', ''), PROFILE_TYPE_STR);
    CProfile::update('web.latest.filter.show_without_data', getRequest('show_without_data', 0), PROFILE_TYPE_INT);
    CProfile::update('web.latest.filter.show_details', getRequest('show_details', 0), PROFILE_TYPE_INT);
    CProfile::update('web.latest.filter.application', getRequest('application', ''), PROFILE_TYPE_STR);
    CProfile::updateArray('web.latest.filter.groupids', getRequest('groupids', array()), PROFILE_TYPE_STR);
    CProfile::updateArray('web.latest.filter.hostids', getRequest('hostids', array()), PROFILE_TYPE_STR);
} elseif (hasRequest('filter_rst')) {
    DBStart();
    CProfile::delete('web.latest.filter.select');
    CProfile::delete('web.latest.filter.show_without_data');
    CProfile::delete('web.latest.filter.show_details');
    CProfile::delete('web.latest.filter.application');
    CProfile::deleteIdx('web.latest.filter.groupids');
    CProfile::deleteIdx('web.latest.filter.hostids');
    DBend();
}
$filter = array('select' => CProfile::get('web.latest.filter.select', ''), 'showWithoutData' => CProfile::get('web.latest.filter.show_without_data', 1), 'showDetails' => CProfile::get('web.latest.filter.show_details'), 'application' => CProfile::get('web.latest.filter.application', ''), 'groupids' => CProfile::getArray('web.latest.filter.groupids'), 'hostids' => CProfile::getArray('web.latest.filter.hostids'));
// we'll need to hide the host column if only one host is selected
$singleHostSelected = count($filter['hostids']) == 1;
$sortField = getRequest('sort', CProfile::get('web.' . $page['file'] . '.sort', 'name'));
$sortOrder = getRequest('sortorder', CProfile::get('web.' . $page['file'] . '.sortorder', ZBX_SORT_UP));
CProfile::update('web.' . $page['file'] . '.sort', $sortField, PROFILE_TYPE_STR);
CProfile::update('web.' . $page['file'] . '.sortorder', $sortOrder, PROFILE_TYPE_STR);
$applications = $items = $hostScripts = array();
// we'll only display the values if the filter is set
$filterSet = $filter['select'] !== '' || $filter['application'] !== '' || $filter['groupids'] || $filter['hostids'];
if ($filterSet) {
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:latest.php


注:本文中的CProfile::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。