Weitere Reviewänderungen
This commit is contained in:
@@ -15,5 +15,5 @@ if (isset($_SESSION["user_email"])) {
|
|||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
header("Location: index.php?pfad=register");
|
header("Location: index.php");
|
||||||
exit();
|
exit();
|
||||||
+34
-36
@@ -1,55 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once 'php/controller/profile-controller.php';
|
$error = $error ?? null;
|
||||||
|
|
||||||
$user = $user ?? null;
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Content: Profil
|
Form: Login-Bereich
|
||||||
Inhalt: Das eigene Profil, wenn man angemeldet ist.
|
Funktion: Benutzerauthentifizierung und Zugang zum eigenen Profil, Erstellen von Beiträgen, etc.
|
||||||
Dort werden die aktuellen Profildaten angezeigt.
|
|
||||||
-->
|
-->
|
||||||
|
<main class="login-page">
|
||||||
|
<div class="login-container">
|
||||||
|
|
||||||
<main class="form-page">
|
<h1>Bitte anmelden</h1>
|
||||||
|
|
||||||
<div class="form-container">
|
<?php if ($error): ?>
|
||||||
|
<p style="color:red;">
|
||||||
|
<?php echo htmlspecialchars($error); ?>
|
||||||
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<h1>Mein Profil</h1>
|
<form method="post" action="index.php?pfad=login">
|
||||||
|
|
||||||
<form>
|
<p class="input-label">Benutzername/E-Mail-Adresse:</p>
|
||||||
|
|
||||||
<label class="input-label">Name</label>
|
|
||||||
<input type="text"
|
|
||||||
class="login-input"
|
|
||||||
readonly
|
|
||||||
value="<?php echo htmlspecialchars($user["username"] ?? ""); ?>">
|
|
||||||
|
|
||||||
<label class="input-label">Email-Adresse</label>
|
|
||||||
<input type="email"
|
<input type="email"
|
||||||
|
name="email"
|
||||||
class="login-input"
|
class="login-input"
|
||||||
readonly
|
placeholder="E-Mail-Adresse"
|
||||||
value="<?php echo htmlspecialchars($user["email"] ?? ""); ?>">
|
required
|
||||||
|
autofocus>
|
||||||
|
|
||||||
<label class="input-label">Passwort</label>
|
<p class="input-label">Passwort:</p>
|
||||||
<input type="password"
|
<input type="password"
|
||||||
|
name="password"
|
||||||
class="login-input"
|
class="login-input"
|
||||||
readonly
|
placeholder="Passwort"
|
||||||
value="********">
|
required>
|
||||||
|
|
||||||
|
<button type="submit"
|
||||||
|
value="anmelden"
|
||||||
|
name="loginSubmit"
|
||||||
|
class="login-button">
|
||||||
|
anmelden
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="register-link">
|
||||||
|
<a href="index.php?pfad=register">
|
||||||
|
Noch keinen Account? Jetzt hier registrieren!
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<a href="index.php?pfad=deleteAccount" class="login-button">
|
|
||||||
Account löschen
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<a href="index.php?pfad=logout" class="login-button">
|
|
||||||
Abmelden
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
@@ -5,9 +5,17 @@ ob_start();
|
|||||||
$pfad = $_GET["pfad"] ?? "home";
|
$pfad = $_GET["pfad"] ?? "home";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Aktionen wie Logout oder Account löschen müssen vor der HTML-Ausgabe
|
Controller für Aktionen werden vor der HTML-Ausgabe geladen,
|
||||||
verarbeitet werden, damit Weiterleitungen mit header() funktionieren.
|
damit Weiterleitungen mit header() funktionieren.
|
||||||
*/
|
*/
|
||||||
|
if ($pfad === "login") {
|
||||||
|
include_once "php/controller/login-controller.php";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pfad === "register") {
|
||||||
|
include_once "php/controller/register-controller.php";
|
||||||
|
}
|
||||||
|
|
||||||
if ($pfad === "logout") {
|
if ($pfad === "logout") {
|
||||||
include_once "content/logout.php";
|
include_once "content/logout.php";
|
||||||
exit();
|
exit();
|
||||||
@@ -57,7 +65,6 @@ if ($pfad === "deleteAccount") {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user