本文整理汇总了PHP中Av_sensor::is_channel_allowed方法的典型用法代码示例。如果您正苦于以下问题:PHP Av_sensor::is_channel_allowed方法的具体用法?PHP Av_sensor::is_channel_allowed怎么用?PHP Av_sensor::is_channel_allowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Av_sensor
的用法示例。
在下文中一共展示了Av_sensor::is_channel_allowed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
$type = 'ICMP';
break;
case 4:
$type = 'other';
break;
default:
die(_('Wrong type'));
}
$limit = $limit < 1 || $limit > 7 ? 1 : $limit;
$end = time();
$begind = $end - $limit * 86400;
//86400 belongs to 24 hours in seconds --> 24*60*60
$nfsen_sensors = get_nfsen_sensors();
$sensor_list = '';
foreach ($nfsen_sensors as $flow_id => $sdata) {
if (!Av_sensor::is_channel_allowed($conn, $flow_id)) {
continue;
}
$sname = Av_sensor::get_nfsen_channel_name($conn, $flow_id);
$sensor_list .= "{$flow_id};{$sname}:";
}
$sensor_list = preg_replace('/:$/i', '', $sensor_list);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
//If the refresh is enabled, we set it up in the meta.
if (isset($winfo['refresh']) && $winfo['refresh'] != 0) {
echo '<meta http-equiv="refresh" content="' . $winfo['refresh'] . '">';
示例2: allowed_nfsen_section
function allowed_nfsen_section()
{
if (Session::am_i_admin()) {
return true;
}
require_once 'ossim_db.inc';
$db = new ossim_db();
$conn = $db->connect();
$flag = true;
// Decode channel information
foreach ($_SESSION['profileinfo']['all_channels'] as $channel) {
if (!Av_sensor::is_channel_allowed($conn, $channel)) {
$flag = false;
break;
}
}
$db->close();
return $flag;
}