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


PHP CDiv::AddAction方法代码示例

本文整理汇总了PHP中CDiv::AddAction方法的典型用法代码示例。如果您正苦于以下问题:PHP CDiv::AddAction方法的具体用法?PHP CDiv::AddAction怎么用?PHP CDiv::AddAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDiv的用法示例。


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

示例1: array

        if (isset($services[$row['serviceid']])) {
            $services[$row['serviceid']] = array_merge($services[$row['serviceid']], $row);
        } else {
            $services[$row['serviceid']] = $row;
        }
        if (isset($row['serviceupid'])) {
            $services[$row['serviceupid']]['childs'][] = array('id' => $row['serviceid'], 'soft' => 0, 'linkid' => 0);
        }
        if (isset($row['servicedownid'])) {
            $services[$row['serviceid']]['childs'][] = array('id' => $row['servicedownid'], 'soft' => 1, 'linkid' => $row['linkid']);
        }
    }
    $treeServ = array();
    createShowServiceTree($services, $treeServ);
    //return into $treeServ parametr
    //permission issue
    $treeServ = del_empty_nodes($treeServ);
    $tree = new CTree($treeServ, array('caption' => bold(S_SERVICE), 'status' => bold(S_STATUS), 'reason' => bold(S_REASON), 'sla' => bold(S_SLA_LAST_7_DAYS), 'sla2' => bold(nbsp(S_SLA)), 'graph' => bold(S_GRAPH)));
    if ($tree) {
        $url = '?fullscreen=' . ($_REQUEST['fullscreen'] ? '0' : '1');
        $fs_icon = new CDiv(SPACE, 'fullscreen');
        $fs_icon->AddOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
        $fs_icon->AddAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
        $tab = create_hat(S_IT_SERVICES_BIG, $tree->getHTML(), null, 'hat_services', get_profile('web.srv_status.hats.hat_services.state', 1));
        $tab->Show();
        unset($tab);
    } else {
        error('Can not format Tree. Check logik structure in service links');
    }
}
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:srv_status.php

示例2: array

        echo $main_header . SBR;
    }
    $_REQUEST['period'] = get_request('period', get_profile('web.item.graph.period', ZBX_PERIOD_DEFAULT, PROFILE_TYPE_INT, $_REQUEST['itemid']));
    if ($_REQUEST['period'] >= ZBX_MIN_PERIOD) {
        update_profile('web.item.graph.period', $_REQUEST['period'], PROFILE_TYPE_INT, $_REQUEST['itemid']);
    }
    $l_header = array(new CLink($item_data['host'], 'latest.php?hostid=' . $item_data['hostid']), ': ', item_description($item_data));
    if ('showgraph' == $_REQUEST['action']) {
        if (infavorites('web.favorite.graphids', $_REQUEST['itemid'], 'itemid')) {
            $icon = new CDiv(SPACE, 'iconminus');
            $icon->AddOption('title', S_REMOVE_FROM . ' ' . S_FAVORITES);
            $icon->AddAction('onclick', new CScript("javascript: rm4favorites('itemid','" . $_REQUEST['itemid'] . "',0);"));
        } else {
            $icon = new CDiv(SPACE, 'iconplus');
            $icon->AddOption('title', S_ADD_TO . ' ' . S_FAVORITES);
            $icon->AddAction('onclick', new CScript("javascript: add2favorites('itemid','" . $_REQUEST['itemid'] . "');"));
        }
        $icon->AddOption('id', 'addrm_fav');
        $icon_tab = new CTable();
        $icon_tab->AddRow(array($icon, SPACE, $l_header));
        $l_header = $icon_tab;
    }
}
$effectiveperiod = navigation_bar_calc();
unset($item_data);
$to_save_request = null;
if (!isset($_REQUEST['plaintext']) && $_REQUEST['fullscreen'] == 0) {
    if ($item_type == ITEM_VALUE_TYPE_LOG) {
        $l_header = new CForm();
        $l_header->SetName('loglist');
        $l_header->AddVar('action', $_REQUEST['action']);
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:history.php


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