diff --git a/about.php b/about.php new file mode 100644 index 0000000..5bbd71b --- /dev/null +++ b/about.php @@ -0,0 +1,27 @@ + +
+

+ +
+

Our Mission

+

Founded in 2017, EXCHANGE is a leading cryptocurrency infrastructure provider with a mission to facilitate the free flow of value around the world. We believe that everyone should have access to financial services, regardless of who they are or where they come from.

+ +
+
+

Global Presence

+

With offices in over 10 countries and users from 180+ nations, we are truly a global organization. Our team consists of experts from finance, technology, and security sectors.

+
+
+

Security First

+

Security is at the heart of everything we do. We employ industry-leading security measures, including multi-signature wallets and offline cold storage, to protect our users' assets.

+
+
+ +
+

Join millions of users worldwide

+

Experience the future of finance with the most trusted crypto exchange.

+ +
+
+
+ diff --git a/admin/chat.php b/admin/chat.php new file mode 100644 index 0000000..dfdc956 --- /dev/null +++ b/admin/chat.php @@ -0,0 +1,179 @@ +prepare("INSERT INTO messages (user_id, sender, message) VALUES (?, 'admin', ?)"); + $stmt->execute([$uid, $msg]); + } + header("Location: chat.php?user_id=" . $uid); + exit; +} + +// Handle setting bank info +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['bank_info']) && isset($_POST['order_id'])) { + $info = $_POST['bank_info']; + $oid = $_POST['order_id']; + $uid = $_POST['user_id']; + $stmt = db()->prepare("UPDATE fiat_orders SET bank_account_info = ? WHERE id = ?"); + $stmt->execute([$info, $oid]); + + // Also send as a chat message + $msg = "I have matched a bank account for your deposit. Please check the matching page.\n\nAccount Info:\n" . $info; + $stmt = db()->prepare("INSERT INTO messages (user_id, sender, message) VALUES (?, 'admin', ?)"); + $stmt->execute([$uid, $msg]); + + header("Location: chat.php?user_id=" . $uid); + exit; +} + +// Fetch all users who have sent messages +$users = db()->query(" + SELECT u.id, u.username, u.uid, MAX(m.created_at) as last_message, + (SELECT COUNT(*) FROM messages WHERE user_id = u.id AND sender = 'user' AND is_read = 0) as unread_count + FROM users u + JOIN messages m ON u.id = m.user_id + GROUP BY u.id + ORDER BY last_message DESC +")->fetchAll(); + +$messages = []; +$pending_order = null; +if ($selected_user_id) { + db()->prepare("UPDATE messages SET is_read = 1 WHERE user_id = ? AND sender = 'user'")->execute([$selected_user_id]); + $stmt = db()->prepare("SELECT * FROM messages WHERE user_id = ? ORDER BY created_at ASC"); + $stmt->execute([$selected_user_id]); + $messages = $stmt->fetchAll(); + + // Check for pending fiat order + $stmt = db()->prepare("SELECT * FROM fiat_orders WHERE user_id = ? AND bank_account_info IS NULL ORDER BY created_at DESC LIMIT 1"); + $stmt->execute([$selected_user_id]); + $pending_order = $stmt->fetch(); +} +?> + + + + + CS Workbench + + + + + + + + +
+ +
+
+

+ UID: +
+
+ + + + +
+
+ +
+ +
+ +
+ +
+ +
+
+ + + +
+
+ +
+
+ +

Select a conversation to begin

+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..117269f --- /dev/null +++ b/admin/index.php @@ -0,0 +1,82 @@ +query("SELECT COUNT(*) FROM users")->fetchColumn(); +$pending_kyc = $db->query("SELECT COUNT(*) FROM users WHERE kyc_status = 1")->fetchColumn(); +$pending_orders = $db->query("SELECT COUNT(*) FROM orders WHERE status = 'pending'")->fetchColumn() + $db->query("SELECT COUNT(*) FROM fiat_orders WHERE status = 'pending'")->fetchColumn(); +?> + + + + Admin Dashboard + + + + + +
+ +
+

System Overview

+
+
+
Total Registered
+
+
+
+
KYC Pending
+
+
+
+
Pending Deposits
+
+
+
+
Total Balance
+
$0.00
+
+
+ +
+

Control Center

+
+
+

Price Manipulation

+

Override real-time prices for specific pairs.

+ Configure +
+
+

Trade Win/Loss Control

+

Control the win rate for users trading on the platform.

+ Configure +
+
+
+
+
+ + \ No newline at end of file diff --git a/admin/kyc.php b/admin/kyc.php new file mode 100644 index 0000000..608c87d --- /dev/null +++ b/admin/kyc.php @@ -0,0 +1,81 @@ +prepare("UPDATE users SET kyc_status = ? WHERE id = ?")->execute([$status, $id]); + header("Location: kyc.php"); + exit; +} + +$submissions = $db->query("SELECT * FROM users WHERE kyc_status = 1 ORDER BY id DESC")->fetchAll(); +?> + + + + KYC Review + + + + + +
+ +
+

KYC Review Submissions

+ + + + + + + + + + + + + + + + + + + + + + + + +
UserFull NameID NumberDocumentsActions
(UID: ) + View Front | + View Back | + View Handheld + + Approve + Reject +
No pending KYC submissions.
+
+
+ + diff --git a/admin/orders.php b/admin/orders.php new file mode 100644 index 0000000..de8d843 --- /dev/null +++ b/admin/orders.php @@ -0,0 +1,152 @@ +prepare("UPDATE $table SET status = 'matched', account_info = ? WHERE id = ?")->execute([$info, $id]); + } elseif ($_POST['action'] == 'complete') { + $orderStmt = $pdo->prepare("SELECT user_id, amount FROM $table WHERE id = ?"); + $orderStmt->execute([$id]); + $order = $orderStmt->fetch(); + if ($order) { + // Update BOTH total_assets and balance + $pdo->prepare("UPDATE users SET total_assets = total_assets + ?, balance = balance + ? WHERE id = ?")->execute([$order['amount'], $order['amount'], $order['user_id']]); + $pdo->prepare("UPDATE $table SET status = 'completed' WHERE id = ?")->execute([$id]); + } + } elseif ($_POST['action'] == 'reject') { + $pdo->prepare("UPDATE $table SET status = 'rejected' WHERE id = ?")->execute([$id]); + } + } + + // Trading Order Actions + if ($_POST['action'] == 'set_win_loss') { + $win_loss = $_POST['win_loss']; + $pdo->prepare("UPDATE trading_orders SET win_loss = ? WHERE id = ?")->execute([$win_loss, $id]); + } +} + +$fiat_orders = $pdo->query("SELECT o.*, u.username, u.uid, 'fiat' as tbl FROM fiat_orders o JOIN users u ON o.user_id = u.id ORDER BY o.id DESC")->fetchAll(); +$usdt_orders = $pdo->query("SELECT o.*, u.username, u.uid, 'usdt' as tbl FROM orders o JOIN users u ON o.user_id = u.id ORDER BY o.id DESC")->fetchAll(); +$all_deposits = array_merge($fiat_orders, $usdt_orders); +usort($all_deposits, function($a, $b) { return $b['id'] - $a['id']; }); + +$trading_orders = $pdo->query("SELECT o.*, u.username, u.uid FROM trading_orders o JOIN users u ON o.user_id = u.id ORDER BY o.id DESC LIMIT 50")->fetchAll(); +?> + + + + Order Management + + + + + +
+ +
+

Deposit Management

+ + + + + + + + + + + + + + + + + + +
IDUserTypeAmountStatusActions
# (UID: ) + +
+ + + + + +
+ +
+ + + + +
+ +
+ +

Trading Orders (Win/Loss Control)

+ + + + + + + + + + + + + + + + + + + + + + +
IDUserSymbolTypeSidePriceAmountTotalWin/LossControl
# +
+ + + + +
+
+
+
+ + \ No newline at end of file diff --git a/admin/settings.php b/admin/settings.php new file mode 100644 index 0000000..7c9955a --- /dev/null +++ b/admin/settings.php @@ -0,0 +1,84 @@ + $value) { + $stmt = $db->prepare("INSERT INTO settings (name, value) VALUES (?, ?) ON DUPLICATE KEY UPDATE value = ?"); + $stmt->execute([$name, $value, $value]); + } + $message = "Settings updated successfully."; +} + +$settings_res = $db->query("SELECT * FROM settings")->fetchAll(); +$settings = []; +foreach($settings_res as $s) $settings[$s['name']] = $s['value']; +?> + + + + System Settings + + + + + +
+ +
+

System Control Panel

+ + +
+ + +
+
+ + +

Set the global probability for user winning in Seconds/Perpetual trades.

+
+ +
+ + +
+ +
+ + +

Used when Price Control Mode is "Manual Override". Leave 0 for auto-follow with offset.

+
+ +
+ + +
+ + +
+
+
+ + diff --git a/admin/users.php b/admin/users.php new file mode 100644 index 0000000..8f50b76 --- /dev/null +++ b/admin/users.php @@ -0,0 +1,91 @@ +prepare("UPDATE users SET credit_score = ? WHERE id = ?")->execute([$score, $uid]); + } elseif ($_POST['action'] == 'update_assets') { + $assets = $_POST['assets']; + $pdo->prepare("UPDATE users SET total_assets = ? WHERE id = ?")->execute([$assets, $uid]); + } +} + +$users = $pdo->query("SELECT * FROM users ORDER BY id DESC")->fetchAll(); +?> + + + + User Management + + + + + +
+ +
+

User Management

+ + + + + + + + + + + + + + + + + + + + + + + +
UIDUsernameAssets (USDT)Credit ScoreKYCActions
+
+ + + + +
+
+
+ + + + +
+
+ +
+
+
+ + diff --git a/api/check_order.php b/api/check_order.php new file mode 100644 index 0000000..eaf9f40 --- /dev/null +++ b/api/check_order.php @@ -0,0 +1,22 @@ + 'Unauthorized']); + exit; +} + +$order_id = $_GET['id']; +$pdo = db(); +$stmt = $pdo->prepare("SELECT status FROM orders WHERE id = ? AND user_id = ?"); +$stmt->execute([$order_id, $_SESSION['user_id']]); +$order = $stmt->fetch(); + +if ($order) { + echo json_encode(['status' => $order['status']]); +} else { + echo json_encode(['error' => 'Not found']); +} diff --git a/api/check_order_status.php b/api/check_order_status.php new file mode 100644 index 0000000..e8415ca --- /dev/null +++ b/api/check_order_status.php @@ -0,0 +1,17 @@ + 'Unauthorized']); + exit; +} + +$order_id = $_GET['order_id']; +$user_id = $_SESSION['user_id']; + +$stmt = db()->prepare("SELECT bank_account_info FROM fiat_orders WHERE id = ? AND user_id = ?"); +$stmt->execute([$order_id, $user_id]); +$order = $stmt->fetch(); + +echo json_encode(['bank_account_info' => $order['bank_account_info'] ?? null]); diff --git a/api/get_messages.php b/api/get_messages.php new file mode 100644 index 0000000..a79a5cc --- /dev/null +++ b/api/get_messages.php @@ -0,0 +1,15 @@ + 'Unauthorized']); + exit; +} + +$user_id = $_SESSION['user_id']; +$stmt = db()->prepare("SELECT COUNT(*) as count FROM messages WHERE user_id = ?"); +$stmt->execute([$user_id]); +$row = $stmt->fetch(); + +echo json_encode(['count' => $row['count']]); diff --git a/api/place_order.php b/api/place_order.php new file mode 100644 index 0000000..11ab1cc --- /dev/null +++ b/api/place_order.php @@ -0,0 +1,63 @@ + false, 'error' => 'Unauthorized']); + exit; +} + +$user_id = $_SESSION['user_id']; +$data = json_decode(file_get_contents('php://input'), true); + +if (!$data) { + echo json_encode(['success' => false, 'error' => 'Invalid data']); + exit; +} + +$symbol = $data['symbol']; +$type = $data['type']; // spot or futures +$side = $data['side']; // buy or sell +$order_type = $data['order_type']; // limit or market +$price = $data['price']; +$amount = $data['amount']; +$total = $data['total']; +$leverage = $data['leverage'] ?? 1; +$tp_price = $data['tp_price'] ?? null; +$sl_price = $data['sl_price'] ?? null; + +try { + $db = db(); + $db->beginTransaction(); + + // Check balance if buying spot or opening long/short futures (simplified) + $stmt = $db->prepare("SELECT balance FROM users WHERE id = ? FOR UPDATE"); + $stmt->execute([$user_id]); + $user = $stmt->fetch(); + + if ($side === 'buy' || $type === 'futures') { + $cost = $type === 'futures' ? $total / $leverage : $total; + if ($user['balance'] < $cost) { + $db->rollBack(); + echo json_encode(['success' => false, 'error' => 'Insufficient balance']); + exit; + } + + // Deduct balance + $stmt = $db->prepare("UPDATE users SET balance = balance - ? WHERE id = ?"); + $stmt->execute([$cost, $user_id]); + } + + // Insert order + $stmt = $db->prepare("INSERT INTO trading_orders (user_id, symbol, type, side, order_type, price, amount, total, leverage, tp_price, sl_price) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + $stmt->execute([$user_id, $symbol, $type, $side, $order_type, $price, $amount, $total, $leverage, $tp_price, $sl_price]); + + $db->commit(); + echo json_encode(['success' => true]); + +} catch (Exception $e) { + if (isset($db)) $db->rollBack(); + echo json_encode(['success' => false, 'error' => $e->getMessage()]); +} diff --git a/assets/css/custom.css b/assets/css/custom.css index 65a1626..efda356 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,346 +1,329 @@ :root { - --color-bg: #ffffff; - --color-text: #1a1a1a; - --color-primary: #2563EB; /* Vibrant Blue */ - --color-secondary: #000000; - --color-accent: #A3E635; /* Lime Green */ - --color-surface: #f8f9fa; - --font-heading: 'Space Grotesk', sans-serif; - --font-body: 'Inter', sans-serif; - --border-width: 2px; - --shadow-hard: 5px 5px 0px #000; - --shadow-hover: 8px 8px 0px #000; - --radius-pill: 50rem; - --radius-card: 1rem; + --bg-color: #0B0E11; + --nav-bg: #0B0E11; + --primary-color: #0052FF; + --text-color: #FFFFFF; + --text-muted: #848E9C; + --border-color: #2B3139; + --card-bg: #1E2329; + --danger-color: #F6465D; + --success-color: #0ECB81; + --gold-color: #F0B90B; } body { - font-family: var(--font-body); - background-color: var(--color-bg); - color: var(--color-text); - overflow-x: hidden; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + background-color: var(--bg-color); + color: var(--text-color); + line-height: 1.5; } -h1, h2, h3, h4, h5, h6, .navbar-brand { - font-family: var(--font-heading); - letter-spacing: -0.03em; -} - -/* Utilities */ -.text-primary { color: var(--color-primary) !important; } -.bg-black { background-color: #000 !important; } -.text-white { color: #fff !important; } -.shadow-hard { box-shadow: var(--shadow-hard); } -.border-2-black { border: var(--border-width) solid #000; } -.py-section { padding-top: 5rem; padding-bottom: 5rem; } - -/* Navbar */ .navbar { - background: rgba(255, 255, 255, 0.9); - backdrop-filter: blur(10px); - border-bottom: var(--border-width) solid transparent; - transition: all 0.3s; - padding-top: 1rem; - padding-bottom: 1rem; + background-color: var(--nav-bg); + padding: 0 1.5rem; + height: 64px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid var(--border-color); + position: sticky; + top: 0; + z-index: 1000; } -.navbar.scrolled { - border-bottom-color: #000; - padding-top: 0.5rem; - padding-bottom: 0.5rem; +.nav-links { + display: flex; + gap: 1.5rem; + align-items: center; } -.brand-text { - font-size: 1.5rem; - font-weight: 800; -} - -.nav-link { +.nav-links a { + color: var(--text-color); + text-decoration: none; + font-size: 14px; font-weight: 500; - color: var(--color-text); - margin-left: 1rem; + transition: color 0.2s; + display: flex; + align-items: center; +} + +.nav-links a:hover { + color: var(--primary-color); +} + +.nav-link-icon { + margin-right: 6px; + font-size: 16px; +} + +/* Colorful Menu Icons */ +.fa-home { color: #5d5dff; } +.fa-chart-line { color: #00e676; } +.fa-coins { color: #ffd600; } +.fa-file-contract { color: #ff3d00; } +.fa-bolt { color: #fbc02d; } +.fa-pickaxe { color: #8e24aa; } +.fa-wallet { color: #03a9f4; } + +.dropdown { position: relative; + display: inline-block; } -.nav-link:hover, .nav-link.active { - color: var(--color-primary); +.dropdown-content { + display: none; + position: absolute; + background-color: #1E2329; + min-width: 180px; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5); + z-index: 1; + border: 1px solid var(--border-color); + border-radius: 4px; + top: 100%; } -/* Buttons */ -.btn { - font-weight: 700; - font-family: var(--font-heading); - padding: 0.8rem 2rem; - border-radius: var(--radius-pill); - border: var(--border-width) solid #000; - transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1); - box-shadow: var(--shadow-hard); +.dropdown:hover .dropdown-content { + display: block; } -.btn:hover { - transform: translate(-2px, -2px); - box-shadow: var(--shadow-hover); +.dropdown-content a { + color: white; + padding: 12px 16px; + text-decoration: none; + display: block; + font-size: 14px; } -.btn:active { - transform: translate(2px, 2px); - box-shadow: 0 0 0 #000; +.dropdown-content a:hover { + background-color: #2B3139; } .btn-primary { - background-color: var(--color-primary); - border-color: #000; - color: #fff; + background-color: var(--primary-color); + color: white; + border: none; + padding: 8px 16px; + border-radius: 4px; + cursor: pointer; + font-weight: 600; + text-decoration: none; + display: inline-flex; + align-items: center; + justify-content: center; } .btn-primary:hover { - background-color: #1d4ed8; - border-color: #000; - color: #fff; + opacity: 0.9; } -.btn-outline-dark { - background-color: #fff; - color: #000; -} - -.btn-cta { - background-color: var(--color-accent); - color: #000; -} - -.btn-cta:hover { - background-color: #8cc629; - color: #000; -} - -/* Hero Section */ +/* Hero & Carousel */ .hero-section { - min-height: 100vh; - padding-top: 80px; -} - -.background-blob { - position: absolute; - border-radius: 50%; - filter: blur(80px); - opacity: 0.6; - z-index: 1; -} - -.blob-1 { - top: -10%; - right: -10%; - width: 600px; - height: 600px; - background: radial-gradient(circle, var(--color-accent), transparent); -} - -.blob-2 { - bottom: 10%; - left: -10%; - width: 500px; - height: 500px; - background: radial-gradient(circle, var(--color-primary), transparent); -} - -.highlight-text { - background: linear-gradient(120deg, transparent 0%, transparent 40%, var(--color-accent) 40%, var(--color-accent) 100%); - background-repeat: no-repeat; - background-size: 100% 40%; - background-position: 0 88%; - padding: 0 5px; -} - -.dot { color: var(--color-primary); } - -.badge-pill { - display: inline-block; - padding: 0.5rem 1rem; - border: 2px solid #000; - border-radius: 50px; - font-weight: 700; - background: #fff; - box-shadow: 4px 4px 0 #000; - font-family: var(--font-heading); - font-size: 0.9rem; -} - -/* Marquee */ -.marquee-container { - overflow: hidden; - white-space: nowrap; - border-top: 2px solid #000; - border-bottom: 2px solid #000; -} - -.rotate-divider { - transform: rotate(-2deg) scale(1.05); - z-index: 10; - position: relative; - margin-top: -50px; - margin-bottom: 30px; -} - -.marquee-content { - display: inline-block; - animation: marquee 20s linear infinite; - font-family: var(--font-heading); - font-weight: 700; - font-size: 1.5rem; - letter-spacing: 2px; -} - -@keyframes marquee { - 0% { transform: translateX(0); } - 100% { transform: translateX(-50%); } -} - -/* Portfolio Cards */ -.project-card { - border: 2px solid #000; - border-radius: var(--radius-card); - overflow: hidden; - background: #fff; - transition: transform 0.3s ease; - box-shadow: var(--shadow-hard); - height: 100%; + padding: 80px 5%; display: flex; - flex-direction: column; + align-items: center; + gap: 4rem; + min-height: 500px; } -.project-card:hover { - transform: translateY(-10px); - box-shadow: 8px 8px 0 #000; +.hero-content { flex: 1; } +.hero-image { flex: 1; position: relative; } + +.hero-carousel { + width: 100%; + height: 350px; + position: relative; + overflow: hidden; + border-radius: 12px; } -.card-img-holder { - height: 250px; +.carousel-inner { + width: 100%; + height: 100%; +} + +.carousel-item { + width: 100%; + height: 100%; + position: absolute; + opacity: 0; + transition: opacity 1s ease-in-out; + background-size: cover; + background-position: center; + display: flex; + align-items: flex-end; + padding: 30px; +} + +.carousel-item.active { opacity: 1; } + +.carousel-caption { + background: rgba(0,0,0,0.6); + padding: 15px 25px; + border-radius: 8px; + backdrop-filter: blur(10px); +} + +/* Sections */ +.section-title { + font-size: 2.5rem; + margin-bottom: 40px; + text-align: center; +} + +.market-table-card { + background: var(--card-bg); + border-radius: 12px; + overflow: hidden; + border: 1px solid var(--border-color); +} + +.market-table { + width: 100%; + border-collapse: collapse; +} + +.market-table th, .market-table td { + padding: 16px 24px; + text-align: left; + border-bottom: 1px solid var(--border-color); +} + +.market-table th { + color: var(--text-muted); + font-weight: 500; + font-size: 14px; +} + +/* Why Choose Us */ +.why-section { + display: flex; + gap: 30px; + margin: 80px auto; + max-width: 1200px; + padding: 0 20px; +} + +.why-left { flex: 1.5; } +.why-right { flex: 1; background: var(--card-bg); padding: 40px; border-radius: 20px; border: 1px solid var(--border-color); } + +.why-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 20px; +} + +.why-item { + background: var(--card-bg); + padding: 30px; + border-radius: 16px; + border: 1px solid var(--border-color); +} + +.why-icon { + font-size: 40px; + margin-bottom: 20px; +} + +/* Partners */ +.partners-section { + padding: 80px 5%; + background: #0d1117; + text-align: center; +} + +.partners-grid { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + gap: 40px; + margin-top: 40px; + opacity: 0.7; +} + +.partner-logo { + height: 40px; + filter: grayscale(1); + transition: 0.3s; +} + +.partner-logo:hover { + filter: grayscale(0); + opacity: 1; +} + +/* Floating Service */ +.floating-service { + position: fixed; + bottom: 30px; + right: 30px; + width: 60px; + height: 60px; + background: var(--primary-color); + border-radius: 50%; display: flex; align-items: center; justify-content: center; - border-bottom: 2px solid #000; - position: relative; - font-size: 4rem; + font-size: 24px; + color: white; + cursor: pointer; + box-shadow: 0 10px 25px rgba(0,82,255,0.3); + z-index: 1000; + transition: 0.3s; } -.placeholder-art { - transition: transform 0.3s ease; +.floating-service:hover { + transform: scale(1.1); } -.project-card:hover .placeholder-art { - transform: scale(1.2) rotate(10deg); -} - -.bg-soft-blue { background-color: #e0f2fe; } -.bg-soft-green { background-color: #dcfce7; } -.bg-soft-purple { background-color: #f3e8ff; } -.bg-soft-yellow { background-color: #fef9c3; } - -.category-tag { - position: absolute; - top: 15px; - right: 15px; - background: #000; - color: #fff; - padding: 5px 12px; - border-radius: 20px; - font-size: 0.75rem; - font-weight: 700; -} - -.card-body { padding: 1.5rem; } - -.link-arrow { - text-decoration: none; - color: #000; - font-weight: 700; +/* Back Button */ +.back-btn { display: inline-flex; align-items: center; - margin-top: auto; + gap: 8px; + color: var(--text-muted); + text-decoration: none; + margin-bottom: 20px; + transition: 0.2s; } -.link-arrow i { transition: transform 0.2s; margin-left: 5px; } -.link-arrow:hover i { transform: translateX(5px); } - -/* About */ -.about-image-stack { - position: relative; - height: 400px; - width: 100%; +.back-btn:hover { + color: white; } -.stack-card { - position: absolute; - width: 80%; - height: 100%; - border-radius: var(--radius-card); - border: 2px solid #000; - box-shadow: var(--shadow-hard); - left: 10%; - transform: rotate(-3deg); - background-size: cover; +/* Trading Pages specific */ +.trading-container { + display: grid; + grid-template-columns: 1fr 320px 320px; + height: calc(100vh - 64px); + overflow: hidden; } -/* Forms */ -.form-control { - border: 2px solid #000; - border-radius: 0.5rem; - padding: 1rem; - font-weight: 500; - background: #f8f9fa; -} +.chart-area { flex: 1; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; } +.orderbook-area { width: 320px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; } +.trade-area { width: 320px; padding: 20px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; } -.form-control:focus { - box-shadow: 4px 4px 0 var(--color-primary); - border-color: #000; - background: #fff; -} +.trade-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 15px; } +.trade-tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; color: var(--text-muted); } +.trade-tab.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); } -/* Animations */ -.animate-up { - opacity: 0; - transform: translateY(30px); - animation: fadeUp 0.8s ease forwards; -} +.input-group { margin-bottom: 15px; } +.input-label { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; display: flex; justify-content: space-between; } +.trade-input-wrapper { background: #2b3139; border-radius: 4px; display: flex; align-items: center; padding: 0 12px; border: 1px solid transparent; } +.trade-input-wrapper:focus-within { border-color: var(--primary-color); } +.trade-input { background: transparent; border: none; color: white; padding: 10px 0; width: 100%; outline: none; font-size: 14px; } -.delay-100 { animation-delay: 0.1s; } -.delay-200 { animation-delay: 0.2s; } +.slider-container { margin: 20px 0; } +.slider { width: 100%; cursor: pointer; } -@keyframes fadeUp { - to { - opacity: 1; - transform: translateY(0); - } -} - -/* Social */ -.social-links a { - transition: transform 0.2s; - display: inline-block; -} -.social-links a:hover { - transform: scale(1.2) rotate(10deg); - color: var(--color-accent) !important; -} +.btn-buy { background: var(--success-color); color: white; width: 100%; padding: 12px; border-radius: 4px; border: none; font-weight: bold; cursor: pointer; } +.btn-sell { background: var(--danger-color); color: white; width: 100%; padding: 12px; border-radius: 4px; border: none; font-weight: bold; cursor: pointer; } /* Responsive */ -@media (max-width: 991px) { - .rotate-divider { - transform: rotate(0); - margin-top: 0; - margin-bottom: 2rem; - } - - .hero-section { - padding-top: 120px; - text-align: center; - min-height: auto; - padding-bottom: 100px; - } - - .display-1 { font-size: 3.5rem; } - - .blob-1 { width: 300px; height: 300px; right: -20%; } - .blob-2 { width: 300px; height: 300px; left: -20%; } -} +@media (max-width: 992px) { + .hero-section { flex-direction: column; text-align: center; } + .why-section { flex-direction: column; } + .trading-container { grid-template-columns: 1fr; height: auto; } + .orderbook-area, .trade-area { width: 100%; } +} \ No newline at end of file diff --git a/careers.php b/careers.php new file mode 100644 index 0000000..8166edd --- /dev/null +++ b/careers.php @@ -0,0 +1,45 @@ + +
+

+

Help us build the future of financial freedom.

+ +
+
+
+

Senior Backend Engineer

+

Scale our high-performance trading engine and core financial infrastructure.

+
+ Remote + Full-time +
+
+
+
+

Product Designer

+

Design intuitive and beautiful experiences for millions of crypto users.

+
+ Remote + Full-time +
+
+
+
+

Customer Success Manager

+

Ensure our global users have a world-class support experience.

+
+ Hybrid + Full-time +
+
+
+
+

Security Specialist

+

Protect user assets and maintain the integrity of our platform.

+
+ Remote + Full-time +
+
+
+
+ diff --git a/chat.php b/chat.php new file mode 100644 index 0000000..f893e51 --- /dev/null +++ b/chat.php @@ -0,0 +1,90 @@ +location.href='login.php';"; + exit; +} + +$user_id = $_SESSION['user_id']; + +// Handle message sending +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['message'])) { + $msg = trim($_POST['message']); + if ($msg !== '') { + $stmt = db()->prepare("INSERT INTO messages (user_id, sender, message) VALUES (?, 'user', ?)"); + $stmt->execute([$user_id, $msg]); + } + header("Location: chat.php"); + exit; +} + +// Fetch messages +$stmt = db()->prepare("SELECT * FROM messages WHERE user_id = ? ORDER BY created_at ASC"); +$stmt->execute([$user_id]); +$messages = $stmt->fetchAll(); + +// Mark admin messages as read +$stmt = db()->prepare("UPDATE messages SET is_read = 1 WHERE user_id = ? AND sender = 'admin'"); +$stmt->execute([$user_id]); +?> + +
+
+
+
+ +
+
+

+ Online +
+
+ +
+ +
+ +

+
+ + + +
+
+ +
+ +
+ +
+ +
+
+ + +
+
+
+
+ + + + diff --git a/convert.php b/convert.php new file mode 100644 index 0000000..1dd4928 --- /dev/null +++ b/convert.php @@ -0,0 +1,87 @@ + + +
+
+

+ +
+ +
+ +
+ + USDT +
+
+
+ Available: 0.00 USDT + Max +
+
+ +
+
+ +
+
+ +
+ +
+ + +
+
+ 1 USDT ≈ --.--- BTC +
+
+ + + +
+
+ + Zero fees, instant settlement. +
+
+
+
+ + + + \ No newline at end of file diff --git a/deposit.php b/deposit.php new file mode 100644 index 0000000..ad11533 --- /dev/null +++ b/deposit.php @@ -0,0 +1,186 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$fiat_currencies = [ + 'USD' => ['name' => 'US Dollar', 'rate' => 1.00], + 'EUR' => ['name' => 'Euro', 'rate' => 0.92], + 'GBP' => ['name' => 'British Pound', 'rate' => 0.79], + 'CNY' => ['name' => 'Chinese Yuan', 'rate' => 7.23], + 'HKD' => ['name' => 'Hong Kong Dollar', 'rate' => 7.82], + 'JPY' => ['name' => 'Japanese Yen', 'rate' => 151.45], + 'KRW' => ['name' => 'Korean Won', 'rate' => 1350.20], + 'SGD' => ['name' => 'Singapore Dollar', 'rate' => 1.35], + 'TWD' => ['name' => 'Taiwan Dollar', 'rate' => 32.10], + 'THB' => ['name' => 'Thai Baht', 'rate' => 36.50], + 'VND' => ['name' => 'Vietnamese Dong', 'rate' => 24800], + 'IDR' => ['name' => 'Indonesian Rupiah', 'rate' => 15850], + 'MYR' => ['name' => 'Malaysian Ringgit', 'rate' => 4.74], +]; +?> + +
+
+ + + +
+

+

+
+ +
+
+
+
+ +
+
+

+

+
+
+
+
Support 20+ Global Currencies
+
Secure Bank-Grade Processing
+
+
+ +
+
+
+ +
+
+

+

Blockchain Transfer

+
+
+
+
USDT (TRC20, ERC20, BEP20)
+
Low Service Fees
+
+
+
+ +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
Current Exchange Rate (USDT)
+
7.23 CNY = 1 USDT
+
+ +
+
+ Instructions +
+

+ Please complete the payment within the time limit after matching. Once submitted, our customer service will verify your deposit. +

+
+ +
+
+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..69205f1 --- /dev/null +++ b/footer.php @@ -0,0 +1,98 @@ + + + + + + \ No newline at end of file diff --git a/futures.php b/futures.php new file mode 100644 index 0000000..5a808c4 --- /dev/null +++ b/futures.php @@ -0,0 +1,222 @@ +prepare("SELECT balance FROM users WHERE id = ?"); + $stmt->execute([$user_id]); + $user = $stmt->fetch(); + $balance = $user['balance'] ?? 0; +} +?> + +
+ + +
+
+
Perpetual Contracts
+ +
+
+ +
+
+ + +
+ +
+
+ + BTC/USDT Perpetual +
+
+
--.---
Mark Price
+
--%
24h Change
+
0.0100%
Funding / Countdown
+
+
+ +
+ +
+
+
Positions(0)
+
Open Orders(0)
+
Order History
+
Assets
+
+
+ + + + + + + + + + + + + + + + +
SymbolSizeEntry PriceMark PriceLiq. PriceMarginPNL (ROE%)Action
No active positions
+
+
+
+ + +
+
+
Cross
+
20x
+
+ +
+ + +
+ +
+ Avbl + USDT +
+ +
PriceUSDT
+
SizeBTC
+ +
+ +
+ + +
+ +
+
Cost0.00 USDT
+
Max Open0.00 BTC
+
+
+ + +
+
Order Book
+
+ Price(USDT) + Size(BTC) +
+
+
+
--.---
+
+
+
+
+ + + + + + + diff --git a/header.php b/header.php new file mode 100644 index 0000000..8eb2160 --- /dev/null +++ b/header.php @@ -0,0 +1,75 @@ + + + + + + + OKX | Leading Crypto Exchange + + + + + + + + + + + + diff --git a/includes/i18n.php b/includes/i18n.php new file mode 100644 index 0000000..78e433c --- /dev/null +++ b/includes/i18n.php @@ -0,0 +1,290 @@ + [ + 'nav_home' => 'Home', + 'nav_market' => 'Markets', + 'nav_trade' => 'Trade', + 'nav_spot' => 'Spot', + 'nav_futures' => 'Futures', + 'nav_mining' => 'Mining', + 'nav_convert' => 'Convert', + 'nav_assets' => 'Assets', + 'nav_total_assets' => 'Total Assets', + 'nav_deposit' => 'Deposit', + 'nav_withdraw' => 'Withdraw', + 'nav_login' => 'Log In', + 'nav_register' => 'Sign Up', + 'nav_profile' => 'Profile', + 'nav_logout' => 'Log Out', + 'hero_title' => 'Buy, trade, and hold 350+ cryptocurrencies on Exchange', + 'hero_subtitle' => 'Join the world\'s largest crypto exchange with the lowest fees and best security.', + 'btn_start' => 'Get Started', + 'btn_download' => 'Download App', + 'download_qr_tip' => 'Download App & Get Up to 50 USDT', + 'market_trends' => 'Market Trends', + 'view_more_markets' => 'View More Markets', + 'why_choose_us' => 'Why Choose Us?', + 'secure_storage' => 'Secure Storage', + 'secure_storage_desc' => 'We store the vast majority of the digital assets in secure offline storage.', + 'protected_insurance' => 'Protected by Insurance', + 'protected_insurance_desc' => 'Cryptocurrency stored on our servers is covered by our insurance policy.', + 'industry_best_practices' => 'Industry Best Practices', + 'industry_best_practices_desc' => 'Exchange supports a variety of the most popular digital currencies.', + 'platform_desc' => 'Our platform provides a seamless trading experience with advanced features and a robust infrastructure designed for both retail and institutional traders.', + 'partners' => 'Our Partners', + 'partners_subtitle' => 'Trusted by world-leading organizations and financial institutions.', + 'footer_desc' => 'The world\'s leading digital asset trading platform, providing secure and stable trading services for global users.', + 'about' => 'About', + 'about_us' => 'About Us', + 'careers' => 'Careers', + 'news' => 'News', + 'legal_privacy' => 'Legal & Privacy', + 'terms_service' => 'Terms of Service', + 'products' => 'Products', + 'spot_trading' => 'Spot Trading', + 'futures_trading' => 'Futures Trading', + 'flash_swap' => 'Flash Swap', + 'staking' => 'Staking', + 'asset_management' => 'Asset Management', + 'support' => 'Support', + 'help_center' => 'Help Center', + 'submit_request' => 'Submit a Request', + 'api_docs' => 'API Documentation', + 'fee_schedule' => 'Fee Schedule', + 'service_status' => 'Service Status', + 'all_rights_reserved' => 'ALL RIGHTS RESERVED.', + 'cookie_policy' => 'Cookie Policy', + 'security' => 'Security', + 'system_status_normal' => 'System Status: Normal', + 'personal_center' => 'Personal Center', + 'uid' => 'UID', + 'credit_score' => 'Credit Score', + 'kyc_status' => 'Identity Verification', + 'kyc_none' => 'Not Verified', + 'kyc_pending' => 'Pending Review', + 'kyc_approved' => 'Verified', + 'kyc_rejected' => 'Verification Failed', + 'kyc_submit' => 'Submit Verification', + 'total_balance' => 'Total Balance', + 'available_balance' => 'Available', + 'order_book' => 'Order Book', + 'trade_panel' => 'Trade Panel', + 'k_line' => 'K-Line', + 'open_orders' => 'Open Orders', + 'order_history' => 'Order History', + 'trade_history' => 'Trade History', + 'funds_flow' => 'Funds Flow', + 'current_positions' => 'Current Positions', + 'limit' => 'Limit', + 'market' => 'Market', + 'price' => 'Price', + 'amount' => 'Amount', + 'total' => 'Total', + 'buy' => 'Buy', + 'sell' => 'Sell', + 'leverage' => 'Leverage', + 'tp_sl' => 'TP/SL', + 'take_profit' => 'Take Profit', + 'stop_loss' => 'Stop Loss', + 'cost' => 'Cost', + 'open_long' => 'Open Long', + 'open_short' => 'Open Short', + 'security_settings' => 'Security Settings', + 'asset_details' => 'Asset Details', + 'transaction_records' => 'Transaction Records', + 'level' => 'Level', + 'crypto_markets' => 'Crypto Markets', + '24h_volume' => '24h Volume', + 'fear_greed' => 'Fear & Greed Index', + 'btc_dominance' => 'BTC Dominance', + 'favorites' => 'Favorites', + 'all_crypto' => 'All Crypto', + 'asset' => 'Asset', + '24h_high_low' => '24h High/Low', + 'deposit_assets' => 'Deposit Assets', + 'deposit_method_tip' => 'Select your preferred method to fund your account.', + 'fiat_deposit' => 'Fiat Deposit', + 'crypto_deposit' => 'Crypto Deposit', + 'bank_transfer' => 'Local Bank Transfer', + 'blockchain_transfer' => 'Blockchain Transfer', + 'support_20_global' => 'Support 20+ Global Currencies', + 'safe_compliant' => 'Safe & Compliant Channel', + 'fast_processing' => '24/7 Fast Processing', + 'no_service_fee' => 'No Service Fee', + 'select_currency' => 'Select Currency', + 'deposit_amount' => 'Deposit Amount', + 'matching_instructions' => 'Matching Instructions', + 'matching_tip' => 'Our intelligent matching system will pair you with a verified merchant. After confirming, you will receive the bank account details. Please complete the transfer within the time limit.', + 'match_now' => 'Match Merchant Now', + 'select_network' => 'Select Network', + 'get_address' => 'Get Deposit Address', + 'withdraw_assets' => 'Withdraw Assets', + 'withdraw_tip' => 'Securely withdraw USDT to your external wallet.', + 'withdraw_address' => 'Withdrawal Address', + 'trading_password' => 'Trading Password', + 'submit_withdrawal' => 'Submit Withdrawal', + 'withdrawal_tips' => 'Withdrawal Tips', + 'withdrawal_tip_1' => 'Double check the destination address. We cannot recover funds sent to wrong addresses.', + 'withdrawal_tip_2' => 'TRC20 withdrawals usually take 5-10 minutes to arrive.', + 'withdrawal_tip_3' => 'Withdrawals are processed manually for security audits during peak hours.', + 'withdrawal_tip_4' => 'Handling fee: 1 USDT per transaction.', + 'recent_history' => 'Recent History', + 'no_records' => 'No records found', + 'max' => 'MAX', + 'customer_service' => 'Online Support', + 'chat_welcome' => 'Hello! How can we help you today?', + 'type_message' => 'Type your message...', + 'matching_account' => 'Matching Payment Account...', + 'matching_desc' => 'Our system is matching a secure local account for your deposit. Please wait a moment.', + ], + 'zh' => [ + 'nav_home' => '首页', + 'nav_market' => '行情', + 'nav_trade' => '交易', + 'nav_spot' => '现货交易', + 'nav_futures' => '合约交易', + 'nav_mining' => '挖矿', + 'nav_convert' => '闪兑', + 'nav_assets' => '资产', + 'nav_total_assets' => '总资产', + 'nav_deposit' => '充值', + 'nav_withdraw' => '提现', + 'nav_login' => '登录', + 'nav_register' => '注册', + 'nav_profile' => '个人中心', + 'nav_logout' => '退出登录', + 'hero_title' => '在交易所购买、交易和持有 350 多种加密货币', + 'hero_subtitle' => '加入全球最大的加密货币交易所,享受最低的费用和最好的安全性。', + 'btn_start' => '立即开始', + 'btn_download' => '下载应用', + 'download_qr_tip' => '下载应用并获得高达 50 USDT 的奖励', + 'market_trends' => '市场趋势', + 'view_more_markets' => '查看更多市场', + 'why_choose_us' => '为什么选择我们?', + 'secure_storage' => '安全存储', + 'secure_storage_desc' => '我们将绝大部分数字资产存储在安全的离线存储中。', + 'protected_insurance' => '保险保护', + 'protected_insurance_desc' => '存储在我们服务器上的加密货币受我们的保险政策保护。', + 'industry_best_practices' => '行业最佳实践', + 'industry_best_practices_desc' => '交易所支持多种最流行的数字货币。', + 'platform_desc' => '我们的平台为零售和机构交易者提供具有先进功能和稳健基础设施的无缝交易体验。', + 'partners' => '合作伙伴', + 'partners_subtitle' => '深受全球领先组织和金融机构的信任。', + 'footer_desc' => '全球领先的数字资产交易平台,为全球用户提供安全稳定的交易服务。', + 'about' => '关于', + 'about_us' => '关于我们', + 'careers' => '职业介绍', + 'news' => '新闻', + 'legal_privacy' => '法律与隐私', + 'terms_service' => '服务条款', + 'products' => '产品', + 'spot_trading' => '现货交易', + 'futures_trading' => '合约交易', + 'flash_swap' => '闪兑', + 'staking' => '质押', + 'asset_management' => '资产管理', + 'support' => '支持', + 'help_center' => '帮助中心', + 'submit_request' => '提交请求', + 'api_docs' => 'API 文档', + 'fee_schedule' => '费率标准', + 'service_status' => '服务状态', + 'all_rights_reserved' => '保留所有权利。', + 'cookie_policy' => 'Cookie 政策', + 'security' => '安全', + 'system_status_normal' => '系统状态:正常', + 'personal_center' => '个人中心', + 'uid' => 'UID', + 'credit_score' => '信用分', + 'kyc_status' => '身份认证', + 'kyc_none' => '未认证', + 'kyc_pending' => '审核中', + 'kyc_approved' => '已认证', + 'kyc_rejected' => '认证失败', + 'kyc_submit' => '提交认证', + 'total_balance' => '总资产', + 'available_balance' => '可用余额', + 'order_book' => '订单簿', + 'trade_panel' => '下单面板', + 'k_line' => 'K线图', + 'open_orders' => '当前委托', + 'order_history' => '历史委托', + 'trade_history' => '成交记录', + 'funds_flow' => '资金流水', + 'current_positions' => '当前持仓', + 'limit' => '限价', + 'market' => '市价', + 'price' => '价格', + 'amount' => '数量', + 'total' => '总额', + 'buy' => '买入', + 'sell' => '卖出', + 'leverage' => '杠杆', + 'tp_sl' => '止盈止损', + 'take_profit' => '止盈', + 'stop_loss' => '止损', + 'cost' => '成本', + 'open_long' => '做多', + 'open_short' => '做空', + 'security_settings' => '安全设置', + 'asset_details' => '资产详情', + 'transaction_records' => '交易记录', + 'level' => '等级', + 'crypto_markets' => '加密货币行情', + '24h_volume' => '24小时成交量', + 'fear_greed' => '贪婪恐惧指数', + 'btc_dominance' => '比特币占有率', + 'favorites' => '自选', + 'all_crypto' => '所有币种', + 'asset' => '资产', + '24h_high_low' => '24小时最高/最低', + 'deposit_assets' => '充值资产', + 'deposit_method_tip' => '请选择您偏好的充值方式。', + 'fiat_deposit' => '法币充值', + 'crypto_deposit' => '加密货币充值', + 'bank_transfer' => '本地银行转账', + 'blockchain_transfer' => '区块链转账', + 'support_20_global' => '支持20多种全球货币', + 'safe_compliant' => '安全合规的通道', + 'fast_processing' => '24/7 快速处理', + 'no_service_fee' => '无服务费', + 'select_currency' => '选择币种', + 'deposit_amount' => '充值金额', + 'matching_instructions' => '匹配说明', + 'matching_tip' => '我们的智能匹配系统将为您匹配认证商户。确认后,您将收到银行账户详情。请在时限内完成转账。', + 'match_now' => '立即匹配商户', + 'select_network' => '选择网络', + 'get_address' => '获取充值地址', + 'withdraw_assets' => '提现资产', + 'withdraw_tip' => '安全地将 USDT 提现到您的外部钱包。', + 'withdraw_address' => '提现地址', + 'trading_password' => '交易密码', + 'submit_withdrawal' => '提交提现', + 'withdrawal_tips' => '提现提示', + 'withdrawal_tip_1' => '请仔细检查目标地址。我们无法找回发送到错误地址的资金。', + 'withdrawal_tip_2' => 'TRC20 提现通常在 5-10 分钟内到账。', + 'withdrawal_tip_3' => '高峰时段,提现将进行人工安全审计。', + 'withdrawal_tip_4' => '手续费:每笔交易 1 USDT。', + 'recent_history' => '最近记录', + 'no_records' => '暂无记录', + 'max' => '最大', + 'customer_service' => '在线客服', + 'chat_welcome' => '您好!请问有什么可以帮您?', + 'type_message' => '输入消息...', + 'matching_account' => '正在匹配收款账户...', + 'matching_desc' => '系统正在为您匹配安全的本地收款账户。请稍候。', + ] +]; + +$lang = $_SESSION['lang'] ?? 'en'; +if (isset($_GET['lang']) && array_key_exists($_GET['lang'], $translations)) { + $_SESSION['lang'] = $_GET['lang']; + $lang = $_GET['lang']; +} + +function __($key, $default = '') { + global $translations, $lang; + return $translations[$lang][$key] ?? ($default ?: $key); +} \ No newline at end of file diff --git a/index.php b/index.php index 7205f3d..9228219 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,302 @@ - -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); -?> - - - - - - New Style - - - - - - - - - - - - - - - - - - - - - -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+
+
+ + +
+ +
+
+ +
+
+
+ BTC / USDT + --,---.-- + --% +
+
+ ETH / USDT + --,---.-- + --% +
+
+ SOL / USDT + --,---.-- + --% +
+
+ BNB / USDT + --,---.-- + --% +
+
+ XRP / USDT + --,---.-- + --% +
+
-
-
- Page updated: (UTC) -
- - + +
+
+

+
+ + + + + + + + + + + + + + +
24h Change
Connecting...
+
+ + + +
+
+
+ +
+

+
+
+
+ +
+
+

+

+
+
+
+
+ +
+
+

+

+
+
+
+
+ +
+
+

+

+
+
+ +
+

+ +
+
+
+
+ +
+

+

+
+
+ Bitcoin + Bitcoin +
+
+ Ethereum + Ethereum +
+
+ Binance + BNB Chain +
+
+ Tether + Tether +
+
+ Solana + Solana +
+
+ Cardano + Cardano +
+
+ Visa + Visa +
+
+ Mastercard + Mastercard +
+
+
+
+ + + + + + diff --git a/kyc.php b/kyc.php new file mode 100644 index 0000000..8668ce7 --- /dev/null +++ b/kyc.php @@ -0,0 +1,185 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$status = $user['kyc_status'] ?? 0; + +$message = ''; +$error = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && $status != 1 && $status != 2) { + $name = $_POST['kyc_name'] ?? ''; + $id_number = $_POST['kyc_id_number'] ?? ''; + + // Simple file handling for prototype + $upload_dir = 'uploads/kyc/'; + if (!is_dir($upload_dir)) mkdir($upload_dir, 0777, true); + + $front = ''; + $back = ''; + $handheld = ''; + + if (isset($_FILES['front']) && $_FILES['front']['error'] === 0) { + $front = $upload_dir . time() . '_front_' . $_FILES['front']['name']; + move_uploaded_file($_FILES['front']['tmp_name'], $front); + } + if (isset($_FILES['back']) && $_FILES['back']['error'] === 0) { + $back = $upload_dir . time() . '_back_' . $_FILES['back']['name']; + move_uploaded_file($_FILES['back']['tmp_name'], $back); + } + if (isset($_FILES['handheld']) && $_FILES['handheld']['error'] === 0) { + $handheld = $upload_dir . time() . '_handheld_' . $_FILES['handheld']['name']; + move_uploaded_file($_FILES['handheld']['tmp_name'], $handheld); + } + + $stmt = $db->prepare("UPDATE users SET kyc_name = ?, kyc_id_number = ?, kyc_id_front = ?, kyc_id_back = ?, kyc_id_handheld = ?, kyc_status = 1 WHERE id = ?"); + if ($stmt->execute([$name, $id_number, $front, $back, $handheld, $_SESSION['user_id']])) { + $status = 1; + $message = "KYC documents submitted successfully! Our team will review them shortly."; + } else { + $error = "Failed to submit KYC documents. Please try again."; + } +} + +$status_labels = [ + 0 => ['text' => 'Unverified', 'color' => '#888', 'icon' => 'fa-user-slash'], + 1 => ['text' => 'Under Review', 'color' => '#f0b90b', 'icon' => 'fa-clock'], + 2 => ['text' => 'Verified', 'color' => 'var(--success-color)', 'icon' => 'fa-check-circle'], + 3 => ['text' => 'Rejected', 'color' => 'var(--danger-color)', 'icon' => 'fa-times-circle'], +]; +$current = $status_labels[$status]; +?> + +
+
+ + Profile + +
+
+
+ +
+

Identity Verification

+

Status:

+
+ + +
+ +
+ + + +
+ +
+ + + +
+
+
+ + +
+
+ + +
+
+ +
+
+ +
+ + Upload Photo + +
+
+
+ +
+ + Upload Photo + +
+
+
+ +
+ +
+ + Upload handheld photo with date + +
+
+ + +
+ +
+

Your identity documents have been received and are currently being reviewed. This process usually takes 1-2 business days. We will notify you once the review is complete.

+
+ You can still trade while waiting for verification. +
+
+ +
+

Congratulations! Your identity has been fully verified.

+

You now have full access to all withdrawal limits and advanced trading features.

+
+ +
+
+
+ + + + + + \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..d73bd49 --- /dev/null +++ b/login.php @@ -0,0 +1,68 @@ +prepare("SELECT * FROM users WHERE username = ?"); + $stmt->execute([$username]); + $user = $stmt->fetch(); + + if ($user && password_verify($password, $user['password'])) { + $_SESSION['user_id'] = $user['id']; + $_SESSION['username'] = $user['username']; + $_SESSION['uid'] = $user['uid']; + header("Location: index.php"); + exit; + } else { + $error = "Invalid username or password."; + } +} +?> + + + +
+
+

Welcome Back

+

Log in to your account to continue trading

+ + +
+ +
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ Forgot Password? +
+ +
+
+ Don't have an account? +
+
+
+ + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..b818557 --- /dev/null +++ b/logout.php @@ -0,0 +1,5 @@ + + +
+
+

+ +
+
+
+
$ 84.23B
+
+
+
+
74 (Greed)
+
+
+
+
52.1%
+
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + +
24h Change
+
+
+
+ + + + diff --git a/matching.php b/matching.php new file mode 100644 index 0000000..a03fccc --- /dev/null +++ b/matching.php @@ -0,0 +1,144 @@ +prepare("INSERT INTO fiat_orders (user_id, amount, currency, status, created_at) VALUES (?, ?, ?, 'pending', CURRENT_TIMESTAMP)"); + $stmt->execute([$user_id, $amount, $currency]); + $order_id = db()->lastInsertId(); + + // Notify CS via messages table + $msg = "New deposit order #$order_id: $amount $currency. Please provide bank account details."; + $stmt = db()->prepare("INSERT INTO messages (user_id, sender, message) VALUES (?, 'user', ?)"); + $stmt->execute([$user_id, $msg]); + + header("Location: matching.php?order_id=" . $order_id); + exit; +} + +if (!$order_id) { + header("Location: deposit.php"); + exit; +} + +// Fetch order +$stmt = db()->prepare("SELECT * FROM fiat_orders WHERE id = ? AND user_id = ?"); +$stmt->execute([$order_id, $user_id]); +$order = $stmt->fetch(); + +if (!$order) { + header("Location: deposit.php"); + exit; +} + +// Handle Proof Upload +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['proof'])) { + $file = $_FILES['proof']; + $ext = pathinfo($file['name'], PATHINFO_EXTENSION); + $filename = 'proof_' . $order_id . '_' . time() . '.' . $ext; + $target = 'assets/images/proofs/' . $filename; + + if (!is_dir('assets/images/proofs/')) mkdir('assets/images/proofs/', 0775, true); + + if (move_uploaded_file($file['tmp_name'], $target)) { + $stmt = db()->prepare("UPDATE fiat_orders SET proof_image = ?, status = 'submitting' WHERE id = ?"); + $stmt->execute(['assets/images/proofs/' . $filename, $order_id]); + header("Location: matching.php?order_id=" . $order_id); + exit; + } +} +?> + +
+
+ +
+ +
+
+

+

+
+ Tip: You can also contact Online Support for faster processing. +
+
+ + +
+
+
+ +
+
+

Account Matched Successfully

+

Please complete the transfer to the following account.

+
+
+ +
+
BANK ACCOUNT DETAILS
+ +
+ +
+

Important Instructions

+
    +
  • Please transfer the exact amount:
  • +
  • Include your UID in the transfer remarks.
  • +
  • Take a screenshot of the successful transfer.
  • +
+
+ +
+ +
+ +
Click to select or drag and drop image
+ +
+
+
+ +
+ +

Deposit Under Review

+

Your payment proof has been submitted successfully. Our team will verify the transaction and update your balance within 30 minutes.

+
+ Back to Assets + Contact Support +
+
+ +
+
+
+ + + + diff --git a/mining.php b/mining.php new file mode 100644 index 0000000..57d6d8c --- /dev/null +++ b/mining.php @@ -0,0 +1,111 @@ + + +
+
+ + Home + +
+

Staking & Mining

+

Participate in proof-of-stake and decentralized finance to earn rewards on your digital assets.

+
+ +
+
+
+ +
+

Liquidity Mining

+

Provide liquidity to automated market makers and earn a portion of the trading fees plus governance tokens.

+
+
+
Est. APR
+
Up to 45.8%
+
+ +
+
+ +
+
+ +
+

PoS Staking

+

Stake your proof-of-stake assets to help secure the network and receive inflation rewards directly in your wallet.

+
+
+
Est. APR
+
Up to 12.5%
+
+ +
+
+ +
+
+ +
+

Launchpad

+

Gain exclusive access to high-quality blockchain projects before they list on our exchange.

+
+
+
Next Project
+
Coming Soon
+
+ +
+
+
+ +
+
+

Yield Rankings

+
+ + + +
+
+ + + + + + + + + + + 'USDT', 'apr' => '12.5%', 'duration' => 'Flexible'], + ['symbol' => 'BTC', 'apr' => '4.2%', 'duration' => '30 Days'], + ['symbol' => 'ETH', 'apr' => '5.8%', 'duration' => 'Flexible'], + ['symbol' => 'SOL', 'apr' => '8.9%', 'duration' => '60 Days'], + ['symbol' => 'DOT', 'apr' => '14.2%', 'duration' => '30 Days'], + ]; + foreach ($mining_coins as $coin): + ?> + + + + + + + + +
AssetEst. APRDurationAction
+
+ + +
+
+ + + +
+
+
+
+ + diff --git a/profile.php b/profile.php new file mode 100644 index 0000000..d0a4e7c --- /dev/null +++ b/profile.php @@ -0,0 +1,142 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$kyc_status = $user['kyc_status'] ?? 0; +$kyc_labels = [ + 0 => __('kyc_none', '未认证'), + 1 => __('kyc_pending', '审核中'), + 2 => __('kyc_approved', '已认证'), + 3 => __('kyc_rejected', '未通过'), +]; +$kyc_colors = [0 => '#888', 1 => '#f0b90b', 2 => 'var(--success-color)', 3 => 'var(--danger-color)']; +?> + +
+
+ + + +
+ +
+
+
+ +
+

+
UID:
+ +
+
+
+
+
+
+
+
VIP 0
+
+
+
+ +
+ + + + + +
+
+ + +
+
+
+
(USDT)
+
+ +
+
≈ $
+
+
+ + +
+
+ +
+
+

+ +
+ +
+ 'USDT', 'name' => 'Tether', 'balance' => $user['balance'] ?? 0, 'price' => 1.00], + ['symbol' => 'BTC', 'name' => 'Bitcoin', 'balance' => 0.0000, 'price' => 65432.10], + ['symbol' => 'ETH', 'name' => 'Ethereum', 'balance' => 0.0000, 'price' => 3456.78], + ['symbol' => 'BNB', 'name' => 'Binance Coin', 'balance' => 0.0000, 'price' => 589.20], + ['symbol' => 'SOL', 'name' => 'Solana', 'balance' => 0.0000, 'price' => 145.60], + ]; + foreach ($coins as $coin): + ?> +
+
+ +
+
+
+
+
+
+
+
$
+
+
+ +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/register.php b/register.php new file mode 100644 index 0000000..5513bfc --- /dev/null +++ b/register.php @@ -0,0 +1,99 @@ +prepare("SELECT id FROM users WHERE username = ?"); + $stmt->execute([$username]); + if ($stmt->fetch()) { + $error = "Username already taken."; + } else { + // Generate unique 6-digit UID + $uid = ''; + while (true) { + $uid = str_pad(mt_rand(0, 999999), 6, '0', STR_PAD_LEFT); + $checkUid = $pdo->prepare("SELECT id FROM users WHERE uid = ?"); + $checkUid->execute([$uid]); + if (!$checkUid->fetch()) break; + } + + // Register and auto-login + // Default trading_password is '123456' as requested + $stmt = $pdo->prepare("INSERT INTO users (uid, username, password, trading_password, balance) VALUES (?, ?, ?, '123456', 0)"); + if ($stmt->execute([$uid, $username, password_hash($password, PASSWORD_DEFAULT)])) { + $user_id = $pdo->lastInsertId(); + $_SESSION['user_id'] = $user_id; + $_SESSION['username'] = $username; + $_SESSION['uid'] = $uid; + header("Location: index.php"); + exit; + } else { + $error = "Registration failed."; + } + } + } +} +?> + + + +
+
+

Create Account

+

Join 100+ million traders on Exchange

+ + +
+ +
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ + I have read and agree to the Privacy Policy and Service Agreement. +
+ +
+
+ Already have an account? +
+
+
+ + diff --git a/security.php b/security.php new file mode 100644 index 0000000..b5e23c6 --- /dev/null +++ b/security.php @@ -0,0 +1,119 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$message = ''; +$error = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $type = $_POST['type']; // login or trading + $old_pass = $_POST['old_password']; + $new_pass = $_POST['new_password']; + $confirm_pass = $_POST['confirm_password']; + + if ($new_pass !== $confirm_pass) { + $error = "New passwords do not match"; + } else { + if ($type === 'login') { + if (password_verify($old_pass, $user['password'])) { + $hashed = password_hash($new_pass, PASSWORD_DEFAULT); + $stmt = $db->prepare("UPDATE users SET password = ? WHERE id = ?"); + $stmt->execute([$hashed, $_SESSION['user_id']]); + $message = "Login password updated successfully"; + } else { + $error = "Old login password incorrect"; + } + } else { + // Trading password (simple for demo, but should be hashed in production) + if ($old_pass === $user['trading_password']) { + $stmt = $db->prepare("UPDATE users SET trading_password = ? WHERE id = ?"); + $stmt->execute([$new_pass, $_SESSION['user_id']]); + $message = "Trading password updated successfully"; + } else { + $error = "Old trading password incorrect"; + } + } + } +} +?> + +
+
+ + Profile + +

Security Settings

+ + +
+ +
+ + + +
+ +
+ + + +
+

+ Change Login Password +

+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+

+ Change Trading Password +

+

Default trading password is 123456

+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+
+ +
+
+ + diff --git a/spot.php b/spot.php new file mode 100644 index 0000000..d762dfe --- /dev/null +++ b/spot.php @@ -0,0 +1,231 @@ +prepare("SELECT balance FROM users WHERE id = ?"); + $stmt->execute([$user_id]); + $user = $stmt->fetch(); + $balance = $user['balance'] ?? 0; +} +?> + +
+ + +
+
+ +
+
+ +
+
+ + +
+ +
+
+ + BTC/USDT +
+
+
--.---
Price
+
--%
24h Change
+
--.---
24h High
+
--.---
24h Low
+
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
TimeTypeSidePriceAmountFilledTotalStatus
No active orders
+
+
+
+ + +
+
+ +
+ + +
+ +
+ Balance + USDT +
+ + +
+
PriceUSDT
+
AmountBTC
+
+ +
+ + +
+
PriceUSDT
+
AmountBTC
+
+ +
+
+ + +
+
Order Book
+
+ Price(USDT) + Amount(BTC) +
+
+
+
--.---
+
+
+
+
+ + + + + + + diff --git a/terms.php b/terms.php new file mode 100644 index 0000000..6fe5b15 --- /dev/null +++ b/terms.php @@ -0,0 +1,16 @@ + +
+

+
+

Last Updated: February 2026

+

1. Acceptance of Terms

+

By accessing or using the Exchange platform, you agree to be bound by these Terms of Service. If you do not agree to all of these terms, do not use our services.

+

2. Eligibility

+

You must be at least 18 years old and have the legal capacity to enter into these Terms. Use of the services is void where prohibited by law.

+

3. Risk Disclosure

+

Trading cryptocurrencies involves significant risk and can result in the loss of your invested capital. You should only trade with funds you can afford to lose.

+

4. Account Security

+

You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account.

+
+
+ diff --git a/withdraw.php b/withdraw.php new file mode 100644 index 0000000..39b56fe --- /dev/null +++ b/withdraw.php @@ -0,0 +1,136 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$message = ''; +$error = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $amount = $_POST['amount']; + $address = $_POST['address']; + $network = $_POST['network']; + $trading_pass = $_POST['trading_password']; + + if ($trading_pass !== $user['trading_password']) { + $error = "Incorrect trading password"; + } elseif ($amount > $user['balance']) { + $error = "Insufficient balance"; + } elseif ($amount < 10) { + $error = "Minimum withdrawal amount is 10 USDT"; + } else { + // Process withdrawal (simplified) + $db->beginTransaction(); + try { + $stmt = $db->prepare("UPDATE users SET balance = balance - ? WHERE id = ?"); + $stmt->execute([$amount, $_SESSION['user_id']]); + + // Log as a special type of order or transaction + $stmt = $db->prepare("INSERT INTO orders (user_id, type, amount, currency, account_info, status) VALUES (?, 'usdt', ?, 'USDT', ?, 'pending')"); + $stmt->execute([$_SESSION['user_id'], $amount, "Network: $network, Address: $address"]); + + $db->commit(); + $message = "Withdrawal request submitted successfully. Please wait for audit."; + // Refresh user data + $stmt = $db->prepare("SELECT * FROM users WHERE id = ?"); + $stmt->execute([$_SESSION['user_id']]); + $user = $stmt->fetch(); + } catch (Exception $e) { + $db->rollBack(); + $error = "System error, please try again later"; + } + } +} +?> + +
+
+ + + +
+

+

+
+ + +
+ +
+ + + +
+ +
+ + +
+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ + +
+
+ : USDT +
+
+ +
+ + +
+ + +
+
+ +
+
+

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

+
+ +
+
+
+
+
+
+ + \ No newline at end of file