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


PHP Acl::get_logical_ctx_id方法代码示例

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


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

示例1: get_policy_entities

function get_policy_entities($conn)
{
    $entities = $entities_all = array();
    $entities_all = Acl::get_entities_to_assign($conn);
    foreach ($entities_all as $k => $v) {
        if (Acl::is_logical_entity($conn, $k)) {
            $parent_id = Acl::get_logical_ctx_id($conn, $k);
            $parent_id = $parent_id[0];
            // first
            $parent_name = Acl::get_entity_name($conn, $parent_id);
            $entities[$parent_id] = $parent_name;
        } else {
            $entities[$k] = $v;
        }
    }
    asort($entities);
    return $entities;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:18,代码来源:actionform.php

示例2: get_policy_entities

function get_policy_entities($conn)
{
    $entities = $entities_all = array();
    $ctx_pro = '';
    $entities_all = Acl::get_entities_to_assign($conn);
    foreach ($entities_all as $k => $v) {
        if (Acl::is_logical_entity($conn, $k)) {
            $parent_id = Acl::get_logical_ctx_id($conn, $k);
            $parent_id = $parent_id[0];
            // first
            $parent_name = Acl::get_entity_name($conn, $parent_id);
            if (!empty($parent_id)) {
                $entities[$parent_id] = $parent_name;
            }
        } else {
            $entities[$k] = $v;
        }
    }
    asort($entities);
    $ctx_pro = array_shift(array_keys($entities));
    return array($entities, $ctx_pro);
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:22,代码来源:policy.php

示例3: _

if ($_FILES['nbe_file']['tmp_name'] != "" && $_FILES['nbe_file']['size'] > 0) {
    if (strtoupper(substr($_FILES['nbe_file']['name'], -3)) != "NBE") {
        $status = 1;
        $error_importing = _("Error importing file") . ".  " . _("Uploaded file extension has to be .NBE");
    } else {
        $dest = $conf->get_conf("nessus_rpt_path") . "tmp/import" . md5($report_name) . ".nbe";
        if (!copy($_FILES['nbe_file']['tmp_name'], $dest)) {
            $status = 1;
            $error_importing = _("Error importing file");
        } else {
            $ctx = $transferred_entity;
            if (!Session::is_pro() || empty($ctx)) {
                $ctx = Session::get_default_ctx();
            } else {
                if (Session::get_entity_type($conn, $ctx) == 'logical') {
                    $ctx = Acl::get_logical_ctx_id($conn, $ctx);
                    $ctx = $ctx[0];
                    // first
                }
            }
            $tz = Util::get_timezone();
            $db->close($conn);
            if (POST('submit') == _("Import & asset insertion")) {
                exec("/usr/share/ossim/scripts/vulnmeter/import_nbe.pl {$dest} " . base64_encode($report_name . ";" . $assignto) . " 1 {$tz} {$ctx} {$source}", $output_arr);
            } else {
                exec("/usr/share/ossim/scripts/vulnmeter/import_nbe.pl {$dest} " . base64_encode($report_name . ";" . $assignto) . " 0 {$tz} {$ctx} {$source}", $output_arr);
                //error_log("/usr/share/ossim/scripts/vulnmeter/import_nbe.pl $dest ".base64_encode($report_name.";".$assignto)." 0 $tz $ctx", 3, "/tmp/debug.log");
            }
            $db = new ossim_db();
            $conn = $db->connect();
            foreach ($output_arr as $line) {
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:import_nbe.php


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