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


PHP Repository::have_linked_documents方法代码示例

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


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

示例1: count

                }
            } else {
                $scantype = "<img src='../pixmaps/tables/cross.png'>";
            }
        }
    }
    $xml .= "<cell><![CDATA[" . $host->get_threshold_c() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_threshold_a() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_alert() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_persistence() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_rrd_profile() . "]]></cell>";
    $apps = Host::get_apps($conn, $ip);
    if (count($apps) > 0) {
        $xml .= "<cell><![CDATA[<a href='javascript:;' onclick=\"view_apps('{$ip}')\" class='blue' target=\"main\">[" . count($apps) . "]&nbsp;<img src='../pixmaps/tools.png' title='" . count($apps) . _(" apps found") . "' border='0' align='absmiddle'></a>]]></cell>";
    } else {
        $xml .= "<cell><![CDATA[<img src='../pixmaps/tools_gray.png' title='" . _("No apps found") . "' border='0'>]]></cell>";
    }
    $rep = "";
    if ($linkedocs = Repository::have_linked_documents($conn, $ip, 'host')) {
        //$rep.= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/index.php?search_bylink=$ip&hmenu=Repository&smenu=Repository')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($ip) . "&type=host')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('addrepository.php?id_host=" . $ip . "&name_host=" . urlencode($host->get_hostname()) . "')\"><img src=\"../pixmaps/tables/table_row_insert.png\" border=0 title=\"Add KDB\" alt=\"Add KDB\" align=\"absmiddle\"></a>";
    $rep .= "&nbsp;<a href=\"../repository/index.php?hmenu=Repository&smenu=Repository\" target=\"main\"><img src=\"../pixmaps/tables/table_edit.png\" title=\"Edit KDB\" alt=\"Edit KDB\" border=0 align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . utf8_encode($rep) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $scantype . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
$db->close($conn);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:gethost.php

示例2: utf8_encode

 if ($desc == "") {
     $desc = "&nbsp;";
 }
 $xml .= "<cell><![CDATA[" . utf8_encode($desc) . "]]></cell>";
 $xml .= "<cell><![CDATA[" . $net->get_asset() . "]]></cell>";
 $sensors = "";
 if ($sensor_list = $net->get_sensors($conn)) {
     foreach ($sensor_list as $sensor) {
         $sensors .= ($sensors == "" ? '' : ', ') . $sensor->get_sensor_name();
     }
 }
 $xml .= "<cell><![CDATA[" . utf8_encode($sensors) . "]]></cell>";
 $xml .= "<cell><![CDATA[" . $net->get_threshold_c() . "]]></cell>";
 $xml .= "<cell><![CDATA[" . $net->get_threshold_a() . "]]></cell>";
 $rep = "";
 if ($linkedocs = Repository::have_linked_documents($conn, $name, 'net')) {
     $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($name) . "&type=net')\" class=\"blue\">[" . $linkedocs . "]</a>&nbsp;";
 }
 $rep .= "<a href=\"../repository/index.php?hmenu=Repository&smenu=Repository\" target='main'><img src=\"../pixmaps/tables/table_edit.png\" title=\"Edit KDB\" alt=\"Edit KDB\" border=0 align=\"absmiddle\"></a>";
 $xml .= "<cell><![CDATA[" . $rep . "]]></cell>";
 /* Nessus
    if ($scan_list = Net_scan::get_list($conn, "WHERE net_name = '$name' AND plugin_id = 3001")) {
        $scan_types = "<img src='../pixmaps/tables/tick.png'>";
    } else {
        $scan_types = "<img src='../pixmaps/tables/cross.png'>";
    }
    $xml.= "<cell><![CDATA[" . $scan_types . "]]></cell>"; */
 // Nagios
 if ($scan_list = Net_scan::get_list($conn, "WHERE net_name = '{$name}' AND plugin_id = 2007")) {
     $scan_types = "<img src='../pixmaps/tables/tick.png'>";
 } else {
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:getnet.php

示例3: utf8_encode

    $xml .= "<cell><![CDATA[" . $net_group->get_threshold_a() . "]]></cell>";
    /* Nessus
       if ($scan_list = Net_group_scan::get_list($conn, "WHERE net_group_name = '$name' AND plugin_id = 3001")) {
           $scan_types = "<img src='../pixmaps/tables/tick.png'>";
       } else {
           $scan_types = "<img src='../pixmaps/tables/cross.png'>";
       }
       $xml.= "<cell><![CDATA[" . $scan_types . "]]></cell>"; */
    $desc = $net_group->get_descr();
    if ($desc == "") {
        $desc = "&nbsp;";
    }
    $xml .= "<cell><![CDATA[" . utf8_encode($desc) . "]]></cell>";
    // KDB
    $rep = '';
    if ($linkedocs = Repository::have_linked_documents($conn, $id, 'net_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . $id . "&type=net_group&nosize=1')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/asset_repository.php?id=" . $id . "&name=" . urlencode($name) . "&linktype=net_group')\"><img src=\"../pixmaps/tables/table_row_insert.png\" border=0 title=\"Add KDB\" alt=\"Add KDB\" align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . utf8_encode($rep) . "]]></cell>";
    // Notes
    $rep = '';
    if ($notes = Notes::howmanynotes($conn, $id, 'net_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_notes('../asset_details/ajax/view_notes.php?type=net_group&id=" . $id . "')\" class=\"blue\" target=\"main\">[" . $notes . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_notes('../asset_details/ajax/view_notes.php?type=net_group&id=" . $id . "')\"><img src=\"../pixmaps/notes.png\" border=0 title=\"View Notes\" alt=\"View Notes\" width='16px' align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . utf8_encode($rep) . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:getnetgroup.php

示例4: urlencode

        // Osvdb starting
        $nessus_id = $vulnerability_data->get_nessus_id();
        $osvdb_id = Osvdb::get_osvdbid_by_nessusid($conn, $nessus_id);
        if ($osvdb_id) {
            $nessus_id = "<a href=\"osvdb.php?id=" . $osvdb_id . "\">" . $nessus_id . "</a>";
        }
        // Osvdb end
        // Add name and kdb link
        require_once "classes/Host.inc";
        require_once "classes/Repository.inc";
        $txt_temp = '';
        $hostname_temp = Host::ip2hostname($conn, $vulnerability_data->get_ip());
        if ($hostname_temp != $vulnerability_data->get_ip()) {
            $txt_temp .= $hostname_temp . ' - ';
        }
        if ($linkedocs = Repository::have_linked_documents($conn, $vulnerability_data->get_ip(), 'host')) {
            $txt_temp .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($vulnerability_data->get_ip()) . "&type=host')\" class='blue' target='main'>[" . $linkedocs . "] " . _('Knowledge DB') . "</a>";
        }
        if ($txt_temp != '') {
            $txt_temp = ' (' . $txt_temp . ')';
        }
        echo "<strong>IP:</strong> " . $vulnerability_data->get_ip() . $txt_temp . "<br>";
        echo "<strong>Port:</strong> " . $vulnerability_data->get_port() . "<br/>";
        echo "<strong>Scanner ID:</strong> " . $nessus_id . "<br/>";
        echo "<strong>Risk:</strong> " . $vulnerability_data->get_risk() . "<br/>";
        echo "<strong>Description:</strong> " . Osvdb::sanity($vulnerability_data->get_description()) . "<br/>";
    }
} elseif ($ref == 'Custom') {
    $custom_list = $incident->get_custom($conn);
    echo "<table class='noborder' width='100%' id='custom_table'>";
    foreach ($custom_list as $custom) {
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:incident.php

示例5: utf8_encode

            $sensors .= ($sensors == "" ? '' : ', ') . $sensor->get_sensor_name();
        }
    }
    $xml .= "<cell><![CDATA[" . utf8_encode($sensors) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host_group->get_threshold_c() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host_group->get_threshold_a() . "]]></cell>";
    /* Nessus
       if ($scan_list = Host_group_scan::get_list($conn, "WHERE host_group_name = '$name' AND plugin_id = 3001")) {
           $scan_types = "<img src='../pixmaps/tables/tick.png'>";
       } else {
           $scan_types = "<img src='../pixmaps/tables/cross.png'>";
       }
       $xml.= "<cell><![CDATA[" . $scan_types . "]]></cell>"; */
    // Nagios
    $rep = "";
    if ($linkedocs = Repository::have_linked_documents($conn, $host_group->get_name(), 'host_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($name) . "&type=host_group')\" class=\"blue\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"../repository/index.php?hmenu=Repository&smenu=Repository\" target='main'><img src=\"../pixmaps/tables/table_edit.png\" title=\"Edit KDB\" alt=\"Edit KDB\" border=0 align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . $rep . "]]></cell>";
    if ($scan_list = Host_group_scan::get_list($conn, "WHERE host_group_name = '{$name}' AND plugin_id = 2007")) {
        $scan_types = "<img src='../pixmaps/tables/tick.png'>";
    } else {
        $scan_types = "<img src='../pixmaps/tables/cross.png'>";
    }
    $xml .= "<cell><![CDATA[" . $scan_types . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
$db->close($conn);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:gethostgroup.php


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