First Implementation
This commit is contained in:
+37
-20
@@ -1,11 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
require_once "includes/UserDAO.php";
|
||||||
|
|
||||||
if (!isset($_SESSION["user"])) {
|
if (!isset($_SESSION["user"])) {
|
||||||
header("Location: index.php?pfad=login");
|
header("Location: index.php?pfad=login");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dao = new UserDAO();
|
||||||
|
$user = $dao->findUser($_SESSION["user_email"]);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Content: Profil
|
Content: Profil
|
||||||
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
|
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
|
||||||
@@ -14,27 +18,34 @@ if (!isset($_SESSION["user"])) {
|
|||||||
<main class="form-page">
|
<main class="form-page">
|
||||||
|
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<form>
|
|
||||||
|
|
||||||
<label class="input-label">Vorname</label>
|
<h1>Mein Profil</h1>
|
||||||
|
|
||||||
<input type="text" name="Vorname" class="login-input" required
|
<form method="post" action="index.php?pfad=profile">
|
||||||
placeholder="Vorname"
|
|
||||||
value="<?php //DB-Daten ?>">
|
|
||||||
|
|
||||||
<label class="input-label">Nachname</label>
|
<label class="input-label">Name</label>
|
||||||
<input type="text" name="Nachname" class="login-input" required
|
<input type="text"
|
||||||
placeholder="Nachname"
|
name="username"
|
||||||
value="<?php //DB-Daten ?>">
|
class="login-input"
|
||||||
|
required
|
||||||
|
placeholder="Name"
|
||||||
|
value="<?php echo htmlspecialchars($user["username"]); ?>">
|
||||||
|
|
||||||
<label class="input-label">Email-Adresse</label>
|
<label class="input-label">Email-Adresse</label>
|
||||||
<input type="email" name="Email" class="login-input" required
|
<input type="email"
|
||||||
|
name="email"
|
||||||
|
class="login-input"
|
||||||
|
required
|
||||||
placeholder="mustermann@web.de"
|
placeholder="mustermann@web.de"
|
||||||
value="<?php //DB-Daten ?>">
|
value="<?php echo htmlspecialchars($user["email"]); ?>">
|
||||||
|
|
||||||
<label class="input-label">Passwort</label>
|
<label class="input-label">Passwort</label>
|
||||||
<input type="password" name="Passwort" class="login-input"
|
<input type="password"
|
||||||
required placeholder="Passwort">
|
name="password"
|
||||||
|
class="login-input"
|
||||||
|
required
|
||||||
|
placeholder="Passwort"
|
||||||
|
value="<?php echo htmlspecialchars($user["password"]); ?>">
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -42,13 +53,19 @@ if (!isset($_SESSION["user"])) {
|
|||||||
Speichern
|
Speichern
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<button type="button" class="login-button">
|
|
||||||
Account löschen
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</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>
|
||||||
Reference in New Issue
Block a user