refactoring

This commit is contained in:
2025-04-13 15:57:16 -06:00
parent 27bfe8e7b3
commit 8f2c241c3d
29 changed files with 867 additions and 841 deletions
+2 -8
View File
@@ -6,7 +6,7 @@ $nav = '
<div class="site_navigation">
<ul>
<li><a href="/index.php"' . ($current_page == '/index.php' ? ' class="underline"' : '') . '>Home</a></li>
<li><a href="/articles.php?sort=newest"' . ($current_page == '/articles.php' ? ' class="underline"' : '') . '>Articles</a></li>
<li><a href="/articles.php?view=sort&sort=newest"' . ($current_page == '/articles.php' ? ' class="underline"' : '') . '>Articles</a></li>
';
if (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2) {
@@ -17,13 +17,7 @@ if (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2) {
if (isset($_COOKIE['user_id'])) {
$nav .= '
<li><a href="/user.php?action=view&user_id=' . $_COOKIE['user_id'] . '"' . ($current_page == '/user.php' ? ' class="underline"' : '') . '>Account</a></li>
';
}
if (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 3) {
$nav .= '
<li><a href="/compose.php"' . ($current_page == '/compose.php' ? ' class="underline"' : '') . '>Compose</a></li>
<li><a href="/user.php?view=display&user_id=' . $_COOKIE['user_id'] . '"' . ($current_page == '/user.php' ? ' class="underline"' : '') . '>Account</a></li>
';
}