admin should work now

This commit is contained in:
Richard Mikloš 2024-01-23 13:01:56 +01:00
parent f8a510d190
commit 073a56a628
2 changed files with 4 additions and 1 deletions

@ -38,7 +38,7 @@ if(empty($page)){
// Check if user is logged in
if (isset($_SESSION['user_id'])) {
if ($user['isAdmin'] == 1) {
if ($_SESSION['user_isAdmin'] == 1) {
$paths_to_check[] = "pages/admin";
}

@ -5,6 +5,9 @@
<li><a href="">Home</a></li>
<li><a href=""></a></li>
<li><a href="" class="pfp"><template name="gravatar image"></template></a></li>
ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď)
</div>
</ul>
</nav>