diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/emotes/index.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/public/emotes/index.php b/public/emotes/index.php index ad4df09..978515f 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -383,10 +383,12 @@ if (CLIENT_REQUIRES_JSON) { ?></td> </tr> <?php - $stmt = $db->prepare("SELECT u.id, u.username, a.created_at, r.name AS role_name, r.badge_id AS role_badge_id FROM users u + $stmt = $db->prepare("SELECT u.id, u.username, a.created_at, r.name AS role_name, r.badge_id AS role_badge_id, ub.badge_id AS custom_badge_id + FROM users u INNER JOIN mod_actions a ON a.emote_id = ? LEFT JOIN role_assigns ra ON ra.user_id = u.id LEFT JOIN roles r ON r.id = ra.role_id + LEFT JOIN user_badges ub ON ub.user_id = u.id WHERE u.id = a.user_id"); $stmt->execute([$emote->get_id()]); @@ -398,6 +400,10 @@ if (CLIENT_REQUIRES_JSON) { echo ' <img src="/static/userdata/badges/' . $row["role_badge_id"] . '/1x.webp" alt="## ' . $row["role_name"] . '" title="' . $row["role_name"] . '" />'; } + if ($row["custom_badge_id"]) { + echo " <img src='/static/userdata/badges/" . $row["custom_badge_id"] . "/1x.webp' alt='' title='Personal badge' />"; + } + echo ', <span title="'; echo date("M d, Y H:i:s", strtotime($row["created_at"])) . ' UTC">'; echo format_timestamp(strtotime($row["created_at"]) - $emote->get_created_at()) . ' after upload'; |
