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


PHP get_viewed_hosts函数代码示例

本文整理汇总了PHP中get_viewed_hosts函数的典型用法代码示例。如果您正苦于以下问题:PHP get_viewed_hosts函数的具体用法?PHP get_viewed_hosts怎么用?PHP get_viewed_hosts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_slideshow

// get screen
$data['screen'] = !empty($data['elementid']) ? get_slideshow($data['elementid'], 0) : array();
if (!empty($data['screen'])) {
    // get groups and hosts
    if (check_dynamic_items($data['elementid'], 1)) {
        $data['hostid'] = get_request('hostid', 0);
        $options = array('allow_all_hosts', 'monitored_hosts', 'with_items');
        if (!$ZBX_WITH_ALL_NODES) {
            array_push($options, 'only_current_node');
        }
        $params = array();
        foreach ($options as $option) {
            $params[$option] = 1;
        }
        $data['page_groups'] = get_viewed_groups(PERM_READ_ONLY, $params);
        $data['page_hosts'] = get_viewed_hosts(PERM_READ_ONLY, $data['page_groups']['selected'], $params);
        validate_group_with_host($data['page_groups'], $data['page_hosts']);
    }
    // get element
    $data['element'] = get_slideshow_by_slideshowid($data['elementid']);
    if ($data['screen']['delay'] > 0) {
        $data['element']['delay'] = $data['screen']['delay'];
    }
    show_messages();
    // js menu
    $data['menu'] = array();
    $data['submenu'] = array();
    $data['refresh_multiplier'] = CProfile::get('web.slides.rf_rate.hat_slides', 1, $data['elementid']);
    if (empty($data['refresh_multiplier'])) {
        $data['refresh_multiplier'] = 1;
        CProfile::update('web.slides.rf_rate.hat_slides', $data['refresh_multiplier'], PROFILE_TYPE_STR, $data['elementid']);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:slides.php

示例2: array

$fields = array('applications' => array(T_ZBX_INT, O_OPT, NULL, DB_ID, NULL), 'applicationid' => array(T_ZBX_INT, O_OPT, NULL, DB_ID, NULL), 'close' => array(T_ZBX_INT, O_OPT, NULL, IN('1'), NULL), 'open' => array(T_ZBX_INT, O_OPT, NULL, IN('1'), NULL), 'groupbyapp' => array(T_ZBX_INT, O_OPT, NULL, IN('1'), NULL), 'groupid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), 'hostid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), 'select' => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), 'show' => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), 'fullscreen' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), 'favobj' => array(T_ZBX_STR, O_OPT, P_ACT, NULL, 'isset({favid})'), 'favid' => array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, NULL), 'state' => array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj}) && ("hat"=={favobj})'));
check_fields($fields);
// HEADER REQUEST
$_REQUEST['select'] = get_request('select', get_profile('web.latest.filter.select', ''));
update_profile('web.latest.filter.select', $_REQUEST['select'], PROFILE_TYPE_STR);
$options = array('allow_all_hosts', 'monitored_hosts', 'with_historical_items');
if (!$ZBX_WITH_SUBNODES) {
    array_push($options, 'only_current_node');
}
//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']);
$params = array();
foreach ($options as $option) {
    $params[$option] = 1;
}
$PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_ONLY, $PAGE_GROUPS['selected'], $params);
//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']);
validate_group_with_host($PAGE_GROUPS, $PAGE_HOSTS);
//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']);
//----------------
/* AJAX	*/
if (isset($_REQUEST['favobj'])) {
    if ('hat' == $_REQUEST['favobj']) {
        update_profile('web.latest.hats.' . $_REQUEST['favid'] . '.state', $_REQUEST['state'], PROFILE_TYPE_INT);
    }
    /*
    		else if('refresh' == $_REQUEST['favobj']){
    			switch($_REQUEST['favid']){
    				case ZBX_PAGE_MAIN_HAT:
    					include_once('blocks/latest.page.php');
    					break;
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:latest.php

示例3: get_accessible_hosts_by_user

            }
        }
    }
}
$available_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_WRITE, null, null, AVAILABLE_NOCACHE);
/* update available_hosts after ACTIONS */
$params = array();
$options = array('only_current_node', 'allow_all');
if (isset($_REQUEST['form']) || isset($_REQUEST['massupdate'])) {
    array_push($options, 'do_not_select_if_empty');
}
foreach ($options as $option) {
    $params[$option] = 1;
}
$PAGE_GROUPS = get_viewed_groups(PERM_READ_WRITE, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_WRITE, 0, $params);
validate_group($PAGE_GROUPS, $PAGE_HOSTS, false);
$available_groups = $PAGE_GROUPS['groupids'];
$available_hosts = $PAGE_HOSTS['hostids'];
$frmForm = new CForm();
$frmForm->setMethod('get');
// Config
$cmbConf = new CComboBox('config', 'proxies.php', 'javascript: submit()');
$cmbConf->setAttribute('onchange', 'javascript: redirect(this.options[this.selectedIndex].value);');
$cmbConf->addItem('nodes.php', S_NODES);
$cmbConf->addItem('proxies.php', S_PROXIES);
$frmForm->addItem($cmbConf);
if (!isset($_REQUEST["form"])) {
    $frmForm->addItem(new CButton('form', S_CREATE_PROXY));
}
show_table_header(S_CONFIGURATION_OF_PROXIES, $frmForm);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:proxies.php


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