Skip to content

Commit c6cd454

Browse files
committed
v2.6.6
1 parent 313ce88 commit c6cd454

File tree

144 files changed

+353
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+353
-132
lines changed

README.md

100644100755
+6
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ $HTTP["url"] =~ "^/(i|public)/" {
180180

181181
<details><summary>点击查看2.0版更新日志</summary>
182182

183+
* 2022-07-09 v2.6.6
184+
- 增加图片信息显示随机图片
185+
- 增加文件雪花命名
186+
- 增加举报入口
187+
- 更新组件
188+
183189
* 2022-05-27 v2.6.5
184190
- 更改文件位置
185191

admin/admin.inc.php

100644100755
+17-8
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@
337337
<option value="unix" <?php if ($config['imgName'] == 'unix') echo 'selected'; ?>>Unix >> 1635074840</option>
338338
<option value="crc32" <?php if ($config['imgName'] == 'crc32') echo 'selected'; ?>>CRC32 >> 2495551279</option>
339339
<option value="uniqid" <?php if ($config['imgName'] == 'uniqid') echo 'selected'; ?>>微秒 >> 6175436c73418</option>
340-
<option value="source" <?php if ($config['imgName'] == 'source') echo 'selected'; ?>>源文件名 >> 微信图片_20211228214754</option>
340+
<option value="snowflake" <?php if ($config['imgName'] == 'snowflake') echo 'selected'; ?>>雪花 >> 5357520647037653166</option>
341+
<option value="source" <?php if ($config['imgName'] == 'source') echo 'selected'; ?>>源名 >> 微信图片_20211228214754</option>
341342
<option value="md5" <?php if ($config['imgName'] == 'md5') echo 'selected'; ?>>MD5 >> 3888aa69eb321a2b61fcc63520bf6c82</option>
342343
<option value="sha1" <?php if ($config['imgName'] == 'sha1') echo 'selected'; ?>>SHA1 >> 654faac01499e0cb5fb0e9d78b21e234c63d842a</option>
343344
<option value="guid" <?php if ($config['imgName'] == 'guid') echo 'selected'; ?>>全局唯一标识符 >> 6EDAD0CC-AB0C-4F61-BCCA-05FAD65BF0FA</option>
@@ -780,7 +781,7 @@
780781
<a href="https://github.com/verot/class.upload.php" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="文件管理">Tinyfilemanager</span></a>
781782
<span class="label label-badge label-success" data-toggle="tooltip" title="当前版本"><?php echo get_current_verson(); ?></span>
782783
<?php if (getVersion() !== get_current_verson()) : ?>
783-
<a href="#NewVersion" data-toggle="collapse" class="label label-badge label-warning" title="Github有更新"><?php echo getVersion(); ?> New</span></a>
784+
<a href="#NewVersion" data-toggle="collapse" class="label label-badge label-warning" title="Github有更新"><?php echo getVersion(); ?></span><i class="icon icon-angle-down"></i></a>
784785
<?php endif; ?>
785786
<a href="https://github.com/icret/EasyImages2.0/blob/master/LICENSE" target="_blank"><span class="label label-badge" data-toggle="tooltip" title="许可证">GPL-2.0</span></a>
786787
</p>
@@ -842,16 +843,21 @@
842843
<input type="checkbox" name="showSort" value="1" <?php if ($config['showSort']) echo 'checked="checked"'; ?>>
843844
<label style="font-weight: bold">排序</label>
844845
</div>
845-
<div class="switch switch-inline" data-toggle="tooltip" title="广场图片详细信息按钮">
846-
<input type="hidden" name="show_exif_info" value="0">
847-
<input type="checkbox" name="show_exif_info" value="1" <?php if ($config['show_exif_info']) echo 'checked="checked"'; ?>>
848-
<label style="font-weight: bold">详息</label>
849-
</div>
850846
<div class="switch switch-inline" data-toggle="tooltip" title="图片过多时可能会影响统计时间">
851847
<input type="hidden" name="chart_on" value="0">
852848
<input type="checkbox" name="chart_on" value="1" <?php if ($config['chart_on']) echo 'checked="checked"'; ?>>
853849
<label style="font-weight: bold">统计</label>
854850
</div>
851+
<div class="switch switch-inline" data-toggle="tooltip" title="广场图片详细信息按钮">
852+
<input type="hidden" name="show_exif_info" value="0">
853+
<input type="checkbox" name="show_exif_info" value="1" <?php if ($config['show_exif_info']) echo 'checked="checked"'; ?>>
854+
<label style="font-weight: bold">详情页</label>
855+
</div>
856+
<div class="switch switch-inline" data-toggle="tooltip" title="图片详细信息显示随机图片">
857+
<input type="hidden" name="info_rand_pic" value="0">
858+
<input type="checkbox" name="info_rand_pic" value="1" <?php if ($config['info_rand_pic']) echo 'checked="checked"'; ?>>
859+
<label style="font-weight: bold">随机图片</label>
860+
</div>
855861
</div>
856862
<div class="form-group">
857863
<label data-toggle="tooltip" title="暂支持中文简繁体转换">界面语言</label>
@@ -880,7 +886,10 @@
880886
<input type="text" class="form-control" id="login_bg" name="login_bg" value="<? if ($config['login_bg']) echo $config['login_bg']; ?>" required="required" placeholder="图片地址可以是相对路径或网址" onkeyup="this.value=this.value.replace(/\s/g,'')">
881887
</div>
882888
<div class="form-group">
883-
889+
<label for="report" data-toggle="tooltip" title="举报图片链接网址 (推荐ZOHO)<br/>留空则不显示">举报链接 | <a href="https://store.zoho.com.cn/referral.do?servicename=ZohoForms&category=ZohoForms&ref=52f8a4e98a7a7d4c2475713784605af0dc842f6cc9732dd77f37b87f2959149e212e550f50a869f70360f15b80a4abc6" target="_blank">申请</a></label>
890+
<input type="text" class="form-control" id="report" name="report" value="<? if ($config['report']) echo $config['report']; ?>" placeholder="可以是网址或邮箱" onkeyup="this.value=this.value.replace(/\s/g,'')">
891+
</div>
892+
<div class="form-group">
884893
<div class="col-md-9">
885894
<label data-toggle="tooltip" title="可在网址后填写参数更改预览数量 eg: /list.php?num=3">广场默认浏览数量 | 当前: </label>
886895
<label id="listNumber"><?php echo $config['listNumber']; ?>张</label>

admin/chart.php

100644100755
File mode changed.

admin/index.php

100644100755
File mode changed.

admin/manager.php

100644100755
File mode changed.

admin/terms.php

100644100755
File mode changed.

admin/verson.txt

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.5
1+
2.6.6

admin/zui.chart.php

100644100755
File mode changed.

api/index.php

100644100755
File mode changed.

api/public.php

100644100755
File mode changed.

application/TimThumb.php

100644100755
File mode changed.

application/WaterMask.php

100644100755
File mode changed.

application/captcha.php

100644100755
File mode changed.

application/chart.php

100644100755
File mode changed.

application/check.php

100644100755
File mode changed.

application/check_admin.inc.php

100644100755
File mode changed.

application/class.snowflake.php

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
/**
4+
* 分布式 id 生成类 组成: <毫秒级时间戳+机器id+序列号>
5+
* 默认情况下41bit的时间戳可以支持该算法使用到2082年,10bit的工作机器id可以支持1023台机器,序列号支持1毫秒产生4095个自增序列id
6+
* @author zhangqi
7+
* @link https://www.cnblogs.com/njccqx/p/13402169.html
8+
*/
9+
class SnowFlake
10+
{
11+
const EPOCH = 1479533469598; //开始时间,固定一个小于当前时间的毫秒数
12+
const max12bit = 4095;
13+
const max41bit = 1099511627775;
14+
15+
static $machineId = 1; // 机器id
16+
17+
public static function machineId($mId = 0)
18+
{
19+
self::$machineId = $mId;
20+
}
21+
22+
public static function createOnlyId()
23+
{
24+
// 时间戳 42字节
25+
$time = floor(microtime(true) * 1000);
26+
// 当前时间 与 开始时间 差值
27+
$time -= self::EPOCH;
28+
// 二进制的 毫秒级时间戳
29+
$base = decbin(self::max41bit + $time);
30+
// 机器id 10 字节
31+
if (!self::$machineId) {
32+
$machineid = self::$machineId;
33+
} else {
34+
$machineid = str_pad(decbin(self::$machineId), 10, "0", STR_PAD_LEFT);
35+
}
36+
// 序列数 12字节
37+
$random = str_pad(decbin(mt_rand(0, self::max12bit)), 12, "0", STR_PAD_LEFT);
38+
// 拼接
39+
$base = $base . $machineid . $random;
40+
// 转化为 十进制 返回
41+
return bindec($base);
42+
}
43+
}
44+
// SnowFlake::machineId("1"); //机器编号
45+
// echo SnowFlake::createOnlyId();//分布式id

application/class.thumb.php

100644100755
File mode changed.

0 commit comments

Comments
 (0)