From d5165020115f230dd2ad033eae9593a938179472 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 25 Feb 2026 07:17:34 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=95=B4=E6=B5=8B=E8=AF=95=E9=83=A8?= =?UTF-8?q?=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/forgot.php | 268 ++++++++++++++++++++++++++++++++++++++++++++ auth/login.php | 61 ++++++++-- auth/register.php | 16 ++- includes/footer.php | 2 +- includes/lang.php | 124 ++++++++++++-------- legal.php | 26 ++--- profile.php | 7 ++ tos.php | 26 ++--- 8 files changed, 428 insertions(+), 102 deletions(-) create mode 100644 auth/forgot.php diff --git a/auth/forgot.php b/auth/forgot.php new file mode 100644 index 0000000..2e543bb --- /dev/null +++ b/auth/forgot.php @@ -0,0 +1,268 @@ +prepare("SELECT * FROM users WHERE username = ? OR email = ?"); + $stmt->execute([$account, $account]); + $user = $stmt->fetch(); + + if (!$user) { + $error = __('account_not_found'); + } else { + $hash = password_hash($password, PASSWORD_DEFAULT); + $stmt = db()->prepare("UPDATE users SET password_hash = ? WHERE id = ?"); + $stmt->execute([$hash, $user['id']]); + $success = __('pwd_reset_success'); + } + } + } +} + +// API for sending code +if (isset($_GET['action']) && $_GET['action'] === 'send_code') { + header('Content-Type: application/json'); + $account = $_GET['account'] ?? ''; + $type = $_GET['type'] ?? 'email'; + + $code = str_pad(mt_rand(0, 999999), 6, '0', STR_PAD_LEFT); + if (session_status() === PHP_SESSION_NONE) session_start(); + + if ($type === 'email') { + if (!filter_var($account, FILTER_VALIDATE_EMAIL)) { + echo json_encode(['success' => false, 'error' => __('invalid_email')]); + exit; + } + $_SESSION['reset_email_code'] = $code; + require_once __DIR__ . '/../mail/MailService.php'; + $subject = __('verification_code') . ' - ' . __('reset_password'); + $content = __('verification_code') . ": $code"; + $res = MailService::sendMail($account, $subject, $content, $content); + if (!$res['success']) { + echo json_encode(['success' => false, 'error' => $res['error'] ?? __('send_failed')]); + exit; + } + } else { + $_SESSION['reset_mobile_code'] = $code; + // SMS logic here if needed + } + + echo json_encode(['success' => true]); + exit; +} + +include __DIR__ . '/../includes/header.php'; +?> + + + +
+
+
+
+
+
+ <?= $site_name ?> + +
+

+

+
+ + +
+ +
+ + + +
+ +
+
+ +
+ + + + +
+ + +
+ + +
+ +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+ +
+
+
+
+ + + + diff --git a/auth/login.php b/auth/login.php index b18c333..bbe83d5 100644 --- a/auth/login.php +++ b/auth/login.php @@ -36,17 +36,58 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { include __DIR__ . '/../includes/header.php'; ?> + +
-
+
-
+
<?= $site_name ?>
-

-

+

+

@@ -57,16 +98,16 @@ include __DIR__ . '/../includes/header.php';
- - + +
-
- - +
+ +
- +
diff --git a/auth/register.php b/auth/register.php index 8d59ec0..c950869 100644 --- a/auth/register.php +++ b/auth/register.php @@ -100,6 +100,11 @@ if (isset($_GET['action']) && $_GET['action'] === 'send_code') { $subject = __('verification_code') . ' - ' . __('register'); $content = __('verification_code') . ": $code"; $res = MailService::sendMail($account, $subject, $content, $content); + + if (!$res['success']) { + echo json_encode(['success' => false, 'error' => $res['error'] ?? __('send_failed')]); + exit; + } } else { $_SESSION['mobile_code'] = $code; // Logic for SMS would go here using getSetting('mobile_api_config') @@ -118,15 +123,14 @@ include __DIR__ . '/../includes/header.php'; background: radial-gradient(circle at top right, #1a1f26, #0b0e11); min-height: 100vh; } - .register-card { - background: rgba(30, 35, 41, 0.8) !important; - backdrop-filter: blur(20px); + .auth-card { + background: #1e2329 !important; border: 1px solid rgba(255, 255, 255, 0.05) !important; border-radius: 24px !important; box-shadow: 0 40px 100px rgba(0,0,0,0.6) !important; } .form-control { - background: rgba(0, 0, 0, 0.3) !important; + background: #0b0e11 !important; border: 1px solid #2b3139 !important; color: #fff !important; font-size: 15px !important; @@ -135,7 +139,7 @@ include __DIR__ . '/../includes/header.php'; .form-control:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.1) !important; - background: rgba(0, 0, 0, 0.5) !important; + background: #0b0e11 !important; border-radius: 12px; } .form-label { @@ -178,7 +182,7 @@ include __DIR__ . '/../includes/header.php';
-
+
<?= $site_name ?> diff --git a/includes/footer.php b/includes/footer.php index b858ad1..b1711eb 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -77,7 +77,7 @@ - + diff --git a/includes/lang.php b/includes/lang.php index c591149..5226609 100644 --- a/includes/lang.php +++ b/includes/lang.php @@ -51,7 +51,7 @@ $translations = [ 'login_admin_error' => '管理员请通过后台页面登录', 'fill_full_info' => '请填写完整信息', 'verification_code' => '验证码', - 'agree_tos_privacy' => '我已阅读并同意《服务协议》和《隐私政策》', + 'agree_tos_privacy' => '我已阅读并同意《服务协议》《隐私政策》', 'register_now' => '立即注册', 'resend' => '重新发送', 'send_failed' => '发送失败', @@ -172,7 +172,7 @@ $translations = [ 'unit_seconds' => '秒', 'trading_pair' => '交易对', 'leverage' => '杠杆', - 'buy_long' => '买入/做多', + 'buy_up' => '买入/做多', 'buy_price' => '买入价', 'sell_short' => '卖出/做空', 'sell_price' => '卖出价', @@ -207,7 +207,7 @@ $translations = [ 'uniswap' => 'UNI', 'site_title' => '全球领先的数字资产交易平台', 'unverified' => '未认证', - 0 => '审核中', + '0' => '审核中', 'verified' => '已认证', 'real_name' => '实名认证', 'credit_score' => '信用分', @@ -216,6 +216,9 @@ $translations = [ 'vol_24h' => '24小时成交额', 'welcome_back' => '欢迎回来', 'forgot_password' => '忘记密码?', + 'reset_password' => '找回密码', + 'account_not_found' => '账号不存在', + 'pwd_reset_success' => '密码已重置,请登录', 'no_account' => '没有账号?', 'invalid_account_pwd' => '账号或密码错误', 'account' => '账号 / 邮箱', @@ -228,6 +231,8 @@ $translations = [ 'registration_verify' => '注册验证', 'mobile_reg' => '手机注册', 'email_reg' => '邮箱注册', + 'mobile_recovery' => '手机找回', + 'email_recovery' => '邮箱找回', 'uploading' => '正在上传...', 'uid' => '用户ID', 'recharge' => '充值', @@ -311,28 +316,36 @@ $translations = [ 'email_address' => '邮箱地址', 'join' => '加入', 'popular_topics' => '热门话题', - 'effective_date' => '生效日期:2026年2月16日', - 'tos_1_title' => '1. 接受条款', - 'tos_1_content' => '通过访问或使用BYRO平台,您同意受这些服务条款的约束。如果您不同意这些条款,请不要使用我们的服务。', - 'tos_2_title' => '2. 资格', - 'tos_2_content' => '您必须年满 18 岁,并具有签订约束协议的法律能力,才能使用我们的平台。您有责任确保您对BYRO的使用符合所有当地法律法规。', - 'tos_3_title' => '3. 账户安全', - 'tos_3_content' => '您有责任维护您的账户凭据的机密性,并对在您的账户下发生的所有活动负责。您同意立即通知BYRO任何未经授权使用您账户的情况。', - 'tos_4_title' => '4. 交易风险', - 'tos_4_content' => '数字资产交易涉及重大风险。价格波动剧烈,您可能会损失全部投资。BYRO不提供财务建议。', - 'tos_5_title' => '5. 终止', - 'tos_5_content' => 'BYRO保留随时因任何原因(包括违反这些条款)暂停或终止您的账户的权利。', - 'last_updated' => '最后更新:2026年2月16日', - 'privacy_1_title' => '引言', - 'privacy_1_content' => 'BYRO(“我们”或“我们的”)尊重您的隐私,并致力于保护您的个人数据。本隐私政策告知您当您访问我们的网站时,我们如何处理您的个人数据。', - 'privacy_2_title' => '我们收集的数据', - 'privacy_2_content' => '我们可能会收集、使用、存储和传输有关您的不同种类的个人数据,包括身份数据、联系数据、财务数据和技术数据。', - 'privacy_3_title' => '我们如何使用您的数据', - 'privacy_3_content' => '我们只会在法律允许的情况下使用您的个人数据。最常见的是,我们将使用您的个人数据来执行我们即将与您签订或已经与您签订的合同。', - 'privacy_4_title' => '数据安全', - 'privacy_4_content' => '我们已实施适当的安全措施,以防止您的个人数据意外丢失、以未经授权的方式使用或访问。', - 'privacy_5_title' => '您的法律权利', - 'privacy_5_content' => '在某些情况下,根据数据保护法,您拥有与您的个人数据相关的权利,包括要求访问、更正、删除或限制您的个人数据的权利。', + 'effective_date' => '生效日期:2023年2月16日', + 'tos_1_title' => '1. 条款说明', + 'tos_1_content' => '本服务协议(“协议”)是您与 BYRO 平台(“我们”或“我们的”)之间具有法律约束力的协议。通过访问、使用或点击“注册”我们的任何服务,即表示您已阅读、理解并接受本协议中规定的所有条款。', + 'tos_2_title' => '2. 账户开设与安全', + 'tos_2_content' => '您必须年满 18 岁方可注册账户。您负责维护您账户的机密性,并对在您的账户下发生的所有活动承担全部责任。我们保留随时拒绝服务、终止账户或更改资格标准的权利。', + 'tos_3_title' => '3. 交易风险披露', + 'tos_3_content' => '数字资产交易具有极高的风险。价格波动剧烈且不可预测。杠杆交易可能导致超出初始投资的损失。在进行交易前,请确保您充分了解相关风险,BYRO 不提供任何投资、法律或财务建议。', + 'tos_4_title' => '4. 合规性与法律', + 'tos_4_content' => '您同意遵守您所在司法管辖区的所有适用法律和法规。BYRO 致力于反洗钱(AML)和反恐融资(CTF)合规,并可能要求您提供详细的身份证明信息(KYC)。', + 'tos_5_title' => '5. 服务变更与终止', + 'tos_5_content' => '我们可能会随时修改、暂停或中断服务的任何部分,恕不另行通知。如果我们认为您违反了本协议,我们保留限制、暂停或中断您访问全部或部分服务的权利。', + 'tos_6_title' => '6. 知识产权', + 'tos_6_content' => 'BYRO 平台上的所有内容,包括文本、图形、标识、按钮图标、图像、音频剪辑、数字下载和数据编译,均为 BYRO 或其内容供应商的财产,受国际版权法保护。', + 'tos_7_title' => '7. 免责声明', + 'tos_7_content' => '服务按“原样”和“可用”基础提供。我们不保证服务将不间断、及时、安全或无错误。您对服务的使用及您通过服务进行的任何交易均由您自行承担风险。', + 'tos_8_title' => '8. 赔偿', + 'tos_8_content' => '对于因您违反本协议或您对服务的使用而导致的任何索赔、损失、责任、损害、费用或成本(包括合理的律师费),您同意对 BYRO 及其附属公司、高级职员、董事、雇员和代理人进行赔偿并使其免受损害。', + 'last_updated' => '最后更新:2026年2月21日', + 'privacy_1_title' => '1. 信息收集范围', + 'privacy_1_content' => '我们收集的信息包括但不限于:身份信息(姓名、证件照)、联系信息(邮箱、手机号)、财务信息、设备信息以及您在使用我们服务时的交易记录。这些信息用于确保平台安全及提供更好的服务。', + 'privacy_2_title' => '2. 信息使用目的', + 'privacy_2_content' => '我们使用您的信息来:处理您的交易、验证您的身份、向您发送系统通知、改进我们的产品以及遵守适用的法律法规要求。', + 'privacy_3_title' => '3. 信息存储与保护', + 'privacy_3_content' => '我们采用行业领先的技术手段保护您的个人数据,包括多重加密存储和冷备份。除非法律要求或经您明确同意,我们不会向任何第三方出售或出租您的个人信息。', + 'privacy_4_title' => '4. 您的权利与选择', + 'privacy_4_content' => '您有权访问、更正或要求删除我们持有的您的个人数据。您可以随时在账户设置中管理您的隐私首选项,或联系我们的支持团队获取帮助。', + 'privacy_5_title' => '5. 政策变更通知', + 'privacy_5_content' => '我们可能会不时更新本隐私政策。任何重大变更都将通过平台公告或发送电子邮件的方式通知您。建议您定期查看本页面以了解最新信息。', + 'privacy_6_title' => '6. Cookie 的使用', + 'privacy_6_content' => '我们使用 Cookie 和类似技术来收集有关您对我们网站的使用的其他数据。您可以指示浏览器停止接受 Cookie,但如果您这样做,可能无法使用我们服务的某些部分。', 'issue_type' => '问题类型', 'account_access' => '账户访问', 'dep_with_issue' => '充值/提现', @@ -695,7 +708,7 @@ $translations = [ 'login_admin_error' => 'Admin please login via backend', 'fill_full_info' => 'Please fill in full info', 'verification_code' => 'Verification Code', - 'agree_tos_privacy' => 'I have read and agree to the Terms of Service and Privacy Policy', + 'agree_tos_privacy' => 'I have read and agree to the Terms of Service and Privacy Policy', 'register_now' => 'Register Now', 'resend' => 'Resend', 'send_failed' => 'Send Failed', @@ -858,7 +871,7 @@ $translations = [ 'uniswap' => 'UNI', 'site_title' => 'Leading Digital Asset Platform', 'unverified' => 'Unverified', - 0 => 'Pending', + '0' => 'Pending', 'verified' => 'Verified', 'real_name' => 'Real Name', 'credit_score' => 'Credit Score', @@ -867,11 +880,16 @@ $translations = [ 'vol_24h' => '24h Volume', 'welcome_back' => 'Welcome Back', 'forgot_password' => 'Forgot Password?', + 'reset_password' => 'Reset Password', + 'account_not_found' => 'Account not found', + 'pwd_reset_success' => 'Password reset successfully, please login', 'no_account' => 'No account?', 'invalid_account_pwd' => 'Invalid account or password', 'account' => 'Account / Email', 'mobile_reg' => 'Mobile Reg', 'email_reg' => 'Email Reg', + 'mobile_recovery' => 'Phone Recovery', + 'email_recovery' => 'Email Recovery', 'uploading' => 'Uploading...', 'uid' => 'UID', 'recharge' => 'Recharge', @@ -955,28 +973,36 @@ $translations = [ 'email_address' => 'Email Address', 'join' => 'Join', 'popular_topics' => 'Popular Topics', - 'effective_date' => 'Feb 16, 2026', - 'tos_1_title' => '1. Terms', - 'tos_1_content' => 'Accept terms.', - 'tos_2_title' => '2. Eligibility', - 'tos_2_content' => '18+ only.', - 'tos_3_title' => '3. Security', - 'tos_3_content' => 'Protect account.', - 'tos_4_title' => '4. Risks', - 'tos_4_content' => 'Trading is risky.', - 'tos_5_title' => '5. Termination', - 'tos_5_content' => 'Account termination.', - 'last_updated' => 'Feb 16, 2026', - 'privacy_1_title' => 'Intro', - 'privacy_1_content' => 'Privacy policy.', - 'privacy_2_title' => 'Data', - 'privacy_2_content' => 'Data collection.', - 'privacy_3_title' => 'Usage', - 'privacy_3_content' => 'Data usage.', - 'privacy_4_title' => 'Security', - 'privacy_4_content' => 'Data security.', - 'privacy_5_title' => 'Rights', - 'privacy_5_content' => 'Legal rights.', + 'effective_date' => 'Effective Date: February 16, 2023', + 'tos_1_title' => '1. Acceptance of Terms', + 'tos_1_content' => 'This Terms of Service agreement ("Agreement") is a legally binding agreement between you and the BYRO platform ("we", "us", or "our"). By accessing, using, or clicking "Register" for any of our services, you signify that you have read, understood, and accepted all the terms and conditions set forth in this Agreement.', + 'tos_2_title' => '2. Account Opening and Security', + 'tos_2_content' => 'You must be at least 18 years old to register for an account. You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account. We reserve the right to refuse service, terminate accounts, or change eligibility criteria at any time.', + 'tos_3_title' => '3. Risk Disclosure', + 'tos_3_content' => 'Trading in digital assets involves significant risk. Prices are highly volatile and unpredictable. Leveraged trading can result in losses exceeding your initial investment. Before trading, please ensure you fully understand the risks involved. BYRO does not provide any investment, legal, or financial advice.', + 'tos_4_title' => '4. Compliance and Legal', + 'tos_4_content' => 'You agree to comply with all applicable laws and regulations in your jurisdiction. BYRO is committed to Anti-Money Laundering (AML) and Counter-Terrorist Financing (CTF) compliance and may require you to provide detailed identification information (KYC).', + 'tos_5_title' => '5. Service Changes and Termination', + 'tos_5_content' => 'We may modify, suspend, or discontinue any part of the service at any time without prior notice. We reserve the right to restrict, suspend, or terminate your access to all or any part of the service if we believe you have violated this Agreement.', + 'tos_6_title' => '6. Intellectual Property', + 'tos_6_content' => 'All content on the BYRO platform, including text, graphics, logos, icons, images, and software, is the property of BYRO or its content suppliers and protected by international copyright laws.', + 'tos_7_title' => '7. Disclaimer of Warranties', + 'tos_7_content' => 'The service is provided on an "as is" and "as available" basis. We do not warrant that the service will be uninterrupted, timely, secure, or error-free. Your use of the service is at your sole risk.', + 'tos_8_title' => '8. Indemnification', + 'tos_8_content' => 'You agree to indemnify and hold BYRO and its affiliates, officers, directors, employees, and agents harmless from any claim, loss, liability, damage, or expense (including reasonable attorney fees) arising from your violation of this Agreement or your use of the service.', + 'last_updated' => 'Last Updated: February 21, 2026', + 'privacy_1_title' => '1. Scope of Collection', + 'privacy_1_content' => 'The information we collect includes, but is not limited to: identity information (name, ID photos), contact information (email, phone number), financial information, device information, and transaction records during your use of our services. This information is used to ensure platform security and provide better services.', + 'privacy_2_title' => '2. Purpose of Information Use', + 'privacy_2_content' => 'We use your information to: process your transactions, verify your identity, send you system notifications, improve our products, and comply with applicable legal and regulatory requirements.', + 'privacy_3_title' => '3. Data Storage and Protection', + 'privacy_3_content' => 'We use industry-leading technical measures to protect your personal data, including multi-layer encrypted storage and cold backups. We will not sell or rent your personal information to any third party unless required by law or with your explicit consent.', + 'privacy_4_title' => '4. Your Rights and Choices', + 'privacy_4_content' => 'You have the right to access, correct, or request the deletion of your personal data held by us. You can manage your privacy preferences in your account settings at any time or contact our support team for assistance.', + 'privacy_5_title' => '5. Notification of Policy Changes', + 'privacy_5_content' => 'We may update this Privacy Policy from time to time. Any significant changes will be notified to you through platform announcements or by sending an email. We recommend that you check this page regularly for the latest information.', + 'privacy_6_title' => '6. Use of Cookies', + 'privacy_6_content' => 'We use cookies and similar technologies to collect additional data about your use of our website. You can instruct your browser to stop accepting cookies, but if you do so, you may not be able to use certain parts of our service.', 'issue_type' => 'Issue Type', 'account_access' => 'Account', 'dep_with_issue' => 'Financial', diff --git a/legal.php b/legal.php index 6fd27a7..3629751 100644 --- a/legal.php +++ b/legal.php @@ -8,26 +8,16 @@ require_once __DIR__ . '/includes/header.php';

+
-

-

-
-
-

-

-
-
-

-

-
-
-

-

-
-
-

-

+

+

+
diff --git a/profile.php b/profile.php index 83ac34a..c5f37c2 100644 --- a/profile.php +++ b/profile.php @@ -1,6 +1,13 @@

+
-

-

-
-
-

-

-
-
-

-

-
-
-

-

-
-
-

-

+

+

+