From 88f618b0075460cf13a8dab30632e66e2a862601 Mon Sep 17 00:00:00 2001 From: Dendy Date: Thu, 24 Dec 2020 10:04:19 +0100 Subject: [PATCH] Add message notification thingie --- config.php | 4 ++++ include/header.php | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/config.php b/config.php index 3b7dac5..5578ab2 100644 --- a/config.php +++ b/config.php @@ -26,4 +26,8 @@ if(!isset($_SESSION["login"])){ $_IS_LOGGED = $_SESSION["login"] === "true"; $_IS_ADMIN = $_SESSION["username"] === "admin"; +if(!is_array($_SESSION["msg"])){ + $_SESSION["msg"] = array(); +} + ?> diff --git a/include/header.php b/include/header.php index 014e53d..d3ef2f2 100644 --- a/include/header.php +++ b/include/header.php @@ -17,6 +17,14 @@ #header{ text-align: center; } + .alert{ + margin: 20px; + padding: 5px; + color: orange; + border: solid orange 1px; + margin: auto; + width: 60vw; + } "); + $_SESSION["msg"] = array(); + } + } + ?>