本文整理汇总了PHP中Asset_host::bulk_save_in_db方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset_host::bulk_save_in_db方法的具体用法?PHP Asset_host::bulk_save_in_db怎么用?PHP Asset_host::bulk_save_in_db使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset_host
的用法示例。
在下文中一共展示了Asset_host::bulk_save_in_db方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<meta http-equiv="Pragma" content="no-cache">
<?php
//CSS Files
$_files = array(array('src' => 'av_common.css?t=' . Util::get_css_id(), 'def_path' => TRUE));
Util::print_include_files($_files, 'css');
?>
</head>
<body>
<?php
if ($data['status'] != 'error') {
try {
$db = new ossim_db();
$conn = $db->connect();
$asset_data = array('external' => $external, 'descr' => $descr, 'asset_value' => $asset_value, 'latitude' => $latitude, 'longitude' => $longitude, 'zoom' => $zoom, 'os' => $os, 'model' => $model, 'sensors' => $sensors, 'devices' => $devices, 'icon' => $icon);
Asset_host::bulk_save_in_db($conn, $asset_data);
$data['status'] = 'OK';
$data['data'] = _('Your changes have been saved');
$db->close();
} catch (Exception $e) {
$data['status'] = 'error';
$data['data'] = array('php_exception' => $e->getMessage());
}
}
if ($data['status'] == 'error') {
$txt_error = '<div>' . _('The following errors occurred') . ":</div>\n <div style='padding: 10px;'>" . implode('<br/>', $data['data']) . '</div>';
$config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
$nt = new Notification('nt_1', $config_nt);
$nt->show();
} else {
?>