fixed the redirect
to handle everything properly
This commit is contained in:
@@ -8,9 +8,10 @@ include dirname(__DIR__).'/header.phtml';
|
||||
|
||||
<?php if (isset($error)): ?>
|
||||
<div class="error-box"><?= htmlspecialchars($error) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($event)): ?>
|
||||
<div style="text-align:center; margin-top: 1.5em;">
|
||||
<a href="?controller=Event&do=showEvents">Zurück zu den Events</a>
|
||||
</div>
|
||||
<?php elseif (isset($event)): ?>
|
||||
<div class="event-details">
|
||||
<h2><?= htmlspecialchars($event['name']) ?></h2>
|
||||
<p><strong>Beschreibung:</strong> <?= nl2br(htmlspecialchars($event['description'])) ?></p>
|
||||
@@ -33,7 +34,7 @@ include dirname(__DIR__).'/header.phtml';
|
||||
<p>Möchten Sie ein Ticket für dieses Event kaufen?</p>
|
||||
<p><strong>Preis:</strong> <?= number_format($event['ticket_price'], 2, ',', '.') ?> €</p>
|
||||
|
||||
<button class="button-login" type="submit">Ticket kaufen</button>
|
||||
<button class="button-login" type="submit">Jetzt kaufen</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align:center; margin-top: 1.5em;">
|
||||
@@ -49,4 +50,10 @@ include dirname(__DIR__).'/header.phtml';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (isset($redirect)): ?>
|
||||
<script>
|
||||
window.location.href = '<?= $redirect ?>';
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
Reference in New Issue
Block a user