本文整理汇总了PHP中Av_sensor::get_interfaces方法的典型用法代码示例。如果您正苦于以下问题:PHP Av_sensor::get_interfaces方法的具体用法?PHP Av_sensor::get_interfaces怎么用?PHP Av_sensor::get_interfaces使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Av_sensor
的用法示例。
在下文中一共展示了Av_sensor::get_interfaces方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_label
<table class='t_sc'>
<tr>
<th class='_label'><?php
display_label($cnf_data['sensor_interfaces']);
?>
</th>
<td class='_data'>
<div id='c_ifaces'>
<?php
$id = $cnf_data['sensor_interfaces']['id'];
$s_ifaces = $cnf_data['sensor_interfaces']['value'];
$s_ifaces = array_flip($s_ifaces);
//Interfaces
$interfaces = array();
try {
$interfaces = Av_sensor::get_interfaces($system_id);
} catch (Exception $e) {
}
?>
<select class='vfield multiselect' id='<?php
echo $id;
?>
' name='<?php
echo $id . "[]";
?>
' multiple='multiple'>
<?php
foreach ($interfaces as $iface) {
$i_name = $iface['name'];
$id_iface = md5($i_name);
示例2: GET
$interface = GET('interface');
$proto = GET('proto');
ossim_valid($interface, OSS_ALPHA, OSS_PUNC, OSS_NULLABLE, 'illegal:' . _('Interface'));
ossim_valid($proto, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _('Protocol'));
if (ossim_error()) {
die(ossim_error());
}
$db = new ossim_db();
$conn = $db->connect();
$filters = array('where' => 'sensor_properties.has_ntop = 1', 'order_by' => 'priority DESC');
$ntop_list = array();
list($aux_ntop_list, $_total) = Av_sensor::get_list($conn, $filters);
if ($_total > 0) {
foreach ($aux_ntop_list as $s_id => $s) {
try {
$i_faces = Av_sensor::get_interfaces($s['ip']);
if (is_array($i_faces) && !empty($i_faces)) {
$ntop_list[$s_id] = $s;
$ntop_list[$s_id]['i_faces'] = $i_faces;
}
} catch (Exception $e) {
}
}
//Sensor by default
if ($sensor == '') {
$s_id = key($ntop_list);
$sensor = $ntop_list[$s_id]['ip'];
}
}
if (!$_total) {
echo ossim_error(_('There are not sensors with NTOP enabled'), AV_WARNING);