Anpassung der index.php damit der richtige controller geladen wird
This commit is contained in:
@@ -36,7 +36,14 @@ require_once $abs_path . "/php/controller/index-controller.php";
|
||||
include_once 'includes/navbar.php';
|
||||
//Dynamischer Inhalt:
|
||||
if (isset($_GET["pfad"])) {
|
||||
if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) {
|
||||
|
||||
if ($_GET["pfad"] === "search-results") {
|
||||
if (file_exists($abs_path . '/php/controller/search-results-controller.php')) {
|
||||
include_once $abs_path . '/php/controller/search-results-controller.php';
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) {
|
||||
include_once $abs_path . '/content/' . $_GET["pfad"] . '.php';
|
||||
} else {
|
||||
include_once $abs_path . '/content/404.php';
|
||||
|
||||
@@ -22,8 +22,6 @@ if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
|
||||
$_SESSION["message"] = "internal_error";
|
||||
}
|
||||
}
|
||||
header("location: ../../index.php?pfad=search-results");
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user