<?php
ob_start();
require_once '../../config.php';
require_once '../../includes/mail_helper.php';
require_once '../../includes/verify_code_helper.php';

if (isLoggedIn()) {
    redirect(SITE_URL . 'admin.php');
}

$registerEnabled = getSiteConfig('register_enabled') == '1';
if (!$registerEnabled) {
    header('Location: /modules/home/register_closed.php');
    exit;
}

$error = '';
$success = '';
$invite_code = isset($_GET['code']) ? trim($_GET['code']) : '';

// 获取注册页面公告
$announcements = $db->fetchAll("
    SELECT * FROM announcements 
    WHERE type = 'user_register' AND status = 1 
    AND (start_time IS NULL OR start_time <= NOW()) 
    AND (end_time IS NULL OR end_time >= NOW())
    ORDER BY priority DESC, id DESC LIMIT 3
");

// 处理 AJAX 请求（注册验证）
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_GET['action']) && $_GET['action'] === 'register') {
    header('Content-Type: application/json');
    
    $username = trim($_POST['username'] ?? '');
    $password = $_POST['password'] ?? '';
    $confirm_password = $_POST['confirm_password'] ?? '';
    $email = trim($_POST['email'] ?? '');
    $code = trim($_POST['code'] ?? '');
    $invite_code = trim($_POST['invite_code'] ?? '');
    
    if (empty($username) || empty($password) || empty($email) || empty($code)) {
        echo json_encode(['success' => false, 'message' => '请填写完整信息']);
        exit;
    }
    
    if (strlen($username) < 3 || strlen($username) > 20) {
        echo json_encode(['success' => false, 'message' => '用户名3-20个字符']);
        exit;
    }
    
    if (strlen($password) < 6) {
        echo json_encode(['success' => false, 'message' => '密码至少6位']);
        exit;
    }
    
    if ($password !== $confirm_password) {
        echo json_encode(['success' => false, 'message' => '两次密码不一致']);
        exit;
    }
    
    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        echo json_encode(['success' => false, 'message' => '邮箱格式不正确']);
        exit;
    }
    
    $result = completeRegisterWithCode($username, $password, $email, $code);
    
    // 注册成功后处理邀请码
    if ($result['success'] && !empty($invite_code)) {
        $inviter = $db->fetchOne("SELECT id FROM users WHERE invite_code = '$invite_code'");
        if ($inviter && $inviter['id'] != $result['user_id']) {
            $db->query("INSERT INTO invite_records (inviter_id, invitee_id, invite_code) VALUES ({$inviter['id']}, {$result['user_id']}, '$invite_code')");
        }
    }
    
    echo json_encode($result);
    exit;
}

$site_name = getSiteConfig('site_name') ?? '万能授权系统';
$sys_version = getSiteConfig('sys_version') ?? '1.0.0';
// 获取启用的快捷登录方式
$enabled_logins = $db->fetchAll("SELECT type, name FROM quick_login_config WHERE enabled = 1 ORDER BY sort ASC");

// 登录方式配置
$login_styles = [
    'qq' => ['bg' => '#12B7F5', 'icon' => 'qq.svg', 'url' => '/api/qq_login.php'],
    'wx' => ['bg' => '#07C160', 'icon' => 'wechat.svg', 'url' => '/api/union_login.php?type=wx'],
    'alipay' => ['bg' => '#1677FF', 'icon' => 'alipay.svg', 'url' => '/api/union_login.php?type=alipay'],
    'gitee' => ['bg' => '#C71D23', 'icon' => 'gitee.svg', 'url' => '/api/gitee_login.php'],
    'sina' => ['bg' => '#FF8200', 'icon' => 'weibo.svg', 'url' => '/api/union_login.php?type=sina'],
    'baidu' => ['bg' => '#2932E1', 'icon' => 'baidu.svg', 'url' => '/api/union_login.php?type=baidu'],
    'xiaomi' => ['bg' => '#FF6900', 'icon' => 'xiaomi.svg', 'url' => '/api/union_login.php?type=xiaomi'],
    'huawei' => ['bg' => '#FF0000', 'icon' => 'huawei.svg', 'url' => '/api/union_login.php?type=huawei'],
    'douyin' => ['bg' => '#000000', 'icon' => 'douyin.svg', 'url' => '/api/union_login.php?type=douyin'],
    'google' => ['bg' => '#4285F4', 'icon' => 'google.svg', 'url' => '/api/union_login.php?type=google'],
    'microsoft' => ['bg' => '#00A4EF', 'icon' => 'microsoft.svg', 'url' => '/api/union_login.php?type=microsoft'],
    'facebook' => ['bg' => '#1877F2', 'icon' => 'facebook.svg', 'url' => '/api/union_login.php?type=facebook'],
    'twitter' => ['bg' => '#1DA1F2', 'icon' => 'twitter.svg', 'url' => '/api/union_login.php?type=twitter'],
    'feishu' => ['bg' => '#00C4A0', 'icon' => 'feishu.svg', 'url' => '/api/feishu_login.php'],
    'wework' => ['bg' => '#2C7A3E', 'icon' => 'wework.svg', 'url' => '/api/union_login.php?type=wework'],
    'dingtalk' => ['bg' => '#1E9AEF', 'icon' => 'dingtalk.svg', 'url' => '/api/union_login.php?type=dingtalk'],
    'github' => ['bg' => '#24292E', 'icon' => 'github.svg', 'url' => '/api/union_login.php?type=github'],
];
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - <?php echo htmlspecialchars($site_name); ?></title>
    <link rel="stylesheet" href="/assets/css/style.css">
    <link rel="stylesheet" href="/assets/css/dark.css" id="dark-theme" disabled>
    <script src="/assets/js/main.js" defer></script>
    <link rel="stylesheet" href="/assets/css/app.css">
    <script src="/assets/js/iconify.min.js"></script>
    <link rel="icon" href="/assets/uploads/favicon.ico"> 

    <style>
        body {
            width: 100%;
            height: 100%;
            background: url(https://api.suyanw.cn/api/mao.php) no-repeat;
            background-size: cover;
        }
        .auth-card {
            max-width: 450px;
            margin: 30px auto;
            background: var(--bg-primary);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .auth-header {
            text-align: center;
            margin-bottom: 30px;
        }
        .auth-header h2 {
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 8px;
            font-weight: 500;
        }
        .form-group input {
            width: 100%;
            padding: 12px 16px;
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            background: var(--bg-primary);
            color: var(--text-primary);
            font-size: 14px;
            transition: all 0.2s;
        }
        .form-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        .code-input-group {
            display: flex;
            gap: 10px;
        }
        .code-input-group input {
            flex: 1;
        }
        .code-input-group button {
            padding: 0 20px;
            white-space: nowrap;
        }
        .btn-primary {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
        }
        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .btn-secondary {
            background: var(--bg-secondary);
            border: 1.5px solid var(--border-color);
            color: var(--text-primary);
            border-radius: 12px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s;
        }
        .btn-secondary:hover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }
        .btn-secondary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        .auth-footer {
            text-align: center;
            margin-top: 20px;
        }
        .auth-footer a {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }
        .auth-footer a:hover {
            text-decoration: underline;
        }
        .alert {
            padding: 12px 16px;
            border-radius: 12px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .alert-error {
            background: rgba(239,68,68,0.1);
            border: 1px solid #ef4444;
            color: #ef4444;
        }
        .alert-success {
            background: rgba(16,185,129,0.1);
            border: 1px solid #10b981;
            color: #10b981;
        }
        .countdown {
            color: #667eea;
        }
        .invite-tip {
            background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
            border-radius: 12px;
            padding: 12px 16px;
            margin-bottom: 20px;
            font-size: 13px;
            color: #667eea;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .invite-tip img {
            flex-shrink: 0;
        }
        /* 公告卡片 */
        .announcement-section {
            margin-bottom: 20px;
        }
        .announcement-header {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 10px;
        }
        .announce-list {
            background: var(--bg-secondary);
            border-radius: 12px;
            padding: 6px 0;
            border: 1px solid var(--border-color);
        }
        .announce-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .announce-item:hover {
            background: var(--bg-primary);
        }
        .announce-icon {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            background: #fef3c7;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .announce-content {
            flex: 1;
            min-width: 0;
        }
        .announce-title {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .announce-time {
            font-size: 11px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 2px;
        }
        .announce-empty {
            padding: 20px;
            text-align: center;
            color: var(--text-muted);
            font-size: 13px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        /* 圆形图标样式 */
        .login-icons {
            display: flex;
            justify-content: center;
            gap: 16px;
            flex-wrap: wrap;
            margin-top: 20px;
        }
        .login-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            transition: transform 0.2s, box-shadow 0.2s;
            text-decoration: none;
        }
        .login-icon:hover {
            transform: scale(1.1);
        }
        .login-icon img {
            width: 26px;
            height: 26px;
        }
        /* 公告弹窗 */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        .modal-content {
            background: var(--bg-primary);
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            max-height: 70vh;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        }
        .modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .modal-header h3 {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 18px;
            font-weight: 600;
            margin: 0;
        }
        .modal-close {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            border-radius: 8px;
            display: flex;
        }
        .modal-body {
            padding: 24px;
            max-height: 50vh;
            overflow-y: auto;
            line-height: 1.7;
        }
        .modal-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
        }
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 0.6s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
    </style>
</head>
<body>
<div class="auth-card">
    <div class="auth-header">
        <img src="/assets/uploads/logo_1774667898.png" alt="Logo" style="display: block; margin: 0 auto 15px auto; height: 60px;">
        <h2>
            <img src="https://api.iconify.design/mdi:account-plus.svg?color=%23667eea" width="24" height="24" alt="">
            注册新账号
        </h2>
        <p>加入 <?php echo htmlspecialchars($site_name); ?></p>
    </div>
    
    <?php if (!empty($announcements)): ?>
    <div class="announcement-section">
        <div class="announcement-header">
            <img src="https://api.iconify.design/mdi:bullhorn.svg?color=%23f59e0b" width="18" height="18" alt="">
            公告须知
        </div>
        <div class="announce-list">
            <?php foreach ($announcements as $announce): ?>
            <div class="announce-item" onclick="showAnnouncement(<?php echo htmlspecialchars(json_encode($announce)); ?>)">
                <div class="announce-icon">
                    <img src="https://api.iconify.design/mdi:bullhorn.svg?color=%23f59e0b" width="16" height="16" alt="">
                </div>
                <div class="announce-content">
                    <div class="announce-title"><?php echo htmlspecialchars($announce['title']); ?></div>
                    <div class="announce-time">
                        <img src="https://api.iconify.design/mdi:clock-outline.svg?color=%236b7280" width="10" height="10" alt="">
                        <?php echo date('m-d H:i', strtotime($announce['created_at'])); ?>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
    <?php endif; ?>
    
    <?php if (!empty($invite_code)): ?>
        <div class="invite-tip">
            <img src="https://api.iconify.design/mdi:gift.svg?color=%23667eea" width="20" height="20" alt="">
            您正在通过邀请链接注册，注册后消费可享受返利优惠！
        </div>
    <?php endif; ?>
    
    <div id="message" class="alert" style="display: none;"></div>
    
    <form id="registerForm">
        <input type="hidden" name="invite_code" id="invite_code" value="<?php echo htmlspecialchars($invite_code); ?>">
        
        <div class="form-group">
            <label>
                <img src="https://api.iconify.design/mdi:account.svg?color=%23667eea" width="18" height="18" alt="">
                用户名
            </label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" required autofocus>
        </div>
        
        <div class="form-group">
            <label>
                <img src="https://api.iconify.design/mdi:email.svg?color=%23667eea" width="18" height="18" alt="">
                邮箱
            </label>
            <div class="code-input-group">
                <input type="email" id="email" name="email" placeholder="请输入邮箱" required>
                <button type="button" id="sendCodeBtn" class="btn-secondary">
                    发送验证码
                </button>
            </div>
        </div>
        
        <div class="form-group">
            <label>
                <img src="https://api.iconify.design/mdi:shield-key.svg?color=%23667eea" width="18" height="18" alt="">
                验证码
            </label>
            <input type="text" id="code" name="code" placeholder="请输入6位验证码" required>
        </div>
        
        <div class="form-group">
            <label>
                <img src="https://api.iconify.design/mdi:lock.svg?color=%23667eea" width="18" height="18" alt="">
                密码
            </label>
            <input type="password" id="password" name="password" placeholder="至少6位密码" required>
        </div>
        
        <div class="form-group">
            <label>
                <img src="https://api.iconify.design/mdi:lock-check.svg?color=%23667eea" width="18" height="18" alt="">
                确认密码
            </label>
            <input type="password" id="confirm_password" name="confirm_password" placeholder="再次输入密码" required>
        </div>
        
        <button type="submit" class="btn-primary" id="registerBtn">
            <img src="https://api.iconify.design/mdi:account-check.svg?color=white" width="20" height="20" alt="">
            注 册
        </button>
    </form>
    
    <!-- 第三方登录 -->
    <?php if (!empty($enabled_logins)): ?>
    <div style="text-align: center; margin: 25px 0 15px;">
        <div style="position: relative; text-align: center;">
            <div style="border-top: 1px solid var(--border-color);"></div>
            <span style="position: relative; top: -12px; background: var(--bg-primary); padding: 0 10px; color: var(--text-muted); font-size: 12px;">
                或使用第三方注册
            </span>
        </div>
        <div class="login-icons">
            <?php foreach ($enabled_logins as $login): 
                $type = $login['type'];
                $style = $login_styles[$type] ?? ['bg' => '#667eea', 'icon' => 'default.svg', 'url' => '#'];
            ?>
                <a href="<?php echo $style['url']; ?>" class="login-icon" style="background: <?php echo $style['bg']; ?>; box-shadow: 0 2px 8px <?php echo $style['bg']; ?>40;"
                   onmouseover="this.style.boxShadow='0 4px 12px <?php echo $style['bg']; ?>80';"
                   onmouseout="this.style.boxShadow='0 2px 8px <?php echo $style['bg']; ?>40';">
                    <img src="/assets/svg/<?php echo $style['icon']; ?>" alt="<?php echo $login['name']; ?>">
                </a>
            <?php endforeach; ?>
        </div>
    </div>
    <?php endif; ?>
    
    <div class="auth-footer">
        <p>已有账号？<a href="/modules/home/login.php">立即登录</a></p>
    </div>
</div>

<!-- 公告详情弹窗 -->
<div id="announcementModal" class="modal">
    <div class="modal-content">
        <div class="modal-header">
            <h3 id="modalTitle">
                <img src="https://api.iconify.design/mdi:bullhorn.svg?color=%23667eea" width="20" height="20" alt="">
                公告详情
            </h3>
            <button class="modal-close" onclick="closeModal()">
                <img src="https://api.iconify.design/mdi:close.svg?color=%239ca3af" width="20" height="20" alt="">
            </button>
        </div>
        <div class="modal-body">
            <div id="modalContent"></div>
        </div>
        <div class="modal-footer">
            <button class="btn-primary" onclick="closeModal()" style="width: auto; padding: 10px 24px;">关 闭</button>
        </div>
    </div>
</div>

<script>
let countdown = 0;
let timer = null;

function showMessage(msg, type) {
    const msgDiv = document.getElementById('message');
    const icon = type === 'error' 
        ? '<img src="https://api.iconify.design/mdi:alert-circle.svg?color=%23ef4444" width="18" height="18" alt="">'
        : '<img src="https://api.iconify.design/mdi:check-circle.svg?color=%2310b981" width="18" height="18" alt="">';
    msgDiv.innerHTML = icon + ' ' + msg;
    msgDiv.className = 'alert alert-' + type;
    msgDiv.style.display = 'flex';
    setTimeout(() => {
        msgDiv.style.display = 'none';
    }, 3000);
}

function startCountdown(seconds) {
    const btn = document.getElementById('sendCodeBtn');
    countdown = seconds;
    btn.disabled = true;
    btn.innerHTML = `<img src="https://api.iconify.design/mdi:clock-outline.svg?color=currentColor" width="16" height="16" style="margin-right: 4px;" alt="">重新发送(${countdown}s)`;
    
    timer = setInterval(() => {
        countdown--;
        if (countdown <= 0) {
            clearInterval(timer);
            btn.disabled = false;
            btn.innerHTML = '<img src="https://api.iconify.design/mdi:send.svg?color=currentColor" width="16" height="16" style="margin-right: 4px;" alt="">发送验证码';
        } else {
            btn.innerHTML = `<img src="https://api.iconify.design/mdi:clock-outline.svg?color=currentColor" width="16" height="16" style="margin-right: 4px;" alt="">重新发送(${countdown}s)`;
        }
    }, 1000);
}

// 显示公告详情
function showAnnouncement(announce) {
    const modal = document.getElementById('announcementModal');
    document.getElementById('modalTitle').innerHTML = `
        <img src="https://api.iconify.design/mdi:bullhorn.svg?color=%23667eea" width="20" height="20" alt="">
        ${announce.title}
    `;
    document.getElementById('modalContent').innerHTML = announce.content;
    modal.style.display = 'flex';
    
    // 记录已读
    fetch('/api/mark_announcement_read.php', {
        method: 'POST',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        body: `id=${announce.id}`
    });
}

function closeModal() {
    document.getElementById('announcementModal').style.display = 'none';
}

// 点击背景关闭
document.getElementById('announcementModal')?.addEventListener('click', function(e) {
    if (e.target === this) {
        closeModal();
    }
});

// 发送验证码
document.getElementById('sendCodeBtn').addEventListener('click', async function() {
    const email = document.getElementById('email').value;
    
    if (!email) {
        showMessage('请输入邮箱', 'error');
        return;
    }
    
    if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
        showMessage('邮箱格式不正确', 'error');
        return;
    }
    
    this.disabled = true;
    this.innerHTML = '<span class="loading-spinner"></span> 发送中...';
    
    try {
        const response = await fetch('/api/send_code.php', {
            method: 'POST',
            headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
            body: `email=${encodeURIComponent(email)}&type=register`
        });
        const data = await response.json();
        
        if (data.success) {
            showMessage(data.message, 'success');
            startCountdown(60);
        } else {
            showMessage(data.message, 'error');
            this.disabled = false;
            this.innerHTML = '<img src="https://api.iconify.design/mdi:send.svg?color=currentColor" width="16" height="16" style="margin-right: 4px;" alt="">发送验证码';
        }
    } catch (error) {
        showMessage('网络错误，请重试', 'error');
        this.disabled = false;
        this.innerHTML = '<img src="https://api.iconify.design/mdi:send.svg?color=currentColor" width="16" height="16" style="margin-right: 4px;" alt="">发送验证码';
    }
});

// 注册提交
document.getElementById('registerForm').addEventListener('submit', async function(e) {
    e.preventDefault();
    
    const username = document.getElementById('username').value;
    const email = document.getElementById('email').value;
    const code = document.getElementById('code').value;
    const password = document.getElementById('password').value;
    const confirm_password = document.getElementById('confirm_password').value;
    const invite_code = document.getElementById('invite_code').value;
    
    const registerBtn = document.getElementById('registerBtn');
    registerBtn.disabled = true;
    registerBtn.innerHTML = '<span class="loading-spinner"></span> 注册中...';
    
    try {
        let body = `username=${encodeURIComponent(username)}&email=${encodeURIComponent(email)}&code=${encodeURIComponent(code)}&password=${encodeURIComponent(password)}&confirm_password=${encodeURIComponent(confirm_password)}`;
        if (invite_code) {
            body += `&invite_code=${encodeURIComponent(invite_code)}`;
        }
        
        const response = await fetch('/modules/home/register.php?action=register', {
            method: 'POST',
            headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
            body: body
        });
        const data = await response.json();
        
        if (data.success) {
            showMessage(data.message, 'success');
            setTimeout(() => {
                window.location.href = '/admin.php';
            }, 1500);
        } else {
            showMessage(data.message, 'error');
            registerBtn.disabled = false;
            registerBtn.innerHTML = '<img src="https://api.iconify.design/mdi:account-check.svg?color=white" width="20" height="20" alt="">注 册';
        }
    } catch (error) {
        showMessage('网络错误，请重试', 'error');
        registerBtn.disabled = false;
        registerBtn.innerHTML = '<img src="https://api.iconify.design/mdi:account-check.svg?color=white" width="20" height="20" alt="">注 册';
    }
});
</script>
</body>
</html>