$net->set_ctx($ctx); $net->set_name($name); if ($can_i_modify_ips == TRUE) { $net->set_ips($ips_string); } $net->set_descr($descr); if ($icon != '') { $net->set_icon($icon); } else { if ($is_in_db == TRUE && empty($h_icon)) { $net->set_icon(NULL); } } $net->set_external($external); $net->set_asset_value($asset_value); $net->set_owner($owner); $net->set_sensors($sensors); $net->save_in_db($conn); $data['status'] = 'OK'; $data['data'] = _('Your changes have been saved'); $db->close(); } else { $data['status'] = 'error'; $data['data'] = array('no_create_asset' => _("You do not have the correct permissions to create networks. Please contact system administrator with any questions")); } } catch (Exception $e) { $db->close(); $data['status'] = 'error'; $data['data'] = array('php_exception' => $e->getMessage()); } }