Files
AudioCore/views/partials/footer.php

33 lines
1.4 KiB
PHP
Raw Normal View History

<?php
$footerLinksRaw = Core\Services\Settings::get('footer_links_json', '[]');
$footerLinks = json_decode($footerLinksRaw, true);
if (!is_array($footerLinks)) {
$footerLinks = [];
}
?>
<footer class="shell shell-footer">
<div class="card" style="text-align:center; font-size:12px; color:var(--muted);">
<?php if ($footerLinks): ?>
<div style="display:flex; gap:14px; justify-content:center; align-items:center; flex-wrap:wrap; margin-bottom:10px;">
<?php foreach ($footerLinks as $link): ?>
<?php
$label = trim((string)($link['label'] ?? ''));
$url = trim((string)($link['url'] ?? '#'));
if ($label === '' || $url === '') {
continue;
}
$isExternal = (bool)preg_match('~^https?://~i', $url);
?>
<a href="<?= htmlspecialchars($url, ENT_QUOTES, 'UTF-8') ?>"
style="color:var(--muted); text-decoration:none; border-bottom:1px solid rgba(255,255,255,0.18); padding-bottom:2px;"
<?= $isExternal ? 'target="_blank" rel="noopener noreferrer"' : '' ?>>
<?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8') ?>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?= htmlspecialchars(Core\Services\Settings::get('footer_text', 'AudioCore V1.5'), ENT_QUOTES, 'UTF-8') ?>
- <?= date('Y') ?>
</div>
</footer>