Files
flixcooks-website/datenschutz.php
T

93 lines
4.3 KiB
PHP

<?php
require __DIR__ . '/helpers.php';
$lang = strtolower((string) (filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?: 'en')) === 'de' ? 'de' : 'en';
$settings = load_site_settings();
$privacy = $settings['privacy'][$lang] ?? ($settings['privacy']['en'] ?? []);
$langSwitchLabel = $lang === 'de' ? 'DE' : 'EN';
$langSwitchHref = lang_url($lang === 'de' ? 'en' : 'de');
$navHome = $lang === 'de' ? 'Start' : 'Home';
$navLatest = $lang === 'de' ? 'Neueste' : 'Latest';
$navBasics = $lang === 'de' ? 'Basics' : 'Basics';
$t = [
'title' => $lang === 'de' ? 'Datenschutzerklärung' : 'Privacy Policy',
'controller' => $lang === 'de' ? 'Verantwortlicher' : 'Controller',
'address' => $lang === 'de' ? 'Adresse' : 'Address',
'contact' => $lang === 'de' ? 'Kontakt für Datenschutz' : 'Privacy contact',
'hosting' => $lang === 'de' ? 'Hosting' : 'Hosting',
'logs' => $lang === 'de' ? 'Server-Logs' : 'Server logs',
'cookies' => $lang === 'de' ? 'Cookies' : 'Cookies',
'purposes' => $lang === 'de' ? 'Zwecke der Datenverarbeitung' : 'Purposes of processing',
'rights' => $lang === 'de' ? 'Ihre Rechte' : 'Your rights',
'last_updated' => $lang === 'de' ? 'Stand' : 'Last updated',
];
function privacy_item(string $label, ?string $value): void {
$value = trim((string) $value);
if ($value === '') {
return;
}
echo '<div class="legal-item"><span class="legal-label">' . e($label) . '</span><span>' . nl2br(e($value)) . '</span></div>';
}
$rights = $lang === 'de'
? 'Auskunft, Berichtigung, Löschung, Einschränkung, Datenübertragbarkeit, Widerspruch, Beschwerde bei der Datenschutzbehörde.'
: 'Access, rectification, erasure, restriction, data portability, objection, complaint to the data protection authority.';
$logInfo = '';
if (!empty($privacy['log_retention_days'])) {
$logInfo = ($lang === 'de'
? 'Server-Logs (IP-Adresse, Zeitpunkt, URL, User-Agent) werden zur Betriebssicherheit gespeichert und nach '
: 'Server logs (IP address, timestamp, URL, user agent) are kept for security and deleted after ')
. intval($privacy['log_retention_days']) . ($lang === 'de' ? ' Tagen gelöscht.' : ' days.');
}
?>
<!doctype html>
<html lang="<?php echo e($lang); ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo e($t['title']); ?> | FlixCooks</title>
<link rel="stylesheet" href="/assets/style.css">
<style>
.legal-page { max-width: 900px; margin: 40px auto 80px; padding: 0 16px; }
.legal-card { background: var(--surface-2); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.08); }
.legal-item { display: grid; grid-template-columns: 220px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.legal-item:last-child { border-bottom: none; }
.legal-label { font-weight: 700; color: var(--ink); }
.legal-section { margin-top: 22px; }
.legal-section h2 { margin: 0 0 8px; }
@media (max-width: 600px) {
.legal-item { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<?php include __DIR__ . '/partials/header.php'; ?>
<main class="legal-page">
<h1><?php echo e($t['title']); ?></h1>
<p><?php echo $lang === 'de'
? 'Informationen gemäß DSGVO und TKG über die Verarbeitung personenbezogener Daten.'
: 'Information per GDPR and TKG on how personal data is processed.'; ?></p>
<div class="legal-card legal-section">
<h2><?php echo e($t['controller']); ?></h2>
<?php
privacy_item($t['controller'], $privacy['controller'] ?? '');
privacy_item($t['address'], $privacy['address'] ?? '');
privacy_item($t['contact'], ($privacy['contact_email'] ?? '') . ($privacy['contact_phone'] ? ' | ' . $privacy['contact_phone'] : ''));
privacy_item($t['hosting'], $privacy['hosting_provider'] ?? '');
privacy_item($t['purposes'], $privacy['purposes'] ?? '');
if ($logInfo) { privacy_item($t['logs'], $logInfo); }
privacy_item($t['cookies'], $privacy['cookie_statement'] ?? '');
privacy_item($t['rights'], $rights);
privacy_item($t['last_updated'], $privacy['last_updated'] ?? '');
?>
</div>
</main>
<?php include __DIR__ . '/partials/footer.php'; ?>
</body>
</html>