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


PHP CSpan::AddOption方法代码示例

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


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

示例1: host_js_menu

function host_js_menu($hostid, $link_text = S_SELECT)
{
    $hst_grp_all_in = array();
    $db_groups = DBselect('SELECT DISTINCT g.groupid, g.name ' . ' FROM groups g, hosts_groups hg ' . ' WHERE g.groupid=hg.groupid ' . ' AND hg.hostid=' . $hostid . ' ORDER BY g.name');
    while ($group = DBfetch($db_groups)) {
        $group['name'] = htmlspecialchars($group['name']);
        $hst_grp_all_in[] = $group;
    }
    $action = new CSpan($link_text);
    $script = new CScript('javascript: create_host_menu(event,' . $hostid . ',' . zbx_jsvalue($hst_grp_all_in) . ');');
    $action->AddAction('onclick', $script);
    $action->AddOption('onmouseover', 'javascript: this.style.cursor = "pointer";');
    return $action;
}
开发者ID:rennhak,项目名称:zabbix,代码行数:14,代码来源:hosts.inc.php

示例2: get_user_actionmenu

function get_user_actionmenu($userid)
{
    $usr_grp_all_in = array();
    $usr_grp_gui_in = array();
    $usr_grp_status_in = array();
    $sql = 'SELECT DISTINCT g.name, g.usrgrpid, g.gui_access, g.users_status ' . ' FROM users_groups ug, usrgrp g ' . ' WHERE ug.userid=' . $userid . ' AND g.usrgrpid=ug.usrgrpid ' . ' AND ' . DBin_node('g.usrgrpid', get_current_nodeid(false));
    $res = DBselect($sql);
    while ($group = DBFetch($res)) {
        $group['name'] = htmlspecialchars($group['name']);
        $gui_access = $group['gui_access'];
        $users_status = $group['users_status'];
        unset($group['gui_access']);
        unset($group['users_status']);
        $usr_grp_all_in[] = $group;
        if ($gui_access != GROUP_GUI_ACCESS_SYSTEM) {
            $usr_grp_gui_in[] = $group;
        }
        if ($users_status == GROUP_STATUS_DISABLED) {
            $usr_grp_status_in[] = $group;
        }
    }
    $action = new CSpan(S_SELECT);
    $script = new CScript("javascript: create_user_menu(event," . $userid . "," . zbx_jsvalue($usr_grp_all_in) . "," . zbx_jsvalue($usr_grp_gui_in) . "," . zbx_jsvalue($usr_grp_status_in) . ");");
    $action->AddAction('onclick', $script);
    $action->AddOption('onmouseover', 'javascript: this.style.cursor = "pointer";');
    return $action;
}
开发者ID:rennhak,项目名称:zabbix,代码行数:27,代码来源:users.inc.php

示例3: array

$refresh_rate = 30;
//seconds
$fields = array("warning_msg" => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), "message" => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), "retry" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), "cancel" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL));
check_fields($fields, false);
if (isset($_REQUEST['cancel'])) {
    zbx_unsetcookie('ZBX_CONFIG');
    redirect('index.php');
    exit;
}
//	clear_messages();
$USER_DETAILS["refresh"] = $refresh_rate;
include_once "include/page_header.php";
unset($USER_DETAILS);
insert_showhint_javascript();
$table = new CTable(null, 'warning');
$table->SetAlign('center');
$table->AddOption('style', 'width: 480px; margin-top: 100px;');
$table->SetHeader(array(new CCol(S_ZABBIX_VER, 'left'), SPACE), 'header');
$table->AddRow(SPACE);
$warning_msg = isset($_REQUEST['warning_msg']) ? $_REQUEST['warning_msg'] : S_ZABBIX_IS_UNAVAILABLE . '!';
$img = new CImg('./images/general/warning16r.gif', 'warning', 16, 16, 'img');
$img->addOption('style', 'border-width: 0px; vertical-align: bottom;');
$msg = new CSpan(bold(SPACE . $warning_msg));
$msg->AddOption('style', 'line-height: 20px; vertical-align: top;');
$table->AddRow(new CCol(array($img, $msg), 'center'));
$table->AddRow(SPACE);
$table->SetFooter(new CCol(new CButton('retry', S_RETRY, 'javascript: document.location.reload();'), 'left'), 'footer');
$table->Show();
zbx_add_post_js('setTimeout("document.location.reload();",' . $refresh_rate * 1000 . ');');
echo SBR;
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:warning.php


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