Alles auf Englisch umbenannt: exhibition → event, Variablen und Tabellen angepasst, Views auf neue Felder umgestellt, Controller/Model/SQL konsistent gemacht. Alte Variablennamen raus, jetzt ist alles einheitlich. Fehler aus dem Frontend gefixt.
This commit is contained in:
7
Views/Voucher/createVoucher.phtml
Normal file
7
Views/Voucher/createVoucher.phtml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
<!-- Gutschein-Erstellungsformular oder Inhalt hier einfügen -->
|
||||
<?php
|
||||
include dirname(__DIR__).'/footer.phtml';
|
||||
?>
|
37
Views/Voucher/showVouchers.phtml
Normal file
37
Views/Voucher/showVouchers.phtml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
<h2>Alle Gutscheine</h2>
|
||||
<a href="?controller=Voucher&do=createVoucherForm">Neuen Gutschein anlegen</a>
|
||||
<?php if (!empty($vouchers)): ?>
|
||||
<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 ($vouchers as $v): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($v['code']); ?></td>
|
||||
<td><?php echo (int)$v['discount']; ?></td>
|
||||
<td><?php echo (int)$v['event_id']; ?></td>
|
||||
<td><?php echo htmlspecialchars($v['valid_until']); ?></td>
|
||||
<td>
|
||||
<a href="?controller=Voucher&do=editVoucherForm&id=<?php echo $v['voucher_id']; ?>">Bearbeiten</a> |
|
||||
<a href="?controller=Voucher&do=deleteVoucher&id=<?php echo $v['voucher_id']; ?>" onclick="return confirm('Wirklich löschen?');">Löschen</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Gutscheine vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
include dirname(__DIR__).'/footer.phtml';
|
||||
?>
|
Reference in New Issue
Block a user