Beitrag erstellen #13

Merged
niklas.ortmann merged 164 commits from Beitrag-erstellen into dev 2026-05-29 13:22:11 +02:00
3 changed files with 17 additions and 13 deletions
Showing only changes of commit 949ca542ab - Show all commits
+4 -4
View File
@@ -3,10 +3,10 @@
Inhalt: Formular für die Erstellung eines neuen Beitrags
-->
<?php
include_once 'php/model/ArticleManagerDAO.php';
include_once 'php/model/ArticleManager.php';
include_once $abs_path . '/php/model/ArticleManagerDAO.php';
include_once $abs_path . '/php/model/ArticleManager.php';
if(isset($_POST['title']) && isset($_POST['content']) && isset($_POST['post-category'])) {
if(isset($_POST['title']) && isset($_POST['content']) && isset($_POST['category'])) {
}else{
// TODO: Exception werfen.
@@ -14,7 +14,7 @@
}
?>
<form method="post" action="php/controller/createArticle-controller.php" id="editor-form" class="wp-editor-scope editor-container">
<form method="post" action="../php/controller/createArticle-controller.php" id="editor-form" class="wp-editor-scope editor-container">
<main class="editor-main">
<input type="text" id="title" name="title" placeholder="Titel hier eingeben" required>
+10 -9
View File
@@ -1,8 +1,9 @@
<?php
//Geschäftslogik:
require_once 'php/controller/index-controller.php';
if (!isset($abs_path)) {
require_once "path.php";
}
require_once $abs_path . "/php/controller/index-controller.php";
?>
<!--
@@ -29,18 +30,18 @@ require_once 'php/controller/index-controller.php';
<body>
<?php
include_once 'includes/navbar.php';
include_once $abs_path . '/includes/navbar.php';
//Dynamischer Inhalt:
if (isset($_GET["pfad"])) {
if (file_exists('content/' . $_GET["pfad"] . '.php')) {
include_once 'content/' . $_GET["pfad"] . '.php';
if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) {
include_once $abs_path . '/content/' . $_GET["pfad"] . '.php';
} else {
include_once 'content/404.php';
include_once $abs_path . '/content/404.php';
}
} else {
include_once 'content/home.php';
include_once $abs_path . '/content/home.php';
}
include_once 'includes/footer.php';
include_once $abs_path . '/includes/footer.php';
?>
</body>
+3
View File
@@ -0,0 +1,3 @@
<?php
$abs_path = __DIR__;
?>