本文整理汇总了PHP中Acl::entityPerms方法的典型用法代码示例。如果您正苦于以下问题:PHP Acl::entityPerms方法的具体用法?PHP Acl::entityPerms怎么用?PHP Acl::entityPerms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Acl
的用法示例。
在下文中一共展示了Acl::entityPerms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
if ($buffer == "" || $buffer == "[]") {
echo "[{title:'" . _("No Hosts Found") . "', noLink:true}]";
} else {
echo $buffer;
}
} else {
if (preg_match("/^e_(.*)_net\$/", $key)) {
$buffer = Net::draw_nets_by_class($conn, $key, $filter, $length_name, 1);
echo $buffer;
} else {
if (preg_match("/^e_(.*)_.class_(.*)/", $key)) {
$buffer = Net::draw_nets_by_class($conn, $key, $filter, $length_name, 1);
echo $buffer;
} else {
if (preg_match("/e_(.*)_sensor/", $key, $found)) {
$entityPerms = Acl::entityPerms($conn, $found[1]);
$all = count($entityPerms["sensors"]);
$sensors = Sensor::get_all($conn);
$j = 0;
$buffer .= "[";
foreach ($sensors as $sensor) {
if (!$all || $entityPerms["sensors"][$sensor->get_ip()]) {
$sensor_name = $sensor->get_name();
$s_title = Util::htmlentities($sensor_name);
$sensor_key = utf8_encode("sensor;" . $sensor_name);
$title = strlen($sensor_name) > $length_name ? substr($sensor_name, 0, $length_name) . "..." : $sensor_name;
$title = Util::htmlentities($title);
$tooltip = $s_title;
$li = "url:'" . $sensor->get_ip() . "', icon:'../../pixmaps/theme/server.png', title:'{$title}', tooltip:'{$tooltip}'\n";
$buffer .= ($j > 0 ? "," : "") . "{ {$li} }";
$j++;
示例2: die
die(ossim_error());
}
if ($filter == "undefined") {
$filter = "";
}
$low_limit = 10;
$high_limit = 100;
require_once 'classes/Net.inc';
require_once 'ossim_db.inc';
$db = new ossim_db();
$conn = $db->connect();
$current_entity_perms['sensors'] = array();
$current_entity_perms['assets'] = array();
if ($entity != "") {
require_once 'classes/Acl.inc';
$current_entity_perms = Acl::entityPerms($conn, $entity);
} else {
$entity = 0;
}
$filter = str_replace("/", "\\/", $filter);
$aclasses = array();
$bclasses = array();
$cclasses = array();
$nets = array();
if ($filter != "") {
if (preg_match("/\\d+\\./", $filter)) {
$condition = "ips LIKE '" . $filter . "%'";
} else {
$condition = "name LIKE '%" . $filter . "%'";
}
if ($key != "") {