div TODOs
This commit is contained in:
@@ -1,19 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* footer.php
|
||||
*
|
||||
* HTML-Footer, Scripts, evtl. Modale oder Notifications
|
||||
* Wird am Ende jeder Seite eingebunden
|
||||
*/
|
||||
?>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>© <?php echo date('Y'); ?> Troy Grunt - NDT</p>
|
||||
|
||||
<!-- TODO: Optional: Statusanzeige, Debug-Info, Session-Hinweis -->
|
||||
<p class="footer-meta">
|
||||
Umgebung: <?php echo defined('APP_ENV') ? htmlspecialchars(APP_ENV) : 'unknown'; ?>
|
||||
| Session: <?php echo session_id() !== '' ? 'aktiv' : 'inaktiv'; ?>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<!-- TODO: evtl. JS für modale Fenster oder Flash Messages -->
|
||||
<?php if (!empty($_SESSION['success']) || !empty($_SESSION['error'])): ?>
|
||||
<script>
|
||||
(function () {
|
||||
const success = <?php echo json_encode($_SESSION['success'] ?? '', JSON_UNESCAPED_UNICODE); ?>;
|
||||
const error = <?php echo json_encode($_SESSION['error'] ?? '', JSON_UNESCAPED_UNICODE); ?>;
|
||||
if (success) {
|
||||
alert(success);
|
||||
}
|
||||
if (error) {
|
||||
alert(error);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<?php unset($_SESSION['success'], $_SESSION['error']); ?>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user