From 88c369de321c17ba0ce3126d904979bc54e7764e Mon Sep 17 00:00:00 2001 From: NOrtmann1 Date: Fri, 29 May 2026 16:00:31 +0200 Subject: [PATCH] =?UTF-8?q?profile.php=20dynamisch=20Beitr=C3=A4ge=20anzei?= =?UTF-8?q?gen=20(unvollst=C3=A4ndig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/profile.php | 37 ++++++++++++++----- content/showArticle.php | 5 +-- php/controller/profileArticles-controller.php | 34 +++++++++++++++++ 3 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 php/controller/profileArticles-controller.php diff --git a/content/profile.php b/content/profile.php index 24925f3..a035aa5 100644 --- a/content/profile.php +++ b/content/profile.php @@ -2,7 +2,9 @@ Content: Profil Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern. --> - +
@@ -42,18 +44,33 @@

Meine Beiträge

- +
-

Die Zukunft von CSS Grid

- - Bearbeiten +

+ +
+
Tags:
+
+ + + +
+
+ + class="edit-link-button">Bearbeiten
diff --git a/content/showArticle.php b/content/showArticle.php index b069b88..968c0b2 100644 --- a/content/showArticle.php +++ b/content/showArticle.php @@ -15,7 +15,6 @@ include_once 'php/controller/showArticle-controller.php'; -

@@ -28,7 +27,7 @@ include_once 'php/controller/showArticle-controller.php';
- +
@@ -36,7 +35,7 @@ include_once 'php/controller/showArticle-controller.php';
- +
Tags:
diff --git a/php/controller/profileArticles-controller.php b/php/controller/profileArticles-controller.php new file mode 100644 index 0000000..dd53dac --- /dev/null +++ b/php/controller/profileArticles-controller.php @@ -0,0 +1,34 @@ +getArticle($_GET["id"]); + if($article != null){ + $title = $article->getTitle(); + $content = $article->getContent(); + $category = $article->getCategory(); + $author = $article->getAuthor(); + $tags = $article->getTags(); + $creationDate = $article->getCreationDate(); + }else{ + $_SESSION["message"] = "article_not_found"; + echo "article_not_found"; + } + } catch (Exception $e){ + $_SESSION["message"] = "internal_error"; + echo "Fehler aufgetreten: " . $e->getMessage(); + } +}else{ + $_SESSION["message"] = "article_not_found"; + echo "article_not_found"; +} + +?> \ No newline at end of file