dynamic content test
profil wird dynamisch in die index.php integriert (Test)
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
<!--
|
||||
Seite: 404 Seite nicht gefunden
|
||||
Funktion: Wenn eine Seite nicht gefunden wurde oder noch fehlt, dann wird hierauf verwiesen.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<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>
|
||||
<?php
|
||||
include_once 'includes/navbar.php';
|
||||
?>
|
||||
|
||||
<main>
|
||||
|
||||
<h1>404 - Seite nicht vorhanden</h1>
|
||||
<p>
|
||||
Später im Projekt sollen über index.php?pfad= ... der Inhalt der index.php dynamisch gesetzt werden.
|
||||
Alle Content-Links der Navbar führen zunächst hier her. Exemplarisch wurden für die Fächer Informatik, Physik, Mathematik der Content als Seite erstellt und kann über die Navbar ausgekundschaftet werden.
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include_once 'includes/footer.php';
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--
|
||||
Seite: 404 Seite nicht gefunden
|
||||
Funktion: Wenn eine Seite nicht gefunden wurde oder noch fehlt, dann wird hierauf verwiesen.
|
||||
-->
|
||||
<main>
|
||||
|
||||
<h1>404 - Seite nicht vorhanden</h1>
|
||||
<p>
|
||||
Später im Projekt sollen über index.php?pfad= ... der Inhalt der index.php dynamisch gesetzt werden.
|
||||
Alle Content-Links der Navbar führen zunächst hier her. Exemplarisch wurden für die Fächer Informatik, Physik, Mathematik der Content als Seite erstellt und kann über die Navbar ausgekundschaftet werden.
|
||||
</p>
|
||||
</main>
|
||||
@@ -1,27 +1,7 @@
|
||||
<!--
|
||||
Seite: Profil
|
||||
Content: Profil
|
||||
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<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>
|
||||
|
||||
<?php
|
||||
include_once 'includes/navbar.php';
|
||||
?>
|
||||
|
||||
<main class="form-page">
|
||||
|
||||
@@ -64,10 +44,3 @@ include_once 'includes/navbar.php';
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include_once 'includes/footer.php';
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+2
-2
@@ -15,7 +15,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
||||
</label>
|
||||
|
||||
<ul id="mobile-nav" class="nav__mobile-menu">
|
||||
<li><a href="profile.php">Profil</a></li>
|
||||
<li><a href="index.php?pfad=profile">Profil</a></li>
|
||||
<li><a href="login.php">Anmelden</a></li>
|
||||
<li><a href="register.php">Registrieren</a></li>
|
||||
<li>
|
||||
@@ -120,7 +120,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
||||
</div>
|
||||
|
||||
<div class="nav__right">
|
||||
<a href = "profile.php" class="nav_item nav__link">Profil</a>
|
||||
<a href="index.php?pfad=profile" class="nav_item nav__link">Profil</a>
|
||||
<div class="nav__search">
|
||||
<?php
|
||||
include_once 'search.php';
|
||||
|
||||
@@ -23,8 +23,21 @@
|
||||
<?php
|
||||
include_once 'includes/navbar.php';
|
||||
//Dynamischer Inhalt (später mit php...):
|
||||
include_once 'content/home.php';
|
||||
?>
|
||||
if (isset($_GET["pfad"])) {
|
||||
if (file_exists('content/' . $_GET["pfad"] . '.php')) {
|
||||
include_once 'content/' . $_GET["pfad"] . '.php';
|
||||
} else {
|
||||
include_once 'content/404.php';
|
||||
}
|
||||
} else {
|
||||
include_once 'content/home.php';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once 'includes/footer.php';
|
||||
|
||||
Reference in New Issue
Block a user