Basic message implementation
This commit is contained in:
@@ -35,6 +35,16 @@
|
||||
<td><?= ($user->user_active == 0 ? 'No' : 'Yes'); ?></td>
|
||||
<td>
|
||||
<a href="<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>">Profile</a>
|
||||
<?php
|
||||
// Show unread message count for each user
|
||||
if (Session::userIsLoggedIn()) {
|
||||
$current_user_id = Session::get('user_id');
|
||||
$unread_count = MessageModel::getUnreadCountForUser($current_user_id, $user->user_id);
|
||||
if ($unread_count > 0) {
|
||||
echo ' <span class="badge" style="background-color: #d9534f; color: white; padding: 2px 5px; border-radius: 50%;">' . $unread_count . '</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user