prepare("UPDATE notifications SET is_read = TRUE WHERE id = ? AND user_id = ?"); $stmt->execute([$notification_id, $_SESSION['user_id']]); header('Location: notifications.php'); exit; } // 标记所有为已读 if (isset($_POST['mark_all_read'])) { $stmt = $pdo->prepare("UPDATE notifications SET is_read = TRUE WHERE user_id = ?"); $stmt->execute([$_SESSION['user_id']]); header('Location: notifications.php'); exit; } // 删除通知 if (isset($_GET['delete'])) { $notification_id = intval($_GET['delete']); $stmt = $pdo->prepare("DELETE FROM notifications WHERE id = ? AND user_id = ?"); $stmt->execute([$notification_id, $_SESSION['user_id']]); header('Location: notifications.php'); exit; } // 获取通知列表 $notifications = getUserNotifications($_SESSION['user_id'], 50); $unreadCount = getUnreadNotificationCount($_SESSION['user_id']); $userSettings = getUserSettings($_SESSION['user_id']); ?> 通知中心 - PicHost

通知中心

0): ?>
条未读

📭 暂无通知

您还没有收到任何通知

'公告', 'tips' => '技巧', 'feedback_result' => '反馈', 'image_feedback' => '图片' ]; echo $typeLabels[$notification['type_name']] ?? $notification['type_name']; ?>