0 && notices_soft_delete($pdo, $tenantId, $id)) { app_audit_log($pdo, $tenantId, $actorUserId, 'notice.deleted', 'notice', $id); $meldung = 'Hinweis wurde gelöscht.'; } else { $fehler = 'Der Hinweis konnte nicht gelöscht werden.'; } } else { $nachricht = trim((string)($_POST['nachricht'] ?? '')); $gueltig_bis = trim((string)($_POST['gueltig_bis'] ?? '')); // z.B. "2025-09-03T14:00" $dt = DateTime::createFromFormat('Y-m-d\TH:i', $gueltig_bis); $dtErrors = DateTime::getLastErrors(); if ($nachricht === '') { $fehler = 'Bitte eine Nachricht eintragen.'; } elseif ($dt === false || ($dtErrors !== false && ((int)$dtErrors['warning_count'] > 0 || (int)$dtErrors['error_count'] > 0))) { $fehler = 'Bitte ein gültiges Datum mit Uhrzeit angeben.'; } else { $gueltig_bis_sql = $dt->format('Y-m-d H:i:s'); // z.B. "2025-09-03 14:00:00" notices_create($pdo, $tenantId, (string)$nachricht, $gueltig_bis_sql, $actorUserId); app_audit_log($pdo, $tenantId, $actorUserId, 'notice.created', 'notice', null, ['valid_until' => $gueltig_bis_sql]); $meldung = 'Hinweis wurde gespeichert.'; } } $_SESSION['flash_hinweise'] = [ 'meldung' => $meldung, 'fehler' => $fehler, ]; header('Location: hinweise.php'); exit; } $hinweise = notices_fetch_all($pdo, $tenantId); ?>

Kaffeeliste - Hinweise

Neuen Hinweis hinzufügen

">

Alle Hinweise

Aktuell sind keine Hinweise angelegt.


Gültig bis: format('d.m.Y H:i')); ?>
" onsubmit="return confirm('Diesen Hinweis wirklich löschen?')">
Sie haben keinen Zugang zu dieser Webseite"; } ?>