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


PHP Acl::get_entities方法代码示例

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


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

示例1: _

             $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++;
         }
     }
     $buffer .= "]";
     if ($buffer == "" || $buffer == "[]") {
         echo "[{title:'" . _("No Sensors Found") . "', noLink:true}]";
     } else {
         echo $buffer;
     }
 } else {
     if ($key == "entities") {
         $entities = Acl::get_entities($conn);
         $entities_types = Acl::get_entities_types($conn);
         $num_entities = count($entities[0]);
         $expand = $num_entities > 0 ? "expand:true" : "expand:false";
         echo "[";
         $flag = false;
         $entities_admin = array();
         if ($num_entities > 0) {
             foreach ($entities[0] as $entity) {
                 $entity_allowed = Acl::entityAllowed($entity['id']);
                 if ($entity['parent_id'] > 0 || $entity['type'] <= 0 || !$entity_allowed) {
                     continue;
                 }
                 if ($flag) {
                     echo ",";
                 }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:draw_tree.php

示例2: array

if ($pro) {
    // users
    $users = array();
    if (Session::am_i_admin()) {
        $users_list = Session::get_list($conn_ossim);
        foreach ($users_list as $user_data) {
            $users[] = $user_data->login;
        }
    } else {
        $users_list = Acl::get_my_users($conn_ossim, Session::get_session_user());
        foreach ($users_list as $user_data) {
            $users[] = $user_data["login"];
        }
    }
    // entities
    list($entities_all, $num_entities) = Acl::get_entities($conn_ossim);
    list($entities_admin, $num) = Acl::get_entities_admin($conn_ossim, Session::get_session_user());
    $entities_list = array_keys($entities_admin);
}
$db->close($conn);
$db->close($conn_ossim);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title><?php 
echo _('Backup');
?>
</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  		<meta http-equiv="Pragma" content="no-cache">
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:index.php

示例3: GET

$directive_id = GET('directive_id');
$intent = intval(GET('intent'));
$sensor_query = GET('sensor_query');
$tag = GET('tag');
$num_events = GET('num_events');
$num_events_op = GET('num_events_op');
$date_from = GET('date_from');
$date_to = GET('date_to');
$ds_id = GET('ds_id');
$ds_name = GET('ds_name');
$beep = intval(GET('beep'));
$sec = POST('sEcho');
//$tags            = Tags::get_list($conn);
$tags_html = Tags::get_list_html($conn);
if (Session::is_pro() && Session::show_entities()) {
    list($entities, $_children, $_num_ent) = Acl::get_entities($conn, '', '', true, false);
}
ossim_valid($order, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Order"));
ossim_valid($torder, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Order Direction"));
ossim_valid($delete, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Delete"));
ossim_valid($close, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Close"));
ossim_valid($open, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Open"));
ossim_valid($delete_day, OSS_ALPHA, OSS_SPACE, OSS_PUNC, OSS_NULLABLE, 'illegal:' . _("Delete_day"));
ossim_valid($query, OSS_ALPHA, OSS_PUNC_EXT, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("Query"));
ossim_valid($autorefresh, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Autorefresh"));
ossim_valid($refresh_time, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Refresh_time"));
ossim_valid($directive_id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Directive_id"));
ossim_valid($intent, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Intent"));
ossim_valid($src_ip, OSS_IP_ADDRCIDR_0, OSS_NULLABLE, 'illegal:' . _("Src_ip"));
ossim_valid($dst_ip, OSS_IP_ADDRCIDR_0, OSS_NULLABLE, 'illegal:' . _("Dst_ip"));
ossim_valid($inf, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Inf"));
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:alarm_console_ajax.php

示例4: timezone_identifiers_list

/* Version */
$pro = Session::is_pro();
//Timezone
$tzlist = timezone_identifiers_list(4095);
sort($tzlist);
//Login method list
$lm_list = array('ldap' => _('LDAP'), 'pass' => _('PASSWORD'));
//Entities and Templates
$noentities = 0;
$notemplates = 0;
if ($pro) {
    $entity_list = Session::get_entities_to_assign($conn);
    if (count($entity_list) < 1) {
        $noentities = 1;
    }
    list($entities_all, $num_entities_all) = Acl::get_entities($conn, '', '', FALSE, FALSE);
    $templates = array();
    list($templates, $num_templates) = Session::get_templates($conn);
    if (count($templates) < 1) {
        $templates[0] = array('id' => '', 'name' => ' -- ' . _('No templates found') . ' -- ');
        $notemplates = 1;
    }
} else {
    list($menu_perms, $perms_check) = Session::get_menu_perms($conn);
}
//Initialize variables
$_SESSION['user_in_db'] = NULL;
$login = '';
$uuid = '';
$user_name = '';
$email = '';
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:user_form.php

示例5: get_json_entities

function get_json_entities($conn)
{
    require_once 'av_init.php';
    $json_entities = NULL;
    $conf = $GLOBALS["CONF"];
    if (!$conf) {
        $conf = new Ossim_conf();
    }
    $version = $conf->get_conf("ossim_server_version", FALSE);
    $pro = preg_match("/pro|demo/i", $version) ? TRUE : FALSE;
    if ($pro) {
        list($entities_all, $num_entities) = Acl::get_entities($conn, '', '', FALSE, FALSE);
        if (is_array($entities_all) && !empty($entities_all)) {
            foreach ($entities_all as $entity_id) {
                $entity_text = $entity["name"];
                $entity_id = $entity["id"];
                $json_entities .= '{ txt:"' . $entity_text . '", id:"' . $entity_id . '"},';
            }
        }
    }
    return $json_entities;
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:22,代码来源:incident_common.php

示例6: elseif

        echo $url;
        ?>
" />
	<?php 
    } elseif (Acl::am_i_proadmin()) {
        // pro admin
        //users
        $users_admin = Acl::get_my_users($dbconn, Session::get_session_user());
        foreach ($users_admin as $u) {
            //	if($u["login"]!=Session::get_session_user()){
            $users_pro_login[] = $u["login"];
            //	}
        }
        //if(!in_array(Session::get_session_user(), $users_pro_login) && $incident_in_charge!=Session::get_session_user())   $users_pro_login[] = Session::get_session_user();
        //entities
        list($entities_all, $num_entities) = Acl::get_entities($dbconn);
        list($entities_admin, $num) = Acl::get_entities_admin($dbconn, Session::get_session_user());
        $entities_list = array_keys($entities_admin);
        $entities_types_aux = Acl::get_entities_types($dbconn);
        $entities_types = array();
        foreach ($entities_types_aux as $etype) {
            $entities_types[$etype['id']] = $etype;
        }
        //save entities for proadmin
        foreach ($entities_all as $entity) {
            if (in_array($entity["id"], $entities_list)) {
                $entities_pro[$entity["id"]] = $entity["name"] . " [" . $entities_types[$entity["type"]]["name"] . "]";
            }
        }
        // filter users
        $users_pro = array();
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:add_to_all_dashboards.php

示例7: main_page


//.........这里部分代码省略.........
                $stt = _("Monthly");
                break;
            case "Q":
                $stt = _("Quarterly");
                break;
            case "H":
                $stt = _("On Hold");
                break;
            case "NW":
                $stt = _("N<sup>th</sup> weekday of the month");
                break;
            default:
                $stt = "&nbsp;";
                break;
        }
        switch ($schedstatus) {
            case "1":
                $itext = _("Disable Scheduled Job");
                $isrc = "images/stop2.png";
                $ilink = "manage_jobs.php?disp=setstatus&schedid={$schedid}&enabled=0";
                break;
            default:
                $itext = _("Enable Scheduled Job");
                $isrc = "images/play.png";
                $ilink = "manage_jobs.php?disp=setstatus&schedid={$schedid}&enabled=1";
                break;
        }
        if ($schedstatus) {
            $txt_enabled = "<td><a href=\"{$ilink}\"><font color=\"green\">" . _("Enabled") . "</font></a></td>";
        } else {
            $txt_enabled = "<td><a href=\"{$ilink}\"><font color=\"red\">" . _("Disabled") . "</font></a></td>";
        }
        if (preg_match('/^\\d+$/', $user)) {
            list($entities_all, $num_entities) = Acl::get_entities($dbconn, $user);
            $user = $entities_all[$user]['name'];
        }
        echo <<<EOT
<tr>
EOT;
        if ($profile == "") {
            $profile = _("Default");
        }
        echo "<td><a style=\"text-decoration:none;\" href=\"javascript:;\" txt=\"<b>" . _("Owner") . ":</b> {$user}<br><b>" . _("Server") . ":</b> {$servers}<br /><b>" . _("Scheduled Job ID") . ":</b> {$schedid}<br><b>" . _("Profile") . ":</b> {$profile}<br><b>" . _("Targets") . ":</b><br>" . tooltip_hosts($targets, $hosts) . "\" class=\"scriptinfo\">{$schedname}</a></td>";
        ?>
    <td><?php 
        echo $stt;
        ?>
</td>
    <td><?php 
        echo $time;
        ?>
</td>
    <td><?php 
        echo $nextscan;
        ?>
</td>
<?php 
        echo <<<EOT
    {$txt_enabled}
    <td style="padding-top:2px;"><a href="{$ilink}"><img alt="{$itext}" src="{$isrc}" border=0 title="{$itext}"></a>&nbsp;
EOT;
        echo "<a href='sched.php?disp=edit_sched&sched_id={$schedid}&amp;hmenu=Vulnerabilities&amp;smenu=Jobs'><img src='images/pencil.png' title='" . gettext("Edit Scheduled") . "'></a>&nbsp;";
        echo "<a href='manage_jobs.php?disp=delete&amp;schedid={$schedid}' onclick='return confirmDelete();'><img src='images/delete.gif' title='" . gettext("Delete Scheduled") . "'></a></td>";
        echo <<<EOT
</tr>
EOT;
开发者ID:jhbsz,项目名称:ossimTest,代码行数:67,代码来源:manage_jobs.php


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