diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-15 17:34:19 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-15 17:34:19 +0500 |
| commit | a241d3983d1cb79d455053a1f41cae0366fcaa71 (patch) | |
| tree | bf93fe0826f66dea6be9240873430f83a7ced6d6 /src/partials.php | |
| parent | 84e052a64a5ac8172095b993e2d0855e2ce69897 (diff) | |
feat: change emotesets
Diffstat (limited to 'src/partials.php')
| -rw-r--r-- | src/partials.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/partials.php b/src/partials.php index c9ee5cb..760923a 100644 --- a/src/partials.php +++ b/src/partials.php @@ -79,6 +79,27 @@ function html_navigation_bar() </div> <?php if (isset($_SESSION["user_id"])): ?> <div class="flex items-bottom small-gap" style="margin-left: auto;"> + <?php if (isset($_SESSION["user_emote_sets"])): ?> + <form action="/account/change_emoteset.php" method="POST" id="form-change-emoteset"> + <input type="text" name="redirect" value="<?php echo $_SERVER["REQUEST_URI"] ?>" style="display: none;"> + <div class="row small-gap"> + <label for="id">Current emote set: </label> + <select name="id" onchange="send_change_emoteset(event)"> + <?php + foreach ($_SESSION["user_emote_sets"] as $es) { + echo '<option value="' . $es["id"] . '">' . $es["name"] . '</option>'; + } + ?> + </select> + </div> + </form> + <script> + function send_change_emoteset(e) { + document.getElementById("form-change-emoteset").submit(); + } + </script> + <?php endif; ?> + <a href="/users.php?id=<?php echo $_SESSION["user_id"] ?>" class="flex items-bottom small-gap"> Signed in as <?php echo $_SESSION["user_name"] ?> <?php |
