Uhrzeiten, Miete und Lieferkosten ergänzen; Server-Stand übernehmen
- bookings um optionale start_time/end_time sowie rent_cents und delivery_cents erweitert; Gesamtbetrag ist Miete + Lieferkosten (Migration 003, Schema und Doku nachgezogen) - Formular, Detailansicht, Panel, Kalender und Kopiertext zeigen Uhrzeiten und die getrennten Beträge - Live-Stand nachgezogen: Impressum/Datenschutz, Privacy-Cleanup im Cron-Lauf, Löschsperre für Buchungen mit Rechnung - Cache-Buster auf Version 10 erhöht
This commit is contained in:
parent
672df3d0a7
commit
d47a72820d
24 changed files with 1157 additions and 92 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,3 +4,4 @@ storage/*
|
|||
!storage/.htaccess
|
||||
*.log
|
||||
.DS_Store
|
||||
.~lock.*
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ Die Anforderungen stammen aus
|
|||
- **Kalender** mit Tages-, Wochen- und Monatsansicht. Alle Anhänger haben
|
||||
eine eigene Zeile und sind immer gleichzeitig sichtbar. Jeder Termin ist ein
|
||||
durchgehender, farbiger Balken in der Farbe des Anhängers.
|
||||
- **Buchungen** mit Anfangs- und Endtermin (ganztägig), Anzahlung,
|
||||
Gesamtbetrag, automatisch berechnetem Restbetrag, Rechnung JA/NEIN,
|
||||
Abholung/Lieferung und vollständigen Kundendaten.
|
||||
- **Buchungen** mit Anfangs- und Endtermin (Datum, Uhrzeit optional), Miete,
|
||||
Lieferkosten, automatisch berechnetem Gesamtbetrag und Restbetrag, Anzahlung,
|
||||
Rechnung JA/NEIN, Abholung/Lieferung und vollständigen Kundendaten.
|
||||
- **Buchungstext kopieren** mit einem Klick – exakt in der geforderten
|
||||
Reihenfolge und mit erhaltenen Zeilenumbrüchen.
|
||||
- **Doppelbelegungsschutz**: Ein Anhänger kann im gleichen Zeitraum nicht
|
||||
|
|
|
|||
|
|
@ -26,12 +26,14 @@ ini_set('display_errors', '0');
|
|||
ini_set('log_errors', '1');
|
||||
|
||||
require DIC_APP . '/util.php';
|
||||
require DIC_APP . '/legal.php';
|
||||
require DIC_APP . '/db.php';
|
||||
require DIC_APP . '/webpush.php';
|
||||
require DIC_APP . '/auth.php';
|
||||
require DIC_APP . '/data.php';
|
||||
require DIC_APP . '/push.php';
|
||||
require DIC_APP . '/mail.php';
|
||||
require DIC_APP . '/privacy.php';
|
||||
require DIC_APP . '/pages.php';
|
||||
require DIC_APP . '/admin.php';
|
||||
|
||||
|
|
@ -50,10 +52,18 @@ set_exception_handler(static function (Throwable $error): void {
|
|||
header('Content-Type: text/html; charset=utf-8');
|
||||
echo '<!doctype html><meta charset="utf-8"><title>Fehler 500</title>'
|
||||
. '<body style="font-family:system-ui;background:#f4f9fe;color:#0e1b26;padding:2rem">'
|
||||
. '<h1>Interner Fehler</h1><p>Bitte später erneut versuchen.</p></body>';
|
||||
. '<h1>Interner Fehler</h1><p>Bitte später erneut versuchen.</p>'
|
||||
. '<p style="font-size:.85rem"><a style="color:#196abc" href="' . e(url('/impressum')) . '">Impressum</a>'
|
||||
. ' · <a style="color:#196abc" href="' . e(url('/datenschutz')) . '">Datenschutz</a></p></body>';
|
||||
});
|
||||
|
||||
if (PHP_SAPI !== 'cli') {
|
||||
security_headers();
|
||||
start_session();
|
||||
// Öffentliche Rechtsseiten, Health-Check und Cron brauchen keine Session.
|
||||
// So wird auf Impressum/Datenschutz kein unnötiges Sitzungs-Cookie gesetzt.
|
||||
$path = current_path();
|
||||
$sessionFree = ['/health', '/cron/reminders'];
|
||||
if (!legal_is_public_path($path) && !in_array($path, $sessionFree, true)) {
|
||||
start_session();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
124
app/data.php
124
app/data.php
|
|
@ -118,13 +118,29 @@ function booking_conflicts(int $trailerId, string $start, string $end, int $excl
|
|||
function booking_input(array $source): array
|
||||
{
|
||||
$kind = (string) ($source['kind'] ?? 'pickup');
|
||||
if (array_key_exists('rent_cents', $source) || array_key_exists('delivery_cents', $source)) {
|
||||
$rent = max(0, (int) ($source['rent_cents'] ?? 0));
|
||||
$delivery = max(0, (int) ($source['delivery_cents'] ?? 0));
|
||||
} elseif (array_key_exists('rent', $source) || array_key_exists('delivery', $source)) {
|
||||
$rent = parse_money((string) ($source['rent'] ?? '0'));
|
||||
$delivery = parse_money((string) ($source['delivery'] ?? '0'));
|
||||
} else {
|
||||
// Aufrufer ohne getrennte Beträge: Gesamtbetrag gilt als Miete.
|
||||
$rent = parse_money((string) ($source['total'] ?? '0'));
|
||||
$delivery = 0;
|
||||
}
|
||||
|
||||
return [
|
||||
'trailer_id' => (int) ($source['trailer_id'] ?? 0),
|
||||
'employee_id' => (int) ($source['employee_id'] ?? 0),
|
||||
'start_date' => trim((string) ($source['start_date'] ?? '')),
|
||||
'end_date' => trim((string) ($source['end_date'] ?? '')),
|
||||
'start_time' => normalize_time($source['start_time'] ?? ''),
|
||||
'end_time' => normalize_time($source['end_time'] ?? ''),
|
||||
'deposit_cents' => parse_money((string) ($source['deposit'] ?? '0')),
|
||||
'total_cents' => parse_money((string) ($source['total'] ?? '0')),
|
||||
'rent_cents' => $rent,
|
||||
'delivery_cents' => $delivery,
|
||||
'total_cents' => $rent + $delivery,
|
||||
'invoice' => ((string) ($source['invoice'] ?? '0')) === '1' ? 1 : 0,
|
||||
'kind' => in_array($kind, ['pickup', 'delivery'], true) ? $kind : 'pickup',
|
||||
'customer_name' => trim((string) ($source['customer_name'] ?? '')),
|
||||
|
|
@ -135,6 +151,30 @@ function booking_input(array $source): array
|
|||
];
|
||||
}
|
||||
|
||||
/** Bestehende Buchung als Eingabedaten (Validierung, Verschieben, Wiederherstellen). */
|
||||
function booking_to_input(array $booking): array
|
||||
{
|
||||
return [
|
||||
'trailer_id' => (int) $booking['trailer_id'],
|
||||
'employee_id' => (int) $booking['employee_id'],
|
||||
'start_date' => (string) $booking['start_date'],
|
||||
'end_date' => (string) $booking['end_date'],
|
||||
'start_time' => normalize_time($booking['start_time'] ?? ''),
|
||||
'end_time' => normalize_time($booking['end_time'] ?? ''),
|
||||
'deposit_cents' => (int) $booking['deposit_cents'],
|
||||
'rent_cents' => (int) ($booking['rent_cents'] ?? $booking['total_cents']),
|
||||
'delivery_cents' => (int) ($booking['delivery_cents'] ?? 0),
|
||||
'total_cents' => (int) $booking['total_cents'],
|
||||
'invoice' => (int) $booking['invoice'],
|
||||
'kind' => (string) $booking['kind'],
|
||||
'customer_name' => (string) $booking['customer_name'],
|
||||
'street' => (string) $booking['street'],
|
||||
'city' => (string) $booking['city'],
|
||||
'mobile' => (string) $booking['mobile'],
|
||||
'email' => (string) $booking['email'],
|
||||
];
|
||||
}
|
||||
|
||||
function booking_validate(array $data, int $excludeId = 0, int $allowTrailerId = 0, int $allowEmployeeId = 0): array
|
||||
{
|
||||
$errors = [];
|
||||
|
|
@ -163,6 +203,20 @@ function booking_validate(array $data, int $excludeId = 0, int $allowTrailerId =
|
|||
}
|
||||
}
|
||||
|
||||
foreach (['start_time' => 'Mietbeginn', 'end_time' => 'Mietende'] as $field => $label) {
|
||||
if (!valid_time((string) $data[$field])) {
|
||||
$errors[$field] = 'Bitte für ' . $label . ' eine gültige Uhrzeit angeben (HH:MM).';
|
||||
}
|
||||
}
|
||||
if (!isset($errors['start_time']) && !isset($errors['end_time'])
|
||||
&& !isset($errors['start_date']) && !isset($errors['end_date'])
|
||||
&& $data['start_date'] === $data['end_date']
|
||||
&& $data['start_time'] !== '' && $data['end_time'] !== ''
|
||||
&& $data['end_time'] <= $data['start_time']
|
||||
) {
|
||||
$errors['end_time'] = 'Am selben Tag muss das Mietende nach dem Mietbeginn liegen.';
|
||||
}
|
||||
|
||||
if ($data['customer_name'] === '') {
|
||||
$errors['customer_name'] = 'Bitte den Kundennamen angeben.';
|
||||
} elseif (mb_strlen($data['customer_name']) > 190) {
|
||||
|
|
@ -183,10 +237,10 @@ function booking_validate(array $data, int $excludeId = 0, int $allowTrailerId =
|
|||
}
|
||||
|
||||
$maxAmount = 10000000; // 100.000,00 €
|
||||
if ($data['total_cents'] < 0 || $data['deposit_cents'] < 0) {
|
||||
$errors['total'] = 'Beträge dürfen nicht negativ sein.';
|
||||
} elseif ($data['total_cents'] > $maxAmount || $data['deposit_cents'] > $maxAmount) {
|
||||
$errors['total'] = 'Der Betrag ist unrealistisch hoch.';
|
||||
if ($data['rent_cents'] < 0 || $data['delivery_cents'] < 0 || $data['deposit_cents'] < 0) {
|
||||
$errors['rent'] = 'Beträge dürfen nicht negativ sein.';
|
||||
} elseif ($data['rent_cents'] > $maxAmount || $data['delivery_cents'] > $maxAmount || $data['deposit_cents'] > $maxAmount) {
|
||||
$errors['rent'] = 'Der Betrag ist unrealistisch hoch.';
|
||||
} elseif ($data['deposit_cents'] > $data['total_cents']) {
|
||||
$errors['deposit'] = 'Die Anzahlung darf den Gesamtbetrag nicht übersteigen.';
|
||||
}
|
||||
|
|
@ -234,13 +288,16 @@ function booking_create(array $data, int $userId): int
|
|||
}
|
||||
$stmt = $pdo->prepare(
|
||||
'INSERT INTO bookings
|
||||
(trailer_id, employee_id, start_date, end_date, deposit_cents, total_cents, invoice, kind,
|
||||
(trailer_id, employee_id, start_date, end_date, start_time, end_time, deposit_cents,
|
||||
rent_cents, delivery_cents, total_cents, invoice, kind,
|
||||
customer_name, street, city, mobile, email, status, created_at, updated_at, created_by, updated_by)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "active", ?, ?, ?, ?)'
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "active", ?, ?, ?, ?)'
|
||||
);
|
||||
$stmt->execute([
|
||||
$data['trailer_id'], $data['employee_id'], $data['start_date'], $data['end_date'],
|
||||
$data['deposit_cents'], $data['total_cents'], $data['invoice'], $data['kind'],
|
||||
null_if_empty($data['start_time']), null_if_empty($data['end_time']),
|
||||
$data['deposit_cents'], $data['rent_cents'], $data['delivery_cents'], $data['total_cents'],
|
||||
$data['invoice'], $data['kind'],
|
||||
$data['customer_name'], $data['street'], $data['city'], $data['mobile'], $data['email'],
|
||||
utc_now(), utc_now(), $userId, $userId,
|
||||
]);
|
||||
|
|
@ -270,12 +327,15 @@ function booking_update(int $id, array $data, int $userId): void
|
|||
}
|
||||
$stmt = $pdo->prepare(
|
||||
'UPDATE bookings SET trailer_id = ?, employee_id = ?, start_date = ?, end_date = ?,
|
||||
deposit_cents = ?, total_cents = ?, invoice = ?, kind = ?, customer_name = ?, street = ?,
|
||||
start_time = ?, end_time = ?, deposit_cents = ?, rent_cents = ?, delivery_cents = ?,
|
||||
total_cents = ?, invoice = ?, kind = ?, customer_name = ?, street = ?,
|
||||
city = ?, mobile = ?, email = ?, updated_at = ?, updated_by = ? WHERE id = ?'
|
||||
);
|
||||
$stmt->execute([
|
||||
$data['trailer_id'], $data['employee_id'], $data['start_date'], $data['end_date'],
|
||||
$data['deposit_cents'], $data['total_cents'], $data['invoice'], $data['kind'],
|
||||
null_if_empty($data['start_time']), null_if_empty($data['end_time']),
|
||||
$data['deposit_cents'], $data['rent_cents'], $data['delivery_cents'], $data['total_cents'],
|
||||
$data['invoice'], $data['kind'],
|
||||
$data['customer_name'], $data['street'], $data['city'], $data['mobile'], $data['email'],
|
||||
utc_now(), $userId, $id,
|
||||
]);
|
||||
|
|
@ -320,21 +380,12 @@ function booking_restore(int $id, int $userId): array
|
|||
if (!$booking) {
|
||||
throw new RuntimeException('not_found');
|
||||
}
|
||||
$errors = booking_validate([
|
||||
'trailer_id' => (int) $booking['trailer_id'],
|
||||
'employee_id' => (int) $booking['employee_id'],
|
||||
'start_date' => $booking['start_date'],
|
||||
'end_date' => $booking['end_date'],
|
||||
'deposit_cents' => (int) $booking['deposit_cents'],
|
||||
'total_cents' => (int) $booking['total_cents'],
|
||||
'invoice' => (int) $booking['invoice'],
|
||||
'kind' => $booking['kind'],
|
||||
'customer_name' => $booking['customer_name'],
|
||||
'street' => $booking['street'],
|
||||
'city' => $booking['city'],
|
||||
'mobile' => $booking['mobile'],
|
||||
'email' => $booking['email'],
|
||||
], $id, (int) $booking['trailer_id'], (int) $booking['employee_id']);
|
||||
$errors = booking_validate(
|
||||
booking_to_input($booking),
|
||||
$id,
|
||||
(int) $booking['trailer_id'],
|
||||
(int) $booking['employee_id']
|
||||
);
|
||||
if ($errors) {
|
||||
return $errors;
|
||||
}
|
||||
|
|
@ -368,21 +419,10 @@ function booking_move(int $id, string $newStart, int $newTrailerId, int $userId)
|
|||
return ['error' => 'Bitte einen gültigen Kühlanhänger wählen.'];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'trailer_id' => $newTrailerId,
|
||||
'employee_id' => (int) $booking['employee_id'],
|
||||
'start_date' => $newStart,
|
||||
'end_date' => $newEnd,
|
||||
'deposit_cents' => (int) $booking['deposit_cents'],
|
||||
'total_cents' => (int) $booking['total_cents'],
|
||||
'invoice' => (int) $booking['invoice'],
|
||||
'kind' => (string) $booking['kind'],
|
||||
'customer_name' => (string) $booking['customer_name'],
|
||||
'street' => (string) $booking['street'],
|
||||
'city' => (string) $booking['city'],
|
||||
'mobile' => (string) $booking['mobile'],
|
||||
'email' => (string) $booking['email'],
|
||||
];
|
||||
$data = booking_to_input($booking);
|
||||
$data['trailer_id'] = $newTrailerId;
|
||||
$data['start_date'] = $newStart;
|
||||
$data['end_date'] = $newEnd;
|
||||
|
||||
$pdo = db();
|
||||
$pdo->beginTransaction();
|
||||
|
|
@ -440,8 +480,8 @@ function booking_copy_text(array $booking): string
|
|||
'Gesamtbetrag: ' . fmt_money((int) $booking['total_cents']),
|
||||
'Noch zu zahlen: ' . fmt_money(due_cents((int) $booking['total_cents'], (int) $booking['deposit_cents'])),
|
||||
'Rechnung: ' . booking_invoice_label($booking['invoice']),
|
||||
'Von: ' . fmt_date_short((string) $booking['start_date']),
|
||||
'Bis: ' . fmt_date_short((string) $booking['end_date']),
|
||||
'Von: ' . fmt_date_short_with_time((string) $booking['start_date'], $booking['start_time'] ?? null),
|
||||
'Bis: ' . fmt_date_short_with_time((string) $booking['end_date'], $booking['end_time'] ?? null),
|
||||
'Art: ' . booking_kind_label((string) $booking['kind']),
|
||||
'Name: ' . $booking['customer_name'],
|
||||
'Straße: ' . $booking['street'],
|
||||
|
|
|
|||
93
app/legal.php
Normal file
93
app/legal.php
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Rechtliche Pflichtangaben für Impressum und Datenschutzerklärung.
|
||||
*
|
||||
* Die Werte lassen sich in app/config.local.php unter dem Schlüssel `legal`
|
||||
* überschreiben. Fehlende Angaben fallen auf die hier hinterlegten Werte
|
||||
* zurück. Die Standardwerte stammen von der bisherigen Website
|
||||
* (drinkitcold.wixsite.com/drinkitcold).
|
||||
*/
|
||||
function legal_data(): array
|
||||
{
|
||||
static $data = null;
|
||||
if (is_array($data)) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
$defaults = [
|
||||
'business_name' => 'Drink it cold',
|
||||
'owner' => 'Michael Schmitz',
|
||||
'street' => 'Rosellener Schulstr. 2',
|
||||
'postal_code' => '41470',
|
||||
'city' => 'Neuss',
|
||||
'country' => 'Deutschland',
|
||||
'phone' => '+49 172 6384350',
|
||||
'email' => 'drinkitcold@web.de',
|
||||
'vat_id' => 'DE408374900',
|
||||
// Wird bewusst nicht im Impressum veröffentlicht: § 5 DDG verlangt
|
||||
// die USt-IdNr., nicht die Steuernummer.
|
||||
'tax_number' => '122/5553/5322',
|
||||
'register_court' => '',
|
||||
'register_number' => '',
|
||||
'hosting_provider' => 'ALL-INKL.COM – Neue Medien Münnich',
|
||||
'hosting_address' => 'Hauptstraße 68, 02742 Friedersdorf',
|
||||
'hosting_country' => 'Deutschland',
|
||||
'dpo_name' => '',
|
||||
'dpo_email' => '',
|
||||
'supervisory_authority' => 'Landesbeauftragte für Datenschutz und Informationsfreiheit Nordrhein-Westfalen',
|
||||
'supervisory_address' => 'Kavalleriestraße 2–4, 40213 Düsseldorf',
|
||||
'supervisory_phone' => '0211 38424-0',
|
||||
'supervisory_email' => 'poststelle@ldi.nrw.de',
|
||||
'supervisory_url' => 'https://www.ldi.nrw.de',
|
||||
// Bei inhaltlichen Änderungen der Datenschutzerklärung anpassen.
|
||||
'privacy_version' => '13.11.2026',
|
||||
'log_retention_days' => 30,
|
||||
'log_max_mb' => 5,
|
||||
'invoice_retention_years' => 10,
|
||||
'limitation_years' => 3,
|
||||
];
|
||||
|
||||
$configured = config('legal', []);
|
||||
if (is_array($configured)) {
|
||||
foreach ($configured as $key => $value) {
|
||||
if (is_string($key) && (is_string($value) || is_int($value)) && $value !== '') {
|
||||
$defaults[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$defaults['phone_href'] = legal_phone_href((string) $defaults['phone']);
|
||||
$defaults['address_line'] = trim(
|
||||
(string) $defaults['street'] . ', ' . (string) $defaults['postal_code'] . ' ' . (string) $defaults['city']
|
||||
);
|
||||
$defaults['session_days'] = max(1, (int) round(((int) config('app.session_absolute_seconds', 7776000)) / 86400));
|
||||
$defaults['remember_days'] = max(1, (int) round(((int) config('app.remember_seconds', 7776000)) / 86400));
|
||||
|
||||
$data = $defaults;
|
||||
return $data;
|
||||
}
|
||||
|
||||
function legal_phone_href(string $phone): string
|
||||
{
|
||||
$digits = preg_replace('/[^0-9+]/', '', $phone) ?? '';
|
||||
return $digits !== '' ? 'tel:' . $digits : '';
|
||||
}
|
||||
|
||||
/** Öffentliche Rechtsseiten, die ohne Anmeldung und ohne Session erreichbar sind. */
|
||||
function legal_is_public_path(string $path): bool
|
||||
{
|
||||
return in_array($path, ['/impressum', '/datenschutz'], true);
|
||||
}
|
||||
|
||||
function legal_page(string $page): void
|
||||
{
|
||||
if (!in_array($page, ['impressum', 'datenschutz'], true)) {
|
||||
abort_page(404, 'Diese Seite gibt es nicht.');
|
||||
}
|
||||
render_standalone('legal', [
|
||||
'page' => $page,
|
||||
'info' => legal_data(),
|
||||
], $page === 'impressum' ? 'Impressum' : 'Datenschutz');
|
||||
}
|
||||
|
|
@ -54,6 +54,10 @@ function page_handle(string $method, string $path): void
|
|||
page_login($method);
|
||||
return;
|
||||
}
|
||||
if ($path === '/impressum' || $path === '/datenschutz') {
|
||||
legal_page(substr($path, 1));
|
||||
return;
|
||||
}
|
||||
|
||||
$user = auth_user();
|
||||
if ($user !== null && $user['must_change_password'] === 1
|
||||
|
|
@ -177,9 +181,15 @@ function cron_reminders(): void
|
|||
}
|
||||
|
||||
try {
|
||||
$cleanup = privacy_cleanup();
|
||||
$push = push_dispatch_due();
|
||||
$mail = reminder_send_due();
|
||||
echo 'Drink it cold – Erinnerungslauf ' . fmt_datetime(utc_now()) . "\n";
|
||||
echo sprintf(
|
||||
"Aufräumen: %d Login-Fehlversuche, %d Tokens, %d E-Mail-Protokolle, %d Push-Protokolle entfernt%s.\n",
|
||||
$cleanup['login_attempts'], $cleanup['auth_tokens'], $cleanup['reminder_mail_log'],
|
||||
$cleanup['reminder_push_log'], $cleanup['log_rotated'] ? ', Fehlerprotokoll rotiert' : ''
|
||||
);
|
||||
if (!push_is_configured()) {
|
||||
echo "Push: nicht konfiguriert (VAPID-Schlüssel fehlen).\n";
|
||||
} else {
|
||||
|
|
@ -463,8 +473,11 @@ function form_values_from_input(array $data): array
|
|||
'employee_id' => (int) $data['employee_id'],
|
||||
'start_date' => (string) $data['start_date'],
|
||||
'end_date' => (string) $data['end_date'],
|
||||
'start_time' => (string) ($data['start_time'] ?? ''),
|
||||
'end_time' => (string) ($data['end_time'] ?? ''),
|
||||
'deposit' => number_format($data['deposit_cents'] / 100, 2, ',', ''),
|
||||
'total' => number_format($data['total_cents'] / 100, 2, ',', ''),
|
||||
'rent' => number_format($data['rent_cents'] / 100, 2, ',', ''),
|
||||
'delivery' => number_format($data['delivery_cents'] / 100, 2, ',', ''),
|
||||
'invoice' => (int) $data['invoice'],
|
||||
'kind' => (string) $data['kind'],
|
||||
'customer_name' => (string) $data['customer_name'],
|
||||
|
|
@ -505,8 +518,11 @@ function page_booking_new(array $user, string $method): void
|
|||
'employee_id' => $employeeId,
|
||||
'start_date' => $start,
|
||||
'end_date' => $end,
|
||||
'start_time' => '',
|
||||
'end_time' => '',
|
||||
'deposit' => '',
|
||||
'total' => '',
|
||||
'rent' => '',
|
||||
'delivery' => '',
|
||||
'invoice' => 0,
|
||||
'kind' => 'pickup',
|
||||
'customer_name' => '',
|
||||
|
|
@ -549,8 +565,11 @@ function page_booking_edit(array $user, int $id, string $method): void
|
|||
'employee_id' => (int) $booking['employee_id'],
|
||||
'start_date' => (string) $booking['start_date'],
|
||||
'end_date' => (string) $booking['end_date'],
|
||||
'start_time' => (string) ($booking['start_time'] ?? ''),
|
||||
'end_time' => (string) ($booking['end_time'] ?? ''),
|
||||
'deposit' => number_format((int) $booking['deposit_cents'] / 100, 2, ',', ''),
|
||||
'total' => number_format((int) $booking['total_cents'] / 100, 2, ',', ''),
|
||||
'rent' => number_format((int) $booking['rent_cents'] / 100, 2, ',', ''),
|
||||
'delivery' => number_format((int) $booking['delivery_cents'] / 100, 2, ',', ''),
|
||||
'invoice' => (int) $booking['invoice'],
|
||||
'kind' => (string) $booking['kind'],
|
||||
'customer_name' => (string) $booking['customer_name'],
|
||||
|
|
@ -585,12 +604,16 @@ function booking_detail_context(array $booking, array $user): array
|
|||
{
|
||||
$reminders = booking_reminders($booking);
|
||||
$done = reminder_done_map([(int) $booking['id']]);
|
||||
$deleteBlocked = (int) $booking['invoice'] === 1;
|
||||
$isAdmin = ($user['role'] ?? '') === 'admin';
|
||||
return [
|
||||
'booking' => $booking,
|
||||
'reminders' => $reminders,
|
||||
'doneMap' => $done,
|
||||
'copyText' => booking_copy_text($booking),
|
||||
'canDelete' => ($user['role'] ?? '') === 'admin',
|
||||
'canDelete' => $isAdmin && !$deleteBlocked,
|
||||
'deleteBlocked' => $deleteBlocked,
|
||||
'isAdmin' => $isAdmin,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -660,6 +683,12 @@ function page_booking_delete(array $user, int $id): void
|
|||
if (!$booking) {
|
||||
abort_page(404, 'Buchung nicht gefunden.');
|
||||
}
|
||||
// Rechnungs- und Buchhaltungsdaten unterliegen der gesetzlichen
|
||||
// Aufbewahrungspflicht (§ 147 AO, § 257 HGB) und dürfen nicht gelöscht werden.
|
||||
if ((int) $booking['invoice'] === 1) {
|
||||
flash('error', 'Buchungen mit Rechnung können wegen der gesetzlichen Aufbewahrungspflicht nicht gelöscht werden. Bitte zuerst die Rechnungsmarkierung entfernen, wenn keine Rechnung erstellt wurde.');
|
||||
redirect('/bookings/' . $id);
|
||||
}
|
||||
booking_delete($id);
|
||||
flash('success', 'Buchung von ' . $booking['customer_name'] . ' wurde endgültig gelöscht.');
|
||||
redirect('/calendar?view=month&date=' . $booking['start_date']);
|
||||
|
|
|
|||
84
app/privacy.php
Normal file
84
app/privacy.php
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Datenschutz-Aufräumarbeiten.
|
||||
*
|
||||
* Wird beim täglichen Erinnerungslauf (Cron) ausgeführt und hält die
|
||||
* Speicherdauer kurz, die in der Datenschutzerklärung zugesagt wird:
|
||||
* Login-Fehlversuche, abgelaufene Remember-Tokens und alte Versandprotokolle.
|
||||
*/
|
||||
function privacy_cleanup(): array
|
||||
{
|
||||
$result = [
|
||||
'login_attempts' => 0,
|
||||
'auth_tokens' => 0,
|
||||
'reminder_mail_log' => 0,
|
||||
'reminder_push_log' => 0,
|
||||
'log_rotated' => false,
|
||||
];
|
||||
|
||||
// Ratenbegrenzung braucht nur das aktuelle Zeitfenster (max. 15 Minuten).
|
||||
$result['login_attempts'] = privacy_delete(
|
||||
'DELETE FROM login_attempts WHERE attempted_at < ?',
|
||||
[utc_after(-86400)]
|
||||
);
|
||||
$result['auth_tokens'] = privacy_delete(
|
||||
'DELETE FROM auth_tokens WHERE expires_at < ?',
|
||||
[utc_now()]
|
||||
);
|
||||
$result['reminder_mail_log'] = privacy_delete(
|
||||
'DELETE FROM reminder_mail_log WHERE sent_at < ?',
|
||||
[utc_after(-365 * 86400)]
|
||||
);
|
||||
$result['reminder_push_log'] = privacy_delete(
|
||||
'DELETE FROM reminder_push_log WHERE sent_at < ?',
|
||||
[utc_after(-365 * 86400)]
|
||||
);
|
||||
|
||||
$result['log_rotated'] = privacy_rotate_error_log();
|
||||
return $result;
|
||||
}
|
||||
|
||||
function privacy_delete(string $sql, array $params): int
|
||||
{
|
||||
$stmt = db()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
return $stmt->rowCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotiert storage/logs/php.log bei 5 MB oder nach 30 Tagen. Es bleibt
|
||||
* höchstens eine Sicherung (php.log.1) erhalten.
|
||||
*/
|
||||
function privacy_rotate_error_log(): bool
|
||||
{
|
||||
$storage = (string) config('app.storage_path', DIC_ROOT . '/storage');
|
||||
$path = $storage . '/logs/php.log';
|
||||
if (!is_file($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$size = @filesize($path);
|
||||
$mtime = @filemtime($path);
|
||||
if ($size === false || $mtime === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$maxAge = 30 * 86400;
|
||||
$maxBytes = max(1, (int) config('legal.log_max_mb', 5)) * 1024 * 1024;
|
||||
if ($size < $maxBytes && $mtime > time() - $maxAge) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$rotated = $path . '.1';
|
||||
if (is_file($rotated) && (int) @filemtime($rotated) < time() - $maxAge) {
|
||||
@unlink($rotated);
|
||||
}
|
||||
if (!@rename($path, $rotated)) {
|
||||
return false;
|
||||
}
|
||||
@touch($path);
|
||||
@chmod($path, 0640);
|
||||
return true;
|
||||
}
|
||||
53
app/util.php
53
app/util.php
|
|
@ -89,7 +89,7 @@ function url(string $path = '/'): string
|
|||
}
|
||||
|
||||
/** Cache-Buster: bei Änderungen an app.css/app.js erhöhen. */
|
||||
const DIC_ASSET_VERSION = '8';
|
||||
const DIC_ASSET_VERSION = '10';
|
||||
|
||||
function asset(string $path): string
|
||||
{
|
||||
|
|
@ -233,6 +233,8 @@ function abort_page(int $code, string $message): never
|
|||
. '<p class="eyebrow">Drink it cold · Terminplanung</p>'
|
||||
. '<h1>' . e($title) . '</h1><p>' . e($message) . '</p>'
|
||||
. '<p><a class="btn primary" href="' . e(url('/')) . '">Zur Übersicht</a></p>'
|
||||
. '<p class="muted small"><a href="' . e(url('/impressum')) . '">Impressum</a>'
|
||||
. ' · <a href="' . e(url('/datenschutz')) . '">Datenschutz</a></p>'
|
||||
. '</div></body></html>';
|
||||
exit;
|
||||
}
|
||||
|
|
@ -258,6 +260,55 @@ function date_obj(string $iso): DateTimeImmutable
|
|||
return new DateTimeImmutable($iso . ' 12:00:00', new DateTimeZone('Europe/Berlin'));
|
||||
}
|
||||
|
||||
/** Uhrzeit als "HH:MM" normalisieren; leer bleibt leer (optional). */
|
||||
function normalize_time(mixed $value): string
|
||||
{
|
||||
$text = trim((string) $value);
|
||||
if ($text === '') {
|
||||
return '';
|
||||
}
|
||||
if (preg_match('/^(\d{1,2}):(\d{2})(?::\d{2})?$/', $text, $match) === 1) {
|
||||
return sprintf('%02d:%02d', (int) $match[1], (int) $match[2]);
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
/** Leere Uhrzeit wird in der Datenbank als NULL gespeichert. */
|
||||
function null_if_empty(string $value): ?string
|
||||
{
|
||||
return $value === '' ? null : $value;
|
||||
}
|
||||
|
||||
/** Leere Uhrzeit ist erlaubt – sie ist ein optionales Zusatzfeld. */
|
||||
function valid_time(?string $time): bool
|
||||
{
|
||||
if ($time === null || $time === '') {
|
||||
return true;
|
||||
}
|
||||
return preg_match('/^([01]\d|2[0-3]):[0-5]\d$/', $time) === 1;
|
||||
}
|
||||
|
||||
function fmt_time(?string $time): string
|
||||
{
|
||||
$value = normalize_time($time);
|
||||
return $value !== '' && valid_time($value) ? $value : '';
|
||||
}
|
||||
|
||||
/** Datum mit optionaler Uhrzeit, z. B. "30.11.2026 14:00". */
|
||||
function fmt_date_with_time(string $iso, ?string $time): string
|
||||
{
|
||||
$clock = fmt_time($time);
|
||||
return $clock === '' ? fmt_date($iso) : fmt_date($iso) . ' ' . $clock;
|
||||
}
|
||||
|
||||
/** Kurzform für Listen/Kopiertext: "30.11.26 14:00". */
|
||||
function fmt_date_short_with_time(string $iso, ?string $time): string
|
||||
{
|
||||
$clock = fmt_time($time);
|
||||
return $clock === '' ? fmt_date_short($iso) : fmt_date_short($iso) . ' ' . $clock;
|
||||
}
|
||||
|
||||
|
||||
function add_days(string $iso, int $days): string
|
||||
{
|
||||
return date_obj($iso)->modify(($days >= 0 ? '+' : '') . $days . ' days')->format('Y-m-d');
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Browser
|
|||
| `trailers` | Anhänger mit Bezeichnung, Farbname, Hex-Farbe, Sortierung und Aktiv-Status (Start-Anhänger aus der Anforderung vorinstalliert, weitere im Admin anlegbar) |
|
||||
| `employees` | Mitarbeiter (M. Krücken, N. Jorns, M. Schmitz), aktiv/inaktiv |
|
||||
| `users` | Login-Konten (Vorname, Nachname, Passwort-Hash, Rolle, optional E-Mail, optional Mitarbeiter-Link) |
|
||||
| `bookings` | Buchung inkl. Zeitraum, Beträge, Rechnungsflag, Art, Kundendaten, Status |
|
||||
| `bookings` | Buchung inkl. Zeitraum (Datum + optionale Uhrzeit), Miete/Lieferkosten mit Gesamtbetrag, Anzahlung, Rechnungsflag, Art, Kundendaten, Status |
|
||||
| `reminder_done` | Abgehakte Erinnerung, Schlüssel `(booking_id, kind, due_date)` |
|
||||
| `reminder_mail_log` | Versandprotokoll, verhindert doppelte E-Mails |
|
||||
| `push_subscriptions` | Web-Push-Abos pro Gerät (Endpoint-Hash, p256dh, auth, letzter Erfolg/Fehler) |
|
||||
|
|
@ -139,10 +139,11 @@ sind die primäre Anzeige und funktionieren ohne Mailversand.
|
|||
| Tag/Woche/Monat, Google-ähnlich | `?view=day|week|month`, Navigation, Heute, Datumssprung |
|
||||
| Durchgehende farbige Balken | absolute Balken pro Zeile, Farbe aus `trailers.color_hex` |
|
||||
| Keine ausgeblendeten Termine | alle Buchungen im Zeitraum werden gerendert; Lanes statt „weitere Termine“ |
|
||||
| 3. Ganztägige Mietzeiträume | `DATE` ohne Uhrzeit, inklusive Endtag |
|
||||
| 3. Mietzeiträume | `DATE`-Zeitraum inklusive Endtag; Uhrzeiten (`start_time`, `end_time`) optional, ohne Angabe ganztägig |
|
||||
| Keine Doppelbelegung, Wechseltag erlaubt | strikte Intervallprüfung + Zeilensperre, Wechseltag bewusst erlaubt |
|
||||
| 4. Felder in fester Reihenfolge | Formular und Kopiervorlage in exakt der vorgegebenen Reihenfolge |
|
||||
| 4. Felder in fester Reihenfolge | Formular und Kopiervorlage in exakt der vorgegebenen Reihenfolge; Uhrzeit optional |
|
||||
| Restbetrag automatisch | `total_cents − deposit_cents`, live im Formular und serverseitig berechnet |
|
||||
| Miete + Lieferkosten | `rent_cents` + `delivery_cents` = `total_cents`, live im Formular mitgerechnet |
|
||||
| Rechnung JA/NEIN, Art Abholer/Lieferung | Radio-Auswahl, Labels wie gefordert |
|
||||
| Komplett kopieren | Button nutzt Clipboard-API, Fallback `execCommand`; Text enthält Zeilenumbrüche |
|
||||
| 5. Mitarbeiterzuordnung | `bookings.employee_id`, Auswahl im Formular, änderbar |
|
||||
|
|
|
|||
14
sql/migrations/003_booking_times_fees.sql
Normal file
14
sql/migrations/003_booking_times_fees.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Uhrzeiten (optional) und getrennte Beträge Miete / Lieferkosten.
|
||||
--
|
||||
-- Die Felder entsprechen der Vorlage „Neuanlage“ aus docs/App DC.xlsx:
|
||||
-- Von/Bis mit Uhrzeit sowie Miete und Lieferkosten, deren Summe der
|
||||
-- Gesamtbetrag ist. Bestehende Buchungen behalten ihren Gesamtbetrag; er
|
||||
-- wird als Miete übernommen, damit Miete + Lieferkosten = Gesamt gilt.
|
||||
|
||||
ALTER TABLE bookings
|
||||
ADD COLUMN start_time TIME NULL DEFAULT NULL AFTER end_date,
|
||||
ADD COLUMN end_time TIME NULL DEFAULT NULL AFTER start_time,
|
||||
ADD COLUMN rent_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER deposit_cents,
|
||||
ADD COLUMN delivery_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER rent_cents;
|
||||
|
||||
UPDATE bookings SET rent_cents = total_cents WHERE rent_cents = 0 AND total_cents > 0;
|
||||
|
|
@ -61,7 +61,11 @@ CREATE TABLE IF NOT EXISTS bookings (
|
|||
employee_id BIGINT UNSIGNED NOT NULL,
|
||||
start_date DATE NOT NULL,
|
||||
end_date DATE NOT NULL,
|
||||
start_time TIME NULL DEFAULT NULL,
|
||||
end_time TIME NULL DEFAULT NULL,
|
||||
deposit_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
rent_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
delivery_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
total_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
invoice TINYINT(1) NOT NULL DEFAULT 0,
|
||||
kind ENUM('pickup', 'delivery') NOT NULL DEFAULT 'pickup',
|
||||
|
|
@ -163,6 +167,7 @@ INSERT IGNORE INTO employees (name, sort_order, created_at) VALUES
|
|||
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (1, UTC_TIMESTAMP());
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (2, UTC_TIMESTAMP());
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (3, UTC_TIMESTAMP());
|
||||
|
||||
-- Web-Push-Abos (VAPID) und Versandprotokoll für Erinnerungen.
|
||||
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
||||
|
|
|
|||
|
|
@ -20,9 +20,16 @@ foreach ($argv ?? [] as $arg) {
|
|||
}
|
||||
}
|
||||
|
||||
$cleanup = privacy_cleanup();
|
||||
$push = push_dispatch_due($lookback);
|
||||
$mail = reminder_send_due($lookback);
|
||||
|
||||
fwrite(STDOUT, sprintf(
|
||||
"Aufräumen: %d Login-Fehlversuche, %d Tokens, %d E-Mail-Protokolle, %d Push-Protokolle entfernt%s.\n",
|
||||
$cleanup['login_attempts'], $cleanup['auth_tokens'], $cleanup['reminder_mail_log'],
|
||||
$cleanup['reminder_push_log'], $cleanup['log_rotated'] ? ', Fehlerprotokoll rotiert' : ''
|
||||
));
|
||||
|
||||
if (!push_is_configured()) {
|
||||
fwrite(STDOUT, "Push: nicht konfiguriert (VAPID-Schlüssel fehlen).\n");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,11 @@ $mustChange = (int) ($user['must_change_password'] ?? 0) === 1;
|
|||
<small>Die Benachrichtigungs-Erlaubnis wird beim Aktivieren abgefragt.</small>
|
||||
</span>
|
||||
</label>
|
||||
<p class="muted small">
|
||||
Mit dem Aktivieren willigst du in die Verarbeitung deines Push-Endpunkts gemäß
|
||||
<a href="<?= e(url('/datenschutz#push')) ?>">Datenschutzerklärung</a>
|
||||
ein. Die Einwilligung kannst du jederzeit hier widerrufen.
|
||||
</p>
|
||||
<div class="push-status" data-push-status role="status" aria-live="polite"></div>
|
||||
<div class="push-actions">
|
||||
<button class="btn small" type="button" data-push-test hidden>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
/** @var array $doneMap */
|
||||
/** @var string $copyText */
|
||||
/** @var bool $canDelete */
|
||||
/** @var bool $deleteBlocked */
|
||||
/** @var bool $isAdmin */
|
||||
$cancelled = $booking['status'] === 'cancelled';
|
||||
$lines = explode("\n", $copyText);
|
||||
$due = due_cents((int) $booking['total_cents'], (int) $booking['deposit_cents']);
|
||||
|
|
@ -18,7 +20,8 @@ $returnTo = '/bookings/' . (int) $booking['id'];
|
|||
<div class="page-head page-head--compact">
|
||||
<div>
|
||||
<p class="eyebrow">
|
||||
<?= e(fmt_date_range($booking['start_date'], $booking['end_date'])) ?> ·
|
||||
<?= e(fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null)) ?> –
|
||||
<?= e(fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null)) ?> ·
|
||||
<?= e($booking['trailer_label']) ?> · <?= e($booking['employee_name']) ?>
|
||||
</p>
|
||||
<h1><?= e($booking['customer_name']) ?>
|
||||
|
|
@ -146,15 +149,17 @@ $returnTo = '/bookings/' . (int) $booking['id'];
|
|||
</dd>
|
||||
</div>
|
||||
<div><dt>Mitarbeiter</dt><dd><?= e($booking['employee_name']) ?></dd></div>
|
||||
<div><dt>Von</dt><dd><?= e(fmt_date_long($booking['start_date'])) ?></dd></div>
|
||||
<div><dt>Bis</dt><dd><?= e(fmt_date_long($booking['end_date'])) ?></dd></div>
|
||||
<div><dt>Von</dt><dd><?= e(fmt_date_long($booking['start_date'])) ?><?php if (fmt_time($booking['start_time'] ?? null) !== ''): ?> · <?= e(fmt_time($booking['start_time'])) ?> Uhr<?php endif; ?></dd></div>
|
||||
<div><dt>Bis</dt><dd><?= e(fmt_date_long($booking['end_date'])) ?><?php if (fmt_time($booking['end_time'] ?? null) !== ''): ?> · <?= e(fmt_time($booking['end_time'])) ?> Uhr<?php endif; ?></dd></div>
|
||||
<div><dt>Art</dt><dd><span class="pill pill--blue"><?= e(booking_kind_label((string) $booking['kind'])) ?></span></dd></div>
|
||||
<div><dt>Rechnung</dt><dd><span class="pill <?= (int) $booking['invoice'] === 1 ? 'pill--green' : 'pill--grey' ?>"><?= e(booking_invoice_label($booking['invoice'])) ?></span></dd></div>
|
||||
</dl>
|
||||
<hr>
|
||||
<dl class="money-list">
|
||||
<div><dt>Anzahlung</dt><dd><?= e(fmt_money((int) $booking['deposit_cents'])) ?></dd></div>
|
||||
<div><dt>Miete</dt><dd><?= e(fmt_money((int) $booking['rent_cents'])) ?></dd></div>
|
||||
<div><dt>Lieferkosten</dt><dd><?= e(fmt_money((int) $booking['delivery_cents'])) ?></dd></div>
|
||||
<div><dt>Gesamtbetrag</dt><dd><?= e(fmt_money((int) $booking['total_cents'])) ?></dd></div>
|
||||
<div><dt>Anzahlung</dt><dd><?= e(fmt_money((int) $booking['deposit_cents'])) ?></dd></div>
|
||||
<div class="is-strong"><dt>Noch zu zahlen</dt><dd><?= e(fmt_money($due)) ?></dd></div>
|
||||
</dl>
|
||||
</section>
|
||||
|
|
@ -169,6 +174,12 @@ $returnTo = '/bookings/' . (int) $booking['id'];
|
|||
<?= csrf_field() ?>
|
||||
<button class="btn danger-ghost btn--block" type="submit"><svg class="ico" aria-hidden="true"><use href="#i-trash"/></svg> Endgültig löschen</button>
|
||||
</form>
|
||||
<?php elseif ($isAdmin && $deleteBlocked): ?>
|
||||
<p class="muted small">
|
||||
Diese Buchung ist als Rechnung markiert und unterliegt der gesetzlichen Aufbewahrungspflicht.
|
||||
Löschen ist deshalb gesperrt. Wenn keine Rechnung erstellt wurde, kann die Markierung unter
|
||||
<strong>Bearbeiten</strong> entfernt werden.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
<section class="card">
|
||||
<div class="card__head">
|
||||
<h2>Mietzeitraum & Zuständigkeit</h2>
|
||||
<p>Ganztägig – Uhrzeiten sind nicht nötig. Ein Wechseltag am Ende und Anfang ist erlaubt.</p>
|
||||
<p>Uhrzeiten sind optional – ohne Angabe gilt der Termin ganztägig. Ein Wechseltag am Ende und Anfang ist erlaubt.</p>
|
||||
</div>
|
||||
<div class="form-grid">
|
||||
<label class="field<?= $fieldError('trailer_id') !== '' ? ' has-error' : '' ?>">
|
||||
|
|
@ -88,16 +88,24 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<label class="field<?= $fieldError('start_date') !== '' ? ' has-error' : '' ?>">
|
||||
<div class="field<?= $fieldError('start_date') !== '' || $fieldError('start_time') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Mietbeginn (Von)</span>
|
||||
<input type="date" name="start_date" value="<?= e($values['start_date']) ?>" required data-date-start>
|
||||
<div class="field-pair">
|
||||
<input type="date" name="start_date" value="<?= e($values['start_date']) ?>" required data-date-start aria-label="Mietbeginn Datum">
|
||||
<input type="time" name="start_time" value="<?= e(fmt_time($values['start_time'])) ?>" data-time-start aria-label="Mietbeginn Uhrzeit (optional)">
|
||||
</div>
|
||||
<?php if ($fieldError('start_date')): ?><em class="field-error"><?= e($fieldError('start_date')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
<label class="field<?= $fieldError('end_date') !== '' ? ' has-error' : '' ?>">
|
||||
<?php if ($fieldError('start_time')): ?><em class="field-error"><?= e($fieldError('start_time')) ?></em><?php endif; ?>
|
||||
</div>
|
||||
<div class="field<?= $fieldError('end_date') !== '' || $fieldError('end_time') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Mietende (Bis)</span>
|
||||
<input type="date" name="end_date" value="<?= e($values['end_date']) ?>" required data-date-end>
|
||||
<div class="field-pair">
|
||||
<input type="date" name="end_date" value="<?= e($values['end_date']) ?>" required data-date-end aria-label="Mietende Datum">
|
||||
<input type="time" name="end_time" value="<?= e(fmt_time($values['end_time'])) ?>" data-time-end aria-label="Mietende Uhrzeit (optional)">
|
||||
</div>
|
||||
<?php if ($fieldError('end_date')): ?><em class="field-error"><?= e($fieldError('end_date')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
<?php if ($fieldError('end_time')): ?><em class="field-error"><?= e($fieldError('end_time')) ?></em><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<label class="field<?= $fieldError('employee_id') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Zuständiger Mitarbeiter</span>
|
||||
|
|
@ -120,9 +128,30 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
<section class="card">
|
||||
<div class="card__head">
|
||||
<h2>Beträge & Rechnung</h2>
|
||||
<p>„Noch zu zahlen“ wird automatisch aus Gesamtbetrag minus Anzahlung berechnet.</p>
|
||||
<p>Gesamtbetrag = Miete + Lieferkosten. „Noch zu zahlen“ ist Gesamtbetrag minus Anzahlung.</p>
|
||||
</div>
|
||||
<div class="form-grid">
|
||||
<label class="field<?= $fieldError('rent') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Miete</span>
|
||||
<span class="money-input">
|
||||
<input type="text" name="rent" value="<?= e($values['rent']) ?>" inputmode="decimal" placeholder="0,00" data-money="rent">
|
||||
<span>€</span>
|
||||
</span>
|
||||
<?php if ($fieldError('rent')): ?><em class="field-error"><?= e($fieldError('rent')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
<label class="field<?= $fieldError('delivery') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Lieferkosten</span>
|
||||
<span class="money-input">
|
||||
<input type="text" name="delivery" value="<?= e($values['delivery']) ?>" inputmode="decimal" placeholder="0,00" data-money="delivery">
|
||||
<span>€</span>
|
||||
</span>
|
||||
<?php if ($fieldError('delivery')): ?><em class="field-error"><?= e($fieldError('delivery')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
|
||||
<div class="field">
|
||||
<span>Gesamtbetrag</span>
|
||||
<output class="due-output" data-total-output><?= e(fmt_money(parse_money((string) $values['rent']) + parse_money((string) $values['delivery']))) ?></output>
|
||||
</div>
|
||||
<label class="field<?= $fieldError('deposit') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Anzahlung</span>
|
||||
<span class="money-input">
|
||||
|
|
@ -131,17 +160,9 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
</span>
|
||||
<?php if ($fieldError('deposit')): ?><em class="field-error"><?= e($fieldError('deposit')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
<label class="field<?= $fieldError('total') !== '' ? ' has-error' : '' ?>">
|
||||
<span>Gesamtbetrag</span>
|
||||
<span class="money-input">
|
||||
<input type="text" name="total" value="<?= e($values['total']) ?>" inputmode="decimal" placeholder="0,00" data-money="total">
|
||||
<span>€</span>
|
||||
</span>
|
||||
<?php if ($fieldError('total')): ?><em class="field-error"><?= e($fieldError('total')) ?></em><?php endif; ?>
|
||||
</label>
|
||||
<div class="field">
|
||||
<span>Noch zu zahlen</span>
|
||||
<output class="due-output" data-due><?= e(fmt_money(due_cents(parse_money((string) $values['total']), parse_money((string) $values['deposit'])))) ?></output>
|
||||
<output class="due-output" data-due><?= e(fmt_money(due_cents(parse_money((string) $values['rent']) + parse_money((string) $values['delivery']), parse_money((string) $values['deposit'])))) ?></output>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
|
|
@ -164,7 +185,10 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
<section class="card">
|
||||
<div class="card__head">
|
||||
<h2>Kundendaten</h2>
|
||||
<p>Erscheint in genau dieser Reihenfolge im kopierbaren Buchungstext.</p>
|
||||
<p>
|
||||
Erscheint in genau dieser Reihenfolge im kopierbaren Buchungstext.
|
||||
Kunden bitte auf die <a href="<?= e(url('/datenschutz')) ?>">Datenschutzhinweise</a> hinweisen.
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-grid">
|
||||
<label class="field field--wide<?= $fieldError('customer_name') !== '' ? ' has-error' : '' ?>">
|
||||
|
|
@ -201,11 +225,13 @@ $backUrl = $isEdit ? '/bookings/' . (int) $booking['id'] : '/calendar';
|
|||
<h2>Übersicht</h2>
|
||||
<dl class="summary-list">
|
||||
<div><dt>Kühlanhänger</dt><dd><span class="trailer-dot" style="--trailer: <?= e($selectedTrailer['color_hex'] ?? '#196abc') ?>"></span> <span data-summary-trailer><?= e($selectedTrailer['label'] ?? '–') ?></span></dd></div>
|
||||
<div><dt>Zeitraum</dt><dd data-summary-dates><?= e(fmt_date_range($values['start_date'], $values['end_date'])) ?></dd></div>
|
||||
<div><dt>Zeitraum</dt><dd data-summary-dates><?= e(fmt_date_with_time($values['start_date'], $values['start_time']) . ' – ' . fmt_date_with_time($values['end_date'], $values['end_time'])) ?></dd></div>
|
||||
<div><dt>Mitarbeiter</dt><dd><span data-summary-employee><?= e($selectedEmployee['name'] ?? '–') ?></span></dd></div>
|
||||
<div><dt>Gesamtbetrag</dt><dd data-summary-total><?= e(fmt_money(parse_money((string) $values['total']))) ?></dd></div>
|
||||
<div><dt>Miete</dt><dd data-summary-rent><?= e(fmt_money(parse_money((string) $values['rent']))) ?></dd></div>
|
||||
<div><dt>Lieferkosten</dt><dd data-summary-delivery><?= e(fmt_money(parse_money((string) $values['delivery']))) ?></dd></div>
|
||||
<div><dt>Gesamtbetrag</dt><dd data-summary-total><?= e(fmt_money(parse_money((string) $values['rent']) + parse_money((string) $values['delivery']))) ?></dd></div>
|
||||
<div><dt>Anzahlung</dt><dd data-summary-deposit><?= e(fmt_money(parse_money((string) $values['deposit']))) ?></dd></div>
|
||||
<div class="is-strong"><dt>Noch zu zahlen</dt><dd data-summary-due><?= e(fmt_money(due_cents(parse_money((string) $values['total']), parse_money((string) $values['deposit'])))) ?></dd></div>
|
||||
<div class="is-strong"><dt>Noch zu zahlen</dt><dd data-summary-due><?= e(fmt_money(due_cents(parse_money((string) $values['rent']) + parse_money((string) $values['delivery']), parse_money((string) $values['deposit'])))) ?></dd></div>
|
||||
</dl>
|
||||
<div class="form-actions">
|
||||
<button class="btn primary btn--block" type="submit">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ foreach ($reminders as $reminder) {
|
|||
</div>
|
||||
<h2><?= e($booking['customer_name']) ?></h2>
|
||||
<p>
|
||||
<?= e(fmt_date_range($booking['start_date'], $booking['end_date'])) ?>
|
||||
<?= e(fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null)) ?>
|
||||
– <?= e(fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null)) ?>
|
||||
· <?= e($booking['employee_name']) ?>
|
||||
<span class="pill <?= $cancelled ? 'pill--grey' : 'pill--green' ?>"><?= $cancelled ? 'storniert' : 'aktiv' ?></span>
|
||||
</p>
|
||||
|
|
@ -59,8 +60,10 @@ foreach ($reminders as $reminder) {
|
|||
<div><dt>Mitarbeiter</dt><dd><?= e($booking['employee_name']) ?></dd></div>
|
||||
<div><dt>Art</dt><dd><?= e(booking_kind_label((string) $booking['kind'])) ?></dd></div>
|
||||
<div><dt>Rechnung</dt><dd><?= e(booking_invoice_label($booking['invoice'])) ?></dd></div>
|
||||
<div><dt>Anzahlung</dt><dd><?= e(fmt_money((int) $booking['deposit_cents'])) ?></dd></div>
|
||||
<div><dt>Miete</dt><dd><?= e(fmt_money((int) $booking['rent_cents'])) ?></dd></div>
|
||||
<div><dt>Lieferkosten</dt><dd><?= e(fmt_money((int) $booking['delivery_cents'])) ?></dd></div>
|
||||
<div><dt>Gesamt</dt><dd><?= e(fmt_money((int) $booking['total_cents'])) ?></dd></div>
|
||||
<div><dt>Anzahlung</dt><dd><?= e(fmt_money((int) $booking['deposit_cents'])) ?></dd></div>
|
||||
<div class="is-strong"><dt>Noch zu zahlen</dt><dd><?= e(fmt_money($due)) ?></dd></div>
|
||||
</dl>
|
||||
<?php if ($openReminder): ?>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,8 @@ $minWidth = match ($view) {
|
|||
$showMeta = $view === 'day' || ($view === 'week' && $geo['span'] >= 2);
|
||||
$label = $view === 'month' ? truncate((string) $booking['customer_name'], 18) : (string) $booking['customer_name'];
|
||||
$aria = $booking['customer_name'] . ', ' . $booking['trailer_label'] . ', '
|
||||
. fmt_date($booking['start_date']) . ' bis ' . fmt_date($booking['end_date'])
|
||||
. fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' bis '
|
||||
. fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null)
|
||||
. ', ' . $booking['employee_name'] . ($cancelled ? ', storniert' : '');
|
||||
?>
|
||||
<a class="cal-bar<?= $cancelled ? ' is-cancelled' : '' ?><?= $geo['cut_start'] ? ' is-cut-start' : '' ?><?= $geo['cut_end'] ? ' is-cut-end' : '' ?><?= $geo['span'] <= 1 ? ' is-tiny' : '' ?>"
|
||||
|
|
@ -141,10 +142,10 @@ $minWidth = match ($view) {
|
|||
data-days="<?= days_between($booking['start_date'], $booking['end_date']) + 1 ?>"
|
||||
style="--left: <?= number_format($geo['left'], 5, '.', '') ?>%; --width: <?= number_format($geo['width'], 5, '.', '') ?>%; --top: <?= number_format($geo['top'], 5, '.', '') ?>%; --height: <?= number_format($geo['height'], 5, '.', '') ?>%; --bar: <?= e($booking['trailer_color']) ?>; --bar-text: <?= e(contrast_color($booking['trailer_color'])) ?>;"
|
||||
aria-label="<?= e($aria) ?>"
|
||||
title="<?= e($booking['customer_name'] . ' · ' . fmt_date_range($booking['start_date'], $booking['end_date']) . ' · ' . $booking['employee_name'] . ($cancelled ? ' · storniert' : '')) ?>">
|
||||
title="<?= e($booking['customer_name'] . ' · ' . fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' – ' . fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null) . ' · ' . $booking['employee_name'] . ($cancelled ? ' · storniert' : '')) ?>">
|
||||
<span class="cal-bar__name"><?= e($label) ?></span>
|
||||
<?php if ($showMeta): ?>
|
||||
<span class="cal-bar__meta"><?= e($view === 'day' ? fmt_date_range($booking['start_date'], $booking['end_date']) : $booking['employee_name']) ?><?= $view === 'day' ? ' · ' . e($booking['employee_name']) : '' ?></span>
|
||||
<span class="cal-bar__meta"><?= e($view === 'day' ? fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' – ' . fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null) : $booking['employee_name']) ?><?= $view === 'day' ? ' · ' . e($booking['employee_name']) : '' ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($view === 'day'): ?>
|
||||
<span class="cal-bar__meta cal-bar__meta--soft"><?= e(booking_kind_label((string) $booking['kind'])) ?> · <?= e(fmt_money((int) $booking['total_cents'])) ?></span>
|
||||
|
|
|
|||
|
|
@ -150,6 +150,10 @@ $navActive = static function (string $area) use ($path): string {
|
|||
|
||||
<footer class="footer">
|
||||
<span>Drink it cold · Kühlanhänger-Vermietung</span>
|
||||
<nav class="footer__links" aria-label="Rechtliches">
|
||||
<a href="<?= e(url('/impressum')) ?>">Impressum</a>
|
||||
<a href="<?= e(url('/datenschutz')) ?>">Datenschutz</a>
|
||||
</nav>
|
||||
<span class="footer__hint">Interner Bereich · <?= e(fmt_date(today_iso())) ?></span>
|
||||
</footer>
|
||||
|
||||
|
|
|
|||
67
views/legal.php
Normal file
67
views/legal.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
/** @var string $page */
|
||||
/** @var array $info */
|
||||
$isImpressum = $page === 'impressum';
|
||||
$legalTitle = $isImpressum ? 'Impressum' : 'Datenschutz';
|
||||
$legalDescription = $isImpressum
|
||||
? 'Impressum und Anbieterkennzeichnung von ' . $info['business_name'] . '.'
|
||||
: 'Informationen zur Verarbeitung personenbezogener Daten bei ' . $info['business_name'] . '.';
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="theme-color" content="#196abc">
|
||||
<meta name="color-scheme" content="light">
|
||||
<meta name="description" content="<?= e($legalDescription) ?>">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-title" content="<?= e($info['business_name']) ?>">
|
||||
<meta name="application-name" content="<?= e($info['business_name']) ?>">
|
||||
<title><?= e($legalTitle) ?> · <?= e($info['business_name']) ?></title>
|
||||
<link rel="manifest" href="<?= e(url('/manifest.webmanifest')) ?>">
|
||||
<link rel="icon" type="image/svg+xml" href="<?= e(asset('favicon.svg')) ?>">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<?= e(asset('icons/icon-32.png')) ?>">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<?= e(asset('icons/apple-touch-icon-180.png')) ?>">
|
||||
<link rel="preload" as="font" type="font/woff2" href="<?= e(asset('fonts/manrope-latin.woff2')) ?>" crossorigin>
|
||||
<link rel="preload" as="font" type="font/woff2" href="<?= e(asset('fonts/inter-latin.woff2')) ?>" crossorigin>
|
||||
<link rel="stylesheet" href="<?= e(asset('app.css')) ?>">
|
||||
</head>
|
||||
<body class="legal-page">
|
||||
<a class="skip-link" href="#main">Zum Inhalt springen</a>
|
||||
|
||||
<header class="legal-topbar">
|
||||
<div class="legal-topbar__inner">
|
||||
<a class="legal-brand" href="<?= e(url('/login')) ?>" aria-label="<?= e($info['business_name']) ?> – zur Anmeldung">
|
||||
<img src="<?= e(asset('logo-mark.svg')) ?>" alt="" width="44" height="32">
|
||||
<span>
|
||||
<strong><?= e($info['business_name']) ?></strong>
|
||||
<small>Kühlanhänger-Vermietung</small>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="legal-nav" aria-label="Rechtliches">
|
||||
<a href="<?= e(url('/impressum')) ?>"<?= $isImpressum ? ' aria-current="page"' : '' ?>>Impressum</a>
|
||||
<a href="<?= e(url('/datenschutz')) ?>"<?= !$isImpressum ? ' aria-current="page"' : '' ?>>Datenschutz</a>
|
||||
<a class="legal-nav__login" href="<?= e(url('/login')) ?>">Anmelden</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="legal" id="main">
|
||||
<article class="legal-card">
|
||||
<?php require DIC_ROOT . '/views/legal_' . $page . '.php'; ?>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer class="legal-footer">
|
||||
<span>© <?= date('Y') ?> <?= e($info['business_name']) ?> · <?= e($info['city']) ?></span>
|
||||
<nav aria-label="Fußzeile">
|
||||
<a href="<?= e(url('/impressum')) ?>">Impressum</a>
|
||||
<a href="<?= e(url('/datenschutz')) ?>">Datenschutz</a>
|
||||
<a href="<?= e(url('/login')) ?>">Zum internen Bereich</a>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
363
views/legal_datenschutz.php
Normal file
363
views/legal_datenschutz.php
Normal file
|
|
@ -0,0 +1,363 @@
|
|||
<?php
|
||||
/** @var array $info */
|
||||
$owner = trim((string) $info['owner']);
|
||||
$logDays = (int) $info['log_retention_days'];
|
||||
$logMaxMb = (int) $info['log_max_mb'];
|
||||
$invoiceYears = (int) $info['invoice_retention_years'];
|
||||
$limitationYears = (int) $info['limitation_years'];
|
||||
$sessionDays = (int) $info['session_days'];
|
||||
$rememberDays = (int) $info['remember_days'];
|
||||
?>
|
||||
<p class="legal-eyebrow">Datenschutz</p>
|
||||
<h1>Datenschutzerklärung</h1>
|
||||
<p class="legal-lead">
|
||||
Informationen nach Art. 13 und 14 DSGVO zur Verarbeitung personenbezogener Daten in der
|
||||
Terminplanung von <?= e($info['business_name']) ?>.
|
||||
</p>
|
||||
|
||||
<nav class="legal-toc" aria-label="Inhalt dieser Datenschutzerklärung">
|
||||
<ol>
|
||||
<li><a href="#verantwortlicher">Verantwortlicher</a></li>
|
||||
<li><a href="#geltungsbereich">Geltungsbereich</a></li>
|
||||
<li><a href="#hosting">Hosting und Server-Logfiles</a></li>
|
||||
<li><a href="#kundendaten">Kunden- und Buchungsdaten</a></li>
|
||||
<li><a href="#mitarbeiter">Mitarbeiterkonten und Zugriff</a></li>
|
||||
<li><a href="#erinnerungen">Erinnerungen und Versandprotokolle</a></li>
|
||||
<li><a href="#push">Web-Push-Benachrichtigungen</a></li>
|
||||
<li><a href="#email">E-Mail-Erinnerungen</a></li>
|
||||
<li><a href="#cookies">Cookies und lokale Speicherung</a></li>
|
||||
<li><a href="#empfaenger">Empfänger und Auftragsverarbeitung</a></li>
|
||||
<li><a href="#drittland">Übermittlung in Drittländer</a></li>
|
||||
<li><a href="#dauer">Speicherdauer</a></li>
|
||||
<li><a href="#rechte">Ihre Rechte</a></li>
|
||||
<li><a href="#automatisierung">Keine automatisierte Entscheidung</a></li>
|
||||
<li><a href="#bereitstellung">Bereitstellung der Daten</a></li>
|
||||
<li><a href="#sicherheit">Datensicherheit</a></li>
|
||||
<li><a href="#aenderungen">Änderungen</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<section class="legal-section" id="verantwortlicher">
|
||||
<h2>1. Verantwortlicher</h2>
|
||||
<p>Verantwortlich für die Verarbeitung personenbezogener Daten ist:</p>
|
||||
<address class="legal-address">
|
||||
<strong><?= e($info['business_name']) ?></strong><br>
|
||||
<?php if ($owner !== ''): ?>Inhaber: <?= e($owner) ?><br><?php endif; ?>
|
||||
<?= e($info['street']) ?><br>
|
||||
<?= e($info['postal_code']) ?> <?= e($info['city']) ?><br>
|
||||
<?= e($info['country']) ?><br>
|
||||
Telefon: <?php if ($info['phone_href'] !== ''): ?><a href="<?= e($info['phone_href']) ?>"><?= e($info['phone']) ?></a><?php else: ?><?= e($info['phone']) ?><?php endif; ?><br>
|
||||
E-Mail: <a href="mailto:<?= e($info['email']) ?>"><?= e($info['email']) ?></a>
|
||||
</address>
|
||||
<?php if (trim((string) $info['dpo_name']) === '' && trim((string) $info['dpo_email']) === ''): ?>
|
||||
<p>Ein Datenschutzbeauftragter ist nicht bestellt. Anfragen zum Datenschutz richten Sie bitte an die oben genannte Adresse.</p>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
Datenschutzbeauftragter:
|
||||
<?= e($info['dpo_name']) ?><?php if (trim((string) $info['dpo_email']) !== ''): ?>,
|
||||
<a href="mailto:<?= e($info['dpo_email']) ?>"><?= e($info['dpo_email']) ?></a><?php endif; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="geltungsbereich">
|
||||
<h2>2. Geltungsbereich</h2>
|
||||
<p>
|
||||
Diese Anwendung ist der interne Terminplanungsbereich für die Vermietung von Kühlanhängern. Sie richtet
|
||||
sich an die Mitarbeiter von <?= e($info['business_name']) ?> und verarbeitet die Daten von Kunden, die
|
||||
einen Kühlanhänger mieten. Eine Selbstregistrierung, ein öffentliches Kontaktformular oder Werbe- und
|
||||
Analysefunktionen gibt es nicht.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="hosting">
|
||||
<h2>3. Hosting und Server-Logfiles</h2>
|
||||
<p>
|
||||
Die Anwendung wird bei <strong><?= e($info['hosting_provider']) ?></strong>,
|
||||
<?= e($info['hosting_address']) ?>, <?= e($info['hosting_country']) ?> gehostet. Der Anbieter stellt
|
||||
Webspace, Datenbank, E-Mail-Versand und die technische Infrastruktur bereit und verarbeitet die Daten
|
||||
ausschließlich in unserem Auftrag und nach unseren Weisungen. Die Server befinden sich in Deutschland.
|
||||
</p>
|
||||
<p>
|
||||
Beim Aufruf der Website verarbeitet der Webserver automatisch technische Zugriffsdaten: IP-Adresse,
|
||||
Datum und Uhrzeit, aufgerufene Adresse, HTTP-Status, übertragene Datenmenge, Referrer sowie Browser-
|
||||
und Betriebssystemkennung. Diese Daten sind für den sicheren und stabilen Betrieb, die Fehleranalyse
|
||||
und die Abwehr von Angriffen erforderlich.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO (berechtigtes Interesse an Sicherheit und
|
||||
Funktionsfähigkeit). Die Zugriffsprotokolle des Webservers werden nach den Vorgaben des Hosting-Anbieters
|
||||
in der Regel nach spätestens <?= $logDays ?> Tagen gelöscht. Das von der Anwendung zusätzlich geführte
|
||||
technische Fehlerprotokoll wird bei <?= $logMaxMb ?> MB oder nach 30 Tagen rotiert; es bleibt höchstens
|
||||
eine Sicherung erhalten. Bei einem konkreten Sicherheitsvorfall können einzelne Einträge bis zur
|
||||
vollständigen Aufklärung länger aufbewahrt werden.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="kundendaten">
|
||||
<h2>4. Kunden- und Buchungsdaten</h2>
|
||||
<p>Wenn Sie einen Kühlanhänger mieten, verarbeiten wir insbesondere folgende Daten:</p>
|
||||
<ul>
|
||||
<li>Vor- und Nachname,</li>
|
||||
<li>Straße, Postleitzahl und Ort,</li>
|
||||
<li>Mobilnummer und E-Mail-Adresse,</li>
|
||||
<li>Mietzeitraum, gebuchter Anhänger, Abholung oder Lieferung,</li>
|
||||
<li>Anzahlung, Gesamtbetrag, Restbetrag und Rechnungsstatus,</li>
|
||||
<li>Buchungsstatus, zugeordneter Mitarbeiter, bearbeitender Benutzer sowie Anlege- und Änderungszeitpunkte,</li>
|
||||
<li>bei Rechnungserstellung die für die Rechnung erforderlichen Angaben.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Die Daten werden benötigt, um die Anfrage zu bearbeiten, den Mietvertrag durchzuführen, Übergabe und
|
||||
Rücknahme zu organisieren, Erinnerungen zu erzeugen und die Leistung abzurechnen. Wir erheben die Daten
|
||||
direkt bei Ihnen im Rahmen der Anfrage und Buchung; eine Erhebung bei Dritten findet nicht statt.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlagen: Art. 6 Abs. 1 lit. b DSGVO (Vertragsanbahnung und Vertragsdurchführung); für
|
||||
Rechnungs- und Buchhaltungsdaten Art. 6 Abs. 1 lit. c DSGVO in Verbindung mit § 147 Abgabenordnung und
|
||||
§ 257 Handelsgesetzbuch; für die Geltendmachung und Abwehr von Ansprüchen Art. 6 Abs. 1 lit. f DSGVO.
|
||||
</p>
|
||||
<p class="legal-note">
|
||||
Bankverbindungen oder Zahlungsdaten werden in der Anwendung nicht gespeichert. Erfasst werden nur
|
||||
Beträge und die Rechnungsmarkierung.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="mitarbeiter">
|
||||
<h2>5. Mitarbeiterkonten und Zugriff</h2>
|
||||
<p>
|
||||
Für die Anmeldung verarbeiten wir Vor- und Nachname, das Passwort (ausschließlich als sicherer Hash),
|
||||
Rolle, Status, gegebenenfalls die E-Mail-Adresse, die Verknüpfung zum Mitarbeiterkonto, den Zeitpunkt
|
||||
der letzten Anmeldung und der letzten Passwortänderung. Die Kontodaten werden beim Anlegen des Kontos
|
||||
durch den Administrator erhoben. Für die Funktion „Auf diesem Gerät angemeldet bleiben“ speichern wir
|
||||
einen Selector und den Hash eines Tokens mit Ablaufdatum; das eigentliche Token liegt nur im Cookie des
|
||||
Geräts.
|
||||
</p>
|
||||
<p>
|
||||
Zur Abwehr von Angriffsversuchen speichern wir bei fehlgeschlagenen Anmeldungen die IP-Adresse, einen
|
||||
Schlüssel aus dem eingegebenen Namen und den Zeitpunkt. Diese Einträge werden spätestens nach
|
||||
24 Stunden gelöscht.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlagen: § 26 Abs. 1 BDSG (Beschäftigtenverhältnis) sowie Art. 6 Abs. 1 lit. b und lit. f
|
||||
DSGVO. Die Anwendung ist nur nach Anmeldung erreichbar. Konten werden ausschließlich vom Administrator
|
||||
angelegt. Angemeldete Mitarbeiter können die Buchungs- und Kundendaten einsehen, soweit dies für ihre
|
||||
Aufgaben erforderlich ist. Für die Zuordnung von Buchungen und Erinnerungen speichern wir außerdem den
|
||||
Namen des Mitarbeiters.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="erinnerungen">
|
||||
<h2>6. Erinnerungen und Versandprotokolle</h2>
|
||||
<p>
|
||||
Erinnerungen an Übergaben und Rücknahmen werden aus den Buchungsdaten berechnet. Beim Abhaken wird
|
||||
gespeichert, welcher Benutzer die Erinnerung wann erledigt hat. Beim Versand von E-Mail- oder
|
||||
Push-Erinnerungen wird protokolliert, welche Erinnerung wann an welchen Empfänger gesendet wurde, damit
|
||||
keine doppelten Benachrichtigungen entstehen.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlagen: Art. 6 Abs. 1 lit. b und lit. f DSGVO. Versandprotokolle werden nach einem Jahr
|
||||
gelöscht.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="push">
|
||||
<h2>7. Web-Push-Benachrichtigungen</h2>
|
||||
<p>
|
||||
Wenn Sie in der App die App-Erinnerungen aktivieren, speichern wir den vom Browser erzeugten
|
||||
Push-Endpunkt, den öffentlichen Schlüssel (p256dh), das Authentifizierungsgeheimnis (auth), den
|
||||
User-Agent, Zeitstempel sowie den letzten Erfolgs- oder Fehlerstatus.
|
||||
</p>
|
||||
<p>
|
||||
Die Zustellung erfolgt über den Push-Dienst des von Ihnen verwendeten Browsers, zum Beispiel Google,
|
||||
Mozilla, Apple oder Microsoft. Dabei kann eine Übermittlung in die USA erfolgen; die Anbieter stützen
|
||||
sich auf geeignete Garantien.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlage ist Ihre Einwilligung nach Art. 6 Abs. 1 lit. a DSGVO. Sie erteilen sie durch das
|
||||
Aktivieren in der App und die Freigabe der Benachrichtigungen im Browser. Sie können die Einwilligung
|
||||
jederzeit widerrufen, indem Sie den Schalter in der App deaktivieren, die Benachrichtigungsberechtigung
|
||||
im Browser entziehen oder Ihr Konto löschen lassen. Beim Deaktivieren in der App löschen wir den
|
||||
Push-Eintrag; abgelaufene Abos entfernen wir automatisch.
|
||||
</p>
|
||||
<p class="legal-note">
|
||||
Hinweis: Benachrichtigungstexte enthalten den Kundennamen, den Anhänger und den Mietzeitraum und können
|
||||
auf dem Sperrbildschirm sichtbar sein. Wenn Sie das nicht möchten, deaktivieren Sie die
|
||||
App-Erinnerungen.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="email">
|
||||
<h2>8. E-Mail-Erinnerungen</h2>
|
||||
<p>
|
||||
Wenn für Ihr Benutzerkonto eine E-Mail-Adresse hinterlegt ist und der E-Mail-Versand aktiviert ist,
|
||||
senden wir Ihnen täglich eine Zusammenfassung fälliger Erinnerungen. Verarbeitet werden dabei Name,
|
||||
E-Mail-Adresse, Buchungsdaten und Versandzeitpunkt.
|
||||
</p>
|
||||
<p>
|
||||
Rechtsgrundlagen: § 26 Abs. 1 BDSG beziehungsweise Art. 6 Abs. 1 lit. b DSGVO für dienstliche
|
||||
Kommunikation sowie Art. 6 Abs. 1 lit. f DSGVO für einen zuverlässigen Betrieb. Der Versand erfolgt über
|
||||
den Mailserver des Hosting-Anbieters. E-Mail ist kein Ende-zu-Ende-verschlüsselter Kanal; der Inhalt
|
||||
kann auf dem Transportweg von Dritten eingesehen werden.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="cookies">
|
||||
<h2>9. Cookies und lokale Speicherung</h2>
|
||||
<p>
|
||||
Wir verwenden ausschließlich technisch notwendige Cookies und lokale Speicherung. Es gibt keine
|
||||
Marketing-, Analyse- oder Tracking-Cookies und keine Cookies von Drittanbietern. Weil ausschließlich
|
||||
technisch notwendige Cookies eingesetzt werden, ist kein Cookie-Banner erforderlich.
|
||||
</p>
|
||||
<div class="legal-table-wrap">
|
||||
<table class="legal-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Zweck</th>
|
||||
<th scope="col">Laufzeit</th>
|
||||
<th scope="col">Grundlage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>DIC_SESSION</code></td>
|
||||
<td>Sitzungskennung für die Anmeldung und den CSRF-Schutz</td>
|
||||
<td>bis zum Schließen des Browsers; serverseitig höchstens <?= $sessionDays ?> Tage</td>
|
||||
<td>§ 25 Abs. 2 TDDDG</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DIC_REMEMBER</code></td>
|
||||
<td>„Auf diesem Gerät angemeldet bleiben“ mit rotierendem Token</td>
|
||||
<td><?= $rememberDays ?> Tage</td>
|
||||
<td>§ 25 Abs. 2 TDDDG</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>dic-toast</code> (sessionStorage)</td>
|
||||
<td>kurze Statusmeldung nach einer Aktion</td>
|
||||
<td>bis zum Schließen des Tabs</td>
|
||||
<td>§ 25 Abs. 2 TDDDG</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>
|
||||
Für die Anmeldedaten ist zusätzlich Art. 6 Abs. 1 lit. b beziehungsweise lit. f DSGVO die
|
||||
Rechtsgrundlage. Der Service Worker speichert statische Dateien wie CSS, JavaScript, Icons und die
|
||||
Offline-Seite im Browser-Cache, damit die App schneller lädt und offline einen Hinweis zeigt. Buchungen
|
||||
und HTML-Seiten werden nicht gecacht. Dabei werden keine personenbezogenen Daten an uns übertragen.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="empfaenger">
|
||||
<h2>10. Empfänger und Auftragsverarbeitung</h2>
|
||||
<p>Empfänger der Daten sind nur die Stellen, die sie für die genannten Zwecke benötigen:</p>
|
||||
<ul>
|
||||
<li>der Hosting-Anbieter <?= e($info['hosting_provider']) ?> für Webspace, Datenbank und E-Mail-Versand,</li>
|
||||
<li>der Push-Dienst des jeweiligen Browsers bei aktivierten App-Erinnerungen,</li>
|
||||
<li>IT-Dienstleister, soweit sie mit Betrieb, Wartung oder Weiterentwicklung der Anwendung beauftragt sind,</li>
|
||||
<li>Steuerberater, Banken, Rechtsanwälte oder Behörden, soweit dies gesetzlich vorgeschrieben oder zur Vertragsdurchführung erforderlich ist.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Eine Weitergabe zu Werbe- oder Analysezwecken findet nicht statt. Daten werden nicht verkauft. Der
|
||||
Hosting-Anbieter verarbeitet die Daten ausschließlich in unserem Auftrag und nach unseren Weisungen.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="drittland">
|
||||
<h2>11. Übermittlung in Drittländer</h2>
|
||||
<p>
|
||||
Die Anwendung und die Datenbank werden in Deutschland gehostet. Eine Übermittlung in Drittländer kann
|
||||
im Zusammenhang mit Push-Benachrichtigungen erfolgen, wenn der Push-Dienst des verwendeten Browsers
|
||||
seinen Sitz außerhalb der Europäischen Union hat, sowie bei E-Mails, wenn der Mailanbieter des
|
||||
Empfängers außerhalb der Europäischen Union ansässig ist. Für Push ist Rechtsgrundlage Ihre
|
||||
Einwilligung nach Art. 6 Abs. 1 lit. a DSGVO, für dienstliche E-Mails Art. 6 Abs. 1 lit. b
|
||||
beziehungsweise lit. f DSGVO. Die Anbieter stützen sich auf geeignete Garantien, zum Beispiel
|
||||
EU-Standardvertragsklauseln oder eine Angemessenheitsentscheidung.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="dauer">
|
||||
<h2>12. Speicherdauer</h2>
|
||||
<ul>
|
||||
<li><strong>Buchungen:</strong> bis zur Beendigung des Mietverhältnisses und vollständigen Abwicklung; danach werden die Daten gelöscht oder anonymisiert, sobald keine gesetzlichen Aufbewahrungspflichten entgegenstehen.</li>
|
||||
<li><strong>Rechnungs- und Buchhaltungsdaten:</strong> <?= $invoiceYears ?> Jahre (§ 147 Abgabenordnung, § 257 Handelsgesetzbuch).</li>
|
||||
<li><strong>Sonstige Buchungsdaten:</strong> bis zum Ablauf der regelmäßigen Verjährungsfrist von <?= $limitationYears ?> Jahren zum Jahresende (§§ 195, 199 BGB), soweit sie zur Geltendmachung oder Abwehr von Ansprüchen erforderlich sind.</li>
|
||||
<li><strong>Stornierte Buchungen:</strong> Löschung, sobald kein Aufbewahrungsgrund mehr besteht.</li>
|
||||
<li><strong>Mitarbeiterkonten:</strong> für die Dauer des Beschäftigungsverhältnisses; danach Löschung, sobald keine gesetzlichen Aufbewahrungspflichten entgegenstehen.</li>
|
||||
<li><strong>Login-Fehlversuche:</strong> 24 Stunden.</li>
|
||||
<li><strong>Remember-Tokens:</strong> <?= $rememberDays ?> Tage oder bis zur Abmeldung.</li>
|
||||
<li><strong>Push-Abos:</strong> bis zum Widerruf oder zur Löschung des Kontos; abgelaufene Abos werden entfernt.</li>
|
||||
<li><strong>Versandprotokolle:</strong> 1 Jahr.</li>
|
||||
<li><strong>Server-Logfiles:</strong> in der Regel maximal <?= $logDays ?> Tage.</li>
|
||||
<li><strong>Datensicherungen:</strong> nur so lange, wie es für eine Wiederherstellung erforderlich ist; anschließend werden sie überschrieben.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="rechte">
|
||||
<h2>13. Ihre Rechte</h2>
|
||||
<p>Sie haben nach der DSGVO insbesondere folgende Rechte:</p>
|
||||
<ul>
|
||||
<li>Auskunft über die verarbeiteten Daten (Art. 15 DSGVO),</li>
|
||||
<li>Berichtigung unrichtiger Daten (Art. 16 DSGVO),</li>
|
||||
<li>Löschung (Art. 17 DSGVO),</li>
|
||||
<li>Einschränkung der Verarbeitung (Art. 18 DSGVO),</li>
|
||||
<li>Datenübertragbarkeit (Art. 20 DSGVO),</li>
|
||||
<li>Widerspruch gegen Verarbeitungen auf Grundlage berechtigter Interessen (Art. 21 DSGVO),</li>
|
||||
<li>Widerruf einer erteilten Einwilligung mit Wirkung für die Zukunft (Art. 7 Abs. 3 DSGVO).</li>
|
||||
</ul>
|
||||
<p>
|
||||
Zur Ausübung genügt eine E-Mail an <a href="mailto:<?= e($info['email']) ?>"><?= e($info['email']) ?></a>
|
||||
oder ein Anruf unter <?php if ($info['phone_href'] !== ''): ?><a href="<?= e($info['phone_href']) ?>"><?= e($info['phone']) ?></a><?php else: ?><?= e($info['phone']) ?><?php endif; ?>.
|
||||
Wir können zur Identitätsprüfung Rückfragen stellen.
|
||||
</p>
|
||||
<p>
|
||||
Sie haben außerdem das Recht, sich bei einer Datenschutz-Aufsichtsbehörde zu beschweren. Zuständig ist:
|
||||
</p>
|
||||
<address class="legal-address">
|
||||
<strong><?= e($info['supervisory_authority']) ?></strong><br>
|
||||
<?= e($info['supervisory_address']) ?><br>
|
||||
Telefon: <?= e($info['supervisory_phone']) ?><br>
|
||||
E-Mail: <a href="mailto:<?= e($info['supervisory_email']) ?>"><?= e($info['supervisory_email']) ?></a><br>
|
||||
<a href="<?= e($info['supervisory_url']) ?>" rel="noopener noreferrer"><?= e($info['supervisory_url']) ?></a>
|
||||
</address>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="automatisierung">
|
||||
<h2>14. Keine automatisierte Entscheidungsfindung</h2>
|
||||
<p>
|
||||
Eine automatisierte Entscheidungsfindung einschließlich Profiling im Sinne des Art. 22 DSGVO findet
|
||||
nicht statt.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="bereitstellung">
|
||||
<h2>15. Bereitstellung der Daten</h2>
|
||||
<p>
|
||||
Die für eine Buchung erforderlichen Daten müssen angegeben werden; ohne sie kann kein Mietvertrag
|
||||
geschlossen werden. Es besteht keine gesetzliche Pflicht, darüber hinausgehende Daten bereitzustellen.
|
||||
Für ein Mitarbeiterkonto sind die angegebenen Daten erforderlich, um die Anwendung nutzen zu können.
|
||||
Eine Weitergabe der Daten an Dritte zu Werbezwecken findet nicht statt.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="sicherheit">
|
||||
<h2>16. Datensicherheit</h2>
|
||||
<ul>
|
||||
<li>Die Übertragung erfolgt über HTTPS; HTTP-Aufrufe werden auf HTTPS umgeleitet, und es wird HSTS gesetzt.</li>
|
||||
<li>Passwörter werden nur als sicherer Hash (Argon2id, ersatzweise bcrypt) gespeichert und sind nicht im Klartext auslesbar.</li>
|
||||
<li>Formulare sind durch CSRF-Token geschützt; eine Content-Security-Policy und weitere Sicherheitsheader begrenzen Angriffsflächen.</li>
|
||||
<li>Die Anwendung ist nur nach Anmeldung erreichbar; Konten werden ausschließlich vom Administrator angelegt.</li>
|
||||
<li>Es werden keine externen Content-Delivery-Netzwerke, Schriftarten oder Analyse-Dienste eingebunden.</li>
|
||||
<li>Regelmäßige Datensicherungen helfen, Daten nach einem Ausfall wiederherzustellen.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="aenderungen">
|
||||
<h2>17. Änderungen</h2>
|
||||
<p>
|
||||
Wir passen diese Datenschutzerklärung an, wenn sich die Datenverarbeitung oder die rechtlichen
|
||||
Rahmenbedingungen ändern. Es gilt die jeweils auf dieser Seite veröffentlichte Fassung.
|
||||
</p>
|
||||
<p class="legal-meta">Stand: <?= e($info['privacy_version']) ?></p>
|
||||
<p><a class="legal-backlink" href="<?= e(url('/impressum')) ?>">Zum Impressum</a></p>
|
||||
</section>
|
||||
106
views/legal_impressum.php
Normal file
106
views/legal_impressum.php
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
/** @var array $info */
|
||||
$owner = trim((string) $info['owner']);
|
||||
$vatId = trim((string) $info['vat_id']);
|
||||
$registerCourt = trim((string) $info['register_court']);
|
||||
$registerNumber = trim((string) $info['register_number']);
|
||||
$responsible = $owner !== '' ? $owner : (string) $info['business_name'];
|
||||
?>
|
||||
<p class="legal-eyebrow">Rechtliche Angaben</p>
|
||||
<h1>Impressum</h1>
|
||||
<p class="legal-lead">Angaben gemäß § 5 Digitale-Dienste-Gesetz (DDG)</p>
|
||||
|
||||
<section class="legal-section" id="anbieter">
|
||||
<h2>Anbieter</h2>
|
||||
<address class="legal-address">
|
||||
<strong><?= e($info['business_name']) ?></strong><br>
|
||||
<?php if ($owner !== ''): ?>Inhaber: <?= e($owner) ?><br><?php endif; ?>
|
||||
<?= e($info['street']) ?><br>
|
||||
<?= e($info['postal_code']) ?> <?= e($info['city']) ?><br>
|
||||
<?= e($info['country']) ?>
|
||||
</address>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="kontakt">
|
||||
<h2>Kontakt</h2>
|
||||
<p>
|
||||
Telefon: <?php if ($info['phone_href'] !== ''): ?><a href="<?= e($info['phone_href']) ?>"><?= e($info['phone']) ?></a><?php else: ?><?= e($info['phone']) ?><?php endif; ?><br>
|
||||
E-Mail: <a href="mailto:<?= e($info['email']) ?>"><?= e($info['email']) ?></a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<?php if ($vatId !== ''): ?>
|
||||
<section class="legal-section" id="umsatzsteuer">
|
||||
<h2>Umsatzsteuer-Identifikationsnummer</h2>
|
||||
<p>Umsatzsteuer-Identifikationsnummer gemäß § 27a Umsatzsteuergesetz: <strong><?= e($vatId) ?></strong></p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($registerCourt !== '' || $registerNumber !== ''): ?>
|
||||
<section class="legal-section" id="register">
|
||||
<h2>Registereintrag</h2>
|
||||
<p>
|
||||
<?php if ($registerCourt !== ''): ?>Registergericht: <?= e($registerCourt) ?><?php endif; ?>
|
||||
<?php if ($registerCourt !== '' && $registerNumber !== ''): ?><br><?php endif; ?>
|
||||
<?php if ($registerNumber !== ''): ?>Registernummer: <?= e($registerNumber) ?><?php endif; ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="legal-section" id="inhalt">
|
||||
<h2>Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV</h2>
|
||||
<p>
|
||||
<?= e($responsible) ?><br>
|
||||
<?= e($info['street']) ?><br>
|
||||
<?= e($info['postal_code']) ?> <?= e($info['city']) ?>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="streitbeilegung">
|
||||
<h2>Verbraucherstreitbeilegung</h2>
|
||||
<p>
|
||||
Wir sind nicht bereit und nicht verpflichtet, an Streitbeilegungsverfahren vor einer
|
||||
Verbraucherschlichtungsstelle teilzunehmen.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section" id="haftung">
|
||||
<h2>Haftung für Inhalte</h2>
|
||||
<p>
|
||||
Als Diensteanbieter sind wir für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen
|
||||
verantwortlich. Für fremde Informationen, die wir übermitteln oder speichern, gelten die Beschränkungen
|
||||
der Verantwortlichkeit nach Art. 4 bis 8 der Verordnung (EU) 2022/2065 (Digital Services Act) und
|
||||
§ 7 DDG. Danach sind wir insbesondere nicht verpflichtet, übermittelte oder gespeicherte fremde
|
||||
Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit
|
||||
hinweisen. Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den
|
||||
allgemeinen Gesetzen bleiben hiervon unberührt.
|
||||
</p>
|
||||
|
||||
<h2>Haftung für Links</h2>
|
||||
<p>
|
||||
Unser Angebot enthält gegebenenfalls Links zu externen Websites Dritter, auf deren Inhalte wir keinen
|
||||
Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die
|
||||
Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten
|
||||
verantwortlich. Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist ohne konkrete
|
||||
Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden
|
||||
wir derartige Links umgehend entfernen.
|
||||
</p>
|
||||
|
||||
<h2>Urheberrecht</h2>
|
||||
<p>
|
||||
Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen
|
||||
Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der
|
||||
Grenzen des Urheberrechts bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers.
|
||||
Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="legal-section legal-section--note">
|
||||
<p>
|
||||
Diese Website ist der interne Terminplanungsbereich für die Kühlanhänger-Vermietung von
|
||||
<?= e($info['business_name']) ?>. Anfragen zur Vermietung richten Sie bitte an die oben genannten
|
||||
Kontaktdaten.
|
||||
</p>
|
||||
<p class="legal-meta">Stand: <?= e($info['privacy_version']) ?></p>
|
||||
<p><a class="legal-backlink" href="<?= e(url('/datenschutz')) ?>">Zur Datenschutzerklärung</a></p>
|
||||
</section>
|
||||
|
|
@ -103,8 +103,22 @@
|
|||
<svg class="ico" aria-hidden="true"><use href="#i-snow"/></svg>
|
||||
Kein Zugang? Benutzerkonten werden ausschließlich vom Administrator eingerichtet – eine Selbstregistrierung gibt es nicht.
|
||||
</p>
|
||||
|
||||
<p class="auth-card__legal">
|
||||
<a href="<?= e(url('/impressum')) ?>">Impressum</a>
|
||||
<span aria-hidden="true">·</span>
|
||||
<a href="<?= e(url('/datenschutz')) ?>">Datenschutz</a>
|
||||
<span aria-hidden="true">·</span>
|
||||
<span>Nur technisch notwendige Cookies, kein Tracking.</span>
|
||||
</p>
|
||||
</div>
|
||||
<p class="auth-foot">© <?= date('Y') ?> Drink it cold · Neuss</p>
|
||||
<footer class="auth-foot">
|
||||
<span>© <?= date('Y') ?> Drink it cold · Neuss</span>
|
||||
<nav aria-label="Rechtliches">
|
||||
<a href="<?= e(url('/impressum')) ?>">Impressum</a>
|
||||
<a href="<?= e(url('/datenschutz')) ?>">Datenschutz</a>
|
||||
</nav>
|
||||
</footer>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -541,6 +541,7 @@ a .ico, button .ico { pointer-events: none; }
|
|||
.form-side { display: grid; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
|
||||
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
|
||||
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
|
||||
.field-pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
|
||||
.field--wide { grid-column: 1 / -1; }
|
||||
.field > span, .field > label > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
|
||||
.field input, .field select, .field textarea {
|
||||
|
|
@ -972,3 +973,114 @@ a .ico, button .ico { pointer-events: none; }
|
|||
.detail-main { display: block; }
|
||||
.card { margin-bottom: 12px; }
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- Rechtsseiten */
|
||||
.legal-page { background: var(--white); }
|
||||
.legal-topbar {
|
||||
position: sticky; top: 0; z-index: 20;
|
||||
background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.legal-topbar__inner {
|
||||
max-width: 1000px; margin: 0 auto; padding: 13px var(--gutter);
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
|
||||
}
|
||||
.legal-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
|
||||
.legal-brand span { display: flex; flex-direction: column; line-height: 1.1; }
|
||||
.legal-brand strong { font-family: var(--font-display); font-size: 1rem; font-weight: 800; }
|
||||
.legal-brand small { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
|
||||
.legal-nav { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; }
|
||||
.legal-nav a { padding: 7px 10px; border-radius: 8px; color: var(--ink-2); }
|
||||
.legal-nav a:hover { background: var(--ice-50); color: var(--brand-700); }
|
||||
.legal-nav a[aria-current="page"] { background: var(--ice-100); color: var(--brand-700); }
|
||||
.legal-nav a.legal-nav__login { background: var(--brand); color: #fff; }
|
||||
.legal-nav a.legal-nav__login:hover { background: var(--brand-700); color: #fff; }
|
||||
|
||||
.legal { max-width: 900px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 56px; }
|
||||
.legal-card {
|
||||
background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl);
|
||||
box-shadow: var(--shadow); padding: clamp(24px, 4vw, 46px);
|
||||
}
|
||||
.legal-eyebrow {
|
||||
font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
|
||||
color: var(--brand); margin-bottom: 8px;
|
||||
}
|
||||
.legal-card h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
|
||||
.legal-card h2 { font-size: 1.15rem; margin: 0 0 10px; }
|
||||
.legal-lead { color: var(--muted); font-size: 1rem; max-width: 68ch; margin: 0 0 26px; }
|
||||
.legal-card p, .legal-card li { font-size: .94rem; line-height: 1.65; }
|
||||
.legal-card p { margin: 0 0 12px; }
|
||||
.legal-card ul, .legal-card ol { margin: 0 0 14px; padding-left: 1.3rem; }
|
||||
.legal-card li { margin: 4px 0; }
|
||||
.legal-card code {
|
||||
background: var(--ice-50); border: 1px solid var(--ice-200); border-radius: 5px;
|
||||
padding: 1px 5px; font-size: .85em; word-break: break-word;
|
||||
}
|
||||
.legal-toc {
|
||||
background: var(--ice-50); border: 1px solid var(--ice-200); border-radius: var(--radius);
|
||||
padding: 16px 20px; margin: 0 0 30px;
|
||||
}
|
||||
.legal-toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 28px; font-size: .88rem; }
|
||||
.legal-toc li { margin: 3px 0; break-inside: avoid; }
|
||||
.legal-section { margin-top: 26px; scroll-margin-top: 84px; }
|
||||
.legal-section + .legal-section { border-top: 1px solid var(--line-soft); padding-top: 26px; }
|
||||
.legal-address {
|
||||
font-style: normal; background: var(--ice-50); border: 1px solid var(--ice-200);
|
||||
border-radius: 10px; padding: 12px 15px; margin: 0 0 14px; line-height: 1.6;
|
||||
}
|
||||
.legal-note {
|
||||
background: var(--amber-soft); border-left: 3px solid var(--amber);
|
||||
padding: 10px 14px; border-radius: 0 8px 8px 0; color: var(--ink-2);
|
||||
}
|
||||
.legal-table-wrap { overflow-x: auto; margin: 0 0 16px; }
|
||||
.legal-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
|
||||
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 9px 11px; border-bottom: 1px solid var(--line); }
|
||||
.legal-table thead th { background: var(--ice-50); font-weight: 700; color: var(--ink); }
|
||||
.legal-meta { color: var(--muted); font-size: .8rem !important; }
|
||||
.legal-backlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
|
||||
.legal-backlink::before { content: "←"; }
|
||||
.legal-footer {
|
||||
max-width: 900px; margin: 0 auto; padding: 0 var(--gutter) 36px;
|
||||
display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
|
||||
color: var(--muted); font-size: .8rem;
|
||||
}
|
||||
.legal-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
|
||||
|
||||
.auth-card__legal {
|
||||
margin-top: 18px; color: var(--muted); font-size: .74rem; line-height: 1.6;
|
||||
display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
|
||||
}
|
||||
.auth-card__legal a { font-weight: 600; }
|
||||
.auth-foot nav { display: flex; gap: 12px; flex-wrap: wrap; }
|
||||
.footer__links { display: flex; gap: 14px; flex-wrap: wrap; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.legal-toc ol { columns: 1; }
|
||||
.legal-topbar__inner { align-items: flex-start; }
|
||||
.legal-nav { width: 100%; }
|
||||
.legal-nav a { padding: 6px 8px; }
|
||||
.legal-card { border-radius: var(--radius-lg); }
|
||||
}
|
||||
|
||||
@media print {
|
||||
.legal-topbar, .legal-footer, .legal-toc { display: none !important; }
|
||||
.legal { max-width: none; padding: 0; }
|
||||
.legal-card { border: 0; box-shadow: none; padding: 0; }
|
||||
}
|
||||
|
||||
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
|
||||
|
||||
.legal-section--note {
|
||||
background: var(--ice-50);
|
||||
border: 1px solid var(--ice-200);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px 18px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.legal-section { scroll-margin-top: 120px; }
|
||||
}
|
||||
|
||||
@media (min-width: 961px) {
|
||||
.auth-panel { padding-bottom: max(80px, calc(56px + env(safe-area-inset-bottom))); }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,11 @@
|
|||
const startInput = bookingForm.querySelector('[data-date-start]');
|
||||
const endInput = bookingForm.querySelector('[data-date-end]');
|
||||
const depositInput = bookingForm.querySelector('[data-money="deposit"]');
|
||||
const totalInput = bookingForm.querySelector('[data-money="total"]');
|
||||
const rentInput = bookingForm.querySelector('[data-money="rent"]');
|
||||
const deliveryInput = bookingForm.querySelector('[data-money="delivery"]');
|
||||
const totalOutput = bookingForm.querySelector('[data-total-output]');
|
||||
const startTimeInput = bookingForm.querySelector('[data-time-start]');
|
||||
const endTimeInput = bookingForm.querySelector('[data-time-end]');
|
||||
const dueOutput = bookingForm.querySelector('[data-due]');
|
||||
const conflictBox = bookingForm.querySelector('[data-conflict]');
|
||||
const availabilityUrl = bookingForm.dataset.availabilityUrl;
|
||||
|
|
@ -218,9 +222,13 @@
|
|||
const [y, m, d] = iso.split('-');
|
||||
return `${d}.${m}.${y}`;
|
||||
};
|
||||
const formatRange = (a, b) => {
|
||||
const formatDateTime = (iso, time) => {
|
||||
const date = formatDate(iso);
|
||||
return time ? `${date} ${time}` : date;
|
||||
};
|
||||
const formatRange = (a, b, aTime, bTime) => {
|
||||
if (!a || !b) return '–';
|
||||
return a === b ? formatDate(a) : `${formatDate(a)} – ${formatDate(b)}`;
|
||||
return a === b ? formatDateTime(a, aTime) : `${formatDateTime(a, aTime)} – ${formatDateTime(b, bTime)}`;
|
||||
};
|
||||
const contrast = (hex) => {
|
||||
const clean = String(hex || '').replace('#', '');
|
||||
|
|
@ -254,13 +262,20 @@
|
|||
};
|
||||
|
||||
const updateTotals = () => {
|
||||
const rent = parseMoney(rentInput?.value);
|
||||
const delivery = parseMoney(deliveryInput?.value);
|
||||
const total = rent + delivery;
|
||||
const deposit = parseMoney(depositInput?.value);
|
||||
const total = parseMoney(totalInput?.value);
|
||||
const due = total - deposit;
|
||||
if (totalOutput) totalOutput.textContent = formatMoney(total);
|
||||
if (dueOutput) dueOutput.textContent = formatMoney(due);
|
||||
const totalSummary = bookingForm.querySelector('[data-summary-total]');
|
||||
const rentSummary = bookingForm.querySelector('[data-summary-rent]');
|
||||
const deliverySummary = bookingForm.querySelector('[data-summary-delivery]');
|
||||
const depositSummary = bookingForm.querySelector('[data-summary-deposit]');
|
||||
const dueSummary = bookingForm.querySelector('[data-summary-due]');
|
||||
if (rentSummary) rentSummary.textContent = formatMoney(rent);
|
||||
if (deliverySummary) deliverySummary.textContent = formatMoney(delivery);
|
||||
if (totalSummary) totalSummary.textContent = formatMoney(total);
|
||||
if (depositSummary) depositSummary.textContent = formatMoney(deposit);
|
||||
if (dueSummary) dueSummary.textContent = formatMoney(due);
|
||||
|
|
@ -268,7 +283,7 @@
|
|||
|
||||
const updateSummary = () => {
|
||||
const dates = bookingForm.querySelector('[data-summary-dates]');
|
||||
if (dates) dates.textContent = formatRange(startInput?.value, endInput?.value);
|
||||
if (dates) dates.textContent = formatRange(startInput?.value, endInput?.value, startTimeInput?.value, endTimeInput?.value);
|
||||
const employee = bookingForm.querySelector('[data-summary-employee]');
|
||||
if (employee && employeeSelect) {
|
||||
employee.textContent = employeeSelect.selectedOptions[0]?.textContent.trim() || '–';
|
||||
|
|
@ -342,7 +357,10 @@
|
|||
});
|
||||
endInput?.addEventListener('change', () => { updateSummary(); checkAvailability(); });
|
||||
depositInput?.addEventListener('input', updateTotals);
|
||||
totalInput?.addEventListener('input', updateTotals);
|
||||
rentInput?.addEventListener('input', updateTotals);
|
||||
deliveryInput?.addEventListener('input', updateTotals);
|
||||
startTimeInput?.addEventListener('input', updateSummary);
|
||||
endTimeInput?.addEventListener('input', updateSummary);
|
||||
|
||||
updateTrailer();
|
||||
updateTotals();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue