fixed nav links
This commit is contained in:
+9
-9
@@ -10,13 +10,13 @@ $nav = '
|
|||||||
';
|
';
|
||||||
|
|
||||||
if (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2) {
|
if (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2) {
|
||||||
$nav .= '
|
$nav .= '
|
||||||
<li><a href="/admin.php?view=users"' . ($current_page == '/admin.php' ? ' class="underline"' : '') . '>Admin</a></li>
|
<li><a href="/admin.php?view=users"' . ($current_page == '/admin.php' ? ' class="underline"' : '') . '>Admin</a></li>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_COOKIE['user_id'])) {
|
if (isset($_COOKIE['user_id'])) {
|
||||||
$nav .= '
|
$nav .= '
|
||||||
<li><a href="/user.php?view=display&user_id=' . $_COOKIE['user_id'] . '"' . ($current_page == '/user.php' ? ' class="underline"' : '') . '>Account</a></li>
|
<li><a href="/user.php?view=display&user_id=' . $_COOKIE['user_id'] . '"' . ($current_page == '/user.php' ? ' class="underline"' : '') . '>Account</a></li>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
@@ -30,9 +30,9 @@ $nav .= '
|
|||||||
|
|
||||||
$theme_toggle = '';
|
$theme_toggle = '';
|
||||||
if ($_SESSION['theme'] == 'dark')
|
if ($_SESSION['theme'] == 'dark')
|
||||||
$theme_toggle = 'light';
|
$theme_toggle = 'light';
|
||||||
else
|
else
|
||||||
$theme_toggle = 'dark';
|
$theme_toggle = 'dark';
|
||||||
|
|
||||||
$nav .= '
|
$nav .= '
|
||||||
<button id="theme_toggle" value="' . $theme_toggle . '" name="theme"><i class="nf ' . ($theme_toggle == 'dark' ? 'nf-oct-moon' : 'nf-oct-sun') . '"></i></button>
|
<button id="theme_toggle" value="' . $theme_toggle . '" name="theme"><i class="nf ' . ($theme_toggle == 'dark' ? 'nf-oct-moon' : 'nf-oct-sun') . '"></i></button>
|
||||||
@@ -40,13 +40,13 @@ $nav .= '
|
|||||||
';
|
';
|
||||||
|
|
||||||
if (isset($_COOKIE['username'])) {
|
if (isset($_COOKIE['username'])) {
|
||||||
$nav .= '
|
$nav .= '
|
||||||
<a href="user.php?action=logout">Log Out</a>
|
<a href="user.php?view=logout">Log Out</a>
|
||||||
';
|
';
|
||||||
} else {
|
} else {
|
||||||
$nav .= '
|
$nav .= '
|
||||||
<a href="user.php?action=login">Login</a>
|
<a href="user.php?view=login">Login</a>
|
||||||
<a href="user.php?action=signup">Sign Up</a>
|
<a href="user.php?view=signup">Sign Up</a>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user