From 414bb74001335f17854c45731b5145284bdcd085 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Fri, 19 Jul 2024 01:04:05 +0300 Subject: [PATCH] add labels to comments --- app/Models/Comment.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 24ae03f..a103d29 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -25,6 +25,11 @@ class Comment { if (json_decode($user->i('content'), true)['aboutlive']['value'] != null) { echo ' '.htmlspecialchars(json_decode($user->i('content'), true)['aboutlive']['value']); } + if ($user->i('admin') === 1) { + $admintype = ' · Администратор сервера'; + } else if ($user->i('admin') === 2) { + $admintype = ' · Фотомодератор'; + } if ((int)Vote::countcommrates($this->c['id'], -1) >= 1) { $commclass = 'pro'; $symb = '+'; @@ -35,7 +40,7 @@ class Comment { $commclass = ''; } echo ' -