本文整理匯總了PHP中Software::get_versions_by_cpe方法的典型用法代碼示例。如果您正苦於以下問題:PHP Software::get_versions_by_cpe方法的具體用法?PHP Software::get_versions_by_cpe怎麽用?PHP Software::get_versions_by_cpe使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Software
的用法示例。
在下文中一共展示了Software::get_versions_by_cpe方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_version_list
function get_version_list($conn, $data)
{
$response = array();
$model = $data['model'];
ossim_valid($model, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC_EXT, 'illegal:' . _("Model"));
check_ossim_error();
if (empty($model)) {
$items = array();
} else {
$model = escape_sql($model, $conn);
$items = Software::get_versions_by_cpe($conn, $model, TRUE);
}
$response['error'] = FALSE;
$response['data']['items'] = $items;
return $response;
}
示例2: is_array
$active_plugins = Plugin::get_plugins_by_device(Util::uuid_format($selected_sensor));
$asset_plugins = is_array($active_plugins[$asset_id]) ? $active_plugins[$asset_id] : array();
foreach ($asset_plugins as $pdata) {
$model_list = array();
$version_list = array();
list($vendor, $model, $version) = Plugin::translate_cpe_to_software($pdata['cpe']);
if ($vendor != '') {
try {
$model_list = Software::get_models_by_cpe($conn, $vendor, TRUE);
} catch (Exception $e) {
Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
}
}
if ($model != '') {
try {
$version_list = Software::get_versions_by_cpe($conn, $model, TRUE);
} catch (Exception $e) {
Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
}
}
$plugin_list[] = array('vendor' => $vendor, 'model' => $model, 'version' => $version, 'model_list' => $model_list, 'version_list' => $version_list);
}
} catch (Exception $e) {
Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
}
if (empty($plugin_list)) {
$plugin_list[] = array('vendor' => '', 'model' => '', 'version' => '', 'model_list' => array(), 'version_list' => array());
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">