true, 'notifications' => $notifications, 'unreadCount' => $unreadCount, 'totalPages' => $totalPages, 'currentPage' => $notifPage ]); exit(); } $action = $_GET['notificationAction']; $response = ['success' => false]; $json = file_get_contents('php://input'); $data = json_decode($json, true); if ($action === 'mark_notification_read') { if (isset($data['id'])) { $id = intval($data['id']); $query = "UPDATE notification SET notification_status = 1 WHERE id = $id"; if (mysqli_query($conn, $query)) { $response['success'] = true; } } } elseif ($_GET['notificationAction'] === 'mark_notifications_read') { // Tüm bildirimleri güncelle $query = "UPDATE notification SET notification_status = 1 WHERE notification_status = 0 $adminFilter"; if (mysqli_query($conn, $query)) { $response['success'] = true; } } echo json_encode($response); exit(); } ?> ['title' => 'Admin', 'color' => '#FFD700', 'icon' => 'fas fa-crown'], 921 => ['title' => 'Moderator', 'color' => '#00BFFF', 'icon' => 'fas fa-shield-alt'], 896 => ['title' => 'Helper', 'color' => '#BA55D3', 'icon' => 'fas fa-chess-knight'], 356 => ['title' => 'Support', 'color' => '#32CD32', 'icon' => 'fas fa-shopping-cart'], ]; $currentRank = $rankStyles[$rank] ?? ['title' => 'UNKNOWN', 'color' => '#aaa', 'icon' => 'fas fa-question']; $bgGif = ''; if ($rank === 1337) { $bgGif = 'assets/uploads/img/text_anim_red.gif'; } elseif ($rank === 921) { $bgGif = 'assets/uploads/img/text_anim_blue.gif'; } elseif ($rank === 896 || $rank === 356) { $bgGif = 'assets/uploads/img/text_anim_gray.gif'; } include 'assets/inc/animation/season-animation.php'; ?>
0): ?>
Notifications Read All
0): ?> = 3) ? $parts[1] . " " . $parts[2] : $target; $displayMessage = "Send to " . $sendTo . ": " . htmlspecialchars($notif['notification_message'], ENT_QUOTES, 'UTF-8'); } else { continue; } $iconClass = "fa-solid fa-hashtag"; $iconColor = ($notif['notification_status'] == 0) ? 'lightgreen' : 'darkgray'; $textStyle = ""; } else { $displayMessage = htmlspecialchars($notif['notification_message'], ENT_QUOTES, 'UTF-8'); $iconClass = "fa-solid fa-hashtag"; $iconColor = ($notif['notification_status'] == 0) ? 'lightgreen' : 'darkgray'; $textStyle = ""; } if ($notif['notification_status'] == 0 && $notif['notification_type'] !== 'announce') { $textStyle = "color: white;"; } $notificationUrl = isset($notif['notification_url']) ? htmlspecialchars($notif['notification_url'], ENT_QUOTES, 'UTF-8') : ''; ?>
>
You have no notifications.