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


PHP get_viewed_groups函数代码示例

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


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

示例1: foreach

        foreach ($options as $option) {
            $params[$option] = 1;
        }
        $PAGE_GROUPS = get_viewed_groups(PERM_READ_WRITE, $params);
        $PAGE_HOSTS = get_viewed_hosts(PERM_READ_WRITE, $PAGE_GROUPS['selected'], $params);
        validate_group_with_host($PAGE_GROUPS, $PAGE_HOSTS, false);
        break;
    default:
        $options = array('only_current_node');
        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, $PAGE_GROUPS['selected'], $params);
        validate_group_with_host($PAGE_GROUPS, $PAGE_HOSTS);
}
//	$available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,null,null,AVAILABLE_NOCACHE); /* update available_hosts after ACTIONS */
$available_groups = $PAGE_GROUPS['groupids'];
$available_hosts = $PAGE_HOSTS['hostids'];
$frmForm = new CForm();
$frmForm->setMethod('get');
$cmbConf = new CComboBox('config', $_REQUEST['config'], 'submit()');
$cmbConf->addItem(1, S_HOST_GROUPS);
$cmbConf->addItem(0, S_HOSTS);
$cmbConf->addItem(3, S_TEMPLATES);
$cmbConf->addItem(2, S_TEMPLATE_LINKAGE);
$cmbConf->addItem(5, S_PROXIES);
$cmbConf->addItem(6, S_MAINTENANCE);
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:hosts.php

示例2: array

//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$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');
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:latest.php

示例3: 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;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:slides.php


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