Esempio n. 1
0
    $_REQUEST['filter_snmp_oid'] = CProfile::get('web.items.filter_snmp_oid');
    $_REQUEST['filter_snmp_port'] = CProfile::get('web.items.filter_snmp_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');
    $_REQUEST['filter_history'] = CProfile::get('web.items.filter_history');
    $_REQUEST['filter_trends'] = CProfile::get('web.items.filter_trends');
    $_REQUEST['filter_status'] = CProfile::get('web.items.filter_status');
    $_REQUEST['filter_templated_items'] = CProfile::get('web.items.filter_templated_items', -1);
    $_REQUEST['filter_with_triggers'] = CProfile::get('web.items.filter_with_triggers', -1);
    $_REQUEST['filter_ipmi_sensor'] = CProfile::get('web.items.filter_ipmi_sensor');
}
if (isset($_REQUEST['filter_host']) && !zbx_empty($_REQUEST['filter_host'])) {
    $hostid = CHost::getObjects(array('host' => $_REQUEST['filter_host']));
    if (empty($hostid)) {
        $hostid = CTemplate::getObjects(array('host' => $_REQUEST['filter_host']));
    }
    $hostid = reset($hostid);
    $hostid = $hostid ? $hostid['hostid'] : 0;
}
// SUBFILTERS {
$subfilters = array('subfilter_apps', 'subfilter_types', 'subfilter_value_types', 'subfilter_status', 'subfilter_templated_items', 'subfilter_with_triggers', 'subfilter_hosts', 'subfilter_interval', 'subfilter_history', 'subfilter_trends');
foreach ($subfilters as $name) {
    if (isset($_REQUEST['filter_set'])) {
        $_REQUEST[$name] = array();
    } else {
        $_REQUEST[$name] = get_request($name, array());
    }
}
// } SUBFILTERS
$result = 0;