72 lines
1.8 KiB
PHP
72 lines
1.8 KiB
PHP
<?php
|
|
require_once "includes/LocalUserDAO.php";
|
|
|
|
$dao = new LocalUserDAO();
|
|
|
|
if (!isset($_SESSION["user"])) {
|
|
header("Location: index.php?pfad=login");
|
|
exit();
|
|
}
|
|
|
|
$user = $dao->findUser($_SESSION["user_email"]);
|
|
?>
|
|
|
|
<!--
|
|
Content: Profil
|
|
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
|
|
-->
|
|
|
|
<main class="form-page">
|
|
|
|
<div class="form-container">
|
|
|
|
<h1>Mein Profil</h1>
|
|
|
|
<form method="post" action="index.php?pfad=profile">
|
|
|
|
<label class="input-label">Name</label>
|
|
<input type="text"
|
|
name="username"
|
|
class="login-input"
|
|
required
|
|
placeholder="Name"
|
|
value="<?php echo htmlspecialchars($user["username"]); ?>">
|
|
|
|
<label class="input-label">Email-Adresse</label>
|
|
<input type="email"
|
|
name="email"
|
|
class="login-input"
|
|
required
|
|
placeholder="mustermann@web.de"
|
|
value="<?php echo htmlspecialchars($user["email"]); ?>">
|
|
|
|
<label class="input-label">Passwort</label>
|
|
<input type="password"
|
|
name="password"
|
|
class="login-input"
|
|
required
|
|
placeholder="Passwort"
|
|
value="<?php echo htmlspecialchars($user["password"]); ?>">
|
|
|
|
<br>
|
|
|
|
<button type="submit" class="login-button">
|
|
Speichern
|
|
</button>
|
|
|
|
</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>
|
|
</main>
|