Merge remote-tracking branch 'origin/main'

# Conflicts:
#	CSS/style.css
This commit is contained in:
2025-07-10 11:43:11 +02:00
13 changed files with 376 additions and 139 deletions

View File

@@ -134,6 +134,26 @@ class UserController{
}
}
public function validateEditKursForm(){
foreach ($this->kursLabels as $index => $value) {
if($value === "|") continue;
if (strpos($value, "*") !== false && (!isset($_POST[$index]) || empty($_POST[$index]))) {
$this->kursErrors[$index] = "Bitte " . $value . " eingeben";
} else {
$this->kursValidData[$index] = $_POST[$index] === '' ? null : $_POST[$index];
}
}
if (count($this->errors) > 0) {
$this->view->setDoMethodName("showUserAccountPage");
$this->showUserAccountPage();
} else {
if ($this->db->writeNewCourse($this->kursValidData, $_SESSION["user_id"])) {
$this->view->setDoMethodName("showKursEditedConfirmation");
$this->showConfirmation();
}
}
}
public function showConfirmation(){}
public function showUserLoginConfirmation(){