From 25620b5f684f28b7aea279d927528e22bda85c91 Mon Sep 17 00:00:00 2001
From: dyzzyduq <2909883891@qq.com>
Date: Fri, 4 Jul 2025 23:49:18 +0000
Subject: [PATCH] 2025-7-5
---
.htaccess | 1 +
404.html | 69 ++
a.html | 949 +++++++++++++++++++
api.php | 291 ++++++
auth/index.php | 35 +-
console/index.php | 57 +-
console/ins/.user.ini | 1 -
console/ins/proxy.php | 4 +-
console/ins_beta/css/styles.css | 88 ++
console/ins_beta/index.html | 91 ++
console/ins_beta/js/api.js | 668 ++++++++++++++
console/ins_beta/js/util.js | 445 +++++++++
console/ins_beta/php/api.php | 385 ++++++++
console/ins_beta/php/config.php | 21 +
console/motd.html | 649 +++++++++++++
console/tools.html | 309 +++++++
get_server_status.php | 28 +
haresworld.html | 494 ++++++++++
img/Hare'sWorld.png | Bin 0 -> 4010311 bytes
back.jpeg => img/back.jpeg | Bin
rainyun.jpg => img/rainyun.jpg | Bin
img/web.png | Bin 0 -> 1104401 bytes
index.html | 1427 +++++++++++++++++++++--------
index-true.html => index.html.old | 9 +-
logo-sm.png | Bin 0 -> 6925 bytes
logo.jpg | Bin 22105 -> 0 bytes
logo.png | Bin 6769 -> 0 bytes
logo2.png | Bin 0 -> 16752 bytes
stop.html | 411 +++++++++
temp.html | 87 ++
30 files changed, 6095 insertions(+), 424 deletions(-)
create mode 100755 .htaccess
create mode 100755 404.html
create mode 100755 a.html
create mode 100755 api.php
delete mode 100644 console/ins/.user.ini
create mode 100755 console/ins_beta/css/styles.css
create mode 100755 console/ins_beta/index.html
create mode 100755 console/ins_beta/js/api.js
create mode 100755 console/ins_beta/js/util.js
create mode 100755 console/ins_beta/php/api.php
create mode 100755 console/ins_beta/php/config.php
create mode 100755 console/motd.html
create mode 100755 console/tools.html
create mode 100755 get_server_status.php
create mode 100755 haresworld.html
create mode 100755 img/Hare'sWorld.png
rename back.jpeg => img/back.jpeg (100%)
rename rainyun.jpg => img/rainyun.jpg (100%)
create mode 100755 img/web.png
rename index-true.html => index.html.old (97%)
mode change 100755 => 100644
create mode 100644 logo-sm.png
delete mode 100755 logo.jpg
delete mode 100755 logo.png
create mode 100644 logo2.png
create mode 100755 stop.html
create mode 100755 temp.html
diff --git a/.htaccess b/.htaccess
new file mode 100755
index 0000000..0519ecb
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/404.html b/404.html
new file mode 100755
index 0000000..829e029
--- /dev/null
+++ b/404.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ 网站已封禁
+
+
+
+
+
+
此页面已被管理员封禁
+
您尝试访问的网站已被学校管理员封禁,如需了解更多详情,请联系学校网络管理部门。
+
+
+
\ No newline at end of file
diff --git a/a.html b/a.html
new file mode 100755
index 0000000..7a9b0e5
--- /dev/null
+++ b/a.html
@@ -0,0 +1,949 @@
+
+
+
+
+
+ 成绩追踪应用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 成绩追踪
+
+
+ 记录、分析和可视化你的预估成绩与实际成绩,帮助你更好地掌握学习情况
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 成绩趋势
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 成绩记录
+
+
+
+
+
+
+
+
+
+
+
+
+ 课程
+ |
+
+ 预估
+ |
+
+ 实际
+ |
+
+ 偏差
+ |
+
+ 备注
+ |
+
+ 操作
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
编辑成绩
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
确认删除
+
你确定要删除这条成绩记录吗?此操作无法撤销。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
输入成绩代码
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api.php b/api.php
new file mode 100755
index 0000000..8d2fe9f
--- /dev/null
+++ b/api.php
@@ -0,0 +1,291 @@
+host = $host;
+ $this->port = $port;
+ $this->timeout = $timeout;
+ }
+
+ public function connect() {
+ // 记录开始时间计算延迟
+ $start = microtime(true);
+
+ // 创建 socket 连接
+ $this->socket = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
+
+ if (!$this->socket) {
+ return false;
+ }
+
+ // 设置超时
+ stream_set_timeout($this->socket, $this->timeout);
+
+ // 发送握手包
+ $this->sendHandshake();
+
+ // 发送状态请求
+ $this->sendStatusRequest();
+
+ // 读取状态响应
+ $this->readStatusResponse();
+
+ // 计算延迟
+ $this->ping = round((microtime(true) - $start) * 1000);
+
+ // 关闭连接
+ fclose($this->socket);
+
+ return true;
+ }
+
+ private function sendHandshake() {
+ $packet = pack('c', 0x00); // 包ID (Handshake)
+ $packet .= pack('c', 0x04); // 协议版本 (4 for 1.7.2+)
+ $packet .= pack('c', strlen($this->host)) . $this->host; // 服务器地址
+ $packet .= pack('n', $this->port); // 服务器端口
+ $packet .= pack('c', 0x01); // 下一步状态 (1 for Status)
+
+ $packet = pack('c', strlen($packet)) . $packet; // 添加包长度前缀
+ fwrite($this->socket, $packet);
+ }
+
+ private function sendStatusRequest() {
+ $packet = pack('c', 0x00); // 包ID (Status Request)
+ $packet = pack('c', strlen($packet)) . $packet;
+ fwrite($this->socket, $packet);
+ }
+
+ private function readStatusResponse() {
+ // 读取包长度
+ $length = $this->readVarInt();
+
+ // 读取包ID
+ $packetID = $this->readVarInt();
+
+ if ($packetID !== 0x00) {
+ return false; // 不是状态响应包
+ }
+
+ // 读取JSON数据长度
+ $jsonLength = $this->readVarInt();
+
+ // 读取JSON数据
+ $json = '';
+ $bytesRead = 0;
+
+ while ($bytesRead < $jsonLength) {
+ $chunk = fread($this->socket, $jsonLength - $bytesRead);
+ if ($chunk === false) break;
+ $json .= $chunk;
+ $bytesRead += strlen($chunk);
+ }
+
+ $this->info = json_decode($json, true);
+ return true;
+ }
+
+ private function readVarInt() {
+ $value = 0;
+ $size = 0;
+ $b;
+
+ do {
+ $b = ord(fgetc($this->socket));
+ $value |= ($b & 0x7F) << ($size++ * 7);
+ if ($size > 5) {
+ throw new Exception('VarInt too big');
+ }
+ } while (($b & 0x80) == 0x80);
+
+ return $value;
+ }
+
+ public function getInfo() {
+ return $this->info;
+ }
+
+ public function getPing() {
+ return $this->ping;
+ }
+
+ public function formatMotd($motd) {
+ // 颜色代码映射
+ $colors = [
+ '0' => '#000000', '1' => '#0000AA', '2' => '#00AA00', '3' => '#00AAAA',
+ '4' => '#AA0000', '5' => '#AA00AA', '6' => '#FFAA00', '7' => '#AAAAAA',
+ '8' => '#555555', '9' => '#5555FF', 'a' => '#55FF55', 'b' => '#55FFFF',
+ 'c' => '#FF5555', 'd' => '#FF55FF', 'e' => '#FFFF55', 'f' => '#FFFFFF'
+ ];
+
+ // 格式化代码映射
+ $formats = [
+ 'l' => 'font-weight:bold', // 粗体
+ 'm' => 'text-decoration:line-through', // 删除线
+ 'n' => 'text-decoration:underline', // 下划线
+ 'o' => 'font-style:italic', // 斜体
+ 'r' => '' // 重置
+ ];
+
+ $html = '';
+ $currentStyles = [];
+ $buffer = '';
+ $chars = preg_split('//u', $motd, -1, PREG_SPLIT_NO_EMPTY);
+
+ for ($i = 0; $i < count($chars); $i++) {
+ $char = $chars[$i];
+
+ if ($char === '§' && isset($chars[$i + 1])) {
+ $code = $chars[$i + 1];
+ $i++;
+
+ // 处理颜色代码
+ if (isset($colors[strtolower($code)])) {
+ if ($buffer !== '') {
+ $html .= $this->wrapWithStyles($buffer, $currentStyles);
+ $buffer = '';
+ }
+ $currentStyles['color'] = $colors[strtolower($code)];
+ }
+ // 处理格式代码
+ elseif (isset($formats[strtolower($code)])) {
+ if ($buffer !== '') {
+ $html .= $this->wrapWithStyles($buffer, $currentStyles);
+ $buffer = '';
+ }
+
+ if (strtolower($code) === 'r') {
+ $currentStyles = []; // 重置所有样式
+ } else {
+ $currentStyles[] = $formats[strtolower($code)];
+ }
+ }
+ // 忽略未知代码
+ else {
+ $buffer .= $char . $code;
+ }
+ } else {
+ $buffer .= $char;
+ }
+ }
+
+ if ($buffer !== '') {
+ $html .= $this->wrapWithStyles($buffer, $currentStyles);
+ }
+
+ // 处理换行符
+ $html = str_replace("\n", "
", $html);
+
+ return $html;
+ }
+
+ private function wrapWithStyles($text, $styles) {
+ if (empty($styles)) {
+ return htmlspecialchars($text);
+ }
+
+ $styleString = '';
+ foreach ($styles as $key => $value) {
+ if (is_numeric($key)) {
+ $styleString .= $value . ';';
+ } else {
+ $styleString .= $key . ':' . $value . ';';
+ }
+ }
+
+ return '' . htmlspecialchars($text) . '';
+ }
+}
+
+// 处理API请求
+if ($_SERVER['REQUEST_METHOD'] === 'GET') {
+ // 获取查询参数
+ $host = isset($_GET['host']) ? $_GET['host'] : '';
+ $port = isset($_GET['port']) ? (int)$_GET['port'] : 25565;
+
+ // 验证输入
+ if (empty($host)) {
+ http_response_code(400);
+ echo json_encode(['error' => 'Missing host parameter']);
+ exit;
+ }
+
+ // 创建服务器查询实例
+ $server = new MinecraftServerQuery($host, $port);
+
+ try {
+ // 尝试连接并获取信息
+ $connected = $server->connect();
+
+ if ($connected) {
+ $info = $server->getInfo();
+ $ping = $server->getPing();
+
+ // 处理玩家列表
+ $players = [];
+ if (isset($info['players']['sample'])) {
+ foreach ($info['players']['sample'] as $player) {
+ $players[] = $player['name'];
+ }
+ }
+
+ // 格式化MOTD
+ $motd = '';
+ $formattedMotd = '';
+
+ if (isset($info['description'])) {
+ if (is_string($info['description'])) {
+ $motd = $info['description'];
+ $formattedMotd = $server->formatMotd($motd);
+ } elseif (is_array($info['description']) && isset($info['description']['text'])) {
+ $motd = $info['description']['text'];
+ $formattedMotd = $server->formatMotd($motd);
+ }
+ }
+
+ // 构建响应数据
+ $response = [
+ 'online' => true,
+ 'host' => $host,
+ 'port' => $port,
+ 'ping' => $ping,
+ 'version' => $info['version']['name'] ?? 'Unknown',
+ 'protocol' => $info['version']['protocol'] ?? -1,
+ 'online_players' => $info['players']['online'] ?? 0,
+ 'max_players' => $info['players']['max'] ?? 0,
+ 'motd' => $motd,
+ 'formatted_motd' => $formattedMotd,
+ 'players' => $players
+ ];
+
+ echo json_encode($response);
+ } else {
+ http_response_code(500);
+ echo json_encode([
+ 'online' => false,
+ 'error' => '无法连接到服务器',
+ 'host' => $host,
+ 'port' => $port
+ ]);
+ }
+ } catch (Exception $e) {
+ http_response_code(500);
+ echo json_encode([
+ 'online' => false,
+ 'error' => $e->getMessage(),
+ 'host' => $host,
+ 'port' => $port
+ ]);
+ }
+} else {
+ http_response_code(405);
+ echo json_encode(['error' => 'Method not allowed']);
+}
+?>
\ No newline at end of file
diff --git a/auth/index.php b/auth/index.php
index a6bca7b..62ecb64 100755
--- a/auth/index.php
+++ b/auth/index.php
@@ -237,24 +237,25 @@ if ($token) {
-
-
+
diff --git a/console/index.php b/console/index.php
index 1606b67..fcf83f9 100755
--- a/console/index.php
+++ b/console/index.php
@@ -17,7 +17,8 @@ function get_user_full_info($conn, $user_id) {
register_time,
organization,
development_field,
- skill_tags
+ skill_tags,
+ QQ
FROM users
WHERE id = ?");
$stmt->bind_param("i", $user_id);
@@ -34,7 +35,8 @@ function get_user_full_info($conn, $user_id) {
'register_time' => 'NULL',
'organization' => 'NULL',
'development_field' => 'NULL',
- 'skill_tags' => 'NULL'
+ 'skill_tags' => 'NULL',
+ 'QQ' => 'NULL'
];
}
@@ -47,7 +49,9 @@ $register_time = $user_info['register_time'];
$organization = $user_info['organization'];
$development_field = $user_info['development_field'];
$skill_tags = explode(',', $user_info['skill_tags']);
+$QQ = $user_info['QQ'];
+$UserPicture = "https://q2.qlogo.cn/headimg_dl?bs=$QQ&dst_uin=$QQ&spec=100&url_enc=0&referer=bu_interface&term_type=PC";
$levelDescriptions = [1 => '云境初探者', 2 => '云境行者', 3 => '云智大师', 4 => '云核守护者'];
$userLevelDescription = $levelDescriptions[$level] ?? '未知等级';
@@ -67,7 +71,7 @@ $can_create_player = count($user_players) < $max_players;
// 管理功能 - 获取所有用户
function get_all_users($conn) {
- $stmt = $conn->prepare("SELECT id, username, level, points, email, register_time FROM users");
+ $stmt = $conn->prepare("SELECT id, username, level, points, email, register_time, QQ FROM users");
$stmt->execute();
$result = $stmt->get_result();
$users = $result->fetch_all(MYSQLI_ASSOC);
@@ -96,6 +100,7 @@ if ($level == 4) {
$token = bin2hex(random_bytes(32));
$_SESSION['player_token'] = $token;
+
$conn->close();
?>
@@ -165,9 +170,6 @@ $conn->close();
-
-

-
@@ -352,7 +358,7 @@ $conn->close();
圆周云境用户后台
-
© 2025 圆周云境. 保留所有权利
+
一切,为了梦,为了你
本站由雨云提供技术支持
请遵守国家法律,本站可能与某些老旧浏览器不兼容 | 背景图片来源:《蔚蓝档案》侵权请联系删除
@@ -368,7 +374,8 @@ $conn->close();
Cookie政策
- 版本 2.4.1(Alpha)
+ Copyright © 2023-2025 CCSIT Network.All rights reserved.
+© 圆周云境信息技术 保留所有权利。| 版本:2.8.9(submitID:NULL(未开源))
@@ -526,6 +533,7 @@ $conn->close();
积分 |
邮箱 |
注册时间 |
+ QQ号码 |
操作 |
@@ -547,6 +555,7 @@ $conn->close();
= $user['points'] ?> |
= htmlspecialchars($user['email']) ?> |
= date('Y-m-d', strtotime($user['register_time'])) ?> |
+ = htmlspecialchars($user['QQ']); ?> |
|