本文整理汇总了PHP中Av_sensor::get_ctx_by_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Av_sensor::get_ctx_by_id方法的具体用法?PHP Av_sensor::get_ctx_by_id怎么用?PHP Av_sensor::get_ctx_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Av_sensor
的用法示例。
在下文中一共展示了Av_sensor::get_ctx_by_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ossim_db
$nt->show();
Util::make_form("POST", "newsensorform.php?id={$sensor_id}&ip={$ip}&sname={$sname}");
exit;
}
$db = new ossim_db();
$conn = $db->connect();
$newcontext = POST('newcontext') != '' ? POST('newcontext') : $sname;
if (POST('isolated') == 1 && $newcontext != '') {
// Isolated sensor. Creating a new context first
$new_context_uuid = Session::clone_default_ctx($conn, $newcontext);
$entities = array($new_context_uuid);
// Refresh current permissions
$_SESSION['_user_vision'] = Acl::get_user_vision($conn);
} elseif (POST('isolated') == 0 && preg_match("/[a-f\\d]{32}/i", POST('neighborsensor'))) {
// Use selected sensor context
$entities = array_keys(Av_sensor::get_ctx_by_id($conn, POST('neighborsensor')));
}
try {
$old = new Av_Sensor($sensor_id);
$old->load_from_db($conn);
$cproperties = $old->get_properties();
$new = new Av_Sensor($sensor_id);
$new->set_properties($cproperties);
$new->set_name($sname);
$new->set_ip($ip);
$new->set_priority($priority);
$new->set_port($port);
$new->set_tzone($tzone);
$new->set_descr($descr);
$new->set_rpass($rpass);
foreach ($entities as $ctx) {