本文整理汇总了PHP中Inventory::get_object方法的典型用法代码示例。如果您正苦于以下问题:PHP Inventory::get_object方法的具体用法?PHP Inventory::get_object怎么用?PHP Inventory::get_object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Inventory
的用法示例。
在下文中一共展示了Inventory::get_object方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
Session::logcheck('configuration-menu', 'AlienVaultInventory');
} else {
Session::logcheck('environment-menu', 'AlienVaultInventory');
}
//Getting data
$task_id = intval(REQUEST('task_id'));
ossim_valid($id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _('Task ID'));
if (ossim_error()) {
ossim_error();
exit;
}
$db = new ossim_db();
$conn = $db->connect();
if (!empty($task_id)) {
try {
$task_obj = Inventory::get_object($conn, $task_id);
$name = $task_obj['task_name'];
$sensor_id = $task_obj['task_sensor'];
$params = $task_obj['task_params'];
$period = $task_obj['task_period'];
} catch (Exception $e) {
echo ossim_error($e->getMessage());
exit;
}
}
//Sensors
$sensors = Av_sensor::get_basic_list($conn);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
示例2: intval
exit;
}
}
}
}
//Get Data
$id = intval(GET('id'));
$s_type = GET('s_type');
ossim_valid($id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _('Task ID'));
ossim_valid($s_type, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _('Scheduler type'));
if (ossim_error()) {
ossim_error();
exit;
}
if ($id != '') {
if ($task_obj = Inventory::get_object($conn, $id)) {
$name = $task_obj['task_name'];
$sensor_id = $task_obj['task_sensor'];
$params = $task_obj['task_params'];
$period = $task_obj['task_period'];
$enable = $task_obj['task_enable'];
}
}
//Sensors
$sensors = Av_sensor::get_basic_list($conn);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php