From d1a804db47fe0437278c1a55e395971026b8c7f9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 23 Apr 2025 01:19:10 +0500 Subject: feat: report system --- src/partials.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/partials.php') diff --git a/src/partials.php b/src/partials.php index 174b1d3..cf28f28 100644 --- a/src/partials.php +++ b/src/partials.php @@ -15,6 +15,8 @@ function html_navigation_bar() prepare("SELECT COUNT(*) FROM inbox_messages WHERE recipient_id = ? AND has_read = false"); $stmt->execute([$_SESSION["user_id"]]); $unread_count = intval($stmt->fetch()[0]); @@ -24,6 +26,19 @@ function html_navigation_bar() prepare("SELECT COUNT(*) FROM reports WHERE sender_id = ? AND resolved_by IS NULL"); + $stmt->execute([$_SESSION["user_id"]]); + $unread_count = intval($stmt->fetch()[0]); + echo '' ?> + + Reports 0 ? "($unread_count)" : "" ?> + + -- cgit v1.2.3