summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-20 10:48:39 +0500
committerilotterytea <iltsu@alright.party>2025-04-20 10:48:39 +0500
commit129b4df7ddeb1c6a819c0ebeee11dab50d18ff53 (patch)
tree49667e8eb6fd08d83cfc79bd53b11d921a1eff78 /src
parentc474b61f3c741e86a3273b2f4c2017de05eb1085 (diff)
feat: display current session + updated button url
Diffstat (limited to 'src')
-rw-r--r--src/partials.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/partials.php b/src/partials.php
index 97bd1f4..8f2d2ab 100644
--- a/src/partials.php
+++ b/src/partials.php
@@ -10,8 +10,18 @@ function html_navigation_bar()
<div class="links">
<a href="/emotes" class="button">Emotes</a>
<a href="/emotes/upload.php" class="button">Upload</a>
- <a href="/login" class="button">Log in...</a>
+ <a href="/account" class="button">Account</a>
</div>
+ <?php
+ if (isset($_SESSION["user_id"])) {
+ echo '' ?>
+ <a href="/users/<?php echo $_SESSION["user_id"] ?>" class="links" style="margin-left:auto;">
+ Signed in as <?php echo $_SESSION["user_name"] ?> <img
+ src="/static/userdata/avatars/<?php echo $_SESSION["user_id"] ?>" width="24" height="24" />
+ </a>
+ <?php ;
+ }
+ ?>
</section>
<?php ;
}