ImgURL是一个简单、纯粹的图床程序,让个人图床多一个选择。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

203 lines
7.8 KiB

<!DOCTYPE html>
<html lang="zh-cmn-Hans" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>ImgURL - 简单、纯粹的图床程序。</title>
<meta name="generator" content="EverEdit" />
<meta name="author" content="xiaoz.me" />
<meta name="keywords" content="ImgURL,免费图床,图床程序,小z图床,XZ Pic" />
<meta name="description" content="ImgURL是一个简单、纯粹的图床程序,让个人图床多一个选择。" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="Bookmark" href="favicon.ico" />
<link rel="stylesheet" href="./static/layui/css/layui.css">
<link rel="stylesheet" href="./static/style.css?v=1.2">
<script src = "https://libs.xiaoz.top/clipBoard.js/clipBoard.min.js"></script>
<style type="text/css" media="screen">
#imgbtn{
display: none;
}
</style>
</head>
<body>
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-lg12 layui-col-xs12">
<div class="msg"><i class="layui-icon">&#xe645;</i> 注意:您上传的图片将会公开显示,勿上传隐私图片。此项目依赖于:<a href="https://imgurl.org/" target = "_blank">https://imgurl.org/</a></div>
<!--选项卡测试-->
<div class="layui-tab layui-tab-brief" lay-filter="uptab">
<ul class="layui-tab-title">
<li class="layui-this">ImgURL</li>
<li>SM.MS</li>
<li>关于</li>
</ul>
<div class="layui-tab-content">
<!--上传到ImgURL-->
<div class="layui-tab-item layui-show">
<!-- 上传图片表单 -->
<div class="layui-upload-drag" id="upimg">
<i class="layui-icon">&#xe67c;</i>
<p>将图片拖拽到此处,或将鼠标移动到这里支持Ctrl + V上传</p>
</div>
<!-- 上传图片表单END -->
</div>
<!--上传到sm.ms-->
<div class="layui-tab-item">
<div class = "smfile">
<a href="javascript:;" class="file">
<input type="file" name="smfile" id="sm">
<i class="layui-icon" style = "font-size:6em;">&#xe67c;</i>
</a>
</div>
</div>
<!--捐赠-->
<div class="layui-tab-item">
<h1>ImgURL</h1>
<p>ImgURL是一款简洁、纯粹的图床程序,使用PHP + Sqlite开发,开箱即用。</p>
<br /><h2>主要功能</h2><br />
<ul>
<li>拽拖上传图片、实时预览</li>
<li>一键生成链接,一键复制</li>
<li>图片管理</li>
<li>TinyPNG图片压缩</li>
<li>图片智能鉴黄</li>
</ul>
<br /><h2>使用说明</h2><br />
<ul>
<li>图片最大上传限制为2M</li>
<li>游客每天限制上传10张图片</li>
<li>勿上传暴力、色情、反动图片,否则后果自负</li>
<li>如果您使用ImgURL代表同意以上协议</li>
</ul>
<br /><h2>联系我</h2><br />
<ul>
<li>Blog:<a href = "https://www.xiaoz.me/" target = "_blank">https://www.xiaoz.me/</a></li>
<li>QQ:337003006</li>
</ul>
<br />
<p>扫描下方二维码请我喝一杯咖啡</p><br />
<p><img src="https://imgurl.org/upload/1712/cb349aa4a1b95997.png" alt=""></p>
</div>
<!--捐赠-->
</div>
</div>
<!--选项卡END-->
</div>
</div>
<div style = "clear:both;"></div>
<!-- 图片上传成功 -->
<div class="layui-row" id = "upok" style = "margin-top:1em;">
<div>
<div id="showpic" class = "layui-col-lg5"><a href="" target = "_blank"><img src=""></a></div>
<div id="piclink" class = "layui-col-lg6 layui-col-md-offset1">
<table class="layui-table" lay-skin="nob">
<colgroup>
<col width="80">
<col width="400">
<col>
</colgroup>
<tbody>
<tr>
<td>URL</td>
<td><input type="text" class="layui-input" id = "url"></td>
<td><a href="javascript:;" class = "layui-btn layui-btn-sm" onclick = "copy('url')">复制</a></td>
</tr>
<tr>
<td>HTML</td>
<td><input type="text" class="layui-input" id = "html"></td>
<td><a href="javascript:;" class = "layui-btn layui-btn-sm" onclick = "copy('html')">复制</a></td>
</tr>
<tr>
<td>MarkDown</td>
<td><input type="text" class="layui-input" id = "markdown"></td>
<td><a href="javascript:;" class = "layui-btn layui-btn-sm" onclick = "copy('markdown')">复制</a></td>
</tr>
<tr>
<td>BBcode</td>
<td><input type="text" class="layui-input" id = "bbcode"></td>
<td><a href="javascript:;" class = "layui-btn layui-btn-sm" onclick = "copy('bbcode')">复制</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- 图片上传成功END -->
</div>
<div style = "clear:both;"></div>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src = "./static/index.js"></script>
<script src="./static/layui/layui.js"></script>
<script src="./static/embed.js?v=1.2"></script>
<script>
//隐藏按钮
//setTimeout('$("#imgbtn").remove()',100)
layui.use(['element','layer'],function(){
var element = layui.element;
var layer = layui.layer;
element.on('tab(uptab)', function(data){
//console.log(this); //当前Tab标题所在的原始DOM元素
//console.log(data.index); //得到当前Tab的所在下标
//console.log(data.elem); //得到当前的Tab大容器
});
});
var load1 = document.querySelector("body");
// 实例化即可
new ctrlVUtil({
uploadUrl: "functions/cvupload.php",
targetElement: load1,
isCompleteImg:false,
data:{
name:"alanzhang",
},
success:function(data){
//转为对象
var res = data;
//上传成功
if(res.code == 1){
layer.closeAll('loading');
$("#showpic a").attr('href',res.url);
$("#showpic img").attr('src',res.url);
$("#url").val(res.url);
$("#html").val("<img src = '" + res.url + "' />");
$("#markdown").val("![](" + res.url + ")");
$("#bbcode").val("[img]" + res.url + "[/img]");
$("#upok").show();
//请求接口处理图片
$.get("./dispose.php?id="+res.id,function(data,status){
var obj = eval('(' + data + ')');
if(obj.level == 3){
layer.open({
title: '温馨提示'
,content: '请勿上传违规图片!'
});
}
if(obj.level == null){
$.get("./dispose.php?id="+res.id,function(data,status){
var obj = eval('(' + data + ')');
if(obj.level == 3){
layer.open({
title: '温馨提示'
,content: '请勿上传违规图片!'
});
}
});
}
});
}
else{
layer.msg(res.msg);
}
},
error: function(error){
layer.closeAll('loading');
alert("上传失败!");
}
});
</script>
</body>
</html>