Compare commits
2 Commits
97137da6b9
...
a4d6aeea18
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a4d6aeea18 | ||
![]() |
a2fd5f011b |
@ -1,5 +1,4 @@
|
||||
<?php include dirname(__DIR__).'/header.phtml'; ?>
|
||||
<script src="JavaScript/script.js"></script>
|
||||
<?php include dirname(__DIR__).'/header.phtml'; ?>
|
||||
<div class="form-container">
|
||||
<h2>Login</h2>
|
||||
<form id="login-form" method="POST">
|
||||
|
@ -8,13 +8,27 @@
|
||||
<script src="JavaScript/script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="wrapper">
|
||||
<div class="button">
|
||||
<a href="?controller=User&do=showUserLoginForm">Anmelden</a>
|
||||
<header class="top-bar">
|
||||
<h1>Notes App <?php if($_SESSION['role'] === 'admin') echo "<span style='font-size:0.7em; color:#ffdd57;'>(Admin Panel)</span>"; ?></h1>
|
||||
<?php if (isset($_SESSION['user_id'])): ?>
|
||||
<div class="user-info">
|
||||
<span>Welcome, <?php echo htmlspecialchars($_SESSION['username'], ENT_QUOTES, 'UTF-8'); ?>!</span>
|
||||
<form id="logout-form" method="POST" style="display: inline;">
|
||||
<input type="hidden" name="action" value="logout">
|
||||
<button type="submit" class="icon-button" title="Logout">→</button>
|
||||
</form>
|
||||
<!-- <button class="icon-button" title="More options">⋮</button> -->
|
||||
</div>
|
||||
<h1>Notes<span>.de</span></h1>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="user-info">
|
||||
<?php if (!isset($_SESSION['user_id'])): ?>
|
||||
<a href="?controller=User&do=showUserLoginForm">Login</a>
|
||||
<?php endif; ?>
|
||||
<?php if (!isset($_SESSION['user_id'])): ?>
|
||||
<a href="?controller=User&do=showUserRegisterForm">Register</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<nav>
|
||||
<ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user