diff --git a/admin/chat.php b/admin/chat.php index eb9195c..bfebb6c 100644 --- a/admin/chat.php +++ b/admin/chat.php @@ -6,9 +6,7 @@ $pdo = db(); // Handle deletion of chat if (isset($_GET['action']) && $_GET['action'] === 'delete' && isset($_GET['delete_user_id'])) { $del_id = $_GET['delete_user_id']; - // Delete messages $pdo->prepare("DELETE FROM messages WHERE user_id = ?")->execute([$del_id]); - // Optionally update orders to not show in chat $pdo->prepare("UPDATE fiat_orders SET status = 'rejected' WHERE user_id = ? AND status IN ('matching', 'submitting')")->execute([$del_id]); header("Location: chat.php"); exit; @@ -70,7 +68,6 @@ $chat_users = $pdo->query(" .back-btn { color: #848E9C; text-decoration: none; font-size: 0.9rem; padding: 15px; border-bottom: 1px solid #2B3139; display: block; } .back-btn:hover { color: white; background: #2B3139; } - /* Custom alert */ #custom-alert { display: none; position: fixed; top: 20px; right: 20px; background: #f0b90b; color: black; padding: 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 10000; animation: slideIn 0.5s; width: 300px; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @@ -82,7 +79,7 @@ $chat_users = $pdo->query(" 新通知 / NEW NOTIFICATION