diff --git a/admin/ai_control.php b/admin/ai_control.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/ai_control.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/backend_settings.php b/admin/backend_settings.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/backend_settings.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/binary.php b/admin/binary.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/binary.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/contract.php b/admin/contract.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/contract.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/customer_service.php b/admin/customer_service.php new file mode 100644 index 0000000..dfab399 --- /dev/null +++ b/admin/customer_service.php @@ -0,0 +1,167 @@ + + + + + + Byro Admin | 客服系统 + + + + + + + + + +
+ + +
+
+ +

从左侧选择一个会话开始实时对话

+
+
+ + +
+ + + + diff --git a/admin/exchange.php b/admin/exchange.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/exchange.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/finance.php b/admin/finance.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/finance.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/frontend_settings.php b/admin/frontend_settings.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/frontend_settings.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..00cc054 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,146 @@ + + +
+
+
+
+
+
总用户数
+
1,234
+
+
+ +
+
+
+ 12% 较上月 +
+
+
+
+
+
+
+
总充值 (USDT)
+
542,000
+
+
+ +
+
+
+ 5.4% 较昨日 +
+
+
+
+
+
+
+
今日成交额
+
1.2M
+
+
+ +
+
+
+ 2.1% 较昨日 +
+
+
+
+
+
+
+
待审核提现
+
15
+
+
+ +
+
+
+ 需要尽快处理 +
+
+
+
+ +
+
+
+
+
最新用户注册
+ +
+ + + + + + + + + + + + + prepare("SELECT * FROM users ORDER BY created_at DESC LIMIT 5"); + $stmt->execute(); + while ($user = $stmt->fetch()): + ?> + + + + + + + + + + +
UID账号信用分注册时间状态操作
正常 + +
+
+
+
+
+
系统通知
+
+
+
+ 系统升级成功 + 1小时前 +
+

版本 2.1.0 已发布,优化了交易引擎性能。

+
+
+
+ 数据库备份 + 5小时前 +
+

每日自动备份已完成,状态正常。

+
+
+
+ 新提现申请 + 8小时前 +
+

用户 UID:618120456 申请提现 500 USDT。

+
+
+
+
+
+ + diff --git a/admin/layout.php b/admin/layout.php new file mode 100644 index 0000000..15cce5b --- /dev/null +++ b/admin/layout.php @@ -0,0 +1,151 @@ +prepare("SELECT * FROM users WHERE id = ?"); + $stmt->execute([$_SESSION['user_id']]); + $user = $stmt->fetch(); +} + +if (!$user || $user['username'] !== 'admin') { + header('Location: /auth/login.php'); + exit; +} + +function renderAdminPage($content, $title = '后台管理') { + ?> + + + + + + <?= $title ?> - Byro Admin + + + + + +
+ +
+ 首页 + 平台数据 + 玩家管理 + 充提管理 + 秒合约管理 + 永续合约 + 币币交易 + 兑换管理 + 质押挖矿 + AI控盘 + 客服管理 + 前端设置 + 后台设置 + 个人设置 +
+
+ +
+
+
+
+
+
欢迎您, 管理员
+ 返回首页 + 登出 +
+
+ +
+ +
+ + + diff --git a/admin/mining.php b/admin/mining.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/mining.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/profile.php b/admin/profile.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/profile.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/spot.php b/admin/spot.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/spot.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/stats.php b/admin/stats.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/stats.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/admin/users.php b/admin/users.php new file mode 100644 index 0000000..dbd3df4 --- /dev/null +++ b/admin/users.php @@ -0,0 +1 @@ +

正在开发中...

此模块即将上线,敬请期待。

diff --git a/api/chat.php b/api/chat.php new file mode 100644 index 0000000..4e49a99 --- /dev/null +++ b/api/chat.php @@ -0,0 +1,53 @@ + false])); + + $user_id = $_SESSION['user_id'] ?? 0; + $sender = 'user'; + $ip = $_SERVER['REMOTE_ADDR']; + + $stmt = db()->prepare("INSERT INTO messages (user_id, sender, message, ip_address) VALUES (?, ?, ?, ?)"); + $stmt->execute([$user_id, $sender, $message, $ip]); + echo json_encode(['success' => true]); + exit; +} + +if ($action === 'get_messages') { + $user_id = $_SESSION['user_id'] ?? 0; + // For simplicity, we get all messages for this user session or UID + // If not logged in, we could use session_id or IP, but let's stick to user_id or all recent for the session + $stmt = db()->prepare("SELECT * FROM messages WHERE user_id = ? OR (user_id = 0 AND ip_address = ?) ORDER BY created_at ASC"); + $stmt->execute([$user_id, $_SERVER['REMOTE_ADDR']]); + $messages = $stmt->fetchAll(); + echo json_encode($messages); + exit; +} + +if ($action === 'admin_send') { + $message = $_POST['message'] ?? ''; + $user_id = $_POST['user_id'] ?? 0; + $target_ip = $_POST['ip_address'] ?? ''; + + if (!$message) exit(json_encode(['success' => false])); + + $admin_id = $_SESSION['user_id'] ?? 1; // Default to admin + $sender = 'admin'; + + $stmt = db()->prepare("INSERT INTO messages (user_id, admin_id, sender, message, ip_address) VALUES (?, ?, ?, ?, ?)"); + $stmt->execute([$user_id, $admin_id, $sender, $message, $target_ip]); + echo json_encode(['success' => true]); + exit; +} + +if ($action === 'admin_get_all') { + // Get distinct users/IPs who have messaged + $stmt = db()->query("SELECT m.*, u.username, u.uid FROM messages m LEFT JOIN users u ON m.user_id = u.id WHERE m.id IN (SELECT MAX(id) FROM messages GROUP BY user_id, ip_address) ORDER BY created_at DESC"); + echo json_encode($stmt->fetchAll()); + exit; +} diff --git a/assets/css/index.css b/assets/css/index.css index 579b17a..77b6fa8 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -21,12 +21,32 @@ body { color: var(--text-muted) !important; } +.text-light { + color: #fff !important; +} + +.fs-3, .fs-5, h1, h2, h3, h4 { + color: #ffffff; +} + .card { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; } +/* Contrast optimization */ +.alert { + background: rgba(239, 83, 80, 0.1); + color: #ef5350; + border: 1px solid rgba(239, 83, 80, 0.2); +} + +.bg-black { + background-color: #000000 !important; +} + + /* Hero Carousel Optimization */ .carousel-item { transition: transform 0.6s ease-in-out; diff --git a/assets/css/terminal.css b/assets/css/terminal.css index 8fd874f..cd84221 100644 --- a/assets/css/terminal.css +++ b/assets/css/terminal.css @@ -7,27 +7,228 @@ --term-primary: #0062ff; --term-success: #26a69a; --term-danger: #ef5350; - --header-height: 50px; - --sidebar-width: 260px; - --orderbook-width: 280px; + --header-height: 60px; + --sidebar-width: 280px; + --orderbook-width: 300px; } .terminal-container { display: flex; flex-direction: column; - height: calc(100vh - 70px); + height: 100vh; background: var(--term-bg); color: var(--term-text); overflow: hidden; } -.terminal-top-nav { - height: var(--header-height); +.sidebar-tabs { + display: flex; + height: 60px; + border-bottom: 1px solid var(--term-border); background: var(--term-surface); +} + +.sidebar-tabs .terminal-tab { + flex: 1; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + font-size: 13px; + border-right: 1px solid var(--term-border); + color: var(--term-muted); + text-decoration: none; + font-weight: 600; + transition: all 0.2s; +} + +.sidebar-tabs .terminal-tab:hover { + color: var(--term-text); + background: rgba(255,255,255,0.03); +} + +.sidebar-tabs .terminal-tab.active { + background: var(--term-bg); + color: var(--term-primary); + border-bottom: 2px solid var(--term-primary); +} + +.sidebar-tabs .terminal-tab:last-child { + border-right: none; +} + +.sidebar-search { + padding: 10px 12px; + border-bottom: 1px solid var(--term-border); + height: 60px; + display: flex; + align-items: center; + background: var(--term-surface); +} + +.sidebar-search input { + background: #0b0e11; + border: 1px solid var(--term-border); + color: #fff; + width: 100%; + height: 38px; + padding: 0 12px; + border-radius: 4px; + font-size: 12px; + outline: none; + transition: all 0.2s; +} + +.content-header { + height: 50px; border-bottom: 1px solid var(--term-border); display: flex; align-items: center; - padding: 0; + padding: 0 15px; + gap: 20px; + background: var(--term-surface); +} + +.terminal-sidebar { + width: var(--sidebar-width); + border-right: 1px solid var(--term-border); + display: flex; + flex-direction: column; + background: var(--term-surface); +} + +.terminal-right-sidebar { + width: var(--orderbook-width); + border-left: 1px solid var(--term-border); + background: var(--term-surface); +} + + +.sidebar-search input { + background: #0b0e11; + border: 1px solid var(--term-border); + color: #fff; + width: 100%; + padding: 8px 15px; + border-radius: 8px; + font-size: 13px; + outline: none; + transition: border-color 0.2s; +} + +.sidebar-search input:focus { + border-color: var(--term-primary); +} + +/* Order Book Beautification */ +.order-book { + display: flex; + flex-direction: column; + height: 100%; + font-family: 'Roboto Mono', 'Noto Sans SC', monospace; + background: #0b0e11; +} + +.ob-header { + display: flex; + justify-content: space-between; + padding: 12px 15px; + font-size: 11px; + color: #848e9c; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + border-bottom: 1px solid var(--term-border); +} + +.ob-list { + flex: 1; + display: flex; + flex-direction: column; +} + +.ob-row { + display: flex; + justify-content: space-between; + padding: 2px 15px; + font-size: 12px; + position: relative; + cursor: pointer; +} + +.ob-mid-price { + padding: 10px 15px; + text-align: left; + background: rgba(0,0,0,0.4); + border-top: 1px solid var(--term-border); + border-bottom: 1px solid var(--term-border); +} + +.ob-mid-price .val { + font-size: 18px; + font-weight: 700; + display: block; +} + +.ob-row:hover { + background: rgba(255,255,255,0.05); +} + +.ob-row .price { font-weight: 600; z-index: 2; } +.asks .price { color: #f6465d; } +.bids .price { color: #0ecb81; } +.ob-row .amount { color: #eaecef; opacity: 0.9; z-index: 2; } + +.ob-row-bg { + position: absolute; + top: 0; + right: 0; + bottom: 0; + z-index: 1; + opacity: 0.1; + transition: width 0.3s ease; +} + +.asks .ob-row-bg { background: #f6465d; } +.bids .ob-row-bg { background: #0ecb81; } + +.ob-mid-price { + padding: 15px; + text-align: left; + background: rgba(0,0,0,0.3); + border-top: 1px solid var(--term-border); + border-bottom: 1px solid var(--term-border); +} + +.ob-mid-price .val { + font-size: 20px; + font-weight: 700; + display: block; +} + + +/* Order Panel Records */ +.order-history table { + border-collapse: separate; + border-spacing: 0; +} + +.order-history th { + font-weight: 600; + text-transform: uppercase; + font-size: 10px; + letter-spacing: 0.5px; + color: var(--term-muted); + padding: 10px; +} + +.order-history td { + padding: 12px 10px; + border-bottom: 1px solid rgba(255,255,255,0.03); +} + +.order-history tr:hover td { + background: rgba(255,255,255,0.02); } .terminal-tab { @@ -71,14 +272,17 @@ .sidebar-search { padding: 12px; border-bottom: 1px solid var(--term-border); + height: 60px; + display: flex; + align-items: center; } .sidebar-search input { background: #2b3139; - border: none; + border: 1px solid var(--term-border); color: #fff; width: 100%; - padding: 8px 12px; + padding: 6px 12px; border-radius: 4px; font-size: 13px; outline: none; @@ -87,227 +291,138 @@ .coin-list-container { flex: 1; overflow-y: auto; + scrollbar-width: none; + -ms-overflow-style: none; +} +.coin-list-container::-webkit-scrollbar { + display: none; } .coin-row { + padding: 10px 15px; display: flex; justify-content: space-between; - padding: 10px 12px; + align-items: center; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.02); transition: background 0.2s; } - .coin-row:hover { background: rgba(255,255,255,0.05); } - -.coin-row .coin-info { - display: flex; - align-items: center; - gap: 8px; -} - .coin-row img { - width: 18px; - height: 18px; + width: 20px; + height: 20px; + margin-right: 10px; } - .coin-row .symbol { font-weight: 600; font-size: 13px; } - -.coin-row .price { - font-size: 13px; - text-align: right; - font-family: monospace; -} - .coin-row .change { font-size: 11px; - display: block; + margin-left: 5px; +} +.coin-row .price { + font-size: 13px; + font-weight: 500; } .terminal-content { flex: 1; display: flex; flex-direction: column; - overflow: hidden; - background: var(--term-bg); + border-right: 1px solid var(--term-border); } .content-header { height: 60px; + border-bottom: 1px solid var(--term-border); display: flex; align-items: center; - padding: 0 16px; - border-bottom: 1px solid var(--term-border); - gap: 24px; -} - -.header-pair { - font-size: 20px; - font-weight: 700; -} - -.header-stat { - display: flex; - flex-direction: column; -} - -.header-stat label { - font-size: 11px; - color: var(--term-muted); -} - -.header-stat span { - font-size: 13px; - font-weight: 600; + padding: 0 20px; + gap: 30px; } .kline-container { - flex: 2; + flex: 1; + min-height: 400px; background: #000; - position: relative; - border-bottom: 1px solid var(--term-border); } .trading-panels { - height: 280px; - display: flex; - border-bottom: 1px solid var(--term-border); -} - -.order-form-container { - flex: 1; - padding: 16px; - border-right: 1px solid var(--term-border); -} - -.order-form-tabs { - display: flex; - gap: 16px; - margin-bottom: 16px; -} - -.order-form-tabs button { - background: none; - border: none; - color: var(--term-muted); - font-weight: 600; - font-size: 14px; - padding-bottom: 4px; -} - -.order-form-tabs button.active { - color: var(--term-text); - border-bottom: 2px solid var(--term-primary); -} - -.input-group-custom { - margin-bottom: 12px; -} - -.input-group-custom label { - display: block; - font-size: 11px; - color: var(--term-muted); - margin-bottom: 4px; -} - -.input-wrapper { - background: #2b3139; - border-radius: 4px; - display: flex; - align-items: center; - padding: 0 10px; -} - -.input-wrapper input { - background: transparent; - border: none; - color: #fff; - width: 100%; - padding: 8px 0; - outline: none; - font-size: 14px; -} - -.input-wrapper .suffix { - font-size: 12px; - color: var(--term-muted); + padding: 20px; + background: var(--term-surface); } .order-history { flex: 1; overflow-y: auto; + scrollbar-width: none; +} +.order-history::-webkit-scrollbar { + display: none; } -.terminal-right-sidebar { - width: var(--orderbook-width); - border-left: 1px solid var(--term-border); - display: flex; - flex-direction: column; - background: var(--term-surface); -} - -.order-book { - flex: 1; - display: flex; - flex-direction: column; - font-size: 12px; -} - -.ob-header { - padding: 8px 12px; - display: flex; - justify-content: space-between; - color: var(--term-muted); - border-bottom: 1px solid var(--term-border); -} - -.ob-list { - flex: 1; +/* Binary Order Panel */ +.cycle-grid { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 1px; + background: var(--term-border); + border: 1px solid var(--term-border); + border-radius: 4px; overflow: hidden; } -.ob-row { - display: flex; - justify-content: space-between; - padding: 2px 12px; - position: relative; - z-index: 1; +.cycle-btn { + background: var(--term-bg); + border: none; + color: var(--term-muted); + padding: 12px 5px; + font-size: 11px; + font-weight: 600; + transition: all 0.2s; } -.ob-row .price { width: 40%; } -.ob-row .amount { width: 30%; text-align: right; } -.ob-row .total { width: 30%; text-align: right; } - -.asks .price { color: var(--term-danger); } -.bids .price { color: var(--term-success); } - -.ob-row-bg { - position: absolute; - top: 0; right: 0; bottom: 0; - z-index: -1; - opacity: 0.15; +.cycle-btn:hover { + background: rgba(255,255,255,0.05); + color: var(--term-text); } -.asks .ob-row-bg { background: var(--term-danger); } -.bids .ob-row-bg { background: var(--term-success); } - -.ob-mid-price { - padding: 10px 12px; - background: rgba(255,255,255,0.02); - display: flex; - align-items: center; - gap: 8px; - border-top: 1px solid var(--term-border); - border-bottom: 1px solid var(--term-border); +.cycle-btn.active { + background: var(--term-primary); + color: #fff; } -.ob-mid-price .val { font-size: 18px; font-weight: 700; } +.amount-input-wrapper input { + height: 50px; + font-size: 18px; + font-weight: bold; + text-align: center; + border-radius: 8px; +} + +.section-title { + font-size: 12px; + font-weight: 600; + color: var(--term-muted); + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.quick-amounts .btn { + font-weight: 600; + background: #2b3139; + border: none; +} + +.quick-amounts .btn:hover { + background: #3b424c; +} + +.binary-order-panel { + background: var(--term-surface); + border-radius: 12px; +} -.btn-buy { background: var(--term-success); border: none; color: #fff; width: 100%; padding: 10px; border-radius: 4px; font-weight: 700; margin-top: 10px; } -.btn-sell { background: var(--term-danger); border: none; color: #fff; width: 100%; padding: 10px; border-radius: 4px; font-weight: 700; margin-top: 10px; } diff --git a/assets/pasted-20260216-030754-d864743b.png b/assets/pasted-20260216-030754-d864743b.png new file mode 100644 index 0000000..96a99c6 Binary files /dev/null and b/assets/pasted-20260216-030754-d864743b.png differ diff --git a/assets/pasted-20260216-045542-0f5ccd02.png b/assets/pasted-20260216-045542-0f5ccd02.png new file mode 100644 index 0000000..8dea6be Binary files /dev/null and b/assets/pasted-20260216-045542-0f5ccd02.png differ diff --git a/assets/pasted-20260216-053957-3eccecf6.png b/assets/pasted-20260216-053957-3eccecf6.png new file mode 100644 index 0000000..c948273 Binary files /dev/null and b/assets/pasted-20260216-053957-3eccecf6.png differ diff --git a/auth/login.php b/auth/login.php index 01be2a7..7470042 100644 --- a/auth/login.php +++ b/auth/login.php @@ -16,7 +16,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $user = $stmt->fetch(); if ($user && password_verify($password, $user['password_hash'])) { + if (session_status() === PHP_SESSION_NONE) session_start(); $_SESSION['user_id'] = $user['id']; + $_SESSION['username'] = $user['username']; + $_SESSION['uid'] = $user['uid']; + $_SESSION['role'] = $user['role']; header('Location: /'); exit; } else { @@ -28,31 +32,53 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { include __DIR__ . '/../includes/header.php'; ?> -
-

- - -
- +
+
+
+
+
+
+
+ + + + + +
+ BYRO +
+

+

Welcome back to Byro Exchange

+
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ + + +
+ 还没有账号? +
+
+
- - -
-
- - -
- -
- - -
- - -
- -
- New to OKX? Create an account
diff --git a/auth/register.php b/auth/register.php index 098d190..437818a 100644 --- a/auth/register.php +++ b/auth/register.php @@ -33,19 +33,26 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } else { try { $hash = password_hash($password, PASSWORD_DEFAULT); - $stmt = db()->prepare("INSERT INTO users (username, email, password_hash) VALUES (?, ?, ?)"); + $uid = '618120' . mt_rand(100000, 999999); + $stmt = db()->prepare("INSERT INTO users (username, email, password_hash, uid, credit_score) VALUES (?, ?, ?, ?, ?)"); $username = strpos($account, '@') === false ? $account : explode('@', $account)[0]; $email = strpos($account, '@') !== false ? $account : $account . '@byro.io'; - $stmt->execute([$username, $email, $hash]); + $stmt->execute([$username, $email, $hash, $uid, 80]); $userId = db()->lastInsertId(); + if (session_status() === PHP_SESSION_NONE) session_start(); + $_SESSION['user_id'] = $userId; + $_SESSION['username'] = $username; + $_SESSION['uid'] = $uid; + $_SESSION['role'] = 'user'; + $_SESSION['credit_score'] = 80; + // Initialize balance - $stmt = db()->prepare("INSERT INTO user_balances (user_id, symbol, available) VALUES (?, 'USDT', 0)"); + $stmt = db()->prepare("INSERT INTO user_balances (user_id, symbol, available) VALUES (?, 'USDT', 1000)"); // Giving some demo USDT $stmt->execute([$userId]); - $_SESSION['user_id'] = $userId; header('Location: /'); exit; } catch (PDOException $e) { @@ -61,52 +68,52 @@ include __DIR__ . '/../includes/header.php';
-
-
-
-
- +
+
+
+
+
- Byro + BYRO
-

-

Create your account to start trading

+

+

Join the most secure digital asset exchange

-
- +
+
- - + +
- +
- - + +
- - + +
- - + +
@@ -116,10 +123,10 @@ include __DIR__ . '/../includes/header.php';
- +
- Already have an account? + 已经有账号?
diff --git a/create_admin.php b/create_admin.php new file mode 100644 index 0000000..b442ed6 --- /dev/null +++ b/create_admin.php @@ -0,0 +1,16 @@ +prepare("INSERT INTO users (username, email, password_hash, uid, role, credit_score) VALUES (?, ?, ?, ?, ?, ?)"); + $stmt->execute([$username, 'admin@byro.io', $hash, $uid, 'admin', 100]); + + echo "Admin user created successfully with password: admin123\n"; +} catch (Exception $e) { + echo "Error or Admin already exists: " . $e->getMessage() . "\n"; +} diff --git a/includes/footer.php b/includes/footer.php index 788cee3..eecf857 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -69,6 +69,122 @@
+ +
+ +
+
+ + + +
+
+
+
+ Online Support +
+ +
+
+
Welcome to Byro Support! How can we help?
+
+
+
+ + +
+
+
+ + + diff --git a/includes/header.php b/includes/header.php index 751fa3e..872291a 100644 --- a/includes/header.php +++ b/includes/header.php @@ -26,6 +26,7 @@ function getSetting($key, $default = null) { + @@ -214,8 +310,44 @@ function getSetting($key, $default = null) {
- - + + + + +
+ +
+
+ + + + +
+
+ + +
+ prepare("SELECT available FROM user_balances WHERE user_id = ? AND symbol = 'USDT'"); + $stmt->execute([$user['id']]); + $bal = $stmt->fetch(); + ?> +
+ + USDT +
+
+ + +
diff --git a/includes/lang.php b/includes/lang.php index 4a9150b..b86b2de 100644 --- a/includes/lang.php +++ b/includes/lang.php @@ -1,9 +1,9 @@ 'Byro 每日更新全球加密市场动态,包括最新的上币信息、行业动态、深度分析报告,助您掌握财富密码。', 'fees_content' => 'Byro 致力于提供行业极具竞争力的费率标准。现货交易手续费低至 0.1%,根据您的交易量等级,还可以享受更大幅度的费率折扣。', 'app_desc' => '随时随地,尽在掌握。下载 Byro 移动端,体验专业级交易。', + 'real_name' => '实名认证', + 'verified' => '已认证', + 'unverified' => '未认证', + 'credit_score' => '信用分', + 'recharge' => '充值', + 'orders' => '订单记录', + 'account' => '账号 / 邮箱', + 'market_view' => '市场行情', + 'sec_contract' => '秒合约', + 'secure_acc' => '保障账户安全', + 'from' => '从', + 'to' => '到', + 'balance' => '余额', + 'swap_now' => '立即兑换', + 'rate' => '汇率', + 'price_impact' => '价格影响', + 'slippage' => '滑点容差', + 'mining_title' => '专业矿池', + 'mining_desc' => '专业的云挖矿和质押平台。加入数千名用户,通过 Byro 的高效挖矿池赚取被动收入。', + 'est_apy' => '预计年化', + 'min_deposit' => '最低充值', + 'lock_period' => '锁定周期', + 'start_mining' => '开始挖矿', + 'why_mining' => '为什么选择 Byro 挖矿?', + 'adv_hardware' => '先进硬件', + 'adv_hardware_desc' => '我们使用最新的 ASIC 和 GPU 矿机,确保最高利润 and 稳定性。', + 'auto_compound' => '自动复利', + 'auto_compound_desc' => '自动重新投资您的每日奖励,以实现长期收益最大化。', + 'real_time_monitor' => '实时监控', + 'real_time_monitor_desc' => '通过我们直观的控制面板实时跟踪您的算力和收益。', + 'calc_profit' => '计算您的收益', + 'calc_desc' => '输入您的投资金额以估算每日收益。', + 'daily_profit' => '每日收益', + 'monthly_profit' => '每月收益', + 'try_calc' => '尝试挖矿计算器', + 'asset' => '资产', + 'vol_24h' => '24h 成交额', + 'cycle_settlement' => '周期/结算', + 'purchase_amount' => '买入量', + 'available_balance' => '可以金额', + 'expected_profit' => '预期收益', + 'buy_up' => '买涨', + 'buy_down' => '买跌', + 'profit' => '收益', ], 'en' => [ 'home' => 'Home', @@ -149,6 +193,50 @@ $translations = [ 'news_content' => 'Byro updates daily global crypto market dynamics, including the latest listing info, industry trends, and in-depth analysis reports to help you master wealth opportunities.', 'fees_content' => 'Byro is committed to providing industry-competitive fee standards. Spot trading fees as low as 0.1%, with deeper discounts based on your trading volume tier.', 'app_desc' => 'Anytime, anywhere, at your fingertips. Download Byro mobile app for professional trading experience.', + 'real_name' => 'Real-name', + 'verified' => 'Verified', + 'unverified' => 'Unverified', + 'credit_score' => 'Credit Score', + 'recharge' => 'Recharge', + 'orders' => 'Orders', + 'account' => 'Account / Email', + 'market_view' => 'Market View', + 'sec_contract' => 'Second Contract', + 'secure_acc' => 'Secure My Account', + 'from' => 'From', + 'to' => 'To', + 'balance' => 'Balance', + 'swap_now' => 'Swap Now', + 'rate' => 'Rate', + 'price_impact' => 'Price Impact', + 'slippage' => 'Slippage Tolerance', + 'mining_title' => 'Mining Pool', + 'mining_desc' => 'Professional cloud mining and staking platform. Join thousands of users earning passive income with Byro\'s high-efficiency mining pools.', + 'est_apy' => 'Est. APY', + 'min_deposit' => 'Min. Deposit', + 'lock_period' => 'Lock Period', + 'start_mining' => 'Start Mining', + 'why_mining' => 'Why choose Byro Mining?', + 'adv_hardware' => 'Advanced Hardware', + 'adv_hardware_desc' => 'We use the latest ASIC and GPU miners to ensure maximum profitability and stability.', + 'auto_compound' => 'Auto Compounding', + 'auto_compound_desc' => 'Reinvest your daily rewards automatically to maximize your total yield over time.', + 'real_time_monitor' => 'Real-time Monitoring', + 'real_time_monitor_desc' => 'Track your hash rate and earnings in real-time through our intuitive dashboard.', + 'calc_profit' => 'Calculate Your Profit', + 'calc_desc' => 'Enter your investment amount to estimate your daily earnings.', + 'daily_profit' => 'Daily Profit', + 'monthly_profit' => 'Monthly Profit', + 'try_calc' => 'Try Mining Calculator', + 'asset' => 'Asset', + 'vol_24h' => '24h Volume', + 'cycle_settlement' => 'Cycle / Settlement', + 'purchase_amount' => 'Purchase Amount', + 'available_balance' => 'Available Balance', + 'expected_profit' => 'Expected Profit', + 'buy_up' => 'Buy Up', + 'buy_down' => 'Buy Down', + 'profit' => 'Profit', ] ]; @@ -156,3 +244,32 @@ function __($key) { global $translations, $lang; return $translations[$lang][$key] ?? $key; } + +function getCoinIcon($symbol) { + $icon_ids = [ + 'BTC' => '1/small/bitcoin.png', + 'ETH' => '279/small/ethereum.png', + 'USDT' => '325/small/tether.png', + 'BNB' => '825/small/binance-coin-logo.png', + 'SOL' => '4128/small/solana.png', + 'XRP' => '44/small/xrp-symbol-white-128.png', + 'ADA' => '975/small/cardano.png', + 'DOGE' => '5/small/dogecoin.png', + 'DOT' => '12171/small/polkadot.png', + 'MATIC' => '4713/small/matic-network.png', + 'AVAX' => '12559/small/avalanche.png', + 'LINK' => '877/small/chainlink.png', + 'SHIB' => '11939/small/shiba-inu.png', + 'TRX' => '1094/small/tron.png', + 'BCH' => '153/small/bitcoin-cash.png', + 'LTC' => '2/small/litecoin.png', + 'UNI' => '12504/small/uniswap.png', + 'ARB' => '29359/small/arbitrum.png', + 'OP' => '25244/small/optimism.png', + 'APT' => '27355/small/aptos.png', + 'USDC' => '6319/small/usdc.png', + 'PEPE' => '31386/small/pepe.png', + ]; + $id = $icon_ids[strtoupper($symbol)] ?? '1/small/bitcoin.png'; + return "https://assets.coingecko.com/coins/images/" . $id; +} diff --git a/includes/terminal_layout.php b/includes/terminal_layout.php index 5969e06..4cf1f43 100644 --- a/includes/terminal_layout.php +++ b/includes/terminal_layout.php @@ -1,141 +1,287 @@ 'BTC', 'name' => 'Bitcoin', 'id' => '1/small/bitcoin.png', 'price' => '64,234.50', 'change' => '+2.45%'], - ['symbol' => 'ETH', 'name' => 'Ethereum', 'id' => '279/small/ethereum.png', 'price' => '3,456.20', 'change' => '+1.12%'], - ['symbol' => 'BNB', 'name' => 'BNB', 'id' => '825/small/binance-coin-logo.png', 'price' => '598.40', 'change' => '-0.56%'], - ['symbol' => 'SOL', 'name' => 'Solana', 'id' => '4128/small/solana.png', 'price' => '145.20', 'change' => '+5.67%'], - ['symbol' => 'XRP', 'name' => 'Ripple', 'id' => '44/small/xrp-symbol-white-128.png', 'price' => '0.62', 'change' => '-1.23%'], - ['symbol' => 'ADA', 'name' => 'Cardano', 'id' => '975/small/cardano.png', 'price' => '0.58', 'change' => '+0.89%'], - ['symbol' => 'DOGE', 'name' => 'Dogecoin', 'id' => '5/small/dogecoin.png', 'price' => '0.16', 'change' => '+12.4%'], - ['symbol' => 'DOT', 'name' => 'Polkadot', 'id' => '12171/small/polkadot.png', 'price' => '8.45', 'change' => '-2.11%'], - ['symbol' => 'MATIC', 'name' => 'Polygon', 'id' => '4713/small/matic-network.png', 'price' => '0.92', 'change' => '+1.56%'], - ['symbol' => 'LINK', 'name' => 'Chainlink', 'id' => '877/small/chainlink.png', 'price' => '18.40', 'change' => '+3.22%'], + global $lang, $user; + $currentSymbol = $_GET['symbol'] ?? 'BTC'; + $currentSymbol = strtoupper($currentSymbol); + + $full_coins = [ + ['symbol' => 'BTC', 'name' => 'Bitcoin', 'price' => '64,234.50', 'change' => '+2.45%'], + ['symbol' => 'ETH', 'name' => 'Ethereum', 'price' => '3,456.20', 'change' => '+1.12%'], + ['symbol' => 'USDT', 'name' => 'Tether', 'price' => '1.00', 'change' => '+0.01%'], + ['symbol' => 'BNB', 'name' => 'BNB', 'price' => '598.40', 'change' => '-0.56%'], + ['symbol' => 'SOL', 'name' => 'Solana', 'price' => '145.20', 'change' => '+5.67%'], + ['symbol' => 'XRP', 'name' => 'Ripple', 'price' => '0.62', 'change' => '-1.23%'], + ['symbol' => 'ADA', 'name' => 'Cardano', 'price' => '0.58', 'change' => '+0.89%'], + ['symbol' => 'DOGE', 'name' => 'Dogecoin', 'price' => '0.16', 'change' => '+12.4%'], + ['symbol' => 'DOT', 'name' => 'Polkadot', 'price' => '8.45', 'change' => '-2.11%'], + ['symbol' => 'MATIC', 'name' => 'Polygon', 'price' => '0.92', 'change' => '+1.56%'], + ['symbol' => 'LINK', 'name' => 'Chainlink', 'price' => '18.40', 'change' => '+3.22%'], + ['symbol' => 'AVAX', 'name' => 'Avalanche', 'price' => '45.20', 'change' => '+4.12%'], + ['symbol' => 'SHIB', 'name' => 'Shiba Inu', 'price' => '0.000027', 'change' => '-3.45%'], + ['symbol' => 'TRX', 'name' => 'TRON', 'price' => '0.12', 'change' => '+0.56%'], + ['symbol' => 'BCH', 'name' => 'Bitcoin Cash', 'price' => '456.20', 'change' => '+2.12%'], + ['symbol' => 'LTC', 'name' => 'Litecoin', 'price' => '84.50', 'change' => '+1.45%'], + ['symbol' => 'UNI', 'name' => 'Uniswap', 'price' => '7.20', 'change' => '-2.12%'], ]; ?>
- -
- - - -
-
+ +
- -
-
- <?= $c['symbol'] ?> -
- - + +
+
+
+ <?= $c['symbol'] ?> +
+
+
+
+
+
+
-
-
+
- -
-
BTC/USDT
+
/USDT
- 64,234.50 + 64,234.50
- +2.45% + +2.45%
-
+
- 65,120.00 + 65,120.00
-
+
- 63,450.00 + 63,450.00 +
+
+ + 12,456.23
- -
- TRADING VIEW CHART + +
+
+ +
+
-
-
- - + +
+
+
+ + + + +
-
+ +
(USDT)
+
+ +
+ +
+ + + +
+ +
+
1,000.00 USDT
+
0.00 USDT
+
+ +
-
- -
- - USDT -
-
-
- -
- - BTC -
-
- +
-
- -
- - USDT -
-
-
- -
- - BTC -
-
- +
-
-
-
Open Orders
- - - - - - - - - - - - - - -
TimeTypeSidePriceAmountStatus
No records found
+ + + +
+
+
+ + +
+
: 1,000.00 USDT
+
+
+
+
+ +
+ + USDT +
+
+
+ +
+ + +
+
+
+ + + +
+ +
+
+
+ +
+ + USDT +
+
+
+ +
+ + +
+
+
+ + + +
+ +
+
+
+ +
+ + + + +
+
+
当前委托 (Open Orders)
+
结算部位 (Settlement)
+
成交历史 (Trade History)
+
资产 (Assets)
+
+
+ + + + + + + + + + + + + + + + + +
时间交易对类型方向价格数量成交额状态操作
+
@@ -144,11 +290,11 @@ function renderTerminal($activeTab = 'spot') {
Price(USDT) - Amount(BTC) + Amount()
- @@ -164,7 +310,7 @@ function renderTerminal($activeTab = 'spot') { ≈ $64,234.50
-
+ + diff --git a/index.php b/index.php index 23ebef7..de5a8ce 100644 --- a/index.php +++ b/index.php @@ -10,39 +10,42 @@ require_once __DIR__ . '/includes/header.php';