本文整理汇总了PHP中Asset_host::can_delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset_host::can_delete方法的具体用法?PHP Asset_host::can_delete怎么用?PHP Asset_host::can_delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset_host
的用法示例。
在下文中一共展示了Asset_host::can_delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GET
$id = GET('asset_id');
$section = GET('section');
ossim_valid($id, OSS_HEX, 'illegal:' . _('Asset ID'));
ossim_valid($section, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _('Asset Section'));
if (ossim_error()) {
die(ossim_error());
}
// Database Object
$db = new ossim_db();
$conn = $db->connect();
if (Asset_host::is_in_db($conn, $id)) {
$asset_type = 'asset';
Session::logcheck('environment-menu', 'PolicyHosts');
$breadcrumb = array('section' => _('Assets'), 'current' => _('Asset Details'));
$edit = Asset_host::can_i_modify_ips($conn, $id);
$delete = Asset_host::can_delete($conn, $id);
$local_assets = Asset_host::get_asset_by_system($conn, Util::get_system_uuid());
$p_plugin = Session::am_i_admin() && !$local_assets[$id];
$deploy_agent = Session::logcheck_bool('environment-menu', 'EventsHidsConfig');
} else {
if (Asset_net::is_in_db($conn, $id)) {
$asset_type = 'network';
Session::logcheck('environment-menu', 'PolicyNetworks');
$breadcrumb = array('section' => _('Networks'), 'current' => _('Network Details'));
$edit = Asset_net::can_i_modify_ips($conn, $id);
$delete = Asset_net::can_delete($conn, $id);
$p_plugin = Session::am_i_admin();
$deploy_agent = FALSE;
} else {
if (Asset_group::is_in_db($conn, $id)) {
$asset_type = 'group';