Compare commits
25 Commits
ae3a653de4
...
main
Author | SHA1 | Date | |
---|---|---|---|
e426926692 | |||
07a56b31a6 | |||
3dc185b667 | |||
8cebf35c6d | |||
e5637d4929 | |||
c8499aa9d5 | |||
509c685d80 | |||
96e569c66d | |||
aa20731efc | |||
0ff636c20a | |||
a2b66de0be | |||
cee9220f6a | |||
633f8eb1e2 | |||
4e243976db | |||
af6f6238ae | |||
6fd7b8d918 | |||
3964f90a30 | |||
2c044b2498 | |||
3d0fcc42c4 | |||
449dd10302 | |||
7ce389d179 | |||
![]() |
b5118a699f | ||
2eadf75557 | |||
bc8ddbff4c | |||
ae554ab0a6 |
@@ -3,6 +3,7 @@ header {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
background-color: var(--brand-background);
|
||||
}
|
||||
|
||||
nav {
|
||||
|
@@ -18,6 +18,13 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
color: var(--brand-white);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--brand-primary);
|
||||
border-radius: 3px;
|
||||
@@ -56,3 +63,29 @@
|
||||
.btn-logout{
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.btn-userchange{
|
||||
background-color: var(--brand-white);
|
||||
color: var(--brand-background);
|
||||
}
|
||||
|
||||
/* Hovers */
|
||||
.btn-primary:hover {
|
||||
background-color: var(--brand-primary-hover);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-color: var(--bg-muted-hover);
|
||||
}
|
||||
|
||||
.btn-accent:hover {
|
||||
background-color: var(--fullblock-hover);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background-color: var(--error-hover);
|
||||
}
|
||||
|
||||
.btn-userchange:hover, .btn-logout:hover{
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* === Grundlayout === */
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--font-family-main);
|
||||
@@ -6,7 +6,6 @@ body {
|
||||
color: var(--brand-white);
|
||||
}
|
||||
|
||||
/* === Header-Bereich === */
|
||||
.welcome-header {
|
||||
text-align: center;
|
||||
margin: 60px 20px 40px 20px;
|
||||
@@ -25,22 +24,24 @@ body {
|
||||
color: white;
|
||||
text-align: left;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding-left: 230px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
/* === Kurs-Grid === */
|
||||
.course-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: 30px;
|
||||
margin: 0 auto;
|
||||
gap: 40px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* === Kurs-Karte === */
|
||||
@media screen and (max-width: 765px) {
|
||||
.course-grid{
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.course-card {
|
||||
flex: 0 0 calc(33.333% - 20px); /* Drei nebeneinander */
|
||||
background: var(--brand-white);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
@@ -48,19 +49,16 @@ body {
|
||||
min-height: 300px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/* Optional: Kurs-Bildbereich */
|
||||
.course-image {
|
||||
background-color: #ddd; /* Platzhalter – kannst du durch echte Bilder ersetzen */
|
||||
background-color: #ddd;
|
||||
height: 180px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* === Kurs-Inhalt === */
|
||||
.course-content {
|
||||
background-color: var(--brand-primary); /* Orange */
|
||||
background-color: var(--brand-primary);
|
||||
color: var(--brand-white);
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
@@ -88,7 +86,6 @@ body {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* === Responsive Anpassung === */
|
||||
@media screen and (max-width: 1024px) {
|
||||
.course-card {
|
||||
flex: 0 0 calc(50% - 20px);
|
||||
|
32
CSS/Element/filter_box.css
Normal file
32
CSS/Element/filter_box.css
Normal file
@@ -0,0 +1,32 @@
|
||||
.filter-box {
|
||||
background: #EB8202;
|
||||
color: #fff;
|
||||
padding: 1em;
|
||||
border-radius: 8px;
|
||||
font-family: sans-serif;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.filter-box label {
|
||||
display: block;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.filter-box select,
|
||||
.filter-box input[type="text"],
|
||||
.filter-box input[type="range"] {
|
||||
width: 100%;
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
.filter-box button {
|
||||
margin-top: 1em;
|
||||
width: 100%;
|
||||
background: white;
|
||||
color: #000;
|
||||
border: none;
|
||||
padding: 0.5em;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
main a {
|
||||
color: var(--brand-white)
|
||||
color: var(--brand-white);
|
||||
}
|
||||
|
||||
.form-flex {
|
||||
@@ -12,6 +12,7 @@ main a{
|
||||
|
||||
form label {
|
||||
width: fit-content;
|
||||
color: var(--brand-white);
|
||||
}
|
||||
|
||||
form input {
|
||||
@@ -20,7 +21,8 @@ form input {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
form input, textarea {
|
||||
form input,
|
||||
textarea {
|
||||
border: var(--border-primary);
|
||||
padding: 8px;
|
||||
font-size: 1rem;
|
||||
@@ -49,6 +51,33 @@ form input, textarea {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.form-grid {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.form-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.form-grid-3 {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
.form-grid-3 {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.form-grid label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -60,11 +89,6 @@ form input, textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-grid input:last-child, div:nth-last-child(4) {
|
||||
grid-column: 1 / -1;
|
||||
column-span: 2;
|
||||
}
|
||||
|
||||
form .error {
|
||||
color: var(--error);
|
||||
border-color: var(--error);
|
||||
@@ -73,25 +97,31 @@ form .error {
|
||||
outline-color: var(--error);
|
||||
}
|
||||
.form-user {
|
||||
justify-content: center!important;
|
||||
/*justify-content: center !important;*/
|
||||
grid-template-columns: auto !important;
|
||||
}
|
||||
|
||||
/* fix radio buttons registration */
|
||||
.input:nth-child(5){
|
||||
.radio {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
max-width: 290px;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
|
||||
}
|
||||
|
||||
.input:nth-child(5) label{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.input:nth-child(5) label input{
|
||||
.radio input {
|
||||
margin-top: 0;
|
||||
height: var(--h-sm);
|
||||
width: var(--h-sm);
|
||||
}
|
||||
|
||||
.input-transparent{
|
||||
background: transparent!important;
|
||||
border: transparent!important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.input-transparent{
|
||||
display: none;
|
||||
}
|
||||
}
|
34
CSS/Element/modal.css
Normal file
34
CSS/Element/modal.css
Normal file
@@ -0,0 +1,34 @@
|
||||
.modal-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.modal-overlay.is-visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.modal {
|
||||
background: var(--brand-background);
|
||||
padding: 1.5rem;
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
max-width: 320px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 900px) {
|
||||
.modal nav {
|
||||
padding: 24px 42px 24px 42px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 800px) {
|
||||
.modal nav {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
32
CSS/Element/sidebar.css
Normal file
32
CSS/Element/sidebar.css
Normal file
@@ -0,0 +1,32 @@
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
background-color: transparent;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sidebar nav ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar nav ul li {
|
||||
margin-bottom: 0.5rem;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sidebar nav ul li a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
display: block;
|
||||
padding: 0.5rem;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sidebar nav ul li a:hover {
|
||||
background-color: #e2e6ea;
|
||||
}
|
||||
|
||||
.sidebar button{
|
||||
width: 100%;
|
||||
padding: 10px 10px;
|
||||
}
|
@@ -6,8 +6,13 @@
|
||||
@import url(Element/form.css);
|
||||
@import url(Element/button.css);
|
||||
@import url(Element/card.css);
|
||||
@import url(Element/sidebar.css);
|
||||
@import url(Element/filter_box.css);
|
||||
@import url(Element/modal.css);
|
||||
|
||||
*, *:before, *:after {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
@@ -16,9 +21,10 @@
|
||||
|
||||
body {
|
||||
background-color: var(--brand-background);
|
||||
color: #666;
|
||||
color: var(--brand-white);
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -35,10 +41,21 @@ h2 {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
*, button, a {
|
||||
transition: background-color 0.2s, color 0.2s;
|
||||
}
|
||||
|
||||
main {
|
||||
margin-top: 190px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
main{
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.msg {
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
@@ -48,7 +65,6 @@ main {
|
||||
.msg a {
|
||||
text-decoration: none;
|
||||
color: #09add0;
|
||||
|
||||
}
|
||||
|
||||
.msg a:hover {
|
||||
@@ -102,8 +118,16 @@ main {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.d-flex-between{
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.hover:hover {
|
||||
opacity: .75;
|
||||
opacity: 0.75;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@@ -9,17 +9,29 @@
|
||||
|
||||
.container {
|
||||
max-width: 90%;
|
||||
padding: 24px 42px 24px 42px;
|
||||
/* padding: 24px 42px 24px 42px; */
|
||||
margin: 0 auto;
|
||||
color: var(--brand-white);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.container {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.row {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/*** Spaltendefinitionen Smartphone Ansicht ***/
|
||||
@media (max-width: 529px) {
|
||||
.col-s-12 {
|
||||
@@ -33,16 +45,19 @@
|
||||
}
|
||||
|
||||
/*** Spaltendefinitionen Tablet Ansicht ***/
|
||||
@media (min-width: 530px) {
|
||||
@media (min-width: 750px) {
|
||||
.col-m-1 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
.col-m-4 {
|
||||
flex: 0 0 33.3333333%;
|
||||
}
|
||||
|
||||
.col-m-6 {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
|
||||
.col-m-12 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
@@ -53,21 +68,35 @@
|
||||
.col-1 {
|
||||
flex: 0 0 8.3333333%;
|
||||
}
|
||||
|
||||
.col-3 {
|
||||
flex: 0 0 25%;
|
||||
}
|
||||
|
||||
.col-4 {
|
||||
flex: 0 0 33.3333333%;
|
||||
}
|
||||
|
||||
.col-card-4{
|
||||
flex: 1 1 calc((100% - (3 - 1) * 40px) / 3);
|
||||
}
|
||||
|
||||
.col-5 {
|
||||
flex: 0 0 41.6666667%;
|
||||
}
|
||||
|
||||
.col-6 {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
|
||||
.col-8 {
|
||||
flex: 0 0 66.66666667%;
|
||||
}
|
||||
|
||||
.col-9{
|
||||
flex: 0 0 75%;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@
|
||||
--input-placeholder: #998E82;
|
||||
--error: #FF0000;
|
||||
|
||||
|
||||
/*Fonts*/
|
||||
--font-family-main: "Inter", sans-serif;
|
||||
--font-family-headline: "Source Serif 4", serif;
|
||||
@@ -22,6 +21,14 @@
|
||||
/*Font-Weight*/
|
||||
--font-weight-semibold: 600;
|
||||
|
||||
--h-sm: 24px;
|
||||
--h-md: 48px;
|
||||
--border-primary: 1px solid #998E82;
|
||||
|
||||
/* Hover Variants */
|
||||
--brand-primary-hover: #FF9E33;
|
||||
--brand-background-hover: #2A231F;
|
||||
--bg-muted-hover: #6A6A6A;
|
||||
--fullblock-hover: #00008B;
|
||||
--error-hover: #CC0000;
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Controller;
|
||||
|
||||
use Blog\Model\AdminModel;
|
||||
|
||||
class AdminController
|
||||
{
|
||||
protected $view;
|
||||
private $db;
|
||||
private $validData = array();
|
||||
private $errors = array();
|
||||
private $labels = array("name" => "Name*", "preis" => "€ Preis*", "dauer" => "Dauer* (Stunden)", "rabatt" => "Rabatt", "kategorie" => "Kategorie", "stadt" => "Stadt*", "strasse" => "Straße und Nummer*", "plz" => "PLZ*" ,"beschreibung" => "Beschreibung");
|
||||
|
||||
|
||||
public function __construct($view)
|
||||
{
|
||||
$this->db = new AdminModel();
|
||||
$this->view = $view;
|
||||
}
|
||||
|
||||
public function showAdminForm()
|
||||
{
|
||||
$this->view->setVars([
|
||||
'labels' => $this->labels,
|
||||
'validData' => $this->validData,
|
||||
'errors' => $this->errors
|
||||
]);
|
||||
}
|
||||
|
||||
public function showConfirmation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function validateForm(){
|
||||
foreach ($this->labels as $index => $value) {
|
||||
if (strpos($value, "*") !== false && (!isset($_POST[$index]) || empty($_POST[$index]))) {
|
||||
$this->errors[$index] = "Bitte " . $value . " eingeben";
|
||||
} else {
|
||||
$this->validData[$index] = $_POST[$index];
|
||||
}
|
||||
}
|
||||
if (count($this->errors) > 0) {
|
||||
$this->view->setDoMethodName("showAdminForm");
|
||||
$this->showAdminForm();
|
||||
} else {
|
||||
if ($this->db->writeNewCourse($this->validData, $_SESSION["user_id"])) {
|
||||
$this->view->setDoMethodName("showConfirmation");
|
||||
$this->showConfirmation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
35
Controller/CourseController.php
Normal file
35
Controller/CourseController.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Controller;
|
||||
|
||||
use Blog\Model\CourseModel;
|
||||
|
||||
class CourseController{
|
||||
private $view;
|
||||
private $db;
|
||||
|
||||
public function __construct($view){
|
||||
$this->db = new CourseModel();
|
||||
$this->view = $view;
|
||||
}
|
||||
|
||||
public function showCourse(){
|
||||
$id = $_GET["courseId"] ?? null;
|
||||
if(!$id){
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$kurs = $this->db->getCourseById($id);
|
||||
if(!$kurs){
|
||||
new \Blog\Library\ErrorMsg("Kurs nicht gefunden");
|
||||
}
|
||||
|
||||
$this->view->setVars([
|
||||
"kurs" => $kurs
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -25,6 +25,28 @@ class UserController{
|
||||
"password" => "Passwort*",
|
||||
];
|
||||
|
||||
private $changeUserLabels = [
|
||||
'vorname' => 'Vorname',
|
||||
'name' => 'Nachname',
|
||||
'email' => 'E-Mail',
|
||||
'password' => 'Passwort',
|
||||
];
|
||||
|
||||
private $kursValidData = array();
|
||||
private $kursErrors = array();
|
||||
private $kursLabels = array(
|
||||
"name" => "Name*",
|
||||
"preis" => "€ Preis*",
|
||||
"dauer" => "Dauer* (Stunden)",
|
||||
"rabatt" => "Rabatt",
|
||||
"kategorie" => "Kategorie",
|
||||
"1" => "|",
|
||||
"stadt" => "Stadt*",
|
||||
"strasse" => "Straße und Nummer*",
|
||||
"plz" => "PLZ*",
|
||||
"2" => "|",
|
||||
"beschreibung" => "Beschreibung");
|
||||
|
||||
public function __construct($view){
|
||||
$this->db = new UserModel();
|
||||
$this->view = $view;
|
||||
@@ -92,6 +114,48 @@ class UserController{
|
||||
}
|
||||
}
|
||||
|
||||
public function validateKursForm(){
|
||||
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("showNewKursConfirmation");
|
||||
$this->showConfirmation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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(){
|
||||
$userId = $this->getCurrentUserId();
|
||||
$user = null;
|
||||
@@ -165,7 +229,11 @@ class UserController{
|
||||
}
|
||||
|
||||
public function showUserAccountPage (){
|
||||
|
||||
$this->view->setVars([
|
||||
'labels' => $this->kursLabels,
|
||||
'errors' => $this->kursErrors,
|
||||
'validData' => $this->kursValidData
|
||||
]);
|
||||
}
|
||||
|
||||
public function showUserDeleteConfirmation(){
|
||||
@@ -173,7 +241,7 @@ class UserController{
|
||||
}
|
||||
|
||||
public function deleteAccount(){
|
||||
$userId = $_SESSION["user_id"] ?? "";
|
||||
$userId = $this->getCurrentUserId();
|
||||
if($userId){
|
||||
$this->db->deleteUser($userId);
|
||||
$this->clearUserSession();
|
||||
@@ -182,13 +250,158 @@ class UserController{
|
||||
}
|
||||
}
|
||||
|
||||
public function changeAccountData(){
|
||||
$userId = $_SESSION["user_id"] ?? "";
|
||||
public function changeAccountDataRedirect(){
|
||||
$userId = $this->getCurrentUserId();
|
||||
if($userId){
|
||||
$this->db->changeUserData($userId);
|
||||
$this->setUserSession($user);
|
||||
$this->view->setDoMethodName("showUserDeleteConfirmation");
|
||||
$this->showUserDeleteConfirmation();
|
||||
$this->view->setDoMethodName("showUserChangeAccountSettings");
|
||||
$this->showUserChangeAccountSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public function showUserChangeAccountSettings(){
|
||||
$userId = $this->getCurrentUserId();
|
||||
if(!$userId){
|
||||
header("Location: index.php?controller=user&do=showUserLoginForm");
|
||||
exit();
|
||||
}
|
||||
|
||||
$currentUser = $this->db->getUserById($userId);
|
||||
if(!$currentUser){
|
||||
new \Blog\Library\ErrorMsg("User nicht gefunden");
|
||||
}
|
||||
|
||||
$validData = [
|
||||
'vorname' => $currentUser["vorname"],
|
||||
'name' => $currentUser["name"],
|
||||
'email' => $currentUser["email"],
|
||||
];
|
||||
|
||||
$this->view->setVars([
|
||||
'changeUserLabels' => $this->changeUserLabels,
|
||||
'validData' => $validData,
|
||||
'errors' => $this->errors,
|
||||
]);
|
||||
|
||||
//$this->view->render('User/showUserChangeAccountSettings');
|
||||
return;
|
||||
}
|
||||
|
||||
public function updateAccountData()
|
||||
{
|
||||
$userId = $this->getCurrentUserId();
|
||||
if (!$userId) {
|
||||
header('Location: index.php?controller=user&do=showUserLoginForm');
|
||||
exit;
|
||||
}
|
||||
|
||||
$currentUser = $this->db->getUserById($userId);
|
||||
if (!$currentUser) {
|
||||
new \Blog\Library\ErrorMsg('User nicht gefunden');
|
||||
}
|
||||
|
||||
$submitted = [
|
||||
'vorname' => trim($_POST['vorname'] ?? ''),
|
||||
'name' => trim($_POST['name'] ?? ''),
|
||||
'email' => trim($_POST['email'] ?? ''),
|
||||
'password' => trim($_POST['password'] ?? ''),
|
||||
];
|
||||
|
||||
$this->errors = [];
|
||||
if (strlen($submitted['vorname']) < 2) {
|
||||
$this->errors['vorname'] = 'Vorname muss mindestens 2 Zeichen haben.';
|
||||
}
|
||||
if (strlen($submitted['name']) < 2) {
|
||||
$this->errors['name'] = 'Nachname muss mindestens 2 Zeichen haben.';
|
||||
}
|
||||
if (!filter_var($submitted['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
$this->errors['email'] = 'Ungültige E-Mail-Adresse.';
|
||||
}
|
||||
if ($submitted['password'] !== '' && strlen($submitted['password']) < 6) {
|
||||
$this->errors['password'] = 'Passwort muss mindestens 6 Zeichen haben.';
|
||||
}
|
||||
|
||||
|
||||
if (count($this->errors) > 0) {
|
||||
$this->view->setVars([
|
||||
'changeUserLabels' => $this->changeUserLabels,
|
||||
'validData' => $submitted,
|
||||
'errors' => $this->errors,
|
||||
]);
|
||||
$this->view->render('User/showUserChangeAccountSettings');
|
||||
return;
|
||||
}
|
||||
|
||||
$updateData = [];
|
||||
if ($submitted['vorname'] !== $currentUser['vorname']) {
|
||||
$updateData['vorname'] = $submitted['vorname'];
|
||||
}
|
||||
if ($submitted['name'] !== $currentUser['name']) {
|
||||
$updateData['name'] = $submitted['name'];
|
||||
}
|
||||
if ($submitted['email'] !== $currentUser['email']) {
|
||||
$updateData['email'] = $submitted['email'];
|
||||
}
|
||||
if ($submitted['password'] !== '') {
|
||||
// Passwort und Salt auf neu setzen
|
||||
$salt = bin2hex(random_bytes(16));
|
||||
$hash = hash('sha256', $submitted['password'] . $salt);
|
||||
$updateData['passwort'] = $hash;
|
||||
$updateData['salt'] = $salt;
|
||||
}
|
||||
|
||||
|
||||
if ($submitted['password'] !== '') {
|
||||
$salt = bin2hex(random_bytes(16));
|
||||
$hash = hash('sha256', $submitted['password'] . $salt);
|
||||
$updateData['passwort'] = $hash;
|
||||
$updateData['salt'] = $salt;
|
||||
}
|
||||
|
||||
if (empty($updateData)) {
|
||||
$this->message = 'Keine Änderungen festgestellt.';
|
||||
$this->view->render('User/showUserChangeAccountSettings');
|
||||
return;
|
||||
}
|
||||
|
||||
$ok = $this->db->updateUserData($userId, $updateData);
|
||||
|
||||
if ($ok) {
|
||||
$_SESSION['vorname'] = $updateData['name'] ?? $_SESSION['vorname'];
|
||||
$_SESSION['name'] = $updateData['lastname'] ?? $_SESSION['name'];
|
||||
$_SESSION['email'] = $updateData['email'] ?? $_SESSION['email'];
|
||||
$this->message = 'Änderungen erfolgreich gespeichert.';
|
||||
|
||||
echo "ok";
|
||||
|
||||
header("Location: index.php?controller=user&do=showUserAccountPage");
|
||||
exit();
|
||||
} else {
|
||||
$this->errors['general'] = 'Beim Speichern ist ein Fehler aufgetreten.';
|
||||
$this->view->setVars([
|
||||
'changeUserLabels' => $this->changeUserLabels,
|
||||
'validData' => $submitted,
|
||||
'errors' => $this->errors,
|
||||
]);
|
||||
$this->view->setDoMethodName('showUserChangeAccountSettings');
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function enroll() {
|
||||
$courseId = $_POST['id'] ?? null;
|
||||
$userId = $_SESSION['user_id'] ?? null;
|
||||
|
||||
if ($userId === null) {
|
||||
new \Blog\Library\ErrorMsg("Nicht eingeloggt.");
|
||||
}
|
||||
|
||||
if ($courseId === null) {
|
||||
new \Blog\Library\ErrorMsg("Kein Kurs ausgewählt");
|
||||
}
|
||||
|
||||
$this->db->enroll($courseId, $userId);
|
||||
|
||||
$this->view->setDoMethodName("showEnrollmentConfirmation");
|
||||
}
|
||||
}
|
34
JS/modal.js
Normal file
34
JS/modal.js
Normal file
@@ -0,0 +1,34 @@
|
||||
document.addEventListener('DOMContentLoaded', () =>{
|
||||
const deleteForm = document.getElementById("deleteForm")
|
||||
const confirmModal = document.getElementById("confirmModal");
|
||||
const btnCancel = document.getElementById("btnCancel");
|
||||
console.log(btnCancel);
|
||||
const btnConfirm = document.getElementById("btnConfirm");
|
||||
|
||||
deleteForm.addEventListener('submit',e => {
|
||||
e.preventDefault();
|
||||
confirmModal.classList.add('is-visible');
|
||||
})
|
||||
|
||||
btnCancel.addEventListener('click', e => {
|
||||
confirmModal.classList.remove('is-visible');
|
||||
})
|
||||
|
||||
btnConfirm.addEventListener('click', e => {
|
||||
confirmModal.classList.remove('is-visible');
|
||||
deleteForm.submit();
|
||||
});
|
||||
|
||||
deleteForm.addEventListener('click', e => {
|
||||
if (e.target === deleteForm) {
|
||||
confirmModal.classList.remove('is-visible');
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', e => {
|
||||
if (e.key === 'Escape' && deleteForm.classList.contains('is-visible')) {
|
||||
confirmModal.classList.remove('is-visible');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Model;
|
||||
|
||||
use PDOException;
|
||||
|
||||
class AdminModel extends Database
|
||||
{
|
||||
private function writeNewAddress($values) {
|
||||
$guid = $this->createUUID();
|
||||
|
||||
$sql = "INSERT INTO ort (`id`, `stadt`, `strasse`, `plz`) VALUES (
|
||||
:guid, :stadt, :strasse, :plz);";
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute(array(":guid" => $guid,
|
||||
":stadt" => $values["stadt"],
|
||||
":strasse" => $values["strasse"],
|
||||
":plz" => $values["plz"],
|
||||
));
|
||||
return $guid;
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
public function writeNewCourse($values, $kursleiterId)
|
||||
{
|
||||
// Bleibt übrig wenn Adresse erstellt wird aber Kurs nicht weil Error
|
||||
$addressId = $this->writeNewAddress($values);
|
||||
|
||||
$guid = $this->createUUID();
|
||||
|
||||
$sql = "INSERT INTO kurs (`id`, `name`, `preis`, `dauer`, `rabatt`, `kategorie`, `beschreibung`, `kurseleiter`, `ort_id`) VALUES (
|
||||
:guid, :name, :preis, :dauer, :rabatt, :kategorie, :beschreibung, :kurseleiter, :ort_id);";
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute(array(":guid" => $guid,
|
||||
":name" => $values["name"],
|
||||
":preis" => $values["preis"],
|
||||
":dauer" => $values["dauer"],
|
||||
":rabatt" => $values["rabatt"],
|
||||
":kategorie" => $values["kategorie"],
|
||||
":beschreibung" => $values["beschreibung"],
|
||||
":kurseleiter" => $kursleiterId,
|
||||
"ort_id" => $addressId
|
||||
));
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
24
Model/CourseModel.php
Normal file
24
Model/CourseModel.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Model;
|
||||
|
||||
use Blog\Model\Database;
|
||||
use PDOException;
|
||||
use Random\RandomException;
|
||||
|
||||
class CourseModel extends Database
|
||||
{
|
||||
public function getCourseById(string $id){
|
||||
$pdo = $this->linkDB();
|
||||
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar
|
||||
FROM kurs k
|
||||
JOIN ort o ON k.ort_id = o.id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
WHERE k.id = :id";
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute([':id' => $id]);
|
||||
$result = $sth->fetch(\PDO::FETCH_ASSOC);
|
||||
return $result ?? null;
|
||||
}
|
||||
}
|
@@ -67,4 +67,262 @@ class UserModel extends Database
|
||||
$sth->execute();
|
||||
}
|
||||
|
||||
public function updateUserData($id, $values){
|
||||
$pdo = $this->linkDB();
|
||||
$fields = [];
|
||||
$params = [':id' => $id];
|
||||
|
||||
if(!empty($values["password"])){
|
||||
$salt = bin2hex(random_bytes(16));
|
||||
$hash = hash('sha256', $values["password"] . $salt);
|
||||
$fields["password"] = "´passwort´ = :password";
|
||||
$fields["salt"] = "´salt´ = :salt";
|
||||
$params[":password"] = $hash;
|
||||
$params[":salt"] = $salt;
|
||||
}
|
||||
|
||||
foreach (['name','vorname','email'] as $col) {
|
||||
if (isset($values[$col])) {
|
||||
$fields[] = "`{$col}` = :{$col}";
|
||||
$params[":{$col}"] = $values[$col];
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE user
|
||||
SET " . implode(", ", $fields) . "
|
||||
where id = :id";
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute($params);
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Aktualisieren der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function writeNewAddress($values) {
|
||||
$guid = $this->createUUID();
|
||||
|
||||
$sql = "INSERT INTO ort (`id`, `stadt`, `strasse`, `plz`) VALUES (
|
||||
:guid, :stadt, :strasse, :plz);";
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute(array(":guid" => $guid,
|
||||
":stadt" => $values["stadt"],
|
||||
":strasse" => $values["strasse"],
|
||||
":plz" => $values["plz"],
|
||||
));
|
||||
return $guid;
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
public function writeNewCourse($values, $kursleiterId)
|
||||
{
|
||||
// Bleibt übrig wenn Adresse erstellt wird aber Kurs nicht weil Error
|
||||
$addressId = $this->writeNewAddress($values);
|
||||
|
||||
$guid = $this->createUUID();
|
||||
|
||||
$sql = "INSERT INTO kurs (`id`, `name`, `preis`, `dauer`, `rabatt`, `kategorie`, `beschreibung`, `kurseleiter`, `ort_id`) VALUES (
|
||||
:guid, :name, :preis, :dauer, :rabatt, :kategorie, :beschreibung, :kurseleiter, :ort_id);";
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute(array(":guid" => $guid,
|
||||
":name" => $values["name"],
|
||||
":preis" => $values["preis"],
|
||||
":dauer" => $values["dauer"],
|
||||
":rabatt" => $values["rabatt"],
|
||||
":kategorie" => $values["kategorie"],
|
||||
":beschreibung" => $values["beschreibung"],
|
||||
":kurseleiter" => $kursleiterId,
|
||||
"ort_id" => $addressId
|
||||
));
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getMyCourses() {
|
||||
$personId = $_SESSION["user_id"];
|
||||
$isKursleiter = $_SESSION["user_role"] === "leiter";
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
if ($isKursleiter) {
|
||||
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar
|
||||
FROM kurs AS k
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
WHERE k.kursleiter = :personId
|
||||
ORDER BY k.name";
|
||||
} else {
|
||||
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar
|
||||
FROM kurs_user AS ku
|
||||
JOIN kurs AS k ON k.id = ku.kurs_id
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
WHERE ku.user_id = :personId
|
||||
ORDER BY k.name";
|
||||
}
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute([':personId' => $personId]);
|
||||
return $sth->fetchAll(\PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Lesen der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
}
|
||||
public function getAllCourses() {
|
||||
$pdo = $this->linkDB();
|
||||
$userId = $_SESSION['user_id'] ?? null;
|
||||
|
||||
if ($userId === null) {
|
||||
$sql = "SELECT
|
||||
k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar,
|
||||
0 AS isTeilnehmer
|
||||
FROM kurs AS k
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id";
|
||||
$params = [];
|
||||
} else {
|
||||
$sql = "SELECT
|
||||
k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar,
|
||||
CASE WHEN ku.user_id IS NULL THEN 0 ELSE 1 END AS isTeilnehmer
|
||||
FROM kurs AS k
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
LEFT JOIN kurs_user AS ku ON ku.kurs_id = k.id AND ku.user_id = :userId";
|
||||
$params = ['userId' => $userId];
|
||||
}
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute($params);
|
||||
return $sth->fetchAll(\PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Lesen der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
public function updateCourse($course) {
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
if (isset($course['ort_id'])) {
|
||||
$this->updateAddress($course);
|
||||
$addressId = $course['ort_id'];
|
||||
} else {
|
||||
$addressId = $this->writeNewAddress($course);
|
||||
}
|
||||
|
||||
$sql = "UPDATE kurs SET
|
||||
`name` = :name,
|
||||
`preis` = :preis,
|
||||
`dauer` = :dauer,
|
||||
`rabatt` = :rabatt,
|
||||
`kategorie` = :kategorie,
|
||||
`beschreibung` = :beschreibung,
|
||||
`ort_id` = :ort_id
|
||||
WHERE `id` = :id";
|
||||
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute([
|
||||
':id' => $course['id'],
|
||||
':name' => $course['name'],
|
||||
':preis' => $course['preis'],
|
||||
':dauer' => $course['dauer'],
|
||||
':rabatt' => $course['rabatt'],
|
||||
':kategorie' => $course['kategorie'],
|
||||
':beschreibung' => $course['beschreibung'],
|
||||
':ort_id' => $addressId
|
||||
]);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Aktualisieren des Kurses.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateAddress($data) {
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
if (!isset($data['ort_id'])) {
|
||||
throw new \Exception("Keine Adress-ID vorhanden zum Aktualisieren.");
|
||||
}
|
||||
|
||||
$sql = "UPDATE ort SET
|
||||
`strasse` = :strasse,
|
||||
`stadt` = :stadt,
|
||||
`plz` = :plz
|
||||
WHERE `id` = :id";
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute([
|
||||
':id' => $data['ort_id'],
|
||||
':strasse' => $data['strasse'],
|
||||
':stadt' => $data['stadt'],
|
||||
':plz' => $data['plz']
|
||||
]);
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Aktualisieren der Adresse.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function enroll($courseId, $userId) {
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$checkSql = "SELECT COUNT(*) FROM kurs_user WHERE user_id = :user_id AND kurs_id = :kurs_id";
|
||||
$checkStmt = $pdo->prepare($checkSql);
|
||||
$checkStmt->execute([
|
||||
':user_id' => $userId,
|
||||
':kurs_id' => $courseId
|
||||
]);
|
||||
|
||||
if ($checkStmt->fetchColumn() > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$insertSql = "INSERT INTO kurs_user (user_id, kurs_id) VALUES (:user_id, :kurs_id)";
|
||||
$insertStmt = $pdo->prepare($insertSql);
|
||||
$insertStmt->execute([
|
||||
':user_id' => $userId,
|
||||
':kurs_id' => $courseId
|
||||
]);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Einschreiben in den Kurs.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<h2>Neuer Kurs</h2>
|
||||
<form method="post" class="form-grid">
|
||||
|
||||
<?php
|
||||
$index = 0;
|
||||
|
||||
foreach ($labels as $key => $value) {
|
||||
$hasError = isset($errors[$key]);
|
||||
$errorClass = $hasError ? ' error' : '';
|
||||
|
||||
echo '<div class="input">';
|
||||
echo '<label for="' . $key . '">' . $value . '</label>';
|
||||
|
||||
if ($key == "beschreibung") {
|
||||
echo '<textarea id="' . $key . '" name="' . $key . '" class="' . $errorClass . '">';
|
||||
if (isset($validData[$key])) {
|
||||
echo $validData[$key];
|
||||
}
|
||||
echo '</textarea>';
|
||||
} else {
|
||||
echo '<input class="' . $errorClass . '" type="text" name="' . $key . '" value="' . (isset($validData[$key]) ? $validData[$key] : '') . '">';
|
||||
}
|
||||
|
||||
if ($hasError) {
|
||||
echo '<p class="error">' . $errors[$key] . '</p>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
$index++;
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="controller" value="admin">
|
||||
<input type="hidden" name="do" value="validateForm">
|
||||
<input type="submit" name="submit" value="Absenden"></form>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
20
Views/Course/showCourse.phtml
Normal file
20
Views/Course/showCourse.phtml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h1><?= htmlspecialchars($kurs['name']) ?></h1>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<p><strong>Bewertung:</strong> <?= $kurs['note'] ?> ★</p>
|
||||
<p><strong>Preis:</strong> <?= htmlspecialchars($kurs['preis']) ?>€</p>
|
||||
<p><strong>Adresse:</strong> <?= htmlspecialchars($kurs['strasse']) ?>, <?= htmlspecialchars($kurs['plz']) ?> <?= htmlspecialchars($kurs['stadt']) ?></p>
|
||||
<p><?= nl2br(htmlspecialchars($kurs['beschreibung'] ?? '')) ?></p>
|
||||
<a href="index.php">‹ Zurück zur Kursübersicht</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
116
Views/User/showAdminForm.phtml
Normal file
116
Views/User/showAdminForm.phtml
Normal file
@@ -0,0 +1,116 @@
|
||||
<h2>Neuer Kurs</h2>
|
||||
<form method="post">
|
||||
<?php
|
||||
$userModel = new \Blog\Model\UserModel();
|
||||
$courses = $userModel->getMyCourses();
|
||||
$id = $_GET["id"] ?? null;
|
||||
|
||||
$selectedCourse = null;
|
||||
foreach ($courses as $course) {
|
||||
if ($course['id'] === $id) {
|
||||
$selectedCourse = $course;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$validData = $selectedCourse ?? null;
|
||||
$isEditing = $validData != null;
|
||||
$saveLabel = $isEditing ? "Speichern" : "Erstellen";
|
||||
|
||||
function createInputField($label, $name, $errors, $validData, $type = 'input') {
|
||||
$errorClass = isset($errors[$name]) ? 'error' : '';
|
||||
$value = htmlspecialchars($validData[$name] ?? '');
|
||||
$errorMessage = isset($errors[$name]) ? '<p class="error">' . htmlspecialchars($errors[$name]) . '</p>' : '';
|
||||
|
||||
if($type === 'textarea') {
|
||||
return <<<HTML
|
||||
<div style="grid-column: 1 / -1;" class="input">
|
||||
<label for="{$name}">{$label}</label>
|
||||
<textarea class="{$errorClass}" name="{$name}">{$value}</textarea>
|
||||
{$errorMessage}
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
return <<<HTML
|
||||
<div class="input">
|
||||
<label for="{$name}">{$label}</label>
|
||||
<input class="{$errorClass}" type="text" name="{$name}" value="{$value}">
|
||||
{$errorMessage}
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
echo '<div style="margin-top: 32px;" class="form-grid-3">';
|
||||
foreach ($labels as $name => $label) {
|
||||
if($label === "|") {
|
||||
echo '</div>';
|
||||
echo '<div style="margin-top: 32px;" class="form-grid-3">';
|
||||
} else {
|
||||
echo createInputField($label, $name, $errors, $validData, $type = $name === 'beschreibung' ? 'textarea' : 'input');
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<?php
|
||||
$action = $isEditing ? 'validateEditKursForm' : 'validateKursForm';
|
||||
echo <<<HTML
|
||||
<input type="hidden" name="do" value="{$action}">
|
||||
<div class="form-grid-3" style="margin-top: 16px;">
|
||||
<input style="grid-column: 3;" type="submit" name="submit" value="{$saveLabel}">
|
||||
</div>
|
||||
HTML;
|
||||
?>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
if (!empty($courses)) {
|
||||
echo '<div class="courses-view">';
|
||||
foreach ($courses as $kurs) {
|
||||
$courseCard = $doc->createElement('div');
|
||||
$courseCard->setAttribute('class', 'course-card');
|
||||
|
||||
$courseImage = $doc->createElement('div');
|
||||
$courseImage->setAttribute('class', 'course-image');
|
||||
$courseCard->appendChild($courseImage);
|
||||
|
||||
$courseContent = $doc->createElement('div');
|
||||
$courseContent->setAttribute('class', 'course-content');
|
||||
$courseCard->appendChild($courseContent);
|
||||
|
||||
$courseLeft = $doc->createElement('div');
|
||||
$courseLeft->setAttribute('class', 'course-left');
|
||||
$courseContent->appendChild($courseLeft);
|
||||
|
||||
$note = $doc->createElement('div', htmlspecialchars($kurs['note'] ?? 'Keine Bewertung') . ' ★');
|
||||
$courseLeft->appendChild($note);
|
||||
|
||||
$name = $doc->createElement('div', htmlspecialchars($kurs['name']));
|
||||
$courseLeft->appendChild($name);
|
||||
|
||||
$address = $doc->createElement('div', htmlspecialchars($kurs['strasse'] . ', ' . $kurs['stadt'] . ' ' . $kurs['plz']));
|
||||
$courseLeft->appendChild($address);
|
||||
|
||||
$courseRight = $doc->createElement('div');
|
||||
$courseRight->setAttribute('class', 'course-right');
|
||||
$courseContent->appendChild($courseRight);
|
||||
|
||||
$price = $doc->createElement('div', htmlspecialchars($kurs['preis']) . ' €');
|
||||
$courseRight->appendChild($price);
|
||||
|
||||
$category = $doc->createElement('div', htmlspecialchars($kurs['kategorie'] ?? 'Keine Kategorie'));
|
||||
$courseRight->appendChild($category);
|
||||
|
||||
$editLink = $doc->createElement('a', "Bearbeiten");
|
||||
$editLink->setAttribute('href', '?controller=User&do=showUserAccountPage&id=' . $kurs['id']);
|
||||
$editLink->setAttribute('class', 'course-card-link');
|
||||
$courseRight->appendChild($editLink);
|
||||
|
||||
echo $doc->saveHTML($courseCard);
|
||||
}
|
||||
echo '</div>';
|
||||
} else {
|
||||
echo '<p>Keine Kurse gefunden.</p>';
|
||||
}
|
||||
?>
|
12
Views/User/showEnrollmentConfirmation.phtml
Normal file
12
Views/User/showEnrollmentConfirmation.phtml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="msg">
|
||||
<p>Erfolgreich aufgenommen!</p>
|
||||
<a href="?controller=welcome">Weiter</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
12
Views/User/showKursEditedConfirmation.phtml
Normal file
12
Views/User/showKursEditedConfirmation.phtml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="msg">
|
||||
<p>Kurs erfolgreich bearbeitet.</p>
|
||||
<a href="?controller=User&do=showUserAccountPage">Weiter</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
@@ -4,7 +4,7 @@ include dirname(__DIR__).'/header.phtml';
|
||||
|
||||
<div class="msg">
|
||||
<p>Kurs erfolgreich erstellt.</p>
|
||||
<a href="?controller=Welcome&do=showWelcome">Weiter</a>
|
||||
<a href="?controller=User&do=showUserAccountPage">Weiter</a>
|
||||
</div>
|
||||
|
||||
|
@@ -3,32 +3,62 @@
|
||||
?>
|
||||
|
||||
<article>
|
||||
<div id="confirmModal" class="modal-overlay">
|
||||
<div class="modal">
|
||||
<p>Sind Sie sicher, dass Sie Ihren Account löschen möchten?</p>
|
||||
<div class="row" style="flex-wrap: nowrap">
|
||||
<button id="btnCancel" class="btn btn-secondary">Abbrechen</button>
|
||||
<button id="btnConfirm" class="btn btn-logout">Ja, Account löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<h1>Hallo,
|
||||
<?php echo ($_SESSION['vorname'] ?? "") . " " . ($_SESSION['name'] ?? "") ?>
|
||||
</br>
|
||||
Hier können Sie ihren Account verwalten.
|
||||
</h1>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="col-4 sidebar">
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<form method="post">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="logout">
|
||||
<button type="submit" class="btn btn-logout">Ausloggen</button>
|
||||
<button type="submit" class="btn btn-primary">Ausloggen</button>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form method="post">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="changeAccountDataRedirect">
|
||||
<button type="submit" class="btn btn-userchange">Meine Kontodaten ändern</button>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form method="post" id="deleteForm">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="deleteAccount">
|
||||
<button type="submit" class="btn btn-logout">Meinen Account löschen</button>
|
||||
</form>
|
||||
<form method="post">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="changeAccountData">
|
||||
<button type="submit" class="btn btn-logout">Meine Kontodaten ändern</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if(isset($_SESSION["user_id"]) && $_SESSION["user_id"] != null && $_SESSION["user_role"] == "leiter") {
|
||||
include dirname(__DIR__).'/User/showAdminForm.phtml';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
36
Views/User/showUserChangeAccountSettings.phtml
Normal file
36
Views/User/showUserChangeAccountSettings.phtml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Meine Daten ändern</h1>
|
||||
|
||||
<form method="post" class="form-grid form-user">
|
||||
<?php foreach ($changeUserLabels as $key => $label): ?>
|
||||
<div class="input">
|
||||
<label for="reg_<?= $key ?>"><?= $label ?></label>
|
||||
<?php if ($key === 'password'): ?>
|
||||
<input type="password" name="<?= $key ?>" id="reg_<?= $key ?>">
|
||||
<?php elseif($key === 'email'): ?>
|
||||
<input type="email" name="<?= $key ?>" id="reg_<?= $key ?>" value="<?= htmlspecialchars($validData[$key] ?? '') ?>">
|
||||
<?php else: ?>
|
||||
<input type="text" name="<?= $key ?>" id="reg_<?= $key ?>" value="<?= htmlspecialchars($validData[$key] ?? $_SESSION['vorname']) ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($errors[$key])): ?>
|
||||
<div class="error"><?= $errors[$key] ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="updateAccountData">
|
||||
<button type="submit" class="btn btn-primary btn-form" style="display: block">Meine Info ändern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
@@ -12,3 +12,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
||||
|
@@ -22,3 +22,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Als Benutzer anmelden</h1>
|
||||
<h1>Anmeldung</h1>
|
||||
|
||||
<form method="post" class="form-grid form-user">
|
||||
<?php foreach ($labels as $key => $label): ?>
|
||||
@@ -32,3 +32,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
@@ -9,3 +9,5 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/footer.phtml';
|
||||
?>
|
||||
|
||||
|
||||
|
@@ -5,12 +5,10 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Benutzer erstellen</h1>
|
||||
|
||||
<h1>Registration</h1>
|
||||
<form method="post" class="form-grid">
|
||||
|
||||
<?php foreach ($labels as $key => $label): ?>
|
||||
<div class="input">
|
||||
<div class="input <?= $key === 'role' ? "radio" : "" ?>">
|
||||
<label for="reg_<?= $key ?>"><?= $label ?></label>
|
||||
<?php if ($key === 'password'): ?>
|
||||
<input type="password" name="<?= $key ?>" id="reg_<?= $key ?>" required>
|
||||
@@ -30,8 +28,11 @@
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="register">
|
||||
|
||||
<input type="text" class="input-transparent">
|
||||
<button type="submit" class="btn btn-primary btn-form">Registrieren</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
||||
|
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
include dirname(__DIR__) . '/header.phtml';
|
||||
|
||||
$rating = $_GET['rating'] ?? '';
|
||||
$price = $_GET['price'] ?? '';
|
||||
$location = $_GET['location'] ?? '';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
@@ -7,54 +11,97 @@ include dirname(__DIR__) . '/header.phtml';
|
||||
<div class="col-12">
|
||||
<h1 class="welcome-heading">KURSE & ERLEBNISSE JEDER ART</h1>
|
||||
<p class="welcome-subheading">Alle Kurse in deiner Nähe – auf einen Blick</p>
|
||||
<div class="course-grid">
|
||||
<?php
|
||||
// Beispiel-Kurse
|
||||
$kurse = [
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Marketing Pro',
|
||||
'adresse' => 'Bulu ulu Straße 17',
|
||||
'preis' => '59,99€',
|
||||
'ort' => '33333 Frankfurt',
|
||||
'leiter' => 'Max Mustermann'
|
||||
],
|
||||
[
|
||||
'bewertung' => 4,
|
||||
'titel' => 'Design Basics',
|
||||
'adresse' => 'Musterstraße 10',
|
||||
'preis' => '39,99€',
|
||||
'ort' => '10115 Berlin',
|
||||
'leiter' => 'Lisa Beispiel'
|
||||
],
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Excel Masterclass',
|
||||
'adresse' => 'Tabellenweg 5',
|
||||
'preis' => '49,99€',
|
||||
'ort' => '20457 Hamburg',
|
||||
'leiter' => 'Thomas Tabelle'
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($kurse as $kurs): ?>
|
||||
<div class="course-card col-4">
|
||||
<div class="row">
|
||||
<div class="col-3 col-m-12">
|
||||
<div class="filter-box">
|
||||
<form method="get">
|
||||
<label for="rating">Bewertung:</label>
|
||||
<select name="rating" id="rating">
|
||||
<option value="">Alle</option>
|
||||
<option value="5" <?= $rating == '5' ? 'selected' : '' ?>>5 Sterne</option>
|
||||
<option value="4" <?= $rating == '4' ? 'selected' : '' ?>>4 Sterne+</option>
|
||||
<option value="3" <?= $rating == '3' ? 'selected' : '' ?>>3 Sterne+</option>
|
||||
</select>
|
||||
|
||||
<label for="price">Preis:</label>
|
||||
<select name="price" id="price">
|
||||
<option value="">Alle</option>
|
||||
<option value="asc" <?= $price == 'asc' ? 'selected' : '' ?>>Aufsteigend</option>
|
||||
<option value="desc" <?= $price == 'desc' ? 'selected' : '' ?>>Absteigend</option>
|
||||
</select>
|
||||
<button type="submit">Anwenden</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-9">
|
||||
<div class="course-grid row">
|
||||
<?php
|
||||
$userModel = new \Blog\Model\UserModel();
|
||||
$kurse = $userModel->getAllCourses();
|
||||
|
||||
$filteredKurse = array_filter($kurse, function($kurs) use ($rating, $location) {
|
||||
if ($rating && $kurs['note'] < $rating) return false;
|
||||
if ($location && stripos($kurs['ort'], $location) === false) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
if ($price) {
|
||||
usort($filteredKurse, function($a, $b) use ($price) {
|
||||
$priceA = floatval(str_replace(',', '.', str_replace('€', '', $a['preis'])));
|
||||
$priceB = floatval(str_replace(',', '.', str_replace('€', '', $b['preis'])));
|
||||
return $price === 'asc' ? $priceA <=> $priceB : $priceB <=> $priceA;
|
||||
});
|
||||
}
|
||||
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
if (!empty($filteredKurse)) {
|
||||
foreach ($filteredKurse as $kurs) {
|
||||
foreach ($filteredKurse as $kurs) {
|
||||
$id = htmlspecialchars($kurs['id']);
|
||||
$note = htmlspecialchars($kurs['note'] ?? 'Keine Bewertung') . ' ★';
|
||||
$name = htmlspecialchars($kurs['name']);
|
||||
$address = htmlspecialchars($kurs['strasse'] . ', ' . $kurs['stadt'] . ' ' . $kurs['plz']);
|
||||
$preis = htmlspecialchars($kurs['preis']) . ' €';
|
||||
$kategorie = htmlspecialchars($kurs['kategorie'] ?? 'Keine Kategorie');
|
||||
|
||||
echo <<<HTML
|
||||
<a style="flex: 0 0 calc(50% - 20px);" href="?controller=course&do=showCourse&courseId=$id">
|
||||
<div class="course-card">
|
||||
<div class="course-image"></div>
|
||||
<div class="course-content">
|
||||
<div class="course-left">
|
||||
<div><?= $kurs['bewertung'] ?> ★</div>
|
||||
<div><?= $kurs['titel'] ?></div>
|
||||
<div>Kursleiter: <?= $kurs['leiter'] ?></div>
|
||||
<div><?= $kurs['adresse'] ?></div>
|
||||
<div>$note</div>
|
||||
<div>$name</div>
|
||||
<div>$address</div>
|
||||
</div>
|
||||
<div class="course-right">
|
||||
<div><?= $kurs['preis'] ?></div>
|
||||
<div><?= $kurs['ort'] ?></div>
|
||||
<div>$preis</div>
|
||||
<div>$kategorie</div>
|
||||
<form method="POST" class="course-card-form">
|
||||
<input type="hidden" name="do" value="enroll">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<button type="submit" class="btn-link">Teilnehmen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
HTML;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<p>Keine Kurse gefunden.</p>';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -1,6 +1,6 @@
|
||||
</main>
|
||||
<footer>
|
||||
footer
|
||||
</footer>
|
||||
<script src="JS/modal.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -14,27 +14,21 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<header>
|
||||
<nav class="d-flex-between">
|
||||
<a id="logo" href="index.php">bib<span>course</span></a>
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<?php if (isset($_SESSION['user_id']) && $_SESSION['user_id'] !== null): ?>
|
||||
<?php if($_SESSION['user_role'] == 'leiter'): ?>
|
||||
<a style="column-gap: 16px;" class="btn" href="?controller=Admin&do=showAdminForm">
|
||||
<?php echo ($_SESSION['vorname'] ?? "") . " " . ($_SESSION['name'] ?? "") . ", " . ($_SESSION['user_role']) ?>
|
||||
<span class="btn btn-user">
|
||||
<span class="material-icons">person</span>
|
||||
</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a style="column-gap: 16px;" class="btn" href="?controller=User&do=showUserAccountPage">
|
||||
<?php echo ($_SESSION['vorname'] ?? "") . " " . ($_SESSION['name'] ?? "") . ", " . ($_SESSION['user_role']) ?>
|
||||
<span class="btn btn-user">
|
||||
<span class="material-icons">person</span>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<a class="btn" href="?controller=User&do=showUserLoginForm">Anmeldung</a>
|
||||
<a class="btn btn-primary" href="?controller=User&do=showUserRegisterForm">Registration</a>
|
||||
@@ -43,5 +37,8 @@
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO Transparent mit Fehleranzeige bei der Anmeldung -->
|
||||
<main style="color: transparent">
|
||||
<main>
|
Reference in New Issue
Block a user