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:
2025-07-01 09:59:25 +02:00
parent d24d914c8c
commit 8a59ddde8e
25 changed files with 493 additions and 529 deletions

View File

@@ -23,13 +23,13 @@ class EventController {
public function createEvent() {
$data = [
'location_id' => $_POST['location_id'] ?? null,
'start_date' => $_POST['start_date'] ?? null,
'end_date' => $_POST['end_date'] ?? null,
'name' => $_POST['name'] ?? null,
'beschreibung' => $_POST['beschreibung'] ?? null,
'standortid' => $_POST['standortid'] ?? null,
'datum_von' => $_POST['datum_von'] ?? null,
'datum_bis' => $_POST['datum_bis'] ?? null,
'description' => $_POST['description'] ?? null,
'max_tickets' => $_POST['max_tickets'] ?? null,
'preis' => $_POST['preis'] ?? null
'ticket_price' => $_POST['ticket_price'] ?? null
];
$this->model->createEvent($data);
@@ -38,21 +38,21 @@ class EventController {
}
public function editEventForm() {
$id = $_GET['ausstellungid'];
$id = $_GET['event_id'];
$event = $this->model->getEvent($id);
$this->view->setVars(['event' => $event]);
}
public function updateEvent($id, $data) {
$id = $_POST['ausstellungid'];
$id = $_POST['event_id'];
$data = [
'standortid' => $_POST['standortid'] ?? null,
'datum_von' => $_POST['datum_von'] ?? null,
'datum_bis' => $_POST['datum_bis'] ?? null,
'location_id' => $_POST['location_id'] ?? null,
'start_date' => $_POST['start_date'] ?? null,
'end_date' => $_POST['end_date'] ?? null,
'name' => $_POST['name'] ?? null,
'beschreibung' => $_POST['beschreibung'] ?? null,
'description' => $_POST['description'] ?? null,
'max_tickets' => $_POST['max_tickets'] ?? null,
'preis' => $_POST['preis'] ?? null
'ticket_price' => $_POST['ticket_price'] ?? null
];
$this->model->updateEvent($id, $data);
}