diff --git a/admin/backend_settings.php b/admin/backend_settings.php
index bae5fc6..6ff73fc 100644
--- a/admin/backend_settings.php
+++ b/admin/backend_settings.php
@@ -137,7 +137,7 @@ ob_start();
-
+
使用说明
- 网站名称:影响浏览器标签页标题。
diff --git a/admin/binary.php b/admin/binary.php
index 90720af..17d87c6 100644
--- a/admin/binary.php
+++ b/admin/binary.php
@@ -17,7 +17,16 @@ try {
$expired = $stmt->fetchAll();
foreach ($expired as $o) {
$result = ($o['control_status'] == 1 || $o['user_control'] == 1) ? 'won' : (($o['control_status'] == 2 || $o['user_control'] == 2) ? 'lost' : ((rand(0, 100) > 50) ? 'won' : 'lost'));
- $db->prepare("UPDATE binary_orders SET status = ?, settled_at = NOW() WHERE id = ?")->execute([$result, $o['id']]);
+
+ // Get a dummy close price if we don't have one (should match the result)
+ $close_price = $o['entry_price'];
+ if ($result === 'won') {
+ $close_price = ($o['direction'] === 'up' || $o['direction'] === 'buy') ? $o['entry_price'] * 1.01 : $o['entry_price'] * 0.99;
+ } else {
+ $close_price = ($o['direction'] === 'up' || $o['direction'] === 'buy') ? $o['entry_price'] * 0.99 : $o['entry_price'] * 1.01;
+ }
+
+ $db->prepare("UPDATE binary_orders SET status = ?, close_price = ?, end_at = NOW() WHERE id = ?")->execute([$result, $close_price, $o['id']]);
if ($result === 'won') {
$win_amount = $o['amount'] + ($o['amount'] * $o['profit_rate'] / 100);
$db->prepare("UPDATE user_balances SET available = available + ? WHERE user_id = ? AND symbol = 'USDT'")->execute([$win_amount, $o['user_id']]);
@@ -70,6 +79,11 @@ $orders = $stmt->fetchAll();
+
+
管理提示
+
在此页面您可以实时监控用户的秒合约订单。对于进行中的订单,您可以手动设置“控赢”或“控亏”来干预交易结果。订单到期后系统会自动根据设置或市场价进行结算。
+
+
控制状态已更新!
diff --git a/admin/customer_service.php b/admin/customer_service.php
index eea001c..1603b6b 100644
--- a/admin/customer_service.php
+++ b/admin/customer_service.php
@@ -162,8 +162,8 @@ document.getElementById('chat-form').addEventListener('submit', async (e) => {
fetchMessages();
});
-setInterval(refreshUsers, 5000);
-setInterval(fetchMessages, 2000);
+setInterval(refreshUsers, 3000);
+setInterval(fetchMessages, 1000);
refreshUsers();