fixed header
This commit is contained in:
parent
75742157b7
commit
a2fd5f011b
@ -1,5 +1,4 @@
|
|||||||
<?php include dirname(__DIR__).'/header.phtml'; ?>
|
<?php include dirname(__DIR__).'/header.phtml'; ?>
|
||||||
<script src="JavaScript/script.js"></script>
|
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<h2>Login</h2>
|
<h2>Login</h2>
|
||||||
<form id="login-form" method="POST">
|
<form id="login-form" method="POST">
|
||||||
|
@ -8,13 +8,27 @@
|
|||||||
<script src="JavaScript/script.js"></script>
|
<script src="JavaScript/script.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header class="top-bar">
|
||||||
<div class="wrapper">
|
<h1>Notes App <?php if($_SESSION['role'] === 'admin') echo "<span style='font-size:0.7em; color:#ffdd57;'>(Admin Panel)</span>"; ?></h1>
|
||||||
<div class="button">
|
<?php if (isset($_SESSION['user_id'])): ?>
|
||||||
<a href="?controller=User&do=showUserLoginForm">Anmelden</a>
|
<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>
|
</div>
|
||||||
<h1>Notes<span>.de</span></h1>
|
<?php else: ?>
|
||||||
</div>
|
<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>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user