} $content['entry_out'] = implode('~', $dbuf); } if ($cut_time || $content['cut_close']) { $dbuf = explode('~', $content['cut_close']); sort($dbuf, SORT_REGULAR); if (trim($cut_time)) { $dbuf[0] = strtr('s=' . $cut_time . '&e=' . $close_time, ':', '.'); } else { array_splice($dbuf, 0, 1); } $content['cut_close'] = implode('~', $dbuf); } $sql = "UPDATE {$dbtable} \n\t\t\t\t\t\t\t\t\tSET encoding='" . $content['encoding'] . "'"; if (!empty($diagnosis)) { $sql .= ",diagnosis=" . $enc_obj->ConcatFieldString('diagnosis', htmlspecialchars($diagnosis) . "\n"); $updateitem .= ' diagnosis;'; } $sql .= ",anesthesia='{$anesthesia}',\n\t\t\t\t\t\t\t\t\tentry_out='" . $content['entry_out'] . "',\n\t\t\t\t\t\t\t\t\tcut_close='" . $content['cut_close'] . "'"; if (!empty($op_therapy)) { $sql .= ",op_therapy=" . $enc_obj->ConcatFieldString('op_therapy', htmlspecialchars($op_therapy) . "\n"); $updateitem .= ' op_therapy;'; } if (!empty($result_info)) { $sql .= ",result_info=" . $enc_obj->ConcatFieldString('result_info', htmlspecialchars($result_info) . "\n"); $updateitem .= ' result_info;'; } # Append update item names to history $sql .= ",history = " . $enc_obj->ConcatHistory("Updated " . $updateitem . " " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n"); $sql .= "\tWHERE nr=" . $item['nr']; if ($ergebnis = $enc_obj->Transact($sql)) {