This repository was archived by the owner on Aug 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchange.php
More file actions
102 lines (100 loc) · 4.52 KB
/
change.php
File metadata and controls
102 lines (100 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
session_start();
require_once 'common.php';
$db = init_database();
$settings = $db->querySingle("SELECT * FROM settings", true);
$settings = $settings ?: [
'site_title' => '联bBb盟 ICP 备案系统',
'site_url' => 'https://icp.bbb-lsy07.my',
'welcome_message' => '这是一个虚拟备案系统,仅供娱乐和社区互动使用,非官方备案。',
'contact_email' => 'admin@bbb-lsy07.my',
'qq_group' => '123456789',
'background_image' => 'https://www.dmoe.cc/random.php'
];
if (!isset($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
$csrf_token = $_SESSION['csrf_token'];
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="变更您的联bBb盟 ICP 备案信息。">
<meta name="keywords" content="变更ICP备案, 虚拟备案, <?php echo htmlspecialchars($settings['site_title']); ?>">
<title>变更 - <?php echo htmlspecialchars($settings['site_title']); ?></title>
<link rel="icon" href="https://www.dmoe.cc/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="github-corner">
<a href="https://github.com/bbb-lsy07/dBd-Filing" target="_blank" class="github-link">开源地址</a>
</div>
<div class="container">
<div class="header">
<h1 class="holographic-text">变更备案信息</h1>
</div>
<div class="search-box">
<form action="change.php" method="GET" class="query-form neon-form">
<input type="text" name="keyword" class="search-input" placeholder="请输入备案号或网站地址" required>
<button type="submit" class="search-button glow-button">
<span>查询</span>
<div class="glow"></div>
</button>
</form>
<?php if (isset($_GET['keyword'])): ?>
<?php
$stmt = $db->prepare("SELECT * FROM filings WHERE filing_number = :keyword OR website_url = :keyword");
$stmt->bindValue(':keyword', htmlspecialchars($_GET['keyword']), SQLITE3_TEXT);
$row = $stmt->execute()->fetchArray(SQLITE3_ASSOC);
if ($row): ?>
<div class="confirmation">
<p>是否确认要变更网站 "<?php echo htmlspecialchars($row['website_name']); ?>" 的备案信息?</p>
<form action="change_verify.php" method="POST" class="neon-form">
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($csrf_token); ?>">
<input type="hidden" name="id" value="<?php echo $row['id']; ?>">
<button type="submit" class="search-button glow-button">
<span>确认变更</span>
<div class="glow"></div>
</button>
</form>
<a href="change.php"><button type="button" class="search-button glow-button"><span>取消</span><div class="glow"></div></button></a>
</div>
<?php else: ?>
<p class="error">未找到相关备案信息。</p>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="footer">
<a href="index.php">主页</a>
<a href="about.php">关于</a>
<a href="join.php">加入</a>
<a href="change.php">变更</a>
<a href="public.php">公示</a>
<a href="travel.php">迁跃</a>
<?php echo getFooterText(); ?>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
document.body.classList.add('loaded');
});
document.querySelectorAll('form').forEach(form => {
form.addEventListener('submit', () => {
form.style.transform = 'scale(0.98)';
setTimeout(() => form.style.transform = '', 200);
});
});
document.querySelectorAll('a').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
document.body.classList.remove('loaded');
setTimeout(() => {
window.location = e.target.href;
}, 300);
});
});
</script>
</body>
</html>