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


PHP Acl::get_entity_name_type方法代码示例

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


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

示例1: list

        echo $class;
        ?>
 nowrap='nowrap'><?php 
        echo $incident->get_date();
        ?>
</td>
						<td <?php 
        echo $class;
        ?>
 nowrap='nowrap'><?php 
        echo $incident->get_life_time();
        ?>
</td>
							<?php 
        if (preg_match("/pro|demo/i", $version) && preg_match("/^\\d+\$/", $incident->get_in_charge_name($conn))) {
            list($entity_name, $entity_type) = Acl::get_entity_name_type($conn, $incident->get_in_charge_name($conn));
            $in_charge_name = !empty($entity_name) ? $entity_name . " [" . $entity_type . "]" : _("Unknown");
        } else {
            $in_charge_name = $incident->get_in_charge_name($conn);
        }
        ?>
						<td <?php 
        echo $class;
        ?>
><?php 
        echo $in_charge_name;
        ?>
</td>
						<td <?php 
        echo $class;
        ?>
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:index.php

示例2: array

$chart['chart_rect'] = array('x' => 50, 'y' => 30, 'width' => 130, 'height' => 200, 'positive_alpha' => 0);
$chart['chart_transition'] = array('type' => "scale", 'delay' => 0.1, 'duration' => 0.3, 'order' => "category");
$chart['chart_type'] = "3d pie";
$chart['chart_value'] = array('as_percentage' => true, 'size' => 9, 'color' => "000000", 'alpha' => 85);
$chart['legend_label'] = array('layout' => "vertical", 'bullet' => "circle", 'size' => 11, 'color' => "505050", 'alpha' => 85, 'bold' => false);
$chart['legend_rect'] = array('x' => 220, 'y' => 120, 'width' => 20, 'height' => 40, 'fill_alpha' => 0);
$chart['draw'] = array(array('type' => "text", 'color' => "000000", 'alpha' => 75, 'rotation' => 0, 'size' => 20, 'x' => 70, 'y' => 30, 'width' => 400, 'height' => 200, 'text' => "Opened Tickets by User", 'h_align' => "left", 'v_align' => "top"));
$chart['series_color'] = array("cc6600", "aaaa22", "8800dd", "666666", "4488aa");
//$chart [ 'series_explode' ] = array ( 0, 50 );
$legend = array("");
$values = array("");
if (!($rs =& $conn->Execute($query))) {
    print $conn->ErrorMsg();
    exit;
}
$conf = $GLOBALS["CONF"];
$version = $conf->get_conf("ossim_server_version", FALSE);
while (!$rs->EOF) {
    if (preg_match("/pro|demo/i", $version) && preg_match("/^\\d+\$/", $rs->fields["in_charge"])) {
        list($name, $type) = Acl::get_entity_name_type($conn, $rs->fields["in_charge"]);
        if ($type != "" && $name != "") {
            array_push($legend, $name . " [" . $type . "]");
        }
    } else {
        array_push($legend, $rs->fields["in_charge"]);
    }
    array_push($values, $rs->fields["num"]);
    $rs->MoveNext();
}
$chart['chart_data'] = array($legend, $values);
SendChartData($chart);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:incident_user_source.php

示例3: set_include_path

set_include_path('/usr/share/ossim/include');
require_once 'classes/Session.inc';
require_once 'ossim_conf.inc';
require_once 'ossim_sql.inc';
$conf = $GLOBALS["CONF"];
$mdays = $conf->get_conf("tickets_max_days", FALSE);
$db = new ossim_db();
$dbconn = $db->connect();
$result = $dbconn->execute("SET SESSION time_zone='+00:00'");
$result = $dbconn->execute("SELECT id, title, date, ref, type_id, priority, last_update, in_charge, submitter FROM incident inner join incident_tag on incident_tag.incident_id=incident.id WHERE DATEDIFF( now( ) , date ) > {$mdays} AND STATUS = 'open'");
while (!$result->EOF) {
    //echo $result->fields["in_charge"];
    unset($email_data);
    if (preg_match("/^\\d+\$/", $result->fields["in_charge"])) {
        $entity_name_type = array();
        $entity_name_type = Acl::get_entity_name_type($dbconn, $result->fields["in_charge"]);
        $in_charge = $entity_name_type[0] . " [" . $entity_name_type[1] . "]";
    } else {
        $in_charge = $result->fields["in_charge"];
    }
    $email_data = array("id" => $result->fields["id"], "title" => $result->fields["title"], "date" => $result->fields["date"], "ref" => $result->fields["ref"], "type_id" => $result->fields["type_id"], "priority" => $result->fields["priority"], "last_update" => $result->fields["last_update"], "in_charge" => $in_charge, "submitter" => $result->fields["submitter"]);
    if (!preg_match("/^\\d+\$/", $result->fields["in_charge"])) {
        //in_charge is a user
        $user_data = Session::get_list($dbconn, "WHERE login='" . $result->fields["in_charge"] . "'");
        //echo $user_data[0]->get_email();
        sendEmail($conf, $email_data, $user_data[0]->get_email());
    } else {
        // in_charge is a entity
        $entity_data = Acl::get_entity($dbconn, $result->fields["in_charge"]);
        if ($entity_data["admin_user"] != "") {
            // exists pro admin
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:check_tickets.php

示例4: array

$conf = $GLOBALS["CONF"];
$levels = array("1" => "Serious:", "2" => "High:", "3" => "Medium:", "6" => "Low:", "7" => "Info:");
$db = new ossim_db();
$dbconn = $db->connect();
// select data for specified report_id
$result = $dbconn->execute("SELECT vns.name as profile, vj.meth_VSET as profile_id, vj.name, vj.username, vj.fk_name, vj.scan_SUBMIT, vj.scan_START, TIMESTAMPDIFF(MINUTE, vj.scan_START, vj.scan_END) as duration, vj.meth_TARGET\r\n                            FROM vuln_jobs as vj, vuln_nessus_settings as vns WHERE vj.report_id={$report_id} and vj.meth_VSET=vns.id");
$username = $result->fields["username"];
$email_data = array("subject" => _('Scan Job Notification: ') . $result->fields["name"]);
$width = 115;
$body = '<html>
        <head>
            <title>' . $subject . '</title>
            </head>
            <body>' . '<table width="100%" cellspacing="0" cellpadding="0" style="border:0px;">' . '<tr><td colspan="2" style="text-decoration: underline;">' . _('Email scan summary') . '</td></tr>' . '<tr><td colspan="2">&nbsp;</td></tr>' . '<tr><td width="' . $width . '">' . _('Scan Title:') . '</td><td>' . $result->fields["name"] . '</td></tr>' . '<tr><td width="' . $width . '">' . _('Profile:') . '</td><td>' . $result->fields["profile"] . '</td></tr>' . '<tr><td width="' . $width . '">' . _('Submit Date:') . '</td><td>' . $result->fields["scan_SUBMIT"] . '</td></tr>' . '<tr><td width="' . $width . '">' . _('Start Date:') . '</td><td>' . $result->fields["scan_START"] . '</td></tr>' . '<tr><td width="' . $width . '">' . _('Duration:') . '</td><td>' . $result->fields["duration"] . ' mins</td></tr>' . '<tr><td width="' . $width . '">' . _('Targets:') . '</td><td>' . str_replace("\n", ", ", $result->fields["meth_TARGET"]) . '</td></tr>' . '<tr><td colspan="2">&nbsp;</td></tr>' . '<tr><td width="' . $width . '">' . _('Launched By:') . '</td><td>' . ($result->fields["fk_name"] != "" ? $result->fields["fk_name"] : _("Unknown")) . '</td></tr>';
if (preg_match("/^\\d+\$/", $username)) {
    $edata = Acl::get_entity_name_type($dbconn, $username);
    $visible_for = $edata[0] . " [" . $edata[1] . "]";
} else {
    $visible_for = $username;
}
$body .= '<tr><td width="' . $width . '">' . _('Job visible for:') . '</td><td>' . ($visible_for != "" ? $visible_for : _("Unknown")) . '</td></tr>';
$body .= '<tr><td colspan="2">&nbsp;</td></tr>';
$body .= '<tr><td colspan="2" style="text-decoration: underline;">' . _('Summary of Scanned Hosts') . '</td></tr>';
$body .= '<tr><td colspan="2">&nbsp;</td></tr>';
$result_ip_name = $dbconn->execute("SELECT distinct t1.hostip as ip, t2.hostname as hostname FROM vuln_nessus_results t1 LEFT JOIN host t2 on t1.hostip = t2.ip\r\n                                         WHERE t1.report_id={$report_id}");
$total = 0;
while (list($hostip, $hostname) = $result_ip_name->fields) {
    // read data from vuln_nessus_latest_results to generate stats
    $result_stats = $dbconn->execute("SELECT note FROM vuln_nessus_latest_reports\r\n                                                        WHERE report_id = inet_aton( '" . $hostip . "' )\r\n                                                        AND sid=" . $result->fields["profile_id"] . " AND username='{$username}'");
    $risk_stats = explode(";", $result_stats->fields["note"]);
    $body .= '<tr><td width="' . $width . '">' . _('Hostname:') . '</td><td>' . ($hostname != "" ? $hostname : _("Unknown")) . '</td></tr>';
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:send_notification.php


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