Standardmethoden für Standort und News.Events erweitert

This commit is contained in:
2025-06-23 11:10:46 +02:00
parent 6e3e3708b2
commit 1964cadd8c
10 changed files with 278 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<h2>Alle Ausstellungen</h2>
<?php if (!empty($events)): ?>
<table>
<thead>
<tr>
<th>Name</th>
<th>Beschreibung</th>
<th>Von</th>
<th>Bis</th>
<th>Max. Tickets</th>
</tr>
</thead>
<tbody>
<?php foreach ($events as $event): ?>
<tr>
<td><?php echo htmlspecialchars($event['name']); ?></td>
<td><?php echo nl2br(htmlspecialchars($event['beschreibung'])); ?></td>
<td><?php echo date('d.m.Y', strtotime($event['datum_von'])); ?></td>
<td><?php echo date('d.m.Y', strtotime($event['datum_bis'])); ?></td>
<td><?php echo (int) $event['max_tickets']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>Derzeit sind keine Ausstellungen verfügbar.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>

28
Views/News/showNews.phtml Normal file
View File

@@ -0,0 +1,28 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<h2>Alle News</h2>
<?php if (!empty($news)): ?>
<table>
<thead>
<tr>
<th>Name</th>
<th>Beschreibung</th>
<th>Datum</th>
</tr>
</thead>
<tbody>
<?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>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>Derzeit sind keine News verfügbar.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>

View File

@@ -0,0 +1,36 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<h2>Unsere Standorte</h2>
<?php if (!empty($standorte)): ?>
<table border="1" cellpadding="8" cellspacing="0">
<thead>
<tr>
<th>Straße</th>
<th>Hausnr.</th>
<th>PLZ</th>
<th>Ort</th>
<th>Land</th>
<th>Telefon</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php foreach ($standorte as $standort): ?>
<tr>
<td><?php echo htmlspecialchars($standort['straße']); ?></td>
<td><?php echo htmlspecialchars($standort['hausnr']); ?></td>
<td><?php echo htmlspecialchars($standort['postleitzahl']); ?></td>
<td><?php echo htmlspecialchars($standort['ort']); ?></td>
<td><?php echo htmlspecialchars($standort['land']); ?></td>
<td><?php echo htmlspecialchars($standort['tel']); ?></td>
<td><?php echo htmlspecialchars($standort['email']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>Keine Standorte gefunden.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>

View File

@@ -0,0 +1,11 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="msg">
<p>TEST</p>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>