function modify_location_services($conn, $data) { $id = $data['id']; $service = $data['service']; $value = $data['value']; ossim_valid($id, OSS_HEX, 'illegal:' . _("Network ID")); ossim_valid($service, OSS_ALPHA, 'illegal:' . _("Service ")); ossim_valid($value, OSS_DIGIT, 'illegal:' . _("Value")); if (ossim_error()) { $info_error = "Error: " . ossim_get_error(); ossim_clean_error(); $return['error'] = true; $return['msg'] = $info_error; return $return; } $checks = Locations::get_location_checks($conn, $id); $checks[$service] = $value; Locations::save_location_checks($conn, $id, $checks); Util::memcacheFlush(false); $return['error'] = false; $return['data'] = _('Service Modified Successfully'); return $return; }