本文整理汇总了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;
}
示例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);
}
示例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) {