2.4.5 beta 2

pull/18/head
icret 2022-01-13 02:48:08 +08:00
parent 52e929563f
commit 8412ff1405
9 changed files with 1256 additions and 1200 deletions

View File

@ -86,8 +86,14 @@ Deny from all
<details><summary><mark><font color=darkred>点击查看2.0版更新日志</font></mark></summary>
* 2022-1-13 v2.4.5 beta 2
- 修复一处权限问题
- 修复恢复可疑图片
- 增加复制提示
- 增加默认上传后首选显示链接
* 2022-1-3 v2.4.5 beta
- 增加复制提示
- 更新安装代码
- 更改前端样式
- 更新上传格式
@ -103,7 +109,6 @@ Deny from all
- 修复开启前端压缩导致的上传图片异常
- 屏蔽因缺少PHP扩展而不能生成缩略图的格式
* 2021-12-25 v2.4.4
- 更改favicon.ico
- 修复缩略图数量统计

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@
*/
</script>
<footer class="text-muted small col-md-12" style="text-align: center;margin-bottom: 10px"><?php if ($config['ad_bot']) {echo $config['ad_bot_info'];} ?>
<?php echo $config['customize']; ?>
<?php if($config['customize']){echo $config['customize'];}?>
<hr>
<!-- 对话框触发按钮 -->
<a href="#" data-position="center" data-moveable="inside" data-moveable="true" data-toggle="modal" data-target="#myModal">

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,20 @@
// | 把大图缩略到缩略图指定的范围内,不留白(原图会剪切掉不符合比例的右边和下边)
// | https://www.php.cn/php-ask-458473.html
// +----------------------------------------------------------------------
require_once __DIR__ . '/function.php';
require_once __DIR__ . '/class.thumb.php';
$src = isset($_GET['img']) ? APP_ROOT . $_GET['img'] : APP_ROOT . '/public/images/404.png'; // 原图路径
$width = isset($_GET['width']) ? $_GET['width'] : 200; // 预生成缩略图的宽
$height = isset($_GET['height']) ? $_GET['height'] : 200; // 预生成缩略图的高
Thumb::show($src, $width, $height);
if (!file_exists($src)) {
exit('image does not exist');
}
$w = isset($_GET['width']) ? $_GET['width'] : 200; // 预生成缩略图的宽
$h = isset($_GET['height']) ? $_GET['height'] : 200; // 预生成缩略图的高
Thumb::show($src, $w, $h);

View File

@ -16,7 +16,7 @@
* 本人仅为程序开源创作,如非法网站与本人无关,请勿用于非法用途
* 请为本人博客www.545141.com加上网址链接谢谢支持。作为开发者你可以对相应的后台功能进行扩展增删改相应代码,但请保留代码中相关来源信息(例如:本人博客,邮箱等)
* 如果因安装问题或其他问题可以给我发邮件。
*
* 配置分为两大区块 - 1.基础配置 2.图床配置
*/

View File

@ -5,8 +5,8 @@ $config=Array
'keywords'=>'简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序最新html5自适应页面兼容手机电脑上传后返回图片直链markdown图片论坛贴图bbscode链接简单方便支持一键复制支持多域名api上传。',
'tips'=>'本站仅做演示用,不定时清理图片单文件≤5M每次上传≤30张',
'domain'=>'http://localhost',
'imgurl'=>'http://localhost',
'domain'=>'http://192.168.2.100',
'imgurl'=>'http://192.168.2.100',
'user'=>'admin',
'password'=>'e6e061838856bf47e1de730719fb2609',
'mustLogin'=>0,
@ -24,7 +24,7 @@ $config=Array
'waterImg'=>'/public/images/watermark.png',
'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,svg,ico',
'compress'=>0,
'thumbnail'=>0,
'thumbnail'=>1,
'imgConvert'=>'',
'maxWidth'=>10240,
'maxHeight'=>10240,
@ -37,7 +37,7 @@ $config=Array
'imgRatio_crop'=>0,
'imgRatio_preserve_headers'=>1,
'static_cdn'=>0,
'theme'=>'default',
'theme'=>'red',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0',
'TinyImag_key'=>'',
'moderatecontent_key'=>'',
@ -55,7 +55,7 @@ $config=Array
<a href="https://app.cloudcone.com/?ref=3521" target="_blank"><img src="/public/images/ad.jpg" /></a>
</div>
',
'showSwitch'=>0,
'showSwitch'=>1,
'listNumber'=>20,
'customize'=>' <!-- 百度统计代码-->
<script>
@ -66,12 +66,24 @@ $config=Array
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>',
</script>
<!-- 自定义js举例非img.545141.com跳转
<script type= "text/javascript" >rthost=window.location.host;if(rthost!="img.545141.com"){top.location.href="https://img.545141.com/"};</script>-->
<!--自定义代码举例打赏、QQ邮箱、QQ群 可删除
<iframe src="https://img.545141.com/sponsor/index.html" style="overflow-x:hidden;overflow-y:hidden; border:0xp none #fff; min-height:240px; width:100%;" frameborder="0" scrolling="no"></iframe>
<a target="_blank" href="https://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=cR0UHB4fGBwxAABfEh4c">
<i class="icon icon-envelope-alt">联系邮箱 </i>
</a>
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f">
<i class="icon icon-qq">加入QQ群</i>
</a>
<a target="_blank" href="/master.zip"><i class="icon icon-download-alt">下载源码</i></a>-->',
'checkEnv'=>1,
'checkImg'=>1,
'checkImg_value'=>50,
'upload_logs'=>1,
'cache_freq'=>2,
'first_show'=>1,
'version'=>'2.4.5 bate',
'form'=>'2022-01-05 18:27:18'
'form'=>'2022-01-13 02:26:57'
);

View File

@ -29,44 +29,44 @@ mustLogin();
</div>
<div class="col-md-10 col-md-offset-1">
<ul class="nav nav-tabs">
<li class="active">
<li <?php if($config['first_show']==1){echo 'class="active"';}?>>
<a href="#" data-target="#tab2Content1" data-toggle="tab"><i class="icon icon-link"> 直链</i></a>
</li>
<li>
<li <?php if($config['first_show']==2){echo 'class="active"';}?>>
<a href="#" data-target="#tab2Content2" data-toggle="tab"><i class="icon icon-chat"> 论坛代码</i></a>
</li>
<li>
<li <?php if($config['first_show']==3){echo 'class="active"';}?>>
<a href="#" data-target="#tab2Content3" data-toggle="tab"><i class="icon icon-code"> MarkDown</i></a>
</li>
<li>
<li <?php if($config['first_show']==4){echo 'class="active"';}?>>
<a href="#" data-target="#tab2Content4" data-toggle="tab"><i class="icon icon-html5"> HTML</i></a>
</li>
<li>
<li <?php if($config['first_show']==5){echo 'class="active"';}?>>
<a href="#" data-target="#tab2Content5" data-toggle="tab"><i class="icon icon-trash"> 删除</i></a>
</li>
</ul>
<div class="tab-content" style="text-align:right">
<div class="tab-pane fade active in" id="tab2Content1">
<div class="tab-pane fade <?php if($config['first_show']==1){echo 'active in';}?>" id="tab2Content1">
<textarea class="form-control" rows="5" id="links" readonly></textarea>
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
<button id="btnLinks" class="btn copyBtn1" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
</div>
<div class="tab-pane fade" id="tab2Content2">
<div class="tab-pane fade <?php if($config['first_show']==2){echo 'active in';}?>" id="tab2Content2">
<textarea class="form-control" rows="5" id="bbscode" readonly></textarea>
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
<button id="btnBbscode" class="btn copyBtn2" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
</div>
<div class="tab-pane fade" id="tab2Content3">
<div class="tab-pane fade <?php if($config['first_show']==3){echo 'active in';}?>" id="tab2Content3">
<textarea class="form-control" rows="5" id="markdown" readonly></textarea>
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
<button id="btnMarkDown" class="btn copyBtn3" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
</div>
<div class="tab-pane fade" id="tab2Content4">
<div class="tab-pane fade <?php if($config['first_show']==4){echo 'active in';}?>" id="tab2Content4">
<textarea class="form-control" rows="5" id="html" readonly></textarea>
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
<button id="btnHtml" class="btn copyBtn4" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
</div>
<div class="tab-pane fade" id="tab2Content5">
<div class="tab-pane fade <?php if($config['first_show']==5){echo 'active in';}?>" id="tab2Content5">
<pre><textarea class="form-control" rows="5" id="del" readonly></textarea></pre>
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
<button id="btndel" class="btn copyBtn5" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>

View File

@ -9,6 +9,9 @@ copyBtn.onclick = function () {
try {
if (document.execCommand('copy', false, null)) {
//success info
new $.zui.Messager("复制成功", {
type: "primary" // 定义颜色主题
}).show();
console.log("复制成功");
} else {
//fail info
@ -27,6 +30,9 @@ copyBtn.onclick = function () {
try {
if (document.execCommand('copy', false, null)) {
//success info
new $.zui.Messager("复制成功", {
type: "primary" // 定义颜色主题
}).show();
console.log("复制成功");
} else {
//fail info
@ -45,6 +51,9 @@ copyBtn.onclick = function () {
try {
if (document.execCommand('copy', false, null)) {
//success info
new $.zui.Messager("复制成功", {
type: "primary" // 定义颜色主题
}).show();
console.log("复制成功");
} else {
//fail info
@ -63,6 +72,9 @@ copyBtn.onclick = function () {
try {
if (document.execCommand('copy', false, null)) {
//success info
new $.zui.Messager("复制成功", {
type: "primary" // 定义颜色主题
}).show();
console.log("复制成功");
} else {
//fail info
@ -81,6 +93,9 @@ copyBtn.onclick = function () {
try {
if (document.execCommand('copy', false, null)) {
//success info
new $.zui.Messager("复制成功", {
type: "primary" // 定义颜色主题
}).show();
console.log("复制成功");
} else {
//fail info