Merge branch 'frontendBackendFinal' of https://git.bib.de/PBBFA23CSE/Bib-Arts into frontendBackendFinal

This commit is contained in:
2025-07-08 10:29:03 +02:00
7 changed files with 137 additions and 24 deletions

View File

@@ -1,12 +0,0 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="inhalt">
<div class="msg">
<p>Das Event "<?php echo $name?>" wurde erfolgreich erstellt!</p>
<a href="?controller=Event&do=showEvents">Weiter</a>
</div>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>

View File

@@ -0,0 +1,36 @@
<div class="inhalt">
<h2>Create Event</h2>
<form action="/Event/create" method="POST">
<label>Event Name:</label>
<input type="text" name="name" required><br>
<label>Start Date:</label>
<input type="date" name="start_date" required><br>
<label>End Date:</label>
<input type="date" name="end_date" required><br>
<label>Location:</label>
<select name="location_id" required>
<option value="">Select location</option>
<?php if (!empty($locations)): ?>
<?php foreach ($locations as $loc): ?>
<option value="<?= htmlspecialchars($loc['location_id']) ?>">
<?= htmlspecialchars($loc['city']) ?>, <?= htmlspecialchars($loc['street']) ?> <?= htmlspecialchars($loc['house_number']) ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select><br>
<label>Description:</label>
<textarea name="description" required></textarea><br>
<label>Max Tickets:</label>
<input type="number" name="max_tickets" required><br>
<label>Ticket Price:</label>
<input type="number" step="0.01" name="ticket_price" required><br>
<button type="submit">Create Event</button>
</form>
</div>

View File

@@ -0,0 +1,15 @@
<div class="inhalt">
<div class="create-forwarding">
<h2>Erstellen...</h2>
<p>Sie werden in wenigen Sekunden zu der Erstell Seite weitergeleitet...</p>
</div>
</div>
<script>
setTimeout(function() {
window.location.href = "?controller=Event&do=showCreateEvent";
}, 2000); // 2 Sekunden warten
</script>
<noscript>
<meta http-equiv="refresh" content="2;url=?controller=Event&do=showCreateEvent">
</noscript>

View File

@@ -0,0 +1,34 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="inhalt">
<h2>Update Event</h2>
<form action="/Event/update?id=<?= htmlspecialchars($event['id']) ?>" method="POST">
<label>Event Name:</label>
<input type="text" name="name" value="<?= htmlspecialchars($event['name']) ?>" required><br>
<label>Start Date:</label>
<input type="date" name="start_date" value="<?= htmlspecialchars($event['start_date']) ?>" required><br>
<label>End Date:</label>
<input type="date" name="end_date" value="<?= htmlspecialchars($event['end_date']) ?>" required><br>
<label>Location:</label>
<input type="text" name="location_name" value="<?= htmlspecialchars($event['location_name']) ?>" readonly><br>
<input type="hidden" name="location_id" value="<?= htmlspecialchars($event['location_id']) ?>">
<label>Description:</label>
<textarea name="description" required><?= htmlspecialchars($event['description']) ?></textarea><br>
<label>Max Tickets:</label>
<input type="number" name="max_tickets" value="<?= htmlspecialchars($event['max_tickets']) ?>" required><br>
<label>Ticket Price:</label>
<input type="number" step="0.01" name="ticket_price" value="<?= htmlspecialchars($event['ticket_price']) ?>" required><br>
<button type="submit">Update Event</button>
</form>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>

View File

@@ -0,0 +1,15 @@
<div class="inhalt">
<div class="update-forwarding">
<h2>Editieren...</h2>
<p>Sie werden in wenigen Sekunden zur Edit Seite weitergeleitet...</p>
</div>
</div>
<script>
setTimeout(function() {
window.location.href = "?controller=Event&do=showUpdateEvent";
}, 2000); // 2 Sekunden warten
</script>
<noscript>
<meta http-equiv="refresh" content="2;url=?controller=Event&do=showUpdateEvent">
</noscript>

View File

@@ -1,12 +0,0 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="inhalt">
<div class="msg">
<p>Das Event mit der ID "<?php echo $ausstellungid?>" wurde erfolgreich bearbeitet!</p>
<a href="?controller=Event&do=showEvents">Weiter</a>
</div>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>