diff --git a/admin/api_notif.php b/admin/api_notif.php new file mode 100644 index 0000000..dce6a02 --- /dev/null +++ b/admin/api_notif.php @@ -0,0 +1,28 @@ +prepare("SELECT is_admin FROM users WHERE id = ?"); +$stmt->execute([$user_id]); +$u = $stmt->fetch(); + +if (!$u || !$u['is_admin']) { + echo json_encode(['error' => 'Unauthorized']); + exit; +} + +// Count pending deposits and unread messages +$stmt = db()->query("SELECT COUNT(*) as cnt FROM deposits WHERE status = 'pending'"); +$dep_count = $stmt->fetch()['cnt']; + +$stmt = db()->query("SELECT COUNT(*) as cnt FROM chat_messages WHERE admin_id IS NULL AND is_read = 0"); +$chat_count = $stmt->fetch()['cnt']; + +echo json_encode([ + 'success' => true, + 'new_count' => $dep_count + $chat_count, + 'deposits' => $dep_count, + 'chats' => $chat_count +]); diff --git a/admin/index.php b/admin/index.php index 55c2695..1aad4e0 100644 --- a/admin/index.php +++ b/admin/index.php @@ -8,6 +8,31 @@ if (!$user || !$user['is_admin']) { $msg = ''; +// Handle Deposit Approval +if (isset($_GET['action']) && isset($_GET['id'])) { + $id = $_GET['id']; + if ($_GET['action'] === 'approve') { + $stmt = db()->prepare("SELECT * FROM deposits WHERE id = ?"); + $stmt->execute([$id]); + $dep = $stmt->fetch(); + if ($dep && $dep['status'] === 'pending') { + db()->beginTransaction(); + $stmt = db()->prepare("UPDATE deposits SET status = 'approved' WHERE id = ?"); + $stmt->execute([$id]); + + // Add balance to user + $stmt = db()->prepare("UPDATE users SET balance_usdt = balance_usdt + ? WHERE id = ?"); + $stmt->execute([$dep['amount'], $dep['user_id']]); + db()->commit(); + $msg = "Deposit approved and balance added."; + } + } elseif ($_GET['action'] === 'reject') { + $stmt = db()->prepare("UPDATE deposits SET status = 'rejected' WHERE id = ?"); + $stmt->execute([$id]); + $msg = "Deposit rejected."; + } +} + if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['update_config'])) { foreach ($_POST['config'] as $key => $value) { @@ -25,36 +50,126 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $msg = 'User control updated.'; } - if (isset($_POST['update_price'])) { - $symbol = $_POST['symbol']; - $price = $_POST['price']; - $key = 'price_' . $symbol; - $stmt = db()->prepare("INSERT INTO system_config (config_key, config_value) VALUES (?, ?) ON DUPLICATE KEY UPDATE config_value = ?"); - $stmt->execute([$key, $price, $price]); - $msg = "Price for $symbol set to $price"; + if (isset($_POST['send_reply'])) { + $user_id = $_POST['user_id']; + $reply = $_POST['message']; + $stmt = db()->prepare("INSERT INTO chat_messages (user_id, admin_id, message) VALUES (?, ?, ?)"); + $stmt->execute([$user_id, $user['id'], $reply]); + $msg = 'Reply sent.'; } } +// Fetch pending deposits +$stmt = db()->query("SELECT d.*, u.username, u.uid FROM deposits d JOIN users u ON d.user_id = u.id WHERE d.status = 'pending' ORDER BY d.created_at DESC"); +$pending_deposits = $stmt->fetchAll(); + // Fetch all users $stmt = db()->query("SELECT * FROM users ORDER BY created_at DESC"); $all_users = $stmt->fetchAll(); -// Fetch current config -$stmt = db()->query("SELECT config_key, config_value FROM system_config"); -$current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); +// Fetch latest chat messages (group by user) +$stmt = db()->query("SELECT m.*, u.username, u.uid FROM chat_messages m JOIN users u ON m.user_id = u.id ORDER BY m.created_at DESC LIMIT 50"); +$chats = $stmt->fetchAll(); ?>
-

Admin Dashboard

+
+

Admin Dashboard

+ +
-
+
+ + +
+ +
+
+

Pending Deposits

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
UIDUserAmountReceiptTimeAction
+ View Proof + + Approve + Reject +
No pending deposits.
+
+
+
+ + +
+
+

Customer Service

+
+ +
+
+ + +
+
+ + + + +
+
+ +
+
+ + + + +
+
+
+ -
-
+
+

Global Settings

@@ -71,33 +186,9 @@ $current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
- -
-
-

Price Control (Insertion)

- - -
-
- -
-
- -
-
- -
Leave price blank or 0 to resume market price.
- -
-
-
-
+

User Controls (Win/Loss)

@@ -107,7 +198,6 @@ $current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); - @@ -115,7 +205,7 @@ $current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); - + - @@ -141,4 +228,24 @@ $current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); - + + + \ No newline at end of file diff --git a/api/market_api.php b/api/market_api.php index 80957a3..14ff9e2 100644 --- a/api/market_api.php +++ b/api/market_api.php @@ -2,49 +2,90 @@ header('Content-Type: application/json'); require_once __DIR__ . '/../db/config.php'; -// List of supported coins with base prices +// List of supported coins for OKX $coins = [ - 'BTC' => ['name' => 'Bitcoin', 'price' => 43250.50, 'change' => 2.45, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/btc.png'], - 'ETH' => ['name' => 'Ethereum', 'price' => 2345.20, 'change' => 1.15, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/eth.png'], - 'SOL' => ['name' => 'Solana', 'price' => 102.45, 'change' => 8.60, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/sol.png'], - 'OKB' => ['name' => 'OKB', 'price' => 54.12, 'change' => 0.15, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/okb.png'], - 'LINK' => ['name' => 'Chainlink', 'price' => 18.40, 'change' => 3.20, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/link.png'], - 'DOT' => ['name' => 'Polkadot', 'price' => 7.25, 'change' => -1.50, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/dot.png'], - 'ADA' => ['name' => 'Cardano', 'price' => 0.58, 'change' => 2.10, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/ada.png'], - 'DOGE' => ['name' => 'Dogecoin', 'price' => 0.082, 'change' => -0.50, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/doge.png'], - 'XRP' => ['name' => 'XRP', 'price' => 0.52, 'change' => 0.25, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/xrp.png'], - 'AVAX' => ['name' => 'Avalanche', 'price' => 35.60, 'change' => 4.10, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/avax.png'], - 'MATIC' => ['name' => 'Polygon', 'price' => 0.82, 'change' => -1.20, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/matic.png'], - 'TRX' => ['name' => 'TRON', 'price' => 0.12, 'change' => 0.80, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/trx.png'], - 'LTC' => ['name' => 'Litecoin', 'price' => 68.45, 'change' => 1.20, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/ltc.png'], - 'BCH' => ['name' => 'Bitcoin Cash', 'price' => 245.30, 'change' => -0.85, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/bch.png'], - 'UNI' => ['name' => 'Uniswap', 'price' => 6.12, 'change' => 5.40, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/uni.png'], - 'FIL' => ['name' => 'Filecoin', 'price' => 5.25, 'change' => 2.15, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/fil.png'], - 'APT' => ['name' => 'Aptos', 'price' => 9.40, 'change' => 12.30, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/apt.png'], - 'ARB' => ['name' => 'Arbitrum', 'price' => 1.85, 'change' => 3.10, 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/arb.png'], + 'BTC' => ['name' => 'Bitcoin', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/btc.png'], + 'ETH' => ['name' => 'Ethereum', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/eth.png'], + 'BNB' => ['name' => 'BNB', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/bnb.png'], + 'SOL' => ['name' => 'Solana', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/sol.png'], + 'OKB' => ['name' => 'OKB', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/okb.png'], + 'LINK' => ['name' => 'Chainlink', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/link.png'], + 'DOT' => ['name' => 'Polkadot', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/dot.png'], + 'ADA' => ['name' => 'Cardano', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/ada.png'], + 'DOGE' => ['name' => 'Dogecoin', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/doge.png'], + 'XRP' => ['name' => 'XRP', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/xrp.png'], + 'AVAX' => ['name' => 'Avalanche', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/avax.png'], + 'MATIC' => ['name' => 'Polygon', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/matic.png'], + 'TRX' => ['name' => 'TRON', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/trx.png'], + 'LTC' => ['name' => 'Litecoin', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/ltc.png'], + 'BCH' => ['name' => 'Bitcoin Cash', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/bch.png'], + 'UNI' => ['name' => 'Uniswap', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/uni.png'], + 'FIL' => ['name' => 'Filecoin', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/fil.png'], + 'APT' => ['name' => 'Aptos', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/apt.png'], + 'ARB' => ['name' => 'Arbitrum', 'icon' => 'https://static.okx.com/cdn/oksupport/asset/currency/icon/arb.png'], ]; -// Seed for consistent pseudo-randomness based on time -srand(floor(time() / 10)); +function fetchRealPricesOKX() { + $ch = curl_init(); + $url = "https://www.okx.com/api/v5/market/tickers?instType=SPOT"; + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0'); + $response = curl_exec($ch); + curl_close($ch); + return json_decode($response, true); +} + +$realData = fetchRealPricesOKX(); +$result = []; + +// Initialize result with fallback data +foreach ($coins as $symbol => $data) { + $result[$symbol] = array_merge($data, [ + 'price' => 0.00, + 'change' => 0.00, + 'high' => 0.00, + 'low' => 0.00, + 'volume' => 0.00, + ]); +} + +if ($realData && isset($realData['code']) && $realData['code'] == "0" && isset($realData['data'])) { + foreach ($realData['data'] as $ticker) { + $instId = $ticker['instId']; + if (strpos($instId, '-USDT') !== false) { + $symbol = str_replace('-USDT', '', $instId); + if (isset($result[$symbol])) { + $last = (float)$ticker['last']; + $open = (float)$ticker['open24h']; + $change = ($open > 0) ? (($last - $open) / $open) * 100 : 0; + + $result[$symbol]['price'] = $last; + $result[$symbol]['change'] = $change; + $result[$symbol]['high'] = (float)$ticker['high24h']; + $result[$symbol]['low'] = (float)$ticker['low24h']; + $result[$symbol]['volume'] = (float)$ticker['vol24h']; + } + } + } +} // Check for admin price manipulation try { - $stmt = db()->prepare("SELECT config_key, config_value FROM system_config WHERE config_key LIKE 'price_%'"); - $stmt->execute(); - $manipulations = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); - - foreach ($coins as $symbol => &$data) { - $key = 'price_' . $symbol; - if (isset($manipulations[$key])) { - $data['price'] = (float)$manipulations[$key]; - } else { - // Natural fluctuation based on time to look "live" - $fluctuation = (sin(time() / 60) * 0.001) + 1; - $data['price'] *= $fluctuation; - // Add a small random noise - $data['price'] += (rand(-100, 100) / 1000) * ($data['price'] * 0.001); + $conn = db(); + if ($conn) { + $stmt = $conn->prepare("SELECT config_key, config_value FROM system_config WHERE config_key LIKE 'price_%'"); + $stmt->execute(); + $manipulations = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); + + foreach ($result as $symbol => &$data) { + $key = 'price_' . $symbol; + if (isset($manipulations[$key]) && is_numeric($manipulations[$key])) { + $data['price'] = (float)$manipulations[$key]; + } } } } catch (Exception $e) {} -echo json_encode(['success' => true, 'data' => $coins]); \ No newline at end of file +echo json_encode(['success' => true, 'data' => $result]); diff --git a/assets/css/custom.css b/assets/css/custom.css index 4cdc5fa..354fd29 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -2,45 +2,62 @@ --bg-color: #0b0e11; --text-color: #eaecef; --accent-color: #f0b90b; - --card-bg: #1e2329; - --border-color: #363c4e; + --card-bg: #181a20; + --border-color: #2b2f36; --success-color: #0ecb81; --danger-color: #f6465d; --okx-blue: #0046ff; + --bit-gradient: linear-gradient(45deg, #0046ff, #00ff96); + --glass-bg: rgba(255, 255, 255, 0.03); + --glass-border: rgba(255, 255, 255, 0.08); } body { background-color: var(--bg-color); color: var(--text-color); font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + letter-spacing: -0.2px; } -/* Visibility Utilities */ -.text-white { color: #ffffff !important; } -.text-black { color: #000000 !important; } -.text-muted { color: #848e9c !important; } +/* Glassmorphism */ +.glass-card { + background: var(--glass-bg); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid var(--glass-border); + border-radius: 24px; +} -.bg-black { background-color: #000000 !important; color: #ffffff !important; } -.bg-white { background-color: #ffffff !important; color: #000000 !important; } - -/* Invert colors for white sections */ -.bg-white .text-muted { color: #666666 !important; } -.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6 { color: #000000 !important; } - -.text-accent { color: var(--okx-blue); } -.text-success { color: var(--success-color) !important; } -.text-danger { color: var(--danger-color) !important; } +/* Gradient Text */ +.text-gradient { + background: var(--bit-gradient); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + display: inline-block; +} +/* Buttons */ .btn-primary { - background-color: var(--okx-blue); + background: var(--okx-blue); border: none; + border-radius: 12px; + padding: 10px 24px; + font-weight: 600; + transition: all 0.3s ease; +} + +.btn-primary:hover { + background: #0037cc; + transform: translateY(-2px); + box-shadow: 0 8px 20px rgba(0, 70, 255, 0.3); } .btn-accent { background-color: var(--accent-color); color: #000; - font-weight: bold; + font-weight: 700; border: none; + border-radius: 10px; transition: all 0.3s ease; } @@ -48,77 +65,52 @@ body { background-color: #d9a508; color: #000; transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3); + box-shadow: 0 6px 15px rgba(240, 185, 11, 0.4); } -.card { - background-color: var(--card-bg); - border: 1px solid var(--border-color); - border-radius: 16px; -} +/* Visibility Utilities */ +.text-white { color: #ffffff !important; } +.text-muted { color: #848e9c !important; } + +.text-success { color: var(--success-color) !important; } +.text-danger { color: var(--danger-color) !important; } /* Custom Scrollbar */ ::-webkit-scrollbar { - width: 6px; - height: 6px; + width: 5px; } - ::-webkit-scrollbar-track { background: var(--bg-color); } - ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; } - ::-webkit-scrollbar-thumb:hover { background: #484f65; } +/* Hover Effects */ +.hover-scale { + transition: transform 0.3s ease; +} +.hover-scale:hover { + transform: scale(1.05); +} + +.hover-glow:hover { + box-shadow: 0 0 20px rgba(0, 70, 255, 0.2); +} + +/* Layout Utilities */ +.rounded-4 { border-radius: 1.5rem !important; } +.rounded-5 { border-radius: 2rem !important; } + /* Animations */ -@keyframes fadeInUp { - from { - opacity: 0; - transform: translate3d(0, 40px, 0); - } - to { - opacity: 1; - transform: translate3d(0, 0, 0); - } -} - -.animated { - animation-duration: 1s; - animation-fill-mode: both; -} - -.fadeInUp { - animation-name: fadeInUp; -} - -/* Market Table Adjustments */ -.market-table-container { - background: var(--card-bg); - border-radius: 8px; - padding: 20px; -} - -.market-table th { - color: #848e9c; - font-weight: 500; - font-size: 0.9rem; -} - -/* Trade Page Specific */ -.trade-container { - background-color: #161a1e; -} - -.order-row { - transition: background-color 0.2s; -} - -.order-row:hover { - background-color: rgba(255, 255, 255, 0.05); +@keyframes fadeIn { + from { opacity: 0; transform: translateY(10px); } + to { opacity: 1; transform: translateY(0); } } +.fade-in { + animation: fadeIn 0.5s ease forwards; +} \ No newline at end of file diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000..3e051cd Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/mobile-app-mockup.jpg b/assets/images/mobile-app-mockup.jpg new file mode 100644 index 0000000..247829a Binary files /dev/null and b/assets/images/mobile-app-mockup.jpg differ diff --git a/assets/js/main.js b/assets/js/main.js index 8503880..7d3be38 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,22 +1,10 @@ // Global variables let currentMarketData = {}; -// Translation helper for JS -const translations = { - 'en': { 'Buy': 'Buy', 'Sell': 'Sell', 'Trade': 'Trade', 'Price': 'Price', 'Amount': 'Amount' }, - 'zh': { 'Buy': '买入', 'Sell': '卖出', 'Trade': '交易', 'Price': '价格', 'Amount': '数量' }, - // ... add more as needed or fetch from server -}; - function getLang() { return document.documentElement.lang || 'en'; } -function tj(key) { - const lang = getLang(); - return (translations[lang] && translations[lang][key]) || key; -} - // Market Data Fetching async function fetchMarketData() { try { @@ -32,15 +20,88 @@ async function fetchMarketData() { } function updateUI() { + // Update Home Page Market List + const homeList = document.getElementById('market-trends'); // Fixed ID mismatch + if (homeList) { + let html = ''; + const symbols = ['BTC', 'ETH', 'BNB', 'SOL', 'XRP', 'DOGE', 'ADA', 'TRX']; + symbols.forEach(symbol => { + const coin = currentMarketData[symbol]; + if (coin) { + const changeClass = coin.change >= 0 ? 'text-success' : 'text-danger'; + const changeSign = coin.change >= 0 ? '+' : ''; + const iconClass = coin.change >= 0 ? 'fa-arrow-trend-up' : 'fa-arrow-trend-down'; + html += ` + + + + + + + `; + } + }); + homeList.innerHTML = html; + } + + // Update Hero Ticker if exists + const heroTicker = document.getElementById('hero-market-ticker'); + if (heroTicker) { + let html = ''; + const symbols = ['BTC', 'ETH', 'SOL', 'BNB']; + symbols.forEach(symbol => { + const coin = currentMarketData[symbol]; + if (coin) { + const changeClass = coin.change >= 0 ? 'text-success' : 'text-danger'; + html += ` +
+
+ ${symbol} + ${coin.change >= 0 ? '+' : ''}${coin.change.toFixed(2)}% +
+
$${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2})}
+
+ `; + } + }); + heroTicker.innerHTML = html; + } + + // Update Ticker + const ticker = document.getElementById('ticker-wrap'); + if (ticker) { + let html = ''; + Object.keys(currentMarketData).forEach(symbol => { + const coin = currentMarketData[symbol]; + const changeClass = coin.change >= 0 ? 'text-success' : 'text-danger'; + html += ` +
+ ${symbol}/USDT + ${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2})} + ${coin.change >= 0 ? '+' : ''}${coin.change.toFixed(2)}% +
+ `; + }); + ticker.innerHTML = html + html; + } + // Update Trade Page if on it if (document.getElementById('crypto-list-container')) { updateTradePage(); } - - // Update Market Page if on it - if (document.getElementById('all-market-body')) { - updateMarketPage(); - } } function updateTradePage() { @@ -54,7 +115,6 @@ function updateTradePage() { const coin = currentMarketData[symbol]; const active = symbol === currentSymbol ? 'active' : ''; const changeClass = coin.change >= 0 ? 'text-success' : 'text-danger'; - const changeSign = coin.change >= 0 ? '+' : ''; html += `
@@ -62,13 +122,13 @@ function updateTradePage() {
-
${symbol}
-
${coin.name}
+
${symbol}
+
${coin.name}
-
$${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2})}
-
${changeSign}${coin.change.toFixed(2)}%
+
$${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2})}
+
${coin.change >= 0 ? '+' : ''}${coin.change.toFixed(2)}%
@@ -77,7 +137,7 @@ function updateTradePage() { }); listContainer.innerHTML = html; - // Update header info for current symbol + // Update header info if (currentSymbol && currentMarketData[currentSymbol]) { const coin = currentMarketData[currentSymbol]; const lastPriceEl = document.getElementById('last-price'); @@ -88,6 +148,15 @@ function updateTradePage() { const bookPriceEl = document.getElementById('book-price'); if (bookPriceEl) bookPriceEl.innerText = coin.price.toLocaleString(undefined, {minimumFractionDigits: 2}); + + // If Market tab is active and price field is empty, update it + const marketTab = document.getElementById('tab-market'); + if (marketTab && marketTab.classList.contains('active')) { + const priceInput = document.getElementById('order-price'); + if (priceInput && !priceInput.value) { + priceInput.value = coin.price; + } + } } const changeEl = document.getElementById('24h-change'); @@ -96,14 +165,16 @@ function updateTradePage() { changeEl.className = 'fw-bold ' + (coin.change >= 0 ? 'text-success' : 'text-danger'); } - // Mocking high/low/vol if (document.getElementById('24h-high')) document.getElementById('24h-high').innerText = '$' + (coin.price * 1.05).toLocaleString(undefined, {minimumFractionDigits: 2}); if (document.getElementById('24h-low')) document.getElementById('24h-low').innerText = '$' + (coin.price * 0.95).toLocaleString(undefined, {minimumFractionDigits: 2}); - if (document.getElementById('24h-vol')) document.getElementById('24h-vol').innerText = (Math.random() * 500 + 100).toFixed(2) + 'M'; - if (document.getElementById('price-fiat')) document.getElementById('price-fiat').innerText = '≈ ¥' + (coin.price * 7.15).toLocaleString(undefined, {minimumFractionDigits: 2}); + if (document.getElementById('price-fiat')) { + const isZh = document.documentElement.lang === 'zh'; + const rate = isZh ? 7.2 : 1.0; + const symbol = isZh ? '¥' : '$'; + document.getElementById('price-fiat').innerText = '≈ ' + symbol + (coin.price * rate).toLocaleString(undefined, {minimumFractionDigits: 2}); + } } - // Update order book simulation simulateOrderBook(); } @@ -120,7 +191,6 @@ function simulateOrderBook() { let askHtml = ''; let bidHtml = ''; - // Asks (Red) for (let i = 5; i > 0; i--) { const price = basePrice * (1 + (i * 0.0002)); const amount = Math.random() * 2 + 0.1; @@ -134,7 +204,6 @@ function simulateOrderBook() { `; } - // Bids (Green) for (let i = 1; i <= 5; i++) { const price = basePrice * (1 - (i * 0.0002)); const amount = Math.random() * 2 + 0.1; @@ -157,7 +226,6 @@ document.addEventListener('DOMContentLoaded', () => { fetchMarketData(); setInterval(fetchMarketData, 3000); - // Search listener const searchInput = document.getElementById('market-search'); if (searchInput) { searchInput.addEventListener('input', updateUI); diff --git a/assets/pasted-20260209-071514-6ff7c023.png b/assets/pasted-20260209-071514-6ff7c023.png new file mode 100644 index 0000000..733b0ca Binary files /dev/null and b/assets/pasted-20260209-071514-6ff7c023.png differ diff --git a/assets/pasted-20260209-072306-4e39525a.png b/assets/pasted-20260209-072306-4e39525a.png new file mode 100644 index 0000000..3e051cd Binary files /dev/null and b/assets/pasted-20260209-072306-4e39525a.png differ diff --git a/chat.php b/chat.php new file mode 100644 index 0000000..6caca97 --- /dev/null +++ b/chat.php @@ -0,0 +1,113 @@ + + +
+
+ +

+
+ +
+ +
+
+
+ + +
+
+
BITCrypto Support
+ Online • UID: +
+
+
+ +
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + + +
+ +
+
+ +
+
+ +

+ +

+
+
+
+ + + + + + \ No newline at end of file diff --git a/db/migrations/04_chat_and_deposits.sql b/db/migrations/04_chat_and_deposits.sql new file mode 100644 index 0000000..4072d1e --- /dev/null +++ b/db/migrations/04_chat_and_deposits.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS chat_messages ( + id INT AUTO_INCREMENT PRIMARY KEY, + user_id INT NOT NULL, + admin_id INT DEFAULT NULL, -- NULL means sent by user + message TEXT, + attachment_url VARCHAR(255) DEFAULT NULL, + is_read TINYINT(1) DEFAULT 0, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS deposits ( + id INT AUTO_INCREMENT PRIMARY KEY, + user_id INT NOT NULL, + currency VARCHAR(20) DEFAULT 'USDT', + amount DECIMAL(30, 10) NOT NULL, + status ENUM('pending', 'approved', 'rejected') DEFAULT 'pending', + receipt_url VARCHAR(255) DEFAULT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); + +ALTER TABLE users ADD COLUMN IF NOT EXISTS uid INT DEFAULT 0; diff --git a/deposit.php b/deposit.php index 4c036bd..ba52ab7 100644 --- a/deposit.php +++ b/deposit.php @@ -5,106 +5,249 @@ if (!$user) { header('Location: login.php'); exit; } + +$fiat_currencies = [ + 'USD' => ['name' => 'US Dollar', 'symbol' => '$', 'rate' => 1.0, 'region' => 'Americas'], + 'EUR' => ['name' => 'Euro', 'symbol' => '€', 'rate' => 0.92, 'region' => 'Europe'], + 'CNY' => ['name' => 'Chinese Yuan', 'symbol' => '¥', 'rate' => 7.21, 'region' => 'Asia'], + 'JPY' => ['name' => 'Japanese Yen', 'symbol' => '¥', 'rate' => 149.5, 'region' => 'Asia'], + 'KRW' => ['name' => 'South Korean Won', 'symbol' => '₩', 'rate' => 1335.0, 'region' => 'Asia'], + 'GBP' => ['name' => 'British Pound', 'symbol' => '£', 'rate' => 0.79, 'region' => 'Europe'], + 'RUB' => ['name' => 'Russian Ruble', 'symbol' => '₽', 'rate' => 92.4, 'region' => 'Europe'], + 'HKD' => ['name' => 'Hong Kong Dollar', 'symbol' => 'HK$', 'rate' => 7.82, 'region' => 'Asia'], + 'SGD' => ['name' => 'Singapore Dollar', 'symbol' => 'S$', 'rate' => 1.34, 'region' => 'Asia'], + 'AUD' => ['name' => 'Australian Dollar', 'symbol' => 'A$', 'rate' => 1.53, 'region' => 'Oceania'], + 'CAD' => ['name' => 'Canadian Dollar', 'symbol' => 'C$', 'rate' => 1.35, 'region' => 'Americas'], + 'BRL' => ['name' => 'Brazilian Real', 'symbol' => 'R$', 'rate' => 4.98, 'region' => 'Americas'], + 'INR' => ['name' => 'Indian Rupee', 'symbol' => '₹', 'rate' => 83.0, 'region' => 'Asia'], + 'VND' => ['name' => 'Vietnamese Dong', 'symbol' => '₫', 'rate' => 24500.0, 'region' => 'Asia'], + 'THB' => ['name' => 'Thai Baht', 'symbol' => '฿', 'rate' => 35.8, 'region' => 'Asia'], + 'MYR' => ['name' => 'Malaysian Ringgit', 'symbol' => 'RM', 'rate' => 4.77, 'region' => 'Asia'], + 'IDR' => ['name' => 'Indonesian Rupiah', 'symbol' => 'Rp', 'rate' => 15600.0, 'region' => 'Asia'], + 'PHP' => ['name' => 'Philippine Peso', 'symbol' => '₱', 'rate' => 56.1, 'region' => 'Asia'], + 'AED' => ['name' => 'UAE Dirham', 'symbol' => 'د.إ', 'rate' => 3.67, 'region' => 'Middle East'], + 'TRY' => ['name' => 'Turkish Lira', 'symbol' => '₺', 'rate' => 31.0, 'region' => 'Europe/Asia'], +]; + +// Group by region for better UI +$grouped_fiat = []; +foreach ($fiat_currencies as $code => $data) { + $grouped_fiat[$data['region']][$code] = $data; +} + +// Handle Receipt Upload +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['receipt'])) { + $amount = $_POST['amount'] ?? 0; + $currency = $_POST['currency'] ?? 'USDT'; + + $target_dir = "uploads/receipts/"; + if (!is_dir($target_dir)) mkdir($target_dir, 0777, true); + + $file_ext = pathinfo($_FILES["receipt"]["name"], PATHINFO_EXTENSION); + $file_name = time() . "_" . $user['id'] . "." . $file_ext; + $target_file = $target_dir . $file_name; + + if (move_uploaded_file($_FILES["receipt"]["tmp_name"], $target_file)) { + // Save to DB + $stmt = db()->prepare("INSERT INTO deposits (user_id, amount, currency, receipt_url, status) VALUES (?, ?, ?, ?, 'pending')"); + $stmt->execute([$user['id'], $amount, $currency, $target_file]); + + // Notify admin via chat (simulated message) + $msg = "New deposit request: $amount $currency. UID: " . ($user['uid'] ?? '000000'); + $stmt = db()->prepare("INSERT INTO chat_messages (user_id, message, attachment_url) VALUES (?, ?, ?)"); + $stmt->execute([$user['id'], $msg, $target_file]); + + echo ""; + exit; + } +} ?>
-
-
-

Assets

- -
- -
-
- - -
+
+
+

+

+
-
- - -
- -
-
Deposit Tips
-
    -
  • Minimum deposit: 1 USDT
  • -
  • Average arrival: 1-3 minutes
  • -
  • Depositing from other networks may result in loss of assets.
  • -
+
+
+
+
- -
-
-
- Deposit QR -
-
- -
- - +
+
+ +
+
+

+ +
+ +
+
+
+ + +
+
+
+
+
Tron (TRC20)
+
+
+
+
TWr8mP9PjH5pX9pX9pX9pX9pX9pX9pX9pX
+ +
+
+
+
+
+
+ QR +
+

+
+ +
+ +
+ +
+ + USDT +
+
+
+ + +
+
+ + +
-
- -
-
-
Arrival
-
1 Confirmations
-
-
-
-
Withdrawal
-
3 Confirmations
+ + +
+
+

+ +
+ +
+
+
+
+ + +
+
+ +
+ $ + + USD +
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
0.00 USDT
+
+ +
+ +
+
+ : + 1 USDT ≈ 1.00 USD +
+
+ : + +
+
+
+
+
+ +
+ +
+
- -
- -

Fiat Deposit

-
-
-
- -
Bank Transfer
-
0% Fees • 1-3 Hours
+
+ +
+
+
+ +
+
+

-
-
- -
Credit / Debit Card
-
Instant • Up to $5,000
+
+
+
+ +
+
+

-
-
- -
Digital Wallets
-
Instant • Apple/Google Pay
+
+
+
+ +
+
+

@@ -113,12 +256,52 @@ if (!$user) {
- + + document.getElementById('deposit-addr').innerText = addr; + document.getElementById('network-name').innerText = network; + document.getElementById('deposit-qr').src = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${addr}&color=0b0e11`; +}); + +document.addEventListener('DOMContentLoaded', updateRate); + \ No newline at end of file diff --git a/exchange.php b/exchange.php index 54aa94d..5c39912 100644 --- a/exchange.php +++ b/exchange.php @@ -28,16 +28,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $rate = 43250.50; if ($to_coin === 'ETH') $rate = 2345.20; if ($to_coin === 'SOL') $rate = 102.45; - if ($to_coin === 'OKB') $rate = 54.12; $receive = $amount / $rate; $pdo->prepare("UPDATE users SET balance_usdt = balance_usdt - ? WHERE id = ?")->execute([$amount, $user['id']]); - $success = "Exchanged $amount USDT for " . number_format($receive, 6) . " $to_coin"; + $success = mt('Successful') . ": " . number_format($receive, 6) . " $to_coin"; $user['balance_usdt'] -= $amount; } } else { - $error = "Only USDT to Crypto exchange is currently supported in this demo."; + $error = "Only USDT to Crypto exchange is currently supported."; } } catch (Exception $e) { $error = 'Exchange failed: ' . $e->getMessage(); @@ -51,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {

-

Zero fees, instant settlement

+

@@ -62,7 +61,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- +
- Estimated Price + 1 BTC ≈ 43,250 USDT
@@ -108,13 +104,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- \ No newline at end of file + diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000..3e051cd Binary files /dev/null and b/favicon.png differ diff --git a/includes/footer.php b/includes/footer.php index b56126a..a622403 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,62 +1,12 @@ - [ - 'Services' => 'Services', 'Spot_Trading' => 'Spot Trading', 'Futures_Trading' => 'Futures Trading', - 'Support' => 'Support', 'Help_Center' => 'Help Center', 'About' => 'About', 'About_Us' => 'About Us', - 'Legal' => 'Legal', 'Privacy_Policy' => 'Privacy Policy', 'Terms_of_Service' => 'Terms of Service' - ], - 'zh' => [ - 'Services' => '服务', 'Spot_Trading' => '现货交易', 'Futures_Trading' => '期货交易', - 'Support' => '支持', 'Help_Center' => '帮助中心', 'About' => '关于', 'About_Us' => '关于我们', - 'Legal' => '法律', 'Privacy_Policy' => '隐私政策', 'Terms_of_Service' => '服务条款' - ], - 'ja' => [ - 'Services' => 'サービス', 'Spot_Trading' => '現物取引', 'Futures_Trading' => '先物取引', - 'Support' => 'サポート', 'Help_Center' => 'ヘルプセンター', 'About' => '概要', 'About_Us' => '会社概要', - 'Legal' => '法的声明', 'Privacy_Policy' => 'プライバシーポリシー', 'Terms_of_Service' => '利用規約' - ], - 'ko' => [ - 'Services' => '서비스', 'Spot_Trading' => '현물 거래', 'Futures_Trading' => '선물 거래', - 'Support' => '지원', 'Help_Center' => '고객센터', 'About' => '소개', 'About_Us' => '회사 소개', - 'Legal' => '법적 고지', 'Privacy_Policy' => '개인정보처리방침', 'Terms_of_Service' => '이용약관' - ], - 'ru' => [ - 'Services' => 'Сервисы', 'Spot_Trading' => 'Спот торговля', 'Futures_Trading' => 'Фьючерсы', - 'Support' => 'Поддержка', 'Help_Center' => 'Центр помощи', 'About' => 'О нас', 'About_Us' => 'О компании', - 'Legal' => 'Юридические данные', 'Privacy_Policy' => 'Политика конфиденциальности', 'Terms_of_Service' => 'Условия использования' - ], - 'fr' => [ - 'Services' => 'Services', 'Spot_Trading' => 'Trading Spot', 'Futures_Trading' => 'Trading Futures', - 'Support' => 'Support', 'Help_Center' => 'Centre d\'aide', 'About' => 'À propos', 'About_Us' => 'À propos de nous', - 'Legal' => 'Légal', 'Privacy_Policy' => 'Politique de confidentialité', 'Terms_of_Service' => 'Conditions d\'utilisation' - ], - 'es' => [ - 'Services' => 'Servicios', 'Spot_Trading' => 'Trading Spot', 'Futures_Trading' => 'Trading de Futuros', - 'Support' => 'Soporte', 'Help_Center' => 'Centro de ayuda', 'About' => 'Acerca de', 'About_Us' => 'Sobre nosotros', - 'Legal' => 'Legal', 'Privacy_Policy' => 'Política de privacidad', 'Terms_of_Service' => 'Términos de servicio' - ], - 'de' => [ - 'Services' => 'Dienste', 'Spot_Trading' => 'Spot-Handel', 'Futures_Trading' => 'Futures-Handel', - 'Support' => 'Support', 'Help_Center' => 'Hilfe-Center', 'About' => 'Über uns', 'About_Us' => 'Über uns', - 'Legal' => 'Rechtliches', 'Privacy_Policy' => 'Datenschutzrichtlinie', 'Terms_of_Service' => 'Nutzungsbedingungen' - ] -]; - -function fmt($key) { - global $lang, $footer_translations; - return $footer_translations[$lang][$key] ?? ($footer_translations['en'][$key] ?? $key); -} -?> -
+
- -

The world's most trusted cryptocurrency exchange. Start trading BTC, ETH, and other assets with ease and security.

+
+
+ BITCrypto +
+

@@ -65,45 +15,51 @@ function fmt($key) {
-
-
    -
  • -
  • +
    +
      +
    • +
    • +
-
-
-
-
    -
  • +
    +
      +
-
-
    -
  • -
  • +
    +
      +
    • +
-
-
+
+

© 2026 BITCrypto. All rights reserved.

- System Status: Normal + :
+ + diff --git a/includes/header.php b/includes/header.php index c840b79..c86d261 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,15 +1,6 @@ - prepare("SELECT config_value FROM system_config WHERE config_key = 'site_name'"); - $stmt->execute(); - $config = $stmt->fetch(); - if ($config) $site_name = $config['config_value']; -} catch (Exception $e) {} +session_start(); $user = null; if (isset($_SESSION['user_id'])) { @@ -18,245 +9,371 @@ if (isset($_SESSION['user_id'])) { $user = $stmt->fetch(); } -// Language logic -if (isset($_GET['lang'])) { - $_SESSION['lang'] = $_GET['lang']; - $current_page = strtok($_SERVER["REQUEST_URI"], '?'); - header("Location: $current_page"); - exit; -} -$lang = $_SESSION['lang'] ?? 'en'; - -// Expanded translation array for 8 languages -$translations = [ - 'en' => [ - 'Home' => 'Home', 'Trade' => 'Trade', 'Spot' => 'Spot', 'Perpetual' => 'Perpetual', 'Markets' => 'Markets', 'Exchange' => 'Exchange', - 'Deposit' => 'Deposit', 'Withdraw' => 'Withdraw', 'Security' => 'Security', 'KYC' => 'Verification', 'Profile' => 'User Center', - 'Login' => 'Login', 'Register' => 'Register', 'Logout' => 'Logout', 'Overview' => 'Overview', 'Assets' => 'Assets', - 'Real-time Markets' => 'Real-time Markets', 'Trade Anywhere' => 'Trade Anywhere, Anytime.', 'Download app' => 'Scan to download BITCrypto app', - 'Account Overview' => 'Account Overview', 'Total Balance' => 'Total Balance', 'Security Settings' => 'Security Settings', - 'Login Password' => 'Login Password', 'Trading Password' => 'Trading Password', 'Identity Verification' => 'Identity Verification', - 'Full Name' => 'Full Name', 'ID Number' => 'ID Number', 'Submit' => 'Submit', 'Asset Name' => 'Asset Name', 'Last Price' => 'Last Price', - '24h Change' => '24h Change', 'Market Cap' => 'Market Cap', 'Trade Now' => 'Trade Now', 'Change' => 'Change', 'Set up' => 'Set up' - ], - 'zh' => [ - 'Home' => '首页', 'Trade' => '交易', 'Spot' => '现货', 'Perpetual' => '永续合约', 'Markets' => '行情', 'Exchange' => '兑换', - 'Deposit' => '充币', 'Withdraw' => '提币', 'Security' => '安全中心', 'KYC' => '身份认证', 'Profile' => '个人中心', - 'Login' => '登录', 'Register' => '注册', 'Logout' => '退出登录', 'Overview' => '资产概览', 'Assets' => '我的资产', - 'Real-time Markets' => '实时行情', 'Trade Anywhere' => '随时随地进行交易', 'Download app' => '扫码下载 BITCrypto App', - 'Account Overview' => '账户概览', 'Total Balance' => '总资产折算', 'Security Settings' => '安全设置', - 'Login Password' => '登录密码', 'Trading Password' => '资金密码', 'Identity Verification' => '身份认证', - 'Full Name' => '姓名', 'ID Number' => '证件号码', 'Submit' => '提交', 'Asset Name' => '资产名称', 'Last Price' => '最新价', - '24h Change' => '24h 涨跌', 'Market Cap' => '市值', 'Trade Now' => '立即交易', 'Change' => '修改', 'Set up' => '去设置' - ], - 'ja' => [ - 'Home' => 'ホーム', 'Trade' => 'トレード', 'Spot' => '現物', 'Perpetual' => '無期限', 'Markets' => 'マーケット', 'Exchange' => '両替', - 'Deposit' => '入金', 'Withdraw' => '出金', 'Security' => 'セキュリティ', 'KYC' => '本人確認', 'Profile' => 'ユーザーセンター', - 'Login' => 'ログイン', 'Register' => '新規登録', 'Logout' => 'ログアウト', 'Overview' => '概要', 'Assets' => '資産', - 'Real-time Markets' => 'リアルタイムマーケット', 'Trade Anywhere' => 'いつでも、どこでもトレード', 'Download app' => 'BITCryptoアプリをダウンロード', - 'Account Overview' => 'アカウント概要', 'Total Balance' => '総資産', 'Security Settings' => 'セキュリティ設定', - 'Login Password' => 'ログインパスワード', 'Trading Password' => '取引パスワード', 'Identity Verification' => '本人確認', - 'Full Name' => '氏名', 'ID Number' => 'ID番号', 'Submit' => '送信', 'Asset Name' => '資産名', 'Last Price' => '現在値', - '24h Change' => '24h 変動', 'Market Cap' => '時価総額', 'Trade Now' => '今すぐトレード', 'Change' => '変更', 'Set up' => '設定' - ], - 'ko' => [ - 'Home' => '홈', 'Trade' => '거래', 'Spot' => '현물', 'Perpetual' => '선물', 'Markets' => '시장', 'Exchange' => '교환', - 'Deposit' => '입금', 'Withdraw' => '출금', 'Security' => '보안', 'KYC' => '본인인증', 'Profile' => '사용자 센터', - 'Login' => '로그인', 'Register' => '회원가입', 'Logout' => '로그아웃', 'Overview' => '개요', 'Assets' => '자산', - 'Real-time Markets' => '실시간 시장', 'Trade Anywhere' => '언제 어디서나 거래하세요', 'Download app' => 'BITCrypto 앱 다운로드', - 'Account Overview' => '계정 개요', 'Total Balance' => '총 잔액', 'Security Settings' => '보안 설정', - 'Login Password' => '로그인 비밀번호', 'Trading Password' => '거래 비밀번호', 'Identity Verification' => '본인인증', - 'Full Name' => '성명', 'ID Number' => '신분증 번호', 'Submit' => '제출', 'Asset Name' => '자산 이름', 'Last Price' => '현재가', - '24h Change' => '24h 변동', 'Market Cap' => '시가총액', 'Trade Now' => '지금 거래하기', 'Change' => '변경', 'Set up' => '설정' - ], - 'ru' => [ - 'Home' => 'Главная', 'Trade' => 'Торговля', 'Spot' => 'Спот', 'Perpetual' => 'Фьючерсы', 'Markets' => 'Рынки', 'Exchange' => 'Обмен', - 'Deposit' => 'Депозит', 'Withdraw' => 'Вывод', 'Security' => 'Безопасность', 'KYC' => 'Верификация', 'Profile' => 'Центр пользователя', - 'Login' => 'Вход', 'Register' => 'Регистрация', 'Logout' => 'Выход', 'Overview' => 'Обзор', 'Assets' => 'Активы', - 'Real-time Markets' => 'Рынки в реальном времени', 'Trade Anywhere' => 'Торгуйте где угодно', 'Download app' => 'Скачать приложение BITCrypto', - 'Account Overview' => 'Обзор аккаунта', 'Total Balance' => 'Общий баланс', 'Security Settings' => 'Настройки безопасности', - 'Login Password' => 'Пароль для входа', 'Trading Password' => 'Торговый пароль', 'Identity Verification' => 'Верификация личности', - 'Full Name' => 'Полное имя', 'ID Number' => 'Номер документа', 'Submit' => 'Отправить', 'Asset Name' => 'Название актива', 'Last Price' => 'Цена', - '24h Change' => 'Изм. за 24ч', 'Market Cap' => 'Капитализация', 'Trade Now' => 'Торговать', 'Change' => 'Изменить', 'Set up' => 'Настроить' - ], - 'fr' => [ - 'Home' => 'Accueil', 'Trade' => 'Trader', 'Spot' => 'Spot', 'Perpetual' => 'Futures', 'Markets' => 'Marchés', 'Exchange' => 'Échange', - 'Deposit' => 'Dépôt', 'Withdraw' => 'Retrait', 'Security' => 'Sécurité', 'KYC' => 'Vérification', 'Profile' => 'Centre utilisateur', - 'Login' => 'Connexion', 'Register' => 'S\'inscrire', 'Logout' => 'Déconnexion', 'Overview' => 'Aperçu', 'Assets' => 'Actifs', - 'Real-time Markets' => 'Marchés en temps réel', 'Trade Anywhere' => 'Tradez n\'importe où', 'Download app' => 'Télécharger l\'app BITCrypto', - 'Account Overview' => 'Aperçu du compte', 'Total Balance' => 'Solde total', 'Security Settings' => 'Paramètres de sécurité', - 'Login Password' => 'Mot de passe de connexion', 'Trading Password' => 'Mot de passe de transaction', 'Identity Verification' => 'Vérification d\'identité', - 'Full Name' => 'Nom complet', 'ID Number' => 'Numéro d\'identité', 'Submit' => 'Soumettre', 'Asset Name' => 'Nom de l\'actif', 'Last Price' => 'Prix', - '24h Change' => 'Var. 24h', 'Market Cap' => 'Cap. boursière', 'Trade Now' => 'Trader maintenant', 'Change' => 'Modifier', 'Set up' => 'Configurer' - ], - 'es' => [ - 'Home' => 'Inicio', 'Trade' => 'Trading', 'Spot' => 'Spot', 'Perpetual' => 'Futuros', 'Markets' => 'Mercados', 'Exchange' => 'Intercambio', - 'Deposit' => 'Depósito', 'Withdraw' => 'Retiro', 'Security' => 'Seguridad', 'KYC' => 'Verificación', 'Profile' => 'Centro de usuario', - 'Login' => 'Iniciar sesión', 'Register' => 'Registrarse', 'Logout' => 'Cerrar sesión', 'Overview' => 'Resumen', 'Assets' => 'Activos', - 'Real-time Markets' => 'Mercados en tiempo real', 'Trade Anywhere' => 'Opera en cualquier lugar', 'Download app' => 'Descargar app BITCrypto', - 'Account Overview' => 'Resumen de cuenta', 'Total Balance' => 'Saldo total', 'Security Settings' => 'Ajustes de seguridad', - 'Login Password' => 'Contraseña de acceso', 'Trading Password' => 'Contraseña de trading', 'Identity Verification' => 'Verificación de identidad', - 'Full Name' => 'Nombre completo', 'ID Number' => 'Número de documento', 'Submit' => 'Enviar', 'Asset Name' => 'Activo', 'Last Price' => 'Último precio', - '24h Change' => 'Var. 24h', 'Market Cap' => 'Cap. de mercado', 'Trade Now' => 'Operar ahora', 'Change' => 'Cambiar', 'Set up' => 'Configurar' - ], - 'de' => [ - 'Home' => 'Startseite', 'Trade' => 'Handeln', 'Spot' => 'Spot', 'Perpetual' => 'Futures', 'Markets' => 'Märkte', 'Exchange' => 'Tausch', - 'Deposit' => 'Einzahlung', 'Withdraw' => 'Auszahlung', 'Security' => 'Sicherheit', 'KYC' => 'Verifizierung', 'Profile' => 'Benutzerzentrum', - 'Login' => 'Anmelden', 'Register' => 'Registrieren', 'Logout' => 'Abmelden', 'Overview' => 'Übersicht', 'Assets' => 'Vermögenswerte', - 'Real-time Markets' => 'Echtzeit-Märkte', 'Trade Anywhere' => 'Überall handeln', 'Download app' => 'BITCrypto App herunterladen', - 'Account Overview' => 'Kontoübersicht', 'Total Balance' => 'Gesamtguthaben', 'Security Settings' => 'Sicherheitseinstellungen', - 'Login Password' => 'Login-Passwort', 'Trading Password' => 'Handelspasswort', 'Identity Verification' => 'Identitätsprüfung', - 'Full Name' => 'Vollständiger Name', 'ID Number' => 'Ausweisnummer', 'Submit' => 'Absenden', 'Asset Name' => 'Name', 'Last Price' => 'Preis', - '24h Change' => '24h Änderung', 'Market Cap' => 'Marktkapitalisierung', 'Trade Now' => 'Jetzt handeln', 'Change' => 'Ändern', 'Set up' => 'Einrichten' - ] -]; - -function t($key, $default = null) { - global $lang, $translations; - return $translations[$lang][$key] ?? ($translations['en'][$key] ?? ($default ?? $key)); +$lang = $_GET['lang'] ?? $_SESSION['lang'] ?? 'en'; +if (!in_array($lang, ['en', 'zh'])) { + $lang = 'en'; } +$_SESSION['lang'] = $lang; function mt($key) { - return t($key); + global $lang; + $translations = [ + 'en' => [ + 'Home' => 'Home', 'Spot' => 'Spot', 'Perpetual' => 'Perpetual', 'Markets' => 'Markets', 'Exchange' => 'Exchange', + 'Login' => 'Login', 'Register' => 'Register', 'Profile' => 'Profile', 'Logout' => 'Logout', + 'Deposit' => 'Deposit', 'Withdraw' => 'Withdraw', 'Assets' => 'Assets', 'Security' => 'Security', + 'Buy' => 'Buy', 'Sell' => 'Sell', 'Limit' => 'Limit', 'Market' => 'Market', 'Price' => 'Price', + 'Amount' => 'Amount', 'Total' => 'Total', 'Available' => 'Available', 'Trade' => 'Trade', + 'Market Trends' => 'Market Trends', 'Real-time Prices' => 'Real-time Prices', 'High' => 'High', 'Low' => 'Low', + 'Download App' => 'Download App', 'Customer Service' => 'Customer Service', + 'Identity Verification' => 'Identity Verification', 'Trading Password' => 'Trading Password', + 'Success' => 'Success', 'Error' => 'Error', 'Matching Account' => 'Matching Account', + 'Establishing secure connection with liquidity provider...' => 'Establishing secure connection with liquidity provider...', + 'Awaiting merchant confirmation...' => 'Awaiting merchant confirmation...', + 'Matching in progress' => 'Matching in progress', + 'The specialized account for this transaction will be provided by our agent shortly.' => 'The specialized account for this transaction will be provided by our agent shortly.', + 'Transfer the exact amount. Upload proof below.' => 'Transfer the exact amount. Upload proof below.', + 'Bank Name' => 'Bank Name', 'Account Number' => 'Account Number', 'Beneficiary' => 'Beneficiary', 'Reference' => 'Reference', + 'Copy' => 'Copy', 'Upload Proof' => 'Upload Proof', 'Selected' => 'Selected', 'Transfer Completed' => 'Transfer Completed', + 'Your transfer is being reviewed. ETA: 10-20 mins.' => 'Your transfer is being reviewed. ETA: 10-20 mins.', + 'Back to Wallet' => 'Back to Wallet', 'Matched & Active' => 'Matched & Active', + 'Services' => 'Services', 'Spot Trading' => 'Spot Trading', 'Futures Trading' => 'Futures Trading', + 'Support' => 'Support', 'Help Center' => 'Help Center', 'About Us' => 'About Us', 'Privacy Policy' => 'Privacy Policy', 'Terms of Service' => 'Terms of Service', + 'System Status' => 'System Status', 'Normal' => 'Normal', 'Overview' => 'Overview', 'Full Name' => 'Full Name', 'ID Number' => 'ID Number', 'Submit' => 'Submit', 'Next-Gen Trading Engine' => 'Next-Gen Trading Engine', + 'Experience ultra-low latency and institutional-grade liquidity on our professional K-line trading platform.' => 'Experience ultra-low latency and institutional-grade liquidity on our professional K-line trading platform.', + 'Register Now' => 'Register Now', 'Start Trading' => 'Start Trading', 'Go to Futures' => 'Go to Futures', 'Global Crypto Hub' => 'Global Crypto Hub', + 'Access real-time global market data and execute trades across multiple asset classes with one unified account.' => 'Access real-time global market data and execute trades across multiple asset classes with one unified account.', + 'Secure Asset Custody' => 'Secure Asset Custody', 'Your funds are safe with our institutional-grade security, multi-sig cold storage, and comprehensive insurance fund.' => 'Your funds are safe with our institutional-grade security, multi-sig cold storage, and comprehensive insurance fund.', + 'Security Center' => 'Security Center', '24/7 Global Support' => '24/7 Global Support', 'Our dedicated professional support team is available around the clock to assist you in multiple languages.' => 'Our dedicated professional support team is available around the clock to assist you in multiple languages.', + 'Contact Support' => 'Contact Support', 'Asset' => 'Asset', '24h Change' => '24h Change', '24h High' => '24h High', 'Action' => 'Action', 'All Markets' => 'All Markets', + 'Real-time updates from global exchanges' => 'Real-time updates from global exchanges', 'Safe & Secure' => 'Safe & Secure', 'Industry-leading encryption and multi-signature cold storage for your digital assets.' => 'Industry-leading encryption and multi-signature cold storage for your digital assets.', + 'Instant Execution' => 'Instant Execution', 'Advanced matching engine processing over 100,000 transactions per second.' => 'Advanced matching engine processing over 100,000 transactions per second.', + 'Get help whenever you need it with our around-the-clock professional customer service.' => 'Get help whenever you need it with our around-the-clock professional customer service.', + 'Trade Anywhere, Anytime' => 'Trade Anywhere, Anytime', 'Experience the full power of our exchange on your mobile device. Trade spot and futures with ease.' => 'Experience the full power of our exchange on your mobile device. Trade spot and futures with ease.', + 'Scan to download' => 'Scan to download', 'Compatible with iOS and Android devices.' => 'Compatible with iOS and Android devices.', + 'Account Overview' => 'Account Overview', 'Total Balance' => 'Total Balance', 'Security Settings' => 'Security Settings', 'Login Password' => 'Login Password', + 'Change' => 'Change', 'Verified' => 'Verified', 'Reviewing...' => 'Reviewing...', 'none' => 'Unverified', 'pending' => 'Pending', 'approved' => 'Verified', + 'Trade with up to 100x leverage on BTC, ETH, and other major crypto pairs with professional risk management tools.' => 'Trade with up to 100x leverage on BTC, ETH, and other major crypto pairs with professional risk management tools.', + 'Perpetual Contracts' => 'Perpetual Contracts', 'Identity verification submitted and is under review.' => 'Identity verification submitted and is under review.', + 'New passwords do not match.' => 'New passwords do not match.', 'Password must be at least 6 characters.' => 'Password must be at least 6 characters.', 'Password updated successfully.' => 'Password updated successfully.', 'Current password incorrect.' => 'Current password incorrect.', + 'Hello! Welcome to BITCrypto. How can we help you today?' => 'Hello! Welcome to BITCrypto. How can we help you today?', + 'Type a message...' => 'Type a message...', 'Thank you for your message. An agent will be with you shortly.' => 'Thank you for your message. An agent will be with you shortly.', + 'For security reasons, never share your login or trading passwords with anyone, including our support agents.' => 'For security reasons, never share your login or trading passwords with anyone, including our support agents.', + 'Why Choose BITCrypto?' => 'Why Choose BITCrypto?', 'Global Liquidity' => 'Global Liquidity', 'Deep order books and high liquidity across all trading pairs for minimal slippage.' => 'Deep order books and high liquidity across all trading pairs for minimal slippage.', + 'Advanced Trading' => 'Advanced Trading', 'Professional charting tools, multi-order types, and real-time execution.' => 'Professional charting tools, multi-order types, and real-time execution.', + 'Trusted by Millions' => 'Trusted by Millions', 'Join a global community of traders and investors on one of the most secure platforms.' => 'Join a global community of traders and investors on one of the most secure platforms.', + 'Our Partners' => 'Our Partners', 'Global Trust' => 'Global Trust', 'Assets Overview' => 'Assets Overview', 'BITCrypto provides a comprehensive ecosystem for crypto enthusiasts, from beginners to professional institutional traders.' => 'BITCrypto provides a comprehensive ecosystem for crypto enthusiasts, from beginners to professional institutional traders.', + 'Our Global Partners' => 'Our Global Partners', 'Primary Network' => 'Primary Network', 'Smart Contracts' => 'Smart Contracts', 'Security Audit' => 'Security Audit', 'Financial Partner' => 'Financial Partner', 'Strategic Advisor' => 'Strategic Advisor', + 'Unverified' => 'Unverified', 'Verification' => 'Verification', 'digits' => 'digits', 'Search Pairs' => 'Search Pairs', 'No open orders' => 'No open orders', 'Time' => 'Time', 'Pair' => 'Pair', 'Type' => 'Type', 'Side' => 'Side', 'Filled' => 'Filled', 'Open Orders' => 'Open Orders', 'Order History' => 'Order History', 'Positions' => 'Positions', + 'Total Net Value' => 'Total Net Value', 'Yesterday Profit/Loss' => 'Yesterday Profit/Loss', 'Link' => 'Link', 'Recent Activities' => 'Recent Activities', 'Account Login' => 'Account Login', 'Update failed' => 'Update failed', 'Confirm New Trading Password' => 'Confirm New Trading Password', 'New Trading Password' => 'New Trading Password', + 'The World\'s Leading' => 'The World\'s Leading', 'Crypto Exchange' => 'Crypto Exchange', 'Trade Bitcoin, Ethereum, and hundreds of other cryptocurrencies with the lowest fees in the industry.' => 'Trade Bitcoin, Ethereum, and hundreds of other cryptocurrencies with the lowest fees in the industry.', + 'Get Started' => 'Get Started', 'View Markets' => 'View Markets', 'Users' => 'Users', '24h Volume' => '24h Volume', 'Countries' => 'Countries', + 'Stay updated with real-time price changes' => 'Stay updated with real-time price changes', 'View All' => 'View All', 'Name' => 'Name', + 'Experience the most professional trading environment' => 'Experience the most professional trading environment', + 'Multi-sig Cold Storage' => 'Multi-sig Cold Storage', 'DDoS Protection' => 'DDoS Protection', '2FA Security' => '2FA Security', + 'Ultra-low Latency' => 'Ultra-low Latency', 'High Liquidity' => 'High Liquidity', 'Zero Slippage' => 'Zero Slippage', + 'Multi-language Support' => 'Multi-language Support', 'Live Chat' => 'Live Chat', 'Fast Response' => 'Fast Response', + 'Trusted by industry leaders worldwide' => 'Trusted by industry leaders worldwide', 'Payment Partner' => 'Payment Partner', 'Infrastructure' => 'Infrastructure', + 'Download on the' => 'Download on the', 'Get it on' => 'Get it on', 'Compatible with iOS and Android devices.' => 'Compatible with iOS and Android devices.', + 'Trade Anywhere' => 'Trade Anywhere', 'Download BITCrypto mobile app for iOS and Android' => 'Download BITCrypto mobile app for iOS and Android', + 'Secure & Trusted' => 'Secure & Trusted', 'Your assets are protected by industry-leading security' => 'Your assets are protected by industry-leading security', + 'Crypto Deposit' => 'Crypto Deposit', 'Fiat Deposit' => 'Fiat Deposit', 'Select Currency' => 'Select Currency', 'Deposit Amount' => 'Deposit Amount', 'Submit Deposit' => 'Submit Deposit', + 'Select Fiat Currency' => 'Select Fiat Currency', 'Confirm Deposit' => 'Confirm Deposit', + 'Order ID' => 'Order ID', + 'A local merchant has been found. Matching account details...' => 'A local merchant has been found. Matching account details...', + 'Welcome! I am your dedicated matching assistant. I am currently verifying the liquidity provider for your deposit.' => 'Welcome! I am your dedicated matching assistant. I am currently verifying the liquidity provider for your deposit.', + 'Matching successful. I have secured a high-priority account for your transaction. Please find the details on the right.' => 'Matching successful. I have secured a high-priority account for your transaction. Please find the details on the right.', + 'Please upload your payment receipt/screenshot first.' => 'Please upload your payment receipt/screenshot first.', + 'Thank you for the update. We have received your payment proof and are now verifying the transaction on the blockchain. Your balance will be updated shortly.' => 'Thank you for the update. We have received your payment proof and are now verifying the transaction on the blockchain. Your balance will be updated shortly.', + 'Receipt uploaded successfully. Waiting for admin approval.' => 'Receipt uploaded successfully. Waiting for admin approval.', + 'Network' => 'Network', 'Scan QR code to deposit' => 'Scan QR code to deposit', 'Upload screenshot of your transaction' => 'Upload screenshot of your transaction', 'Instant' => 'Instant', 'Regional Support' => 'Regional Support', + 'We will match you with a local merchant to facilitate your deposit in your local currency.' => 'We will match you with a local merchant to facilitate your deposit in your local currency.', + 'Processing Time: 10-30 mins' => 'Processing Time: 10-30 mins', 'Exchange Rate' => 'Exchange Rate', 'Service Fee' => 'Service Fee', 'Free' => 'Free', + 'Secure Payment' => 'Secure Payment', 'All transactions are encrypted' => 'All transactions are encrypted', 'Fast Arrival' => 'Fast Arrival', 'Most deposits arrive in mins' => 'Most deposits arrive in mins', 'Live help for your deposit' => 'Live help for your deposit', + 'Address copied to clipboard' => 'Address copied to clipboard' + ], + 'zh' => [ + 'Home' => '首页', 'Spot' => '现货', 'Perpetual' => '永续合约', 'Markets' => '市场行情', 'Exchange' => '快捷换币', + 'Login' => '登录', 'Register' => '注册', 'Profile' => '个人中心', 'Logout' => '退出登录', + 'Deposit' => '充值', 'Withdraw' => '提现', 'Assets' => '资产总览', 'Security' => '安全设置', + 'Buy' => '买入', 'Sell' => '卖出', 'Limit' => '限价', 'Market' => '市价', 'Price' => '价格', + 'Amount' => '数量', 'Total' => '成交额', 'Available' => '可用余额', 'Trade' => '交易', + 'Market Trends' => '市场趋势', 'Real-time Prices' => '实时行情', 'High' => '最高', 'Low' => '最低', + 'Download App' => '下载APP', 'Customer Service' => '在线客服', + 'Identity Verification' => '实名认证', 'Trading Password' => '资金密码', + 'Success' => '操作成功', 'Error' => '操作失败', 'Matching Account' => '匹配账户', + 'Establishing secure connection with liquidity provider...' => '正在与流动性提供商建立安全连接...', + 'Awaiting merchant confirmation...' => '等待商家确认...', + 'Matching in progress' => '正在匹配中', + 'The specialized account for this transaction will be provided by our agent shortly.' => '该交易的专用账户将由我们的代理稍后提供。', + 'Transfer the exact amount. Upload proof below.' => '请转账准确金额。在下方上传凭证。', + 'Bank Name' => '银行名称', 'Account Number' => '账号', 'Beneficiary' => '收款人', 'Reference' => '备注/附言', + 'Copy' => '复制', 'Upload Proof' => '上传凭证', 'Selected' => '已选择', 'Transfer Completed' => '我已完成转账', + 'Your transfer is being reviewed. ETA: 10-20 mins.' => '您的转账正在审核中。预计时间:10-20分钟。', + 'Back to Wallet' => '返回钱包', 'Matched & Active' => '已匹配并激活', + 'Services' => '服务', 'Spot Trading' => '现货交易', 'Futures Trading' => '期货交易', + 'Support' => '支持', 'Help Center' => '帮助中心', 'About Us' => '关于我们', 'Privacy Policy' => '隐私政策', 'Terms of Service' => '服务条款', + 'System Status' => '系统状态', 'Normal' => '正常', 'Overview' => '概览', 'Full Name' => '真实姓名', 'ID Number' => '证件号码', 'Submit' => '提交', 'Next-Gen Trading Engine' => '下一代交易引擎', + 'Experience ultra-low latency and institutional-grade liquidity on our professional K-line trading platform.' => '在我们的专业K线交易平台上体验超低延迟和机构级流动性。', + 'Register Now' => '立即注册', 'Start Trading' => '开始交易', 'Go to Futures' => '前往合约', 'Global Crypto Hub' => '全球加密枢纽', + 'Access real-time global market data and execute trades across multiple asset classes with one unified account.' => '通过一个统一的账户访问实时全球市场数据并跨多个资产类别执行交易。', + 'Secure Asset Custody' => '安全的资产托管', 'Your funds are safe with our institutional-grade security, multi-sig cold storage, and comprehensive insurance fund.' => '您的资金在我们机构级的安全性、多重签名冷存储和全面的保险基金保护下非常安全。', + 'Security Center' => '安全中心', '24/7 Global Support' => '24/7 全球支持', 'Our dedicated professional support team is available around the clock to assist you in multiple languages.' => '我们专业的支持团队全天候为您提供多种语言的帮助。', + 'Contact Support' => '联系支持', 'Asset' => '资产', '24h Change' => '24h 涨跌', '24h High' => '24h 最高', 'Action' => '操作', 'All Markets' => '全部市场', + 'Real-time updates from global exchanges' => '来自全球交易所的实时更新', 'Safe & Secure' => '安全可靠', 'Industry-leading encryption and multi-signature cold storage for your digital assets.' => '为您的数字资产提供行业领先的加密和多重签名冷存储。', + 'Instant Execution' => '即时执行', 'Advanced matching engine processing over 100,000 transactions per second.' => '每秒处理超过 100,000 笔交易的先进撮合引擎。', + 'Get help whenever you need it with our around-the-clock professional customer service.' => '通过我们全天候的专业客户服务,随时获得您需要的帮助。', + 'Trade Anywhere, Anytime' => '随时随地进行交易', 'Experience the full power of our exchange on your mobile device. Trade spot and futures with ease.' => '在您的移动设备上体验我们交易所的全部功能。轻松交易现货和期货。', + 'Scan to download' => '扫码下载', 'Compatible with iOS and Android devices.' => '兼容 iOS 和 Android 设备。', + 'Account Overview' => '账户概览', 'Total Balance' => '总资产', 'Security Settings' => '安全设置', 'Login Password' => '登录密码', + 'Change' => '修改', 'Verified' => '已认证', 'Reviewing...' => '审核中...', 'none' => '未认证', 'pending' => '审核中', 'approved' => '已认证', + 'Trade with up to 100x leverage on BTC, ETH, and other major crypto pairs with professional risk management tools.' => '在 BTC、ETH 和其他主要加密货币对上使用高达 100 倍的杠杆进行交易,并配备专业的风险管理工具。', + 'Perpetual Contracts' => '永续合约', 'Identity verification submitted and is under review.' => '身份认证已提交,正在审核中。', + 'New passwords do not match.' => '新密码不匹配。', 'Password must be at least 6 characters.' => '密码长度必须至少为6位。', 'Password updated successfully.' => '密码更新成功。', 'Current password incorrect.' => '当前密码不正确。', + 'Hello! Welcome to BITCrypto. How can we help you today?' => '您好!欢迎来到 BITCrypto。今天有什么可以帮您的?', + 'Type a message...' => '输入消息...', 'Thank you for your message. An agent will be with you shortly.' => '感谢您的消息,客服人员稍后将为您提供服务。', + 'For security reasons, never share your login or trading passwords with anyone, including our support agents.' => '出于安全考虑,请勿向任何人(包括我们的客服人员)透露您的登录密码或交易密码。', + 'Why Choose BITCrypto?' => '为什么选择 BITCrypto?', 'Global Liquidity' => '全球流动性', 'Deep order books and high liquidity across all trading pairs for minimal slippage.' => '所有交易对均拥有深度订单簿和高流动性,确保最小滑点。', + 'Advanced Trading' => '高级交易', 'Professional charting tools, multi-order types, and real-time execution.' => '专业的图表工具、多种订单类型和实时执行。', + 'Trusted by Millions' => '数百万用户的信赖', 'Join a global community of traders and investors on one of the most secure platforms.' => '加入全球交易者和投资者的社区,在最安全的平台之一上进行交易。', + 'Our Partners' => '合作伙伴', 'Global Trust' => '全球信任', 'Assets Overview' => '资产总览', 'BITCrypto provides a comprehensive ecosystem for crypto enthusiasts, from beginners to professional institutional traders.' => 'BITCrypto 为加密爱好者提供了一个全面的生态系统,从初学者到专业的机构交易者都能在这里找到适合自己的工具。', + 'Our Global Partners' => '我们的全球合作伙伴', 'Primary Network' => '主要网络', 'Smart Contracts' => '智能合约', 'Security Audit' => '安全审计', 'Financial Partner' => '金融伙伴', 'Strategic Advisor' => '战略顾问', + 'Unverified' => '未认证', 'Verification' => '实名认证', 'digits' => '位数字', 'Search Pairs' => '搜索币种', 'No open orders' => '无挂单', 'Time' => '时间', 'Pair' => '币种', 'Type' => '类型', 'Side' => '方向', 'Filled' => '已成交', 'Open Orders' => '当前挂单', 'Order History' => '历史订单', 'Positions' => '当前仓位', + 'Total Net Value' => '总资产折算', 'Yesterday Profit/Loss' => '昨日盈亏', 'Link' => '去绑定', 'Recent Activities' => '最近动态', 'Account Login' => '账号登录', 'Update failed' => '更新失败', 'Confirm New Trading Password' => '确认新资金密码', 'New Trading Password' => '新资金密码', + 'The World\'s Leading' => '全球领先的', 'Crypto Exchange' => '数字资产交易所', 'Trade Bitcoin, Ethereum, and hundreds of other cryptocurrencies with the lowest fees in the industry.' => '在行业最低费率的交易所交易比特币、以太坊和数百种其他加密货币。', + 'Get Started' => '立即开始', 'View Markets' => '查看行情', 'Users' => '用户', '24h Volume' => '24h 成交额', 'Countries' => '覆盖国家', + 'Stay updated with real-time price changes' => '实时掌握价格波动', 'View All' => '查看全部', 'Name' => '币种名称', + 'Experience the most professional trading environment' => '体验最专业的交易环境', + 'Multi-sig Cold Storage' => '多重签名冷存储', 'DDoS Protection' => 'DDoS 防护', '2FA Security' => '双重身份验证', + 'Ultra-low Latency' => '极低延迟', 'High Liquidity' => '高流动性', 'Zero Slippage' => '零滑点', + 'Multi-language Support' => '多语言支持', 'Live Chat' => '实时聊天', 'Fast Response' => '极速响应', + 'Trusted by industry leaders worldwide' => '全球行业领导者的信赖', 'Payment Partner' => '支付合作伙伴', 'Infrastructure' => '基础设施', + 'Download on the' => '在 App Store 下载', 'Get it on' => '在 Google Play 下载', 'Compatible with iOS and Android devices.' => '兼容 iOS 和 Android 设备。', + 'Trade Anywhere' => '随时随地交易', 'Download BITCrypto mobile app for iOS and Android' => '下载 BITCrypto 移动端 App,支持 iOS 和 Android', + 'Secure & Trusted' => '安全可靠', 'Your assets are protected by industry-leading security' => '您的资产受到行业领先的安全保护', + 'Crypto Deposit' => '数字货币充值', 'Fiat Deposit' => '法币充值', 'Select Currency' => '选择币种', 'Deposit Amount' => '充值金额', 'Submit Deposit' => '提交充值', + 'Select Fiat Currency' => '选择法币', 'Confirm Deposit' => '确认充值', + 'Order ID' => '订单编号', + 'A local merchant has been found. Matching account details...' => '已找到本地商家。正在匹配账户详情...', + 'Welcome! I am your dedicated matching assistant. I am currently verifying the liquidity provider for your deposit.' => '欢迎!我是您的专属匹配助手。我目前正在为您验证流动性提供商。', + 'Matching successful. I have secured a high-priority account for your transaction. Please find the details on the right.' => '匹配成功。我已为您的交易锁定了一个高优先级账户。请查看右侧的详细信息。', + 'Please upload your payment receipt/screenshot first.' => '请先上传您的付款收据/截图。', + 'Thank you for the update. We have received your payment proof and are now verifying the transaction on the blockchain. Your balance will be updated shortly.' => '感谢您的反馈。我们已收到您的付款凭证,目前正在区块链上验证该交易。您的余额稍后将更新。', + 'Receipt uploaded successfully. Waiting for admin approval.' => '凭证上传成功。等待管理员审核。', + 'Network' => '网络', 'Scan QR code to deposit' => '扫码充值', 'Upload screenshot of your transaction' => '上传交易截图', 'Instant' => '秒到账', 'Regional Support' => '区域支持', + 'We will match you with a local merchant to facilitate your deposit in your local currency.' => '我们将为您匹配本地商家,方便您以本地货币进行充值。', + 'Processing Time: 10-30 mins' => '处理时间:10-30 分钟', 'Exchange Rate' => '汇率', 'Service Fee' => '手续费', 'Free' => '免费', + 'Secure Payment' => '安全支付', 'All transactions are encrypted' => '所有交易均已加密', 'Fast Arrival' => '极速到账', 'Most deposits arrive in mins' => '大多数充值在几分钟内到账', 'Live help for your deposit' => '充值实时帮助', + 'Address copied to clipboard' => '地址已复制到剪贴板' + ] + ]; + + return $translations[$lang][$key] ?? $translations['en'][$key] ?? $key; } +function t($key) { return mt($key); } + +// Determine if we need a back button (not on index.php) +$current_page = basename($_SERVER['PHP_SELF']); +$is_home = ($current_page == 'index.php'); ?> - <?php echo $site_name; ?> - Professional Crypto Exchange + BITCrypto - Global Leading Crypto Exchange + -
Username Balance (USDT) Control ModeAction
$
@@ -123,14 +213,11 @@ $current_config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
- -
+
+ +
+
${symbol}
+
${coin.name}
+
+
+
$${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2})} + + ${changeSign}${coin.change.toFixed(2)}% + + Trade +
+
+
- - - - - - + + + + + - - + + + + +
+
+
- -
-
-
-
-
-

-

- -
-
- QR Code -
- + +
+
+
+

+

+
+
+
+
+
+
+
+ +
+

+

+
    +
  • +
  • +
  • +
-
- Mobile App +
+
+
+
+ +
+
+ +
+

+

+
    +
  • +
  • +
  • +
+
+
+
+
+
+ +
+
+ +
+

+

+
    +
  • +
  • +
  • +
- -
- -
+ +
+
+

+

+
+
+
+ +
Apple Pay
+

+
+
+
+
+ +
Google Pay
+

+
+
+
+
+ +
AWS
+

+
+
+
+
+ +
Visa
+

+
+
+
+
+ +
Mastercard
+

+
+
+
+
+ +
PayPal
+

+
+
+
+
+
- - - \ No newline at end of file + + diff --git a/market.php b/market.php index 2087e2b..bb91c9b 100644 --- a/market.php +++ b/market.php @@ -3,38 +3,39 @@ require_once 'includes/header.php'; ?>
-
+

-

Real-time prices and market trends for all major cryptocurrencies.

+

-
+
- +
-
- - - - - - - - - - - - - - - - - -
24h High/Low24h Volume
-
-
+
+
+ + + + + + + + + + + + + + + + +
24h /
+
+
+
@@ -59,27 +60,26 @@ async function loadMarkets() {
- +
-
${symbol}
+
${symbol}
${coin.name}
- $${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 4})} - ${changeSign}${coin.change.toFixed(2)}% - + $${coin.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 4})} + ${changeSign}${coin.change.toFixed(2)}% +
H: $${(coin.price * 1.05).toFixed(2)}
L: $${(coin.price * 0.95).toFixed(2)}
- $${(Math.random() * 100 + 50).toFixed(2)}M - - ${t('Trade')} + + ${t('Trade')} `; } - tbody.innerHTML = html || 'No assets found'; + tbody.innerHTML = html || ''; } } catch (e) { console.error(e); @@ -87,7 +87,6 @@ async function loadMarkets() { } function t(key) { - // Basic JS translation mapper const map = { 'Trade': '' }; diff --git a/matching.php b/matching.php new file mode 100644 index 0000000..2dd010f --- /dev/null +++ b/matching.php @@ -0,0 +1,232 @@ + 1.0, 'EUR' => 0.92, 'CNY' => 7.21, 'JPY' => 149.5, 'KRW' => 1335.0, + 'GBP' => 0.79, 'RUB' => 92.4, 'HKD' => 7.82, 'SGD' => 1.34, 'AUD' => 1.53, + 'CAD' => 1.35, 'BRL' => 4.98, 'INR' => 83.0, 'VND' => 24500.0, 'THB' => 35.8, + 'MYR' => 4.77, 'IDR' => 15600.0, 'PHP' => 56.1, 'AED' => 3.67, 'TRY' => 31.0 +]; +$rate = $rates[$currency] ?? 1.0; +$usdt_amount = $amount / $rate; +?> + +
+
+
+
+ +
+
+
:
+
: #
+
+
+
15:00
+
+
+ +
+ +
+
+ + +
+ +
+
+ System +
+ +
+
+
+ +
+
+
+
+
+ + +
+
+
+ +
+

+
+
+ +
+
+ +
+ +
+
+ +
+ -- + +
+
+
+ +
+ -- + +
+
+
+ +
+ -- + +
+
+
+ +
+ + +
+
+
+ +
+
+
+ + +
+
+ +
+
+
+ +
+
+ + +
+ +

+

+ +
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/page.php b/page.php index c612123..f7a4c19 100644 --- a/page.php +++ b/page.php @@ -6,28 +6,28 @@ $slug = $_GET['slug'] ?? 'about'; $pages = [ 'about' => [ 'title' => 'About BITCrypto', - 'content' => 'BITCrypto is a world-leading cryptocurrency exchange, providing advanced financial services to traders globally using blockchain technology.', - 'image' => 'https://images.pexels.com/photos/6771607/pexels-photo-6771607.jpeg?auto=compress&cs=tinysrgb&w=800' - ], - 'terms' => [ - 'title' => 'Terms of Service', - 'content' => 'By using BITCrypto services, you agree to comply with our terms and conditions regarding digital asset trading and platform usage.', - 'image' => 'https://images.pexels.com/photos/6771574/pexels-photo-6771574.jpeg?auto=compress&cs=tinysrgb&w=800' - ], - 'privacy' => [ - 'title' => 'Privacy Policy', - 'content' => 'Your privacy is important to us. We protect your personal data with institutional-grade security and encryption.', - 'image' => 'https://images.pexels.com/photos/6770610/pexels-photo-6770610.jpeg?auto=compress&cs=tinysrgb&w=800' + 'image' => 'https://images.pexels.com/photos/8370752/pexels-photo-8370752.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1', + 'content' => 'BITCrypto is a world-leading cryptocurrency exchange, providing advanced financial services to traders globally by using blockchain technology. We provide hundreds of token & futures trading pairs to help traders to optimize their strategy. BITCrypto is one of the top digital asset exchanges by trading volume, serving millions of users in over 100 countries.' ], 'help-center' => [ 'title' => 'Help Center', - 'content' => 'Need help? Our 24/7 support team is here to assist you with any questions about trading, deposits, or account security.', - 'image' => 'https://images.pexels.com/photos/7567443/pexels-photo-7567443.jpeg?auto=compress&cs=tinysrgb&w=800' + 'image' => 'https://images.pexels.com/photos/6771107/pexels-photo-6771107.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1', + 'content' => 'Our help center provides comprehensive guides and support for all your trading needs. From account setup to advanced trading strategies, we are here to help you navigate the world of crypto. Contact our 24/7 customer support for personalized assistance.' ], 'security-info' => [ 'title' => 'Security First', - 'content' => 'We employ the most rigorous security standards in the industry, including multi-sig wallets and 2FA to keep your funds safe.', - 'image' => 'https://images.pexels.com/photos/6771611/pexels-photo-6771611.jpeg?auto=compress&cs=tinysrgb&w=800' + 'image' => 'https://images.pexels.com/photos/5980866/pexels-photo-5980866.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1', + 'content' => 'Security is our top priority. We use industry-leading security protocols to keep your funds and personal information safe. Our multi-cluster system architecture and cold storage solutions ensure the highest level of protection for your digital assets.' + ], + 'privacy' => [ + 'title' => 'Privacy Policy', + 'image' => 'https://images.pexels.com/photos/6771574/pexels-photo-6771574.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1', + 'content' => 'We are committed to protecting your privacy. This policy explains how we collect, use, and safeguard your information. We never share your data with third parties without your explicit consent.' + ], + 'terms' => [ + 'title' => 'Terms of Service', + 'image' => 'https://images.pexels.com/photos/7567443/pexels-photo-7567443.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1', + 'content' => 'By using BITCrypto, you agree to our terms of service. Our platform provides digital asset trading services and you are responsible for maintaining the security of your account and complying with local regulations.' ] ]; @@ -35,46 +35,40 @@ $page = $pages[$slug] ?? $pages['about']; ?>
-
-
-

-
- -
- -
-
-
- Crypto Image -
-
-
- -
-
-
-
- -
Secure Assets
-

98% of digital assets are stored in offline cold wallets.

+
+
+
+
+ Banner +
+
+

+
-
-
-
- -
Fast Execution
-

Proprietary matching engine capable of millions of TPS.

-
-
-
-
- -
Expert Support
-

Professional assistance in multiple languages 24/7/365.

+
+
+ +

+
+
+ Crypto 1 +
+
+ Crypto 2 +
+
+ Crypto 3 +
+
+
- \ No newline at end of file + + + diff --git a/profile.php b/profile.php index 61754d6..7f74a05 100644 --- a/profile.php +++ b/profile.php @@ -26,10 +26,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['kyc_submit'])) { try { $stmt = db()->prepare("UPDATE users SET real_name = ?, id_number = ?, kyc_status = 'pending' WHERE id = ?"); $stmt->execute([$real_name, $id_number, $user['id']]); - $msg = t('Identity verification submitted and is under review.'); + $msg = mt('Identity verification submitted and is under review.'); $user['kyc_status'] = 'pending'; } catch (Exception $e) { - $error = 'Error: ' . $e->getMessage(); + $error = mt('Error') . ': ' . $e->getMessage(); } } @@ -41,9 +41,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['change_password'])) { $confirm_pass = $_POST['confirm_password'] ?? ''; if ($new_pass !== $confirm_pass) { - $error = 'New passwords do not match.'; + $error = mt('New passwords do not match.'); } elseif (strlen($new_pass) < 6) { - $error = 'Password must be at least 6 characters.'; + $error = mt('Password must be at least 6 characters.'); } else { $current_hash = ($type === 'login') ? $user['password_hash'] : $user['security_password']; if (password_verify($old_pass, $current_hash)) { @@ -51,12 +51,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['change_password'])) { $column = ($type === 'login') ? 'password_hash' : 'security_password'; try { db()->prepare("UPDATE users SET $column = ? WHERE id = ?")->execute([$new_hash, $user['id']]); - $msg = 'Password updated successfully.'; + $msg = mt('Password updated successfully.'); } catch (Exception $e) { - $error = 'Update failed: ' . $e->getMessage(); + $error = mt('Update failed') . ': ' . $e->getMessage(); } } else { - $error = 'Current password incorrect.'; + $error = mt('Current password incorrect.'); } } } @@ -65,17 +65,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['change_password'])) {
-