• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uncheckTableRows函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DBstart

    DBstart();
    $result = $enable ? activate_item($groupItemId) : disable_item($groupItemId);
    $result = DBend($result);
    $updated = count($groupItemId);
    $messageSuccess = $enable ? _n('Item prototype enabled', 'Item prototypes enabled', $updated) : _n('Item prototype disabled', 'Item prototypes disabled', $updated);
    $messageFailed = $enable ? _n('Cannot enable item prototype', 'Cannot enable item prototypes', $updated) : _n('Cannot disable item prototype', 'Cannot disable item prototypes', $updated);
    if ($result) {
        uncheckTableRows(getRequest('parent_discoveryid'));
    }
    show_messages($result, $messageSuccess, $messageFailed);
} elseif (hasRequest('action') && getRequest('action') == 'itemprototype.massdelete' && hasRequest('group_itemid')) {
    DBstart();
    $result = API::Itemprototype()->delete(getRequest('group_itemid'));
    $result = DBend($result);
    if ($result) {
        uncheckTableRows(getRequest('parent_discoveryid'));
    }
    show_messages($result, _('Item prototypes deleted'), _('Cannot delete item prototypes'));
}
/*
 * Display
 */
if (isset($_REQUEST['form'])) {
    $itemPrototype = [];
    if (hasRequest('itemid')) {
        $itemPrototype = API::ItemPrototype()->get(['itemids' => getRequest('itemid'), 'output' => ['itemid', 'type', 'snmp_community', 'snmp_oid', 'hostid', 'name', 'key_', 'delay', 'history', 'trends', 'status', 'value_type', 'trapper_hosts', 'units', 'multiplier', 'delta', 'snmpv3_securityname', 'snmpv3_securitylevel', 'snmpv3_authpassphrase', 'snmpv3_privpassphrase', 'formula', 'logtimefmt', 'templateid', 'valuemapid', 'delay_flex', 'params', 'ipmi_sensor', 'data_type', 'authtype', 'username', 'password', 'publickey', 'privatekey', 'interfaceid', 'port', 'description', 'snmpv3_authprotocol', 'snmpv3_privprotocol', 'snmpv3_contextname']]);
        $itemPrototype = reset($itemPrototype);
    }
    $data = getItemFormData($itemPrototype);
    $data['config'] = select_config();
    // render view
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:disc_prototypes.php


示例2: foreach

    $regExps = [];
    foreach ($regExpIds as $regExpId) {
        $regExps[$regExpId] = getRegexp($regExpId);
    }
    DBstart();
    $result = DBexecute('DELETE FROM regexps WHERE ' . dbConditionInt('regexpid', $regExpIds));
    $regExpCount = count($regExpIds);
    if ($result) {
        foreach ($regExps as $regExpId => $regExp) {
            add_audit(AUDIT_ACTION_DELETE, AUDIT_RESOURCE_REGEXP, 'Id [' . $regExpId . '] ' . _('Name') . ' [' . $regExp['name'] . ']');
        }
        unset($_REQUEST['form'], $_REQUEST['regexpid']);
    }
    $result = DBend($result);
    if ($result) {
        uncheckTableRows();
    }
    show_messages($result, _n('Regular expression deleted', 'Regular expressions deleted', $regExpCount), _n('Cannot delete regular expression', 'Cannot delete regular expressions', $regExpCount));
}
/*
 * Display
 */
if (isset($_REQUEST['form'])) {
    $data = ['form_refresh' => getRequest('form_refresh'), 'regexpid' => getRequest('regexpid')];
    if (isset($_REQUEST['regexpid']) && !isset($_REQUEST['form_refresh'])) {
        $regExp = DBfetch(DBSelect('SELECT re.name,re.test_string' . ' FROM regexps re' . ' WHERE re.regexpid=' . zbx_dbstr($_REQUEST['regexpid'])));
        $data['name'] = $regExp['name'];
        $data['test_string'] = $regExp['test_string'];
        $data['expressions'] = DBfetchArray(DBselect('SELECT e.expressionid,e.expression,e.expression_type,e.exp_delimiter,e.case_sensitive' . ' FROM expressions e' . ' WHERE e.regexpid=' . zbx_dbstr($_REQUEST['regexpid']) . ' ORDER BY e.expression_type'));
    } else {
        $data['name'] = getRequest('name', '');
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:adm.regexps.php


示例3: getRequest

    $groupHostDiscoveryRuleId = getRequest('g_hostdruleid');
    $enable = getRequest('action') == 'discoveryrule.massenable';
    DBstart();
    $result = $enable ? activate_item($groupHostDiscoveryRuleId) : disable_item($groupHostDiscoveryRuleId);
    $result = DBend($result);
    if ($result) {
        uncheckTableRows(getRequest('hostid'));
    }
    $updated = count($groupHostDiscoveryRuleId);
    $messageSuccess = $enable ? _n('Discovery rule enabled', 'Discovery rules enabled', $updated) : _n('Discovery rule disabled', 'Discovery rules disabled', $updated);
    $messageFailed = $enable ? _n('Cannot enable discovery rule', 'Cannot enable discovery rules', $updated) : _n('Cannot disable discovery rule', 'Cannot disable discovery rules', $updated);
    show_messages($result, $messageSuccess, $messageFailed);
} elseif (hasRequest('action') && getRequest('action') == 'discoveryrule.massdelete' && hasRequest('g_hostdruleid')) {
    $result = API::DiscoveryRule()->delete(getRequest('g_hostdruleid'));
    if ($result) {
        uncheckTableRows(getRequest('hostid'));
    }
    show_messages($result, _('Discovery rules deleted'), _('Cannot delete discovery rules'));
}
/*
 * Display
 */
if (isset($_REQUEST['form'])) {
    $formItem = hasRequest('itemid') && !hasRequest('clone') ? $item : [];
    $data = getItemFormData($formItem, ['is_discovery_rule' => true]);
    $data['lifetime'] = getRequest('lifetime', 30);
    $data['evaltype'] = getRequest('evaltype');
    $data['formula'] = getRequest('formula');
    $data['conditions'] = getRequest('conditions', []);
    // update form
    if (hasRequest('itemid') && !getRequest('form_refresh')) {
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:host_discovery.php


示例4: show_messages

    show_messages($result, _n('Application deleted', 'Applications deleted', $deleted), _n('Cannot delete application', 'Cannot delete applications', $deleted));
} elseif (hasRequest('applications') && str_in_array(getRequest('action'), array('application.massenable', 'application.massdisable'))) {
    $enableApplicationItems = getRequest('action') === 'application.massenable';
    $applications = API::Application()->get(array('output' => array(), 'applicationids' => getRequest('applications', array()), 'selectItems' => array('itemid'), 'hostids' => $pageFilter->hostid > 0 ? $pageFilter->hostid : null));
    $actionSuccessful = true;
    $updatedItemCount = 0;
    DBstart();
    foreach ($applications as $application) {
        foreach ($application['items'] as $item) {
            $actionSuccessful &= $enableApplicationItems ? activate_item($item['itemid']) : disable_item($item['itemid']);
            $updatedItemCount++;
        }
    }
    $actionSuccessful = DBend($actionSuccessful);
    if ($actionSuccessful) {
        uncheckTableRows($pageFilter->hostid);
    }
    $messageSuccess = $enableApplicationItems ? _n('Item enabled', 'Items enabled', $updatedItemCount) : _n('Item disabled', 'Items disabled', $updatedItemCount);
    $messageFailed = $enableApplicationItems ? _n('Cannot enable item', 'Cannot enable items', $updatedItemCount) : _n('Cannot disable item', 'Cannot disable items', $updatedItemCount);
    show_messages($actionSuccessful, $messageSuccess, $messageFailed);
}
/*
 * Display
 */
if (isset($_REQUEST['form'])) {
    $data = array('applicationid' => getRequest('applicationid'), 'form' => getRequest('form'), 'form_refresh' => getRequest('form_refresh', 0));
    if (isset($data['applicationid']) && !isset($_REQUEST['form_refresh'])) {
        $dbApplication = reset($dbApplication);
        $data['appname'] = $dbApplication['name'];
        $data['hostid'] = $dbApplication['hostid'];
    } else {
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:applications.php


示例5: DBend

    }
    $result = API::HostPrototype()->update($update);
    $result = DBend($result);
    $updated = count($update);
    $messageSuccess = $enable ? _n('Host prototype enabled', 'Host prototypes enabled', $updated) : _n('Host prototype disabled', 'Host prototypes disabled', $updated);
    $messageFailed = $enable ? _n('Cannot enable host prototype', 'Cannot enable host prototypes', $updated) : _n('Cannot disable host prototype', 'Cannot disable host prototypes', $updated);
    if ($result) {
        uncheckTableRows($discoveryRule['itemid']);
    }
    show_messages($result, $messageSuccess, $messageFailed);
} elseif (hasRequest('action') && getRequest('action') == 'hostprototype.massdelete' && getRequest('group_hostid')) {
    DBstart();
    $result = API::HostPrototype()->delete(getRequest('group_hostid'));
    $result = DBend($result);
    if ($result) {
        uncheckTableRows($discoveryRule['itemid']);
    }
    show_messages($result, _('Host prototypes deleted'), _('Cannot delete host prototypes'));
}
/*
 * Display
 */
if (isset($_REQUEST['form'])) {
    $data = array('discovery_rule' => $discoveryRule, 'host_prototype' => array('hostid' => getRequest('hostid'), 'templateid' => getRequest('templateid'), 'host' => getRequest('host'), 'name' => getRequest('name'), 'status' => getRequest('status', HOST_STATUS_MONITORED), 'templates' => array(), 'inventory' => array('inventory_mode' => getRequest('inventory_mode', HOST_INVENTORY_DISABLED)), 'groupPrototypes' => getRequest('group_prototypes', array())), 'groups' => array());
    // add already linked and new templates
    $data['host_prototype']['templates'] = API::Template()->get(array('output' => array('templateid', 'name'), 'templateids' => getRequest('templates', array())));
    // add parent host
    $parentHost = API::Host()->get(array('output' => API_OUTPUT_EXTEND, 'selectGroups' => array('groupid', 'name'), 'selectInterfaces' => API_OUTPUT_EXTEND, 'selectMacros' => API_OUTPUT_EXTEND, 'hostids' => $discoveryRule['hostid'], 'templated_hosts' => true));
    $parentHost = reset($parentHost);
    $data['parent_host'] = $parentHost;
    if (getRequest('group_links')) {
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:host_prototypes.php


示例6: access_deny

                if (!isset($dbGroups[$groupid])) {
                    access_deny();
                }
            }
            $options['groupids'] = getRequest('copy_targetid');
        }
        $dbHosts = API::Host()->get($options);
        DBstart();
        foreach (getRequest('group_graphid') as $graphid) {
            foreach ($dbHosts as $host) {
                $result &= (bool) copyGraphToHost($graphid, $host['hostid']);
            }
        }
        $result = DBend($result);
        if ($result) {
            uncheckTableRows(getRequest('parent_discoveryid') == 0 ? getRequest('hostid') : getRequest('parent_discoveryid'));
            unset($_REQUEST['group_graphid']);
        }
        show_messages($result, _('Graphs copied'), _('Cannot copy graphs'));
    } else {
        error(_('No target selected.'));
    }
    show_messages();
}
/*
 * Display
 */
$pageFilter = new CPageFilter(array('groups' => array('with_hosts_and_templates' => true, 'editable' => true), 'hosts' => array('editable' => true, 'templated_hosts' => true), 'groupid' => getRequest('groupid'), 'hostid' => getRequest('hostid')));
if (empty($_REQUEST['parent_discoveryid'])) {
    if ($pageFilter->groupid > 0) {
        $_REQUEST['groupid'] = $pageFilter->groupid;
开发者ID:h3llowor1d,项目名称:zabbix,代码行数:31,代码来源:graphs.php


示例7: access_deny

                    access_deny();
                }
            }
            $options['groupids'] = getRequest('copy_targetid');
        }
        $dbHosts = API::Host()->get($options);
        DBstart();
        foreach (getRequest('group_graphid') as $graphid) {
            foreach ($dbHosts as $host) {
                $result &= (bool) copyGraphToHost($graphid, $host['hostid']);
            }
        }
        $result = DBend($result);
        $graphs_count = count(getRequest('group_graphid'));
        if ($result) {
            uncheckTableRows(getRequest('parent_discoveryid') == 0 ? $hostId : getRequest('parent_discoveryid'));
            unset($_REQUEST['group_graphid']);
        }
        show_messages($result, _n('Graph copied', 'Graphs copied', $graphs_count), _n('Cannot copy graph', 'Cannot copy graphs', $graphs_count));
    } else {
        error(_('No target selected.'));
    }
    show_messages();
}
/*
 * Display
 */
$pageFilter = new CPageFilter(['groups' => ['with_hosts_and_templates' => true, 'editable' => true], 'hosts' => ['editable' => true, 'templated_hosts' => true], 'groupid' => $groupId, 'hostid' => $hostId]);
if (empty($_REQUEST['parent_discoveryid'])) {
    if ($pageFilter->groupid > 0) {
        $groupId = $pageFilter->groupid;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:graphs.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uncompress函数代码示例发布时间:2022-05-23
下一篇:
PHP unassign_capability函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap