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';
?>