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


PHP Inventory::get_list方法代码示例

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


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

示例1: session_write_close

session_write_close();
if (!array_key_exists($s_type, $scan_types)) {
    $e_message = _('You do not have the correct permissions to see this page. Please contact system administrator with any questions');
    Util::response_bad_request($e_message);
}
// Logcheck by s_type
if ($s_type == 'ocs') {
    Session::logcheck_ajax('configuration-menu', 'AlienVaultInventory');
} else {
    Session::logcheck_ajax('environment-menu', 'AlienVaultInventory');
}
$data = array();
try {
    $db = new ossim_db();
    $conn = $db->connect();
    $task_list = Inventory::get_list($conn, '', $scan_types[$s_type]);
    foreach ($task_list as $task) {
        $sensor_name = Av_sensor::get_name_by_id($conn, $task['task_sensor']);
        if ($sensor_name == '') {
            $sensor_name = _('Unknown');
        }
        if ($s_type == 'wmi') {
            preg_match('/wmipass:(.*)/', $task['task_params'], $matches);
            if ($matches[1] != '') {
                $task['task_params'] = preg_replace('/wmipass:(.*)/', '', $task['task_params']);
                $task['task_params'] = $task['task_params'] . 'wmipass:' . preg_replace('/./', '*', $matches[1]);
            }
        } elseif ($s_type == 'nmap') {
            $task['task_params'] = str_replace(' ', ', ', preg_replace("/#.*/", "", $task['task_params']));
        }
        $s_data = array("DT_RowId" => $task['task_id'], "DT_RowData" => array('s_type' => $s_type, 'sensor_id' => $task['task_sensor'], 'params' => $task['task_params'], 'frecuency' => $task['task_period'], 'enabled' => $task['task_enable']), $task['task_name'], $sensor_name, $task['task_params'], $frequencies[$task['task_period']], $task['task_enable'], '');
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:dt_schedule_scan.php

示例2: _



                <!-- Inventory Tasks -->
                <tr>
                    <td class="sec_title"><?php 
    echo _("Inventory Task");
    ?>
</td>
                </tr>

                <tr>
                    <td class="noborder" valign="top">
                        <table align="center" width="100%">
                            <?php 
    $task_count = 0;
    $task_list = Inventory::get_list($conn, $sensor_id);
    if (is_array($task_list) && !empty($task_list)) {
        foreach ($task_list as $task) {
            ?>
                                    <form method="GET" action="interfaces.php">
                                        <input type="hidden" name="sensor_id" value="<?php 
            echo $sensor_id;
            ?>
"/>
                                        <input type="hidden" name="task_id" value="<?php 
            echo $task['task_id'];
            ?>
"/>

                                        <tr>
                                            <th><?php 
开发者ID:jackpf,项目名称:ossim-arc,代码行数:29,代码来源:interfaces.php

示例3: ossim_valid

ossim_valid($rp, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _('Rp'));
ossim_valid($s_type, OSS_ALPHA, 'illegal:' . _('s_type'));
if (ossim_error()) {
    echo "<rows>\n<page>1</page>\n<total>0</total>\n</rows>\n";
    exit;
}
if (!empty($order)) {
    $order .= POST('sortorder') == 'asc' ? '' : ' desc';
} else {
    $order = 'name';
}
$db = new ossim_db();
$conn = $db->connect();
$start = ($page - 1) * $rp;
$limit = "LIMIT {$start}, {$rp}";
$task_list = Inventory::get_list($conn, '', $s_type_ids[$s_type]);
$total = count($task_list);
$xml .= "<rows>\n";
$xml .= "<page>{$page}</page>\n";
$xml .= "<total>{$total}</total>\n";
foreach ($task_list as $task) {
    //Parameters
    $sensor_name = Av_sensor::get_name_by_id($conn, $task['task_sensor']);
    if ($sensor_name == '') {
        $sensor_name = _('Unknown');
    }
    $link_modify = "<a style='font-weight:bold;' href=\"./task_edit.php?id=" . $task['task_id'] . "&s_type={$s_type}\">" . utf8_encode($task['task_name']) . "</a>";
    if ($s_type == 'wmi') {
        preg_match('/wmipass:(.*)/', $task['task_params'], $found);
        if ($found[1] != '') {
            $task['task_params'] = preg_replace('/wmipass:(.*)/', '', $task['task_params']);
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:get_tasks.php


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