Compare commits

..

No commits in common. "a4d6aeea18ca98daae247fe3b190249b9c702d26" and "97137da6b949b8c3c6e04c653b26bb5d6579ecfb" have entirely different histories.

2 changed files with 8 additions and 21 deletions

View File

@ -1,4 +1,5 @@
<?php include dirname(__DIR__).'/header.phtml'; ?>
<script src="JavaScript/script.js"></script>
<div class="form-container">
<h2>Login</h2>
<form id="login-form" method="POST">

View File

@ -8,27 +8,13 @@
<script src="JavaScript/script.js"></script>
</head>
<body>
<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> -->
<header>
<div class="wrapper">
<div class="button">
<a href="?controller=User&do=showUserLoginForm">Anmelden</a>
</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; ?>
<h1>Notes<span>.de</span></h1>
</div>
</header>
<nav>
<ul>