From 5fb11336171cedc5c7446167d15c7a6275d3de1f Mon Sep 17 00:00:00 2001 From: Illia Hromovoi Date: Thu, 26 Jun 2025 12:48:13 +0200 Subject: [PATCH] neue BenutzeraccounSeite mit dem Button Ausloggen --- CSS/Element/button.css | 9 +++++++++ CSS/style.css | 2 +- CSS/style_columns.css | 6 ++++++ Controller/UserController.php | 7 ++++++- Views/User/showUserAccountPage.phtml | 17 +++++++++++++++++ Views/User/showUserLoginForm.phtml | 7 +------ Views/header.phtml | 13 +++++++++++-- 7 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 Views/User/showUserAccountPage.phtml diff --git a/CSS/Element/button.css b/CSS/Element/button.css index 6bdba5f..34d3ebd 100644 --- a/CSS/Element/button.css +++ b/CSS/Element/button.css @@ -14,6 +14,7 @@ display: flex; flex-direction: row; align-items: center; + cursor: pointer; } .btn-primary { @@ -34,6 +35,10 @@ aspect-ratio: 1/1; } +.btn-form{ + padding: 10px 20px; +} + .btn-login{ background-color: transparent; } @@ -41,3 +46,7 @@ .btn-user > span { font-size: 28px; } + +.btn-logout{ + background-color: red; +} diff --git a/CSS/style.css b/CSS/style.css index 2f2d81e..3634670 100644 --- a/CSS/style.css +++ b/CSS/style.css @@ -1,4 +1,5 @@ @import url(variables.css); +@import url(style_columns.css); @import url(Block/header.css); @import url(Block/footer.css); @import url(Element/logo.css); @@ -36,7 +37,6 @@ h2 { main { margin-top: 190px; - padding: 10px; } .msg { diff --git a/CSS/style_columns.css b/CSS/style_columns.css index 6c03506..57026a6 100644 --- a/CSS/style_columns.css +++ b/CSS/style_columns.css @@ -6,6 +6,12 @@ /*** 12 spaltiges Grid mit Flexboxen ***/ /*** Container ***/ + +.container{ + max-width: 90%; + padding: 24px 42px 24px 42px; +} + .row { display: flex; flex-flow: row; diff --git a/Controller/UserController.php b/Controller/UserController.php index 1cb8e97..4904508 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -130,7 +130,8 @@ class UserController{ public function logout(){ $this->clearUserSession(); - echo "Erfolgreich ausgeloggt"; + header("Location: index.php?controller=user&do=showUserLoginForm"); + exit(); } public function isUserLoggenIn(){ @@ -140,4 +141,8 @@ class UserController{ public function getCurrentUserId(){ return $_SESSION["user_id"] ?? null; } + + public function showUserAccountPage (){ + + } } \ No newline at end of file diff --git a/Views/User/showUserAccountPage.phtml b/Views/User/showUserAccountPage.phtml new file mode 100644 index 0000000..80b531e --- /dev/null +++ b/Views/User/showUserAccountPage.phtml @@ -0,0 +1,17 @@ + + +
+
+
+
+
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/Views/User/showUserLoginForm.phtml b/Views/User/showUserLoginForm.phtml index af1cff4..73dbada 100644 --- a/Views/User/showUserLoginForm.phtml +++ b/Views/User/showUserLoginForm.phtml @@ -27,12 +27,7 @@ - + - - - diff --git a/Views/header.phtml b/Views/header.phtml index 022093e..09c29ad 100644 --- a/Views/header.phtml +++ b/Views/header.phtml @@ -16,16 +16,25 @@