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