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


PHP Software::get_versions_by_model方法代码示例

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


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

示例1: array

        if (count($active_plugins[$asset_id_canonical]) < 1) {
            $plugin_list[$asset_id][] = array('vendor' => '', 'model' => '', 'version' => '', 'model_list' => array(), 'version_list' => array());
        } else {
            foreach ($active_plugins[$asset_id_canonical] as $pdata) {
                $models = array();
                $versions = array();
                if ($pdata['vendor'] != '') {
                    try {
                        $models = Software::get_models_by_vendor($pdata['vendor']);
                    } catch (Exception $e) {
                        Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
                    }
                }
                if ($pdata['model'] != '') {
                    try {
                        $versions = Software::get_versions_by_model($pdata['vendor'] . ':' . $pdata['model']);
                    } catch (Exception $e) {
                        Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
                    }
                }
                $plugin_list[$asset_id][] = array('vendor' => $pdata['vendor'], 'model' => $pdata['vendor'] . ':' . $pdata['model'], 'version' => $pdata['vendor'] . ':' . $pdata['model'] . ':' . $pdata['version'], 'model_list' => $models, 'version_list' => $versions);
            }
        }
        $device_list[$asset_id] = array("name" => $host['name'], "ips" => Asset::format_to_print($host['ips']), "plugins" => $plugin_list[$asset_id]);
    }
} else {
    $empty_msg = _('There are no network devices found. Return to the asset discovery step by clicking back to either discover or add network devices.');
}
/*  Subtitle Texts */
$subtitle_1 = '';
$subtitle_2 = '';
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:step_4.php

示例2: get_version_list

function get_version_list($data)
{
    $response = array();
    $model = $data['model'];
    $sensor = $data['sensor'];
    ossim_valid($model, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC_EXT, 'illegal:' . _("Model"));
    ossim_valid($sensor, OSS_ALPHA, OSS_HEX, 'illegal:' . _("Sensor"));
    check_ossim_error();
    if (empty($model)) {
        $items = array();
    } else {
        $items = Software::get_versions_by_model($model, $sensor);
    }
    $response['error'] = FALSE;
    $response['data']['items'] = $items;
    return $response;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:17,代码来源:plugin_ajax.php

示例3: foreach

     /**
      * EDIT MODE: No order, no search filter, and looping $plugin_data array is a based asset_id Hash
      */
     $total_filtered = $total;
     foreach ($plugin_data as $asset_id => $asset_plugins) {
         // Apply pagination
         if ($i >= $from && $i < $from + $maxrows) {
             $_row_data = array();
             foreach ($asset_plugins as $_pdata) {
                 $model_list = array();
                 $version_list = array();
                 if ($_pdata['vendor'] != '') {
                     $model_list = Software::get_models_by_vendor($_pdata['vendor'], $sensor_id);
                 }
                 if ($_pdata['model'] != '') {
                     $version_list = Software::get_versions_by_model($_pdata['vendor'] . ':' . $_pdata['model'], $sensor_id);
                 }
                 $_row_data[$asset_id][] = array('asset_id' => $asset_id, 'vendor' => $_pdata['vendor'], 'model' => $_pdata['vendor'] . ':' . $_pdata['model'], 'version' => $_pdata['vendor'] . ':' . $_pdata['model'] . ':' . $_pdata['version'], 'model_list' => json_encode($model_list), 'version_list' => json_encode($version_list));
             }
             $aux_data = array();
             $aux_data[] = $_pdata['asset'];
             $aux_data[] = '';
             // Empty. Here will be located the vendor/model/version select boxes
             $aux_data['DT_RowData'] = $_row_data;
             //Row ID
             $aux_data['DT_RowId'] = $asset_id;
             $data[] = $aux_data;
         }
         $i++;
     }
 } else {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:dt_plugins.php


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