示例#1
0
        <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 {
    ?>