36 lines
1.4 KiB
PHTML
36 lines
1.4 KiB
PHTML
<?php include dirname(__DIR__) . '/header.phtml'; ?>
|
|
|
|
<div class="inhalt">
|
|
<h2>Alle Gutscheine</h2>
|
|
<a href="?controller=Gutschein&do=createGutscheinForm">Neuen Gutschein anlegen</a>
|
|
<?php if (!empty($gutscheine)): ?>
|
|
<table border="1" cellpadding="8" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Rabatt (%)</th>
|
|
<th>Event-ID</th>
|
|
<th>Gültig bis</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($gutscheine as $g): ?>
|
|
<tr>
|
|
<td><?php echo htmlspecialchars($g['code']); ?></td>
|
|
<td><?php echo (int)$g['discount']; ?></td>
|
|
<td><?php echo (int)$g['event_id']; ?></td>
|
|
<td><?php echo htmlspecialchars($g['valid_until']); ?></td>
|
|
<td>
|
|
<a href="?controller=Gutschein&action=editGutscheinForm&id=<?php echo $g['gutscheinid']; ?>">Bearbeiten</a> |
|
|
<a href="?controller=Gutschein&action=deleteGutschein&id=<?php echo $g['gutscheinid']; ?>" onclick="return confirm('Wirklich löschen?');">Löschen</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<p>Keine Gutscheine vorhanden.</p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php include dirname(__DIR__) . '/footer.phtml'; ?> |