showNews angebindet und zum laufen gebracht.

This commit is contained in:
Max Schneider 2025-07-07 14:19:52 +02:00
parent 3dc68dd0bc
commit 717d361dbb
4 changed files with 6 additions and 12 deletions

View File

@ -1,6 +1,3 @@
<?php if (!empty($events)): ?>
<div class="inhalt">
<div class="event-container">
@ -33,4 +30,4 @@
<?php endif; ?>
</div>
</div>
</div>
</div>

View File

@ -1,8 +1,7 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<h2>Alle News</h2>
<?php if (!empty($news)): ?>
<h2>Alle News</h2>
<table>
<thead>
<tr>
@ -15,14 +14,12 @@
<?php foreach ($news as $item): ?>
<tr>
<td><?php echo htmlspecialchars($item['name']); ?></td>
<td><?php echo nl2br(htmlspecialchars($item['beschreibung'])); ?></td>
<td><?php echo date('d.m.Y', strtotime($item['datum'])); ?></td>
<td><?php echo nl2br(htmlspecialchars($item['description'])); ?></td>
<td><?php echo date('d.m.Y', strtotime($item['date'])); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>Derzeit sind keine News verfügbar.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>
<?php endif; ?>

View File

@ -13,7 +13,7 @@
<button id="nav-toggle-btn" aria-label="Menü ein-/ausklappen">&#9660;</button>
<div class="nav-links">
<a id="link-tickets" class="links" href="?controller=Event&do=showEvents">Event</a>
<a id="link-infos" class="links" href="?controller=Welcome&do=showWelcome">Infos</a>
<a id="link-infos" class="links" href="?controller=News&do=showNews">Infos</a>
<a id="link-profil" class="links" href="?controller=Profile&do=showProfile">Profil</a>
<a id="link-login" class="links" href="?controller=Auth&do=showLoginForm">Login</a>
<a id="link-register" class="links" href="?controller=Auth&do=showRegistrationForm">Register</a>