数据文件结构更新
This commit is contained in:
parent
35100eb2d7
commit
90af7a8d98
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
|
|
||||||
o/*
|
o/*
|
||||||
|
.idea/*
|
||||||
|
db.php
|
||||||
|
15
README.md
15
README.md
@ -19,6 +19,21 @@ php5.2.x及以上版本均可运行,做了很多测试,老机都可以轻易
|
|||||||
|
|
||||||
图片分享,支持直接连接,BBcode,HTML,Markdown,轻松一点即可。
|
图片分享,支持直接连接,BBcode,HTML,Markdown,轻松一点即可。
|
||||||
|
|
||||||
|
### 以下所有接口提交请用GET方式
|
||||||
|
|
||||||
|
美女壁纸接口
|
||||||
|
|
||||||
|
输入参数:
|
||||||
|
getGirlWallpaper 必填
|
||||||
|
type 可选,输出json
|
||||||
|
|
||||||
|
调用URL:?getGirlWallpaper&type
|
||||||
|
|
||||||
|
输出JSON结果:
|
||||||
|
{"code":"0","msg":"成功","url":"http://tutu.rf.gd/o/a/b/abf77b43acb51fec2fd5e7590ebd3750.avif"}
|
||||||
|
|
||||||
|
其它情况直接302转向图片网址。
|
||||||
|
|
||||||
## 官网地址:
|
## 官网地址:
|
||||||
https://git.czyx007.cn/sunson/siw
|
https://git.czyx007.cn/sunson/siw
|
||||||
|
|
||||||
|
893
index.php
893
index.php
@ -1,281 +1,307 @@
|
|||||||
<?php
|
<?php
|
||||||
$base_dir = '/o/';// 以/结束
|
$web_base = 'http://tutu.rf.gd/o/'; // 图站基地址
|
||||||
$user = array("chate.store");// 用户名,可多个
|
$img_dir = '/o/'; // 以/结束;
|
||||||
$pwd = array("123456");// 密码,跟用户对应,请记得更换
|
$img_ext = '.avif'; // 文件默认后辍
|
||||||
if(isset($_GET['phpinfo'])){phpinfo();exit;}
|
$http = "http://";
|
||||||
|
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
|
||||||
|
$http = "https://";
|
||||||
|
}
|
||||||
|
$base_dir = $http . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']);
|
||||||
|
$user = array("chate.store"); // 用户名,可多个
|
||||||
|
$pwd = array("123456"); // 密码,跟用户对应,请记得更换
|
||||||
|
if (isset($_GET['type'])) {
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
}
|
||||||
|
if (isset($_GET['getGirlWallpaper'])) {
|
||||||
|
if (file_exists('db.php')) {
|
||||||
|
include ('db.php');
|
||||||
|
}
|
||||||
|
if (empty($web_base)) {
|
||||||
|
$web_base = $http . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . $img_dir;
|
||||||
|
if (empty($img_ext)) {
|
||||||
|
$img_ext = '.avif';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$lines = array_filter(explode("\n", gzuncompress(base64_decode($data))));
|
||||||
|
$file = chop($lines[array_rand($lines) ]);
|
||||||
|
$extension = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
|
if (empty($extension)) {
|
||||||
|
$file.= $img_ext;
|
||||||
|
}
|
||||||
|
if (substr($file, 0, 4) == 'http') {
|
||||||
|
$url = $file;
|
||||||
|
} else {
|
||||||
|
$url = "$web_base" . substr($file, 0, 1) . "/" . substr($file, 1, 1) . "/$file";
|
||||||
|
}
|
||||||
|
if (isset($_GET['type'])) {
|
||||||
|
echo '{"code":"0","msg":"成功","url":"' . $url . '"}';
|
||||||
|
} else {
|
||||||
|
header('HTTP/1.1 302 Found');
|
||||||
|
// 添加Location头部,指定重定向的URL
|
||||||
|
header("Location: " . $url);
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (isset($_GET['phpinfo'])) {
|
||||||
|
phpinfo();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
$authorization = false;
|
$authorization = false;
|
||||||
$key = array_search($_SERVER['PHP_AUTH_USER'], $user);
|
$key = array_search($_SERVER['PHP_AUTH_USER'], $user);
|
||||||
if($key !== false && $_SERVER['PHP_AUTH_PW'] ==$pwd[$key]){$auth = true;}
|
if ($key !== false && $_SERVER['PHP_AUTH_PW'] == $pwd[$key]) {
|
||||||
|
$auth = true;
|
||||||
if(!$auth){
|
}
|
||||||
// 没登录,弹出登录窗口
|
if (!$auth) {
|
||||||
header("WWW-Authenticate:Basic realm='Private'");
|
// 没登录,弹出登录窗口
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header("WWW-Authenticate:Basic realm='Private'");
|
||||||
exit;
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理上传
|
// 处理上传
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) {
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) {
|
||||||
$name = $_FILES['file']['name'];
|
$name = $_FILES['file']['name'];
|
||||||
$file_tmp = $_FILES['file']['tmp_name'];
|
$file_tmp = $_FILES['file']['tmp_name'];
|
||||||
$error = $_FILES['file']['error'];
|
$error = $_FILES['file']['error'];
|
||||||
|
// 检查上传错误,直接提示错误代码
|
||||||
// 检查上传错误,直接提示错误代码
|
if ($error !== UPLOAD_ERR_OK) {
|
||||||
if ($error !== UPLOAD_ERR_OK) {
|
echo '{"error":"上传失败,错误代码:' . $error . '"}';
|
||||||
echo '{"error":"上传失败,错误代码:'.$error.'"}';
|
exit;
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 兼容跨平台路径
|
|
||||||
$md5 = md5_file($file_tmp);
|
|
||||||
$up_dir = $base_dir . substr($md5,0,1).'/'.substr($md5,1,1);
|
|
||||||
$upload_dir = getcwd() . $up_dir;
|
|
||||||
// 检查并创建目录
|
|
||||||
if (!is_dir($upload_dir)) {
|
|
||||||
if (!mkdir($upload_dir, 0777, true) && !is_dir($upload_dir)) {
|
|
||||||
echo '{"error":"无法创建目录:'.$upload_dir.'"}';
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
// 开始创建index.html
|
// 兼容跨平台路径
|
||||||
file_put_contents($upload_dir .'/index.html', 'no access');
|
$md5 = md5_file($file_tmp);
|
||||||
if(!file_exists(dirname($upload_dir) . '/index.html')){file_put_contents(dirname($upload_dir) . '/index.html', 'no access');}
|
$up_dir = substr($md5, 0, 1) . '/' . substr($md5, 1, 1);
|
||||||
if(!file_exists(dirname($upload_dir,2) . '/index.html')){file_put_contents(dirname($upload_dir,2) . '/index.html', 'no access');}
|
$upload_dir = getcwd() . $img_dir . $up_dir;
|
||||||
}
|
// 检查并创建目录
|
||||||
|
if (!is_dir($upload_dir)) {
|
||||||
// 根据文件内容生成MD5文件名,这样可以排除重复上传
|
if (!mkdir($upload_dir, 0777, true) && !is_dir($upload_dir)) {
|
||||||
$FileName = md5_file($file_tmp). '.' . strtolower(pathinfo($name, PATHINFO_EXTENSION));
|
echo '{"error":"无法创建目录。"}';
|
||||||
// 这里判断下重复文件不移动文件
|
exit;
|
||||||
$target_file=$upload_dir . '/' .$FileName;
|
}
|
||||||
if (file_exists($target_file) || move_uploaded_file($file_tmp, $target_file)) {
|
// 开始创建index.html
|
||||||
echo '{"upload_url":"http://'.$_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']).$up_dir .'/'. $FileName.'"}';
|
file_put_contents($upload_dir . '/index.html', 'no access');
|
||||||
} else {
|
if (!file_exists(dirname($upload_dir) . '/index.html')) {
|
||||||
echo '{"error":"写入失败,无法保存文件"}';
|
file_put_contents(dirname($upload_dir) . '/index.html', 'no access');
|
||||||
}
|
}
|
||||||
exit;
|
}
|
||||||
|
// 根据文件内容生成MD5文件名,这样可以排除重复上传
|
||||||
|
$FileName = md5_file($file_tmp) . '.' . strtolower(pathinfo($name, PATHINFO_EXTENSION));
|
||||||
|
// 这里判断下重复文件不移动文件
|
||||||
|
$target_file = $upload_dir . '/' . $FileName;
|
||||||
|
if (file_exists($target_file) || move_uploaded_file($file_tmp, $target_file)) {
|
||||||
|
echo '{"upload_url":"' . $base_dir . $img_dir . $up_dir . '/' . $FileName . '"}';
|
||||||
|
// 为提供接口写入DB.php
|
||||||
|
$lines = array();
|
||||||
|
if (file_exists('db.php')) {
|
||||||
|
include ('db.php');
|
||||||
|
$lines = array_filter(explode("\n", gzuncompress(base64_decode($data))));
|
||||||
|
}
|
||||||
|
$lines[] = $FileName;
|
||||||
|
$data = array_unique($lines);
|
||||||
|
sort($data);
|
||||||
|
file_put_contents('db.php', '<?php $data="' . base64_encode(gzcompress(implode("\n", $data), 9)) . '"?>');
|
||||||
|
} else {
|
||||||
|
echo '{"error":"写入失败,无法保存文件"}';
|
||||||
|
}
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="description" content="SIW图床-基于PHP的图床服务">
|
<meta name="description" content="SIW图床-基于PHP的图床服务">
|
||||||
<meta name="keywords" content="SIW图床,PHP图床,图床">
|
<meta name="keywords" content="SIW图床,PHP图床,图床">
|
||||||
<link rel="stylesheet" href="http://cdn.atusu.cn/202410/bootstrap.min.css">
|
<link rel="stylesheet" href="http://cdn.atusu.cn/202410/bootstrap.min.css">
|
||||||
<script src="http://cdn.atusu.cn/202410/jquery.min.js"></script>
|
<script src="http://cdn.atusu.cn/202410/jquery.min.js"></script>
|
||||||
<title>SIW图床-基于PHP的图床服务</title>
|
<title>SIW图床-基于PHP的图床服务</title>
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.background {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-size: cover;
|
|
||||||
z-index: -1;
|
|
||||||
transition: opacity 1s ease-in-out;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
width: 600px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.file-list {
|
|
||||||
max-height: 200px;
|
|
||||||
overflow-y: auto;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
.file-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px 0;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.file-row:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.file-name {
|
|
||||||
flex-grow: 1;
|
|
||||||
width: 200px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.file-size {
|
|
||||||
margin-left: 10px;
|
|
||||||
color: #666;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
.progress {
|
|
||||||
width: 100px;
|
|
||||||
font-size: 12px;
|
|
||||||
margin-left: 5px;
|
|
||||||
display: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.btn-download, .btn-copy {
|
|
||||||
color: #ffffff;
|
|
||||||
width: 50px;
|
|
||||||
height: 25px;
|
|
||||||
padding: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.btn-download {
|
|
||||||
background-color: #0d6efd;
|
|
||||||
}
|
|
||||||
.btn-copy {
|
|
||||||
background-color: #198754;
|
|
||||||
}
|
|
||||||
.status-output {
|
|
||||||
margin-top: 15px;
|
|
||||||
height: 30px;
|
|
||||||
padding: 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
font-weight: 1000;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.link-output {
|
|
||||||
/*margin-top: 20px;
|
|
||||||
border: 1px solid #ccc;*/
|
|
||||||
padding: 10px;
|
|
||||||
display: none; /* 默认隐藏 */
|
|
||||||
}
|
|
||||||
.link-output textarea {
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
margin-top: 10px;
|
|
||||||
white-space: pre-wrap; /* 自动换行 */
|
|
||||||
overflow-wrap: break-word; /* 强制换行 */
|
|
||||||
}
|
|
||||||
.copy-all-btn-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end; /* 使按钮靠右对齐 */
|
|
||||||
margin-top: 10px; /* 添加上边距 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
.background {
|
||||||
display: flex;
|
position: absolute;
|
||||||
justify-content: center; /* 居中对齐 */
|
top: 0;
|
||||||
align-items: center; /* 垂直居中 */
|
left: 0;
|
||||||
gap: 20px; /* 链接之间的间距 */
|
width: 100%;
|
||||||
}
|
height: 100%;
|
||||||
</style>
|
background-size: cover;
|
||||||
|
z-index: -1;
|
||||||
|
transition: opacity 1s ease-in-out;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 600px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-row:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-name {
|
||||||
|
flex-grow: 1;
|
||||||
|
width: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-size {
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #666;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
width: 100px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
display: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-download, .btn-copy {
|
||||||
|
color: #ffffff;
|
||||||
|
width: 50px;
|
||||||
|
height: 25px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-download {
|
||||||
|
background-color: #0d6efd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-copy {
|
||||||
|
background-color: #198754;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-output {
|
||||||
|
margin-top: 15px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-weight: 1000;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-output {
|
||||||
|
/*margin-top: 20px;
|
||||||
|
border: 1px solid #ccc;*/
|
||||||
|
padding: 10px;
|
||||||
|
display: none; /* 默认隐藏 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-output textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
margin-top: 10px;
|
||||||
|
white-space: pre-wrap; /* 自动换行 */
|
||||||
|
overflow-wrap: break-word; /* 强制换行 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="background" id="background"></div>
|
<div class="background" id="bg"></div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title text-center" style="font-weight: bold;">SIW(Simple Image Web)</h4>
|
<h4 class="card-title text-center" style="font-weight: bold;">SIW(Simple Image Web)</h4>
|
||||||
<h6 class="card-title text-center" style="font-weight: bold;">简单就是美。</h6>
|
<h6 class="card-title text-center" style="font-weight: bold;">简单就是美。</h6>
|
||||||
<form id="uploadForm" enctype="multipart/form-data">
|
<form id="uploadForm" enctype="multipart/form-data">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="files" class="form-label"></label>
|
<label for="files" class="form-label"></label>
|
||||||
<input type="file" class="form-control" id="files" name="files[]" multiple accept="image/jpeg, image/png, image/gif, image/webp, image/avif" required>
|
<input type="file" class="form-control" id="files" name="files[]" multiple
|
||||||
</div>
|
accept="image/jpeg, image/png, image/gif, image/webp, image/avif" required>
|
||||||
<button type="submit" class="btn btn-primary w-100" style="font-weight: bold;">开始上传</button>
|
</div>
|
||||||
</form>
|
<button type="submit" class="btn btn-primary w-100" style="font-weight: bold;">开始上传</button>
|
||||||
<div id="fileList" class="file-list mt-3"></div>
|
</form>
|
||||||
<div id="statusOutput" class="status-output"></div>
|
<div id="fileList" class="file-list mt-3"></div>
|
||||||
<div class="link-output">
|
<div id="statusOutput" class="status-output"></div>
|
||||||
<button class="btn btn-info" id="directLinkBtn">直连</button>
|
<div class="link-output">
|
||||||
<button class="btn btn-info" id="htmlCodeBtn">网页</button>
|
<button class="btn btn-info" id="directLinkBtn">直连</button>
|
||||||
<button class="btn btn-info" id="forumCodeBtn">论坛</button>
|
<button class="btn btn-info" id="htmlCodeBtn">网页</button>
|
||||||
<button class="btn btn-info" id="markDownCodeBtn">Markdown</button>
|
<button class="btn btn-info" id="forumCodeBtn">论坛</button>
|
||||||
<button class="btn btn-success" id="copyAllBtn">复制所有链接</button>
|
<button class="btn btn-info" id="markDownCodeBtn">Markdown</button>
|
||||||
<textarea id="linkText" readonly></textarea>
|
<button class="btn btn-success" id="copyAllBtn">复制所有链接</button>
|
||||||
|
<textarea id="linkText" readonly></textarea>
|
||||||
|
</div>
|
||||||
|
<h6 id="formatHint" class="card-title text-center">支持格式: JPEG, PNG, GIF, WEBP, AVIF
|
||||||
|
最大上传:<?php echo ini_get('upload_max_filesize'); ?></h6>
|
||||||
</div>
|
</div>
|
||||||
<h6 id="formatHint" class="card-title text-center">支持格式: JPEG, PNG, GIF, WEBP, AVIF 最大上传:<?php echo ini_get('upload_max_filesize');?></h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
async function setBackgroundImages() {
|
$(document).ready(function () {
|
||||||
// 取必应每天的壁纸做背景
|
$.ajax({url:"https://raw.onmicrosoft.cn/Bing-Wallpaper-Action/main/data/zh-CN_all.json",dataType: 'json',success:function(result){
|
||||||
var response = await fetch('https://raw.onmicrosoft.cn/Bing-Wallpaper-Action/main/data/zh-CN_all.json');
|
$('#bg').css({"background":"url(https://www.bing.com/"+ result.data[Math.floor(Math.random() * result.data.length)].url +")"});
|
||||||
var data = await response.json();
|
}}); // 设置背景
|
||||||
var images = data.data.map(image => image.url);
|
// 初始化时显示格式提示
|
||||||
var backgroundDiv = document.getElementById('background');
|
$('#formatHint, #serverWarning, #navLinks').show();
|
||||||
var baseurl = 'https://www.bing.com/';
|
|
||||||
if (images.length > 0) {
|
|
||||||
backgroundDiv.style.backgroundImage = 'url(' + baseurl + images[0] + ')';
|
|
||||||
}
|
|
||||||
let index = 0;
|
|
||||||
let currentBackgroundDiv = backgroundDiv;
|
|
||||||
setInterval(() => {
|
|
||||||
const nextIndex = (index + 1) % images.length;
|
|
||||||
const nextBackgroundDiv = document.createElement('div');
|
|
||||||
nextBackgroundDiv.className = 'background next';
|
|
||||||
nextBackgroundDiv.style.backgroundImage = 'url(' + baseurl + images[nextIndex] + ')';
|
|
||||||
document.body.appendChild(nextBackgroundDiv);
|
|
||||||
nextBackgroundDiv.style.opacity = 0;
|
|
||||||
setTimeout(() => {
|
|
||||||
nextBackgroundDiv.style.opacity = 1;
|
|
||||||
}, 50);
|
|
||||||
setTimeout(() => {
|
|
||||||
document.body.removeChild(currentBackgroundDiv);
|
|
||||||
currentBackgroundDiv = nextBackgroundDiv;
|
|
||||||
index = nextIndex;
|
|
||||||
if(index>10)index=0;// 只取前十张
|
|
||||||
}, 1000);
|
|
||||||
}, 5000);
|
|
||||||
|
|
||||||
}
|
$('#files').on('change', function () {
|
||||||
|
if (this.files.length > 0) {
|
||||||
|
$('#formatHint, #serverWarning, #navLinks').hide(); // 隐藏提示信息
|
||||||
|
} else {
|
||||||
|
$('#formatHint, #serverWarning, #navLinks').show(); // 显示提示信息
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let uploadedLinks = [];
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 清除输出信息的函数
|
||||||
|
function clearOutput() {
|
||||||
|
$('#fileList').empty();
|
||||||
|
$('#statusOutput').text('当前状态: 等待上传...');
|
||||||
|
$('.link-output').hide();
|
||||||
|
$('#linkText').val('');
|
||||||
|
uploadedLinks = [];
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
// 点击选择文件框时清除输出信息
|
||||||
setBackgroundImages();// 设置背景
|
$('#files').on('click', function () {
|
||||||
// 初始化时显示格式提示
|
clearOutput();
|
||||||
$('#formatHint, #serverWarning, #navLinks').show();
|
});
|
||||||
|
$('#files').on('change', function () {
|
||||||
|
clearOutput();
|
||||||
|
var files = this.files;
|
||||||
|
// 允许的文件类型
|
||||||
|
var validFormats = ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif'];
|
||||||
|
var validFiles = Array.from(files).filter(file => validFormats.includes(file.type));
|
||||||
|
|
||||||
$('#files').on('change', function() {
|
if (validFiles.length === 0) {
|
||||||
if (this.files.length > 0) {
|
showAlert('请选择有效的图片文件(JPEG, PNG, GIF,WEBP,AVIF)!');
|
||||||
$('#formatHint, #serverWarning, #navLinks').hide(); // 隐藏提示信息
|
$('#files').val(''); // 清空文件选择
|
||||||
} else {
|
return;
|
||||||
$('#formatHint, #serverWarning, #navLinks').show(); // 显示提示信息
|
}
|
||||||
}
|
$.each(validFiles, function (index, file) {
|
||||||
});
|
var fileSize = (file.size / (1024 * 1024)).toFixed(2) + ' MB';
|
||||||
});
|
var fileRow = `
|
||||||
let uploadedLinks = [];
|
|
||||||
$(document).ready(function () {
|
|
||||||
// 清除输出信息的函数
|
|
||||||
function clearOutput() {
|
|
||||||
$('#fileList').empty();
|
|
||||||
$('#statusOutput').text('当前状态: 等待上传...');
|
|
||||||
$('.link-output').hide();
|
|
||||||
$('#linkText').val('');
|
|
||||||
uploadedLinks = [];
|
|
||||||
}
|
|
||||||
// 点击选择文件框时清除输出信息
|
|
||||||
$('#files').on('click', function () {
|
|
||||||
clearOutput();
|
|
||||||
});
|
|
||||||
$('#files').on('change', function () {
|
|
||||||
clearOutput();
|
|
||||||
var files = this.files;
|
|
||||||
// 允许的文件类型
|
|
||||||
var validFormats = ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif'];
|
|
||||||
var validFiles = Array.from(files).filter(file => validFormats.includes(file.type));
|
|
||||||
|
|
||||||
if (validFiles.length === 0) {
|
|
||||||
showAlert('请选择有效的图片文件(JPEG, PNG, GIF,WEBP,AVIF)!');
|
|
||||||
$('#files').val(''); // 清空文件选择
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.each(validFiles, function (index, file) {
|
|
||||||
var fileSize = (file.size / (1024 * 1024)).toFixed(2) + ' MB';
|
|
||||||
var fileRow = `
|
|
||||||
<div class="file-row" id="file-row-${index}">
|
<div class="file-row" id="file-row-${index}">
|
||||||
<span class="file-name">${file.name}</span>
|
<span class="file-name">${file.name}</span>
|
||||||
<span class="file-size">(${fileSize})</span>
|
<span class="file-size">(${fileSize})</span>
|
||||||
@ -285,201 +311,202 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
$('#fileList').append(fileRow);
|
$('#fileList').append(fileRow);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('#uploadForm').on('submit', function (event) {
|
$('#uploadForm').on('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var files = $('#files')[0].files;
|
var files = $('#files')[0].files;
|
||||||
var fileIndex = 0;
|
var fileIndex = 0;
|
||||||
function uploadNextFile() {
|
|
||||||
if (fileIndex < files.length) {
|
function uploadNextFile() {
|
||||||
var formData = new FormData();
|
if (fileIndex < files.length) {
|
||||||
formData.append('file', files[fileIndex]);
|
var formData = new FormData();
|
||||||
var xhr = new XMLHttpRequest();
|
formData.append('file', files[fileIndex]);
|
||||||
xhr.open("POST", '', true);
|
var xhr = new XMLHttpRequest();
|
||||||
var startTime;
|
xhr.open("POST", '', true);
|
||||||
xhr.upload.addEventListener('progress', function (evt) {
|
var startTime;
|
||||||
if (evt.lengthComputable) {
|
xhr.upload.addEventListener('progress', function (evt) {
|
||||||
if (!startTime) startTime = new Date();
|
if (evt.lengthComputable) {
|
||||||
var percentComplete = Math.round((evt.loaded / evt.total) * 100);
|
if (!startTime) startTime = new Date();
|
||||||
var elapsedTime = (new Date() - startTime) / 1000;
|
var percentComplete = Math.round((evt.loaded / evt.total) * 100);
|
||||||
var speed = (evt.loaded / 1024 / 1024) / elapsedTime;
|
var elapsedTime = (new Date() - startTime) / 1000;
|
||||||
var fileRow = $('#file-row-' + fileIndex);
|
var speed = (evt.loaded / 1024 / 1024) / elapsedTime;
|
||||||
fileRow.find('.progress-status').text(` ${speed.toFixed(2)} MB/s`);
|
var fileRow = $('#file-row-' + fileIndex);
|
||||||
fileRow.find('.progress').show();
|
fileRow.find('.progress-status').text(` ${speed.toFixed(2)} MB/s`);
|
||||||
fileRow.find('.progress-bar').css('width', percentComplete + '%').text(percentComplete + '%');
|
fileRow.find('.progress').show();
|
||||||
var container = $('#fileList');
|
fileRow.find('.progress-bar').css('width', percentComplete + '%').text(percentComplete + '%');
|
||||||
var targetRow = $('#file-row-' + fileIndex);
|
var container = $('#fileList');
|
||||||
var targetTop = targetRow[0].offsetTop;
|
var targetRow = $('#file-row-' + fileIndex);
|
||||||
var containerHeight = container.height();
|
var targetTop = targetRow[0].offsetTop;
|
||||||
var rowHeight = targetRow.outerHeight();
|
var containerHeight = container.height();
|
||||||
var scrollTo = targetTop - (containerHeight / 1) + (rowHeight / 2);
|
var rowHeight = targetRow.outerHeight();
|
||||||
scrollTo = Math.max(0, Math.min(scrollTo, container[0].scrollHeight - containerHeight));
|
var scrollTo = targetTop - (containerHeight / 1) + (rowHeight / 2);
|
||||||
container.stop().animate({ scrollTop: scrollTo }, 200);
|
scrollTo = Math.max(0, Math.min(scrollTo, container[0].scrollHeight - containerHeight));
|
||||||
if (percentComplete === 100) {
|
container.stop().animate({scrollTop: scrollTo}, 200);
|
||||||
setTimeout(function () {
|
if (percentComplete === 100) {
|
||||||
if (xhr.readyState !== XMLHttpRequest.DONE) {
|
setTimeout(function () {
|
||||||
fileRow.find('.progress-status').text('处理中请稍等');
|
if (xhr.readyState !== XMLHttpRequest.DONE) {
|
||||||
}
|
fileRow.find('.progress-status').text('处理中请稍等');
|
||||||
}, 100);
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
xhr.onreadystatechange = function () {
|
||||||
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||||
|
var fileRow = $('#file-row-' + fileIndex);
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
if (result.upload_url) {
|
||||||
|
uploadedLinks.push(result.upload_url);
|
||||||
|
fileRow.find('.progress-status').text('处理完成');
|
||||||
|
fileRow.find('.progress').hide();
|
||||||
|
var linkHtml = `<a href="${result.upload_url}" target="_blank" class="btn btn-info btn-download">预览</a>
|
||||||
|
<button class="btn btn-success btn-copy copyButton" data-url="${result.upload_url}">复制</button>`;
|
||||||
|
fileRow.append(linkHtml);
|
||||||
|
setTimeout(function () {
|
||||||
|
fileRow.find('.progress-status').text('成功上传');
|
||||||
|
}, 100);
|
||||||
|
showLinkOutput();
|
||||||
|
} else if (result.error) {
|
||||||
|
fileRow.find('.progress-status').text('上传失败: ' + result.error);
|
||||||
|
$('#statusOutput').text('上传中断: ' + result.error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fileRow.find('.progress-status').text('错误信息: ' + xhr.statusText);
|
||||||
|
$('#statusOutput').text('上传中断: ' + xhr.statusText);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fileIndex++;
|
||||||
|
uploadNextFile();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.send(formData);
|
||||||
|
} else {
|
||||||
|
$('#statusOutput').text('上传任务操作完成');
|
||||||
|
$('#files').val(''); // 清空文件选择
|
||||||
|
}
|
||||||
|
if(fileIndex<files.length-1)$('#statusOutput').text(`当前状态: 正在上传 ${files[fileIndex].name}`);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
xhr.onreadystatechange = function () {
|
|
||||||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
||||||
var fileRow = $('#file-row-' + fileIndex);
|
|
||||||
if (xhr.status === 200) {
|
|
||||||
var result = JSON.parse(xhr.responseText);
|
|
||||||
if (result.upload_url) {
|
|
||||||
uploadedLinks.push(result.upload_url);
|
|
||||||
fileRow.find('.progress-status').text('处理完成');
|
|
||||||
fileRow.find('.progress').hide();
|
|
||||||
var linkHtml = `
|
|
||||||
<a href="${result.upload_url}" target="_blank" class="btn btn-info btn-download">预览</a>
|
|
||||||
<button class="btn btn-success btn-copy copyButton" data-url="${result.upload_url}">复制</button>
|
|
||||||
`;
|
|
||||||
fileRow.append(linkHtml);
|
|
||||||
setTimeout(function() {
|
|
||||||
fileRow.find('.progress-status').text('成功上传');
|
|
||||||
}, 100);
|
|
||||||
showLinkOutput();
|
|
||||||
} else if (result.error) {
|
|
||||||
fileRow.find('.progress-status').text('上传失败: ' + result.error);
|
|
||||||
$('#statusOutput').text('上传中断: ' + result.error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fileRow.find('.progress-status').text('错误信息: ' + xhr.statusText);
|
|
||||||
$('#statusOutput').text('上传中断: ' + xhr.statusText);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fileIndex++;
|
|
||||||
uploadNextFile();
|
uploadNextFile();
|
||||||
}
|
});
|
||||||
};
|
|
||||||
xhr.send(formData);
|
|
||||||
} else {
|
|
||||||
$('#statusOutput').text('上传任务操作完成');
|
|
||||||
$('#files').val(''); // 清空文件选择
|
|
||||||
}
|
|
||||||
$('#statusOutput').text(`当前状态: 正在上传 ${files[fileIndex].name}`);
|
|
||||||
}
|
|
||||||
uploadNextFile();
|
|
||||||
});
|
|
||||||
function showLinkOutput() {
|
|
||||||
$('.link-output').show();
|
|
||||||
$('#linkText').val(uploadedLinks.join('\n')); // 显示所有链接
|
|
||||||
$('#linkText').scrollTop($('#linkText')[0].scrollHeight);
|
|
||||||
}
|
|
||||||
function showAlert(message) {
|
|
||||||
var tooltip = document.createElement('div');
|
|
||||||
tooltip.style.position = 'fixed';
|
|
||||||
tooltip.style.background = '#ffffff';
|
|
||||||
tooltip.style.border = '2px solid #0d6efd';
|
|
||||||
tooltip.style.padding = '10px';
|
|
||||||
tooltip.style.zIndex = 1000;
|
|
||||||
tooltip.style.left = '50%';
|
|
||||||
tooltip.style.top = '50%';
|
|
||||||
tooltip.style.transform = 'translate(-50%, -50%)';
|
|
||||||
tooltip.innerHTML = '<strong>' + message + '</strong>';
|
|
||||||
document.body.appendChild(tooltip);
|
|
||||||
setTimeout(function () {
|
|
||||||
document.body.removeChild(tooltip);
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#directLinkBtn').on('click', function () {
|
function showLinkOutput() {
|
||||||
$('#linkText').val(uploadedLinks.join('\n'));
|
$('.link-output').show();
|
||||||
});
|
$('#linkText').val(uploadedLinks.join('\n')); // 显示所有链接
|
||||||
|
$('#linkText').scrollTop($('#linkText')[0].scrollHeight);
|
||||||
|
}
|
||||||
|
|
||||||
$('#htmlCodeBtn').on('click', function () {
|
function showAlert(message) {
|
||||||
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
var tooltip = document.createElement('div');
|
||||||
$('#linkText').val(htmlCodes);
|
tooltip.style.position = 'fixed';
|
||||||
});
|
tooltip.style.background = '#ffffff';
|
||||||
|
tooltip.style.border = '2px solid #0d6efd';
|
||||||
|
tooltip.style.padding = '10px';
|
||||||
|
tooltip.style.zIndex = 1000;
|
||||||
|
tooltip.style.left = '50%';
|
||||||
|
tooltip.style.top = '50%';
|
||||||
|
tooltip.style.transform = 'translate(-50%, -50%)';
|
||||||
|
tooltip.innerHTML = '<strong>' + message + '</strong>';
|
||||||
|
document.body.appendChild(tooltip);
|
||||||
|
setTimeout(function () {
|
||||||
|
document.body.removeChild(tooltip);
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
$('#forumCodeBtn').on('click', function () {
|
$('#directLinkBtn').on('click', function () {
|
||||||
const forumCodes = uploadedLinks.map(url => `[img]${url}[/img]`).join('\n');
|
$('#linkText').val(uploadedLinks.join('\n'));
|
||||||
$('#linkText').val(forumCodes);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$('#markDownCodeBtn').on('click', function () {
|
$('#htmlCodeBtn').on('click', function () {
|
||||||
const forumCodes = uploadedLinks.map(url => `![${url.replace(/^.*[\\\/]/, '')}](${url})`).join('\n');
|
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
||||||
$('#linkText').val(forumCodes);
|
$('#linkText').val(htmlCodes);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#htmlCodeBtn').on('click', function () {
|
$('#forumCodeBtn').on('click', function () {
|
||||||
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
const forumCodes = uploadedLinks.map(url => `[img]${url}[/img]`).join('\n');
|
||||||
$('#linkText').val(htmlCodes);
|
$('#linkText').val(forumCodes);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#htmlCodeBtn').on('click', function () {
|
$('#markDownCodeBtn').on('click', function () {
|
||||||
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
const forumCodes = uploadedLinks.map(url => `![${url.replace(/^.*[\\\/]/, '')}](${url})`).join('\n');
|
||||||
$('#linkText').val(htmlCodes);
|
$('#linkText').val(forumCodes);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#copyAllBtn').on('click', function () {
|
$('#htmlCodeBtn').on('click', function () {
|
||||||
var copyText = $('#linkText').val();
|
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
||||||
var tempInput = document.createElement('textarea');
|
$('#linkText').val(htmlCodes);
|
||||||
tempInput.value = copyText;
|
});
|
||||||
document.body.appendChild(tempInput);
|
|
||||||
tempInput.select();
|
|
||||||
document.execCommand("copy");
|
|
||||||
document.body.removeChild(tempInput);
|
|
||||||
|
|
||||||
var links = copyText.split('\n');
|
$('#htmlCodeBtn').on('click', function () {
|
||||||
var totalLinks = links.length;
|
const htmlCodes = uploadedLinks.map(url => `<img src="${url}">`).join('\n');
|
||||||
var displayedLinks = links.slice(0, 10);
|
$('#linkText').val(htmlCodes);
|
||||||
var ignoredCount = totalLinks > 10 ? totalLinks - 10 : 0;
|
});
|
||||||
|
|
||||||
var tooltip = document.createElement('div');
|
$('#copyAllBtn').on('click', function () {
|
||||||
tooltip.style.position = 'fixed';
|
var copyText = $('#linkText').val();
|
||||||
tooltip.style.background = '#ffffff';
|
var tempInput = document.createElement('textarea');
|
||||||
tooltip.style.border = '2px solid #0d6efd';
|
tempInput.value = copyText;
|
||||||
tooltip.style.padding = '10px';
|
document.body.appendChild(tempInput);
|
||||||
tooltip.style.zIndex = 1000;
|
tempInput.select();
|
||||||
tooltip.style.left = '50%';
|
document.execCommand("copy");
|
||||||
tooltip.style.top = '50%';
|
document.body.removeChild(tempInput);
|
||||||
tooltip.style.transform = 'translate(-50%, -50%)';
|
|
||||||
|
|
||||||
tooltip.innerHTML = `<strong>已成功复制所有代码到粘贴板,一共 ${totalLinks} 个链接:</strong><br><code>${displayedLinks.map(link => link.replace(/</g, '<').replace(/>/g, '>')).join('<br>')}</code>`;
|
var links = copyText.split('\n');
|
||||||
|
var totalLinks = links.length;
|
||||||
|
var displayedLinks = links.slice(0, 10);
|
||||||
|
var ignoredCount = totalLinks > 10 ? totalLinks - 10 : 0;
|
||||||
|
|
||||||
if (ignoredCount > 0) {
|
var tooltip = document.createElement('div');
|
||||||
tooltip.innerHTML += `<br><em>提示框仅显示10个,其余${ignoredCount} 个链接也已全部复制到粘贴板</em>`;
|
tooltip.style.position = 'fixed';
|
||||||
}
|
tooltip.style.background = '#ffffff';
|
||||||
|
tooltip.style.border = '2px solid #0d6efd';
|
||||||
|
tooltip.style.padding = '10px';
|
||||||
|
tooltip.style.zIndex = 1000;
|
||||||
|
tooltip.style.left = '50%';
|
||||||
|
tooltip.style.top = '50%';
|
||||||
|
tooltip.style.transform = 'translate(-50%, -50%)';
|
||||||
|
|
||||||
document.body.appendChild(tooltip);
|
tooltip.innerHTML = `<strong>已成功复制所有代码到粘贴板,一共 ${totalLinks} 个链接:</strong><br><code>${displayedLinks.map(link => link.replace(/</g, '<').replace(/>/g, '>')).join('<br>')}</code>`;
|
||||||
|
|
||||||
setTimeout(function () {
|
if (ignoredCount > 0) {
|
||||||
document.body.removeChild(tooltip);
|
tooltip.innerHTML += `<br><em>提示框仅显示10个,其余${ignoredCount} 个链接也已全部复制到粘贴板</em>`;
|
||||||
}, 2200);
|
}
|
||||||
});
|
|
||||||
|
|
||||||
|
document.body.appendChild(tooltip);
|
||||||
|
|
||||||
$(document).on('click', '.copyButton', function () {
|
setTimeout(function () {
|
||||||
var copyText = $(this).data('url');
|
document.body.removeChild(tooltip);
|
||||||
var tempInput = document.createElement('input');
|
}, 2200);
|
||||||
tempInput.value = copyText;
|
});
|
||||||
document.body.appendChild(tempInput);
|
|
||||||
tempInput.select();
|
$(document).on('click', '.copyButton', function () {
|
||||||
document.execCommand("copy");
|
var copyText = $(this).data('url');
|
||||||
document.body.removeChild(tempInput);
|
var tempInput = document.createElement('input');
|
||||||
var tooltip = document.createElement('div');
|
tempInput.value = copyText;
|
||||||
tooltip.style.position = 'fixed';
|
document.body.appendChild(tempInput);
|
||||||
tooltip.style.background = '#ffffff';
|
tempInput.select();
|
||||||
tooltip.style.border = '2px solid #0d6efd';
|
document.execCommand("copy");
|
||||||
tooltip.style.padding = '10px';
|
document.body.removeChild(tempInput);
|
||||||
tooltip.style.zIndex = 1000;
|
var tooltip = document.createElement('div');
|
||||||
tooltip.style.left = '50%';
|
tooltip.style.position = 'fixed';
|
||||||
tooltip.style.top = '50%';
|
tooltip.style.background = '#ffffff';
|
||||||
tooltip.style.transform = 'translate(-50%, -50%)';
|
tooltip.style.border = '2px solid #0d6efd';
|
||||||
tooltip.innerHTML = '<strong>链接已成功复制到粘贴板:</strong><br>' + copyText;
|
tooltip.style.padding = '10px';
|
||||||
document.body.appendChild(tooltip)
|
tooltip.style.zIndex = 1000;
|
||||||
setTimeout(function () {
|
tooltip.style.left = '50%';
|
||||||
document.body.removeChild(tooltip);
|
tooltip.style.top = '50%';
|
||||||
}, 2000);
|
tooltip.style.transform = 'translate(-50%, -50%)';
|
||||||
});
|
tooltip.innerHTML = '<strong>链接已成功复制到粘贴板:</strong><br>' + copyText;
|
||||||
});
|
document.body.appendChild(tooltip)
|
||||||
|
setTimeout(function () {
|
||||||
|
document.body.removeChild(tooltip);
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user