Files
flixcooks-website/impressum.php
T

85 lines
3.9 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();
$imprint = $settings['imprint'][$lang] ?? ($settings['imprint']['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' ? 'Impressum' : 'Imprint',
'owner' => $lang === 'de' ? 'Medieninhaber' : 'Media owner',
'address' => $lang === 'de' ? 'Adresse' : 'Address',
'contact' => $lang === 'de' ? 'Kontakt' : 'Contact',
'legal' => $lang === 'de' ? 'Rechtliches' : 'Legal',
'purpose' => $lang === 'de' ? 'Unternehmensgegenstand / Blattlinie' : 'Business purpose / editorial line',
'authority' => $lang === 'de' ? 'Aufsichts-/Gewerbebehörde' : 'Supervisory authority',
'membership' => $lang === 'de' ? 'WKO-Mitgliedschaft' : 'Chamber membership',
'uid' => $lang === 'de' ? 'UID' : 'VAT ID',
'odr' => $lang === 'de' ? 'Online-Streitbeilegung (ODR)' : 'Online dispute resolution (ODR)',
'last_updated' => $lang === 'de' ? 'Stand' : 'Last updated',
];
function legal_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>';
}
?>
<!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'
? 'Pflichtangaben für diese Website gemäß ECG, MedienG und GewO.'
: 'Mandatory website information in line with Austrian ECG, Media Act and Trade Regulation.'; ?></p>
<div class="legal-card legal-section">
<h2><?php echo e($t['owner']); ?></h2>
<?php
legal_item($t['owner'], $imprint['owner_name'] ?? '');
legal_item($t['address'], $imprint['address'] ?? '');
legal_item($t['contact'], ($imprint['email'] ?? '') . ($imprint['phone'] ? ' | ' . $imprint['phone'] : ''));
legal_item($t['legal'], $imprint['legal_form'] ?? '');
legal_item($t['purpose'], $imprint['business_purpose'] ?? '');
legal_item($t['membership'], $imprint['wko_membership'] ?? '');
legal_item($t['authority'], $imprint['authority'] ?? '');
legal_item($t['uid'], $imprint['uid'] ?? '');
if (!empty($imprint['odr'])) {
echo '<div class="legal-item"><span class="legal-label">' . e($t['odr']) . '</span><span><a href="' . e($imprint['odr']) . '" target="_blank" rel="noopener">ODR-Link</a></span></div>';
}
legal_item($t['last_updated'], $imprint['last_updated'] ?? '');
?>
</div>
</main>
<?php include __DIR__ . '/partials/footer.php'; ?>
</body>
</html>