Weitere Reviewänderungen
This commit is contained in:
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
header("Location: index.php?pfad=login");
|
header("Location: index.php");
|
||||||
exit();
|
exit();
|
||||||
@@ -1,46 +1,65 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
$pfad = $_GET["pfad"] ?? "home";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Aktionen wie Logout oder Account löschen müssen vor der HTML-Ausgabe
|
||||||
|
verarbeitet werden, damit Weiterleitungen mit header() funktionieren.
|
||||||
|
*/
|
||||||
|
if ($pfad === "logout") {
|
||||||
|
include_once "content/logout.php";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pfad === "deleteAccount") {
|
||||||
|
include_once "content/deleteAccount.php";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<!--
|
|
||||||
Seite: Index der Lernplattform
|
|
||||||
Funktion: Webseitengerüst, Anzeigen von Content
|
|
||||||
-->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
|
|
||||||
<head>
|
<!--
|
||||||
<meta charset="utf-8">
|
Seite: Index der Lernplattform
|
||||||
<meta name="description" content="EduForge">
|
Funktion: Webseitengerüst, Anzeigen von Content
|
||||||
<meta name="author" content="Niklas Ortmann">
|
-->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<!DOCTYPE html>
|
||||||
<link rel="icon" type="image/x-icon" href="images/logos/logo_icon.ico">
|
<html lang="de">
|
||||||
<link rel="stylesheet" href="css/main.css">
|
|
||||||
<link rel="stylesheet" href="css/navbar.css">
|
|
||||||
<link rel="stylesheet" href="css/footer.css">
|
|
||||||
<title>EduForge</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="description" content="EduForge">
|
||||||
|
<meta name="author" content="Niklas Ortmann">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="icon" type="image/x-icon" href="images/logos/logo_icon.ico">
|
||||||
|
<link rel="stylesheet" href="css/main.css">
|
||||||
|
<link rel="stylesheet" href="css/navbar.css">
|
||||||
|
<link rel="stylesheet" href="css/footer.css">
|
||||||
|
<title>EduForge</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once 'includes/navbar.php';
|
include_once 'includes/navbar.php';
|
||||||
//Dynamischer Inhalt:
|
|
||||||
if (isset($_GET["pfad"])) {
|
/*
|
||||||
if (file_exists('content/' . $_GET["pfad"] . '.php')) {
|
Dynamischer Inhalt:
|
||||||
include_once 'content/' . $_GET["pfad"] . '.php';
|
Je nach pfad-Parameter wird die passende Datei aus content geladen.
|
||||||
} else {
|
*/
|
||||||
include_once 'content/404.php';
|
if (file_exists('content/' . $pfad . '.php')) {
|
||||||
}
|
include_once 'content/' . $pfad . '.php';
|
||||||
} else {
|
} else {
|
||||||
include_once 'content/home.php';
|
include_once 'content/404.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once 'includes/footer.php';
|
include_once 'includes/footer.php';
|
||||||
?>
|
?>
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user