本文整理汇总了PHP中CProfile::deleteIdx方法的典型用法代码示例。如果您正苦于以下问题:PHP CProfile::deleteIdx方法的具体用法?PHP CProfile::deleteIdx怎么用?PHP CProfile::deleteIdx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProfile
的用法示例。
在下文中一共展示了CProfile::deleteIdx方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRequest
*/
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) {
$hosts = API::Host()->get(array('output' => array('name', 'hostid', 'status'), 'hostids' => $filter['hostids'], 'groupids' => $filter['groupids'], 'selectGraphs' => API_OUTPUT_COUNT, 'with_monitored_items' => true, 'preservekeys' => true));
} else {
示例2: elseif
$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) {
$showTriggers = TRIGGERS_OPTION_ALL;
} else {
示例3: elseif
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);
$ackStatus = $config['event_ack_enable'] == EVENT_ACK_DISABLED ? ZBX_ACK_STS_ANY : CProfile::get('web.tr_status.filter.ack_status', ZBX_ACK_STS_ANY);
$showEvents = CProfile::get('web.tr_status.filter.show_events', EVENTS_OPTION_NOEVENT);
示例4: hasRequest
$tomorrow = $today + SEC_PER_DAY;
$timeFrom = hasRequest('filter_from') ? zbxDateToTime(getRequest('filter_from')) : $today;
$timeTill = hasRequest('filter_till') ? zbxDateToTime(getRequest('filter_till')) : $tomorrow;
if (hasRequest('filter_set')) {
// prepare severity array
$severities = hasRequest('severities') ? array_keys(getRequest('severities')) : [];
CProfile::updateArray('web.toptriggers.filter.severities', $severities, PROFILE_TYPE_STR);
CProfile::updateArray('web.toptriggers.filter.groupids', getRequest('groupids', []), PROFILE_TYPE_STR);
CProfile::updateArray('web.toptriggers.filter.hostids', getRequest('hostids', []), PROFILE_TYPE_STR);
CProfile::update('web.toptriggers.filter.from', $timeFrom, PROFILE_TYPE_STR);
CProfile::update('web.toptriggers.filter.till', $timeTill, PROFILE_TYPE_STR);
} elseif (hasRequest('filter_rst')) {
DBstart();
CProfile::deleteIdx('web.toptriggers.filter.severities');
CProfile::deleteIdx('web.toptriggers.filter.groupids');
CProfile::deleteIdx('web.toptriggers.filter.hostids');
CProfile::delete('web.toptriggers.filter.from');
CProfile::delete('web.toptriggers.filter.till');
DBend();
}
if (!hasRequest('filter_set')) {
for ($severity = TRIGGER_SEVERITY_NOT_CLASSIFIED; $severity < TRIGGER_SEVERITY_COUNT; $severity++) {
$defaultSeverities[$severity] = $severity;
}
} else {
$defaultSeverities = [];
}
$data['filter'] = ['severities' => CProfile::getArray('web.toptriggers.filter.severities', $defaultSeverities), 'groupids' => CProfile::getArray('web.toptriggers.filter.groupids'), 'hostids' => CProfile::getArray('web.toptriggers.filter.hostids'), 'filter_from' => CProfile::get('web.toptriggers.filter.from', $today), 'filter_till' => CProfile::get('web.toptriggers.filter.till', $tomorrow)];
// multiselect host groups
$data['multiSelectHostGroupData'] = [];
if ($data['filter']['groupids'] !== null) {