// 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']);
Example #2
0
$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;
Example #3
0
            }
        }
    }
}
$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);