58 行
2.2 KiB
PHP
58 行
2.2 KiB
PHP
<?php
|
|
require_once 'functions.php';
|
|
|
|
$token = $_GET['token'] ?? '';
|
|
|
|
// 添加调试日志
|
|
error_log("验证请求 - Token: " . $token);
|
|
|
|
if (empty($token)) {
|
|
die('缺少验证令牌');
|
|
}
|
|
|
|
$result = verifyEmail($token);
|
|
|
|
// 调试日志
|
|
error_log("验证结果: " . ($result['success'] ? '成功' : '失败') . " - " . $result['message']);
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN" data-theme="<?php echo getTheme(); ?>">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>邮箱验证 - <?php echo SITE_NAME; ?></title>
|
|
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<div class="container verify-container">
|
|
<div class="verify-card">
|
|
<?php if ($result['success']): ?>
|
|
<div class="icon success">
|
|
<i class="fas fa-check-circle"></i>
|
|
</div>
|
|
<h2>验证成功!</h2>
|
|
<p>您的邮箱已成功验证,现在可以登录来使用所有功能了。</p>
|
|
<a href="auth.php?action=login" class="btn btn-primary">
|
|
<i class="fas fa-sign-in-alt"></i> 去登录
|
|
</a>
|
|
<?php else: ?>
|
|
<div class="icon error">
|
|
<i class="fas fa-exclamation-circle"></i>
|
|
</div>
|
|
<h2>验证失败!</h2>
|
|
<p><?php echo htmlspecialchars($result['message']); ?></p>
|
|
<p style="font-size: 13px; color: var(--text-muted);">
|
|
<i class="fas fa-info-circle"></i>
|
|
可能的原因:链接已过期、已被使用或无效,请联系管理员手动激活。
|
|
</p>
|
|
<div style="display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;">
|
|
<a href="auth.php?action=login" class="btn btn-outline">
|
|
<i class="fas fa-sign-in-alt"></i> 登录
|
|
</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|