@@ -565,7 +552,7 @@ if (isset($_GET['reimg'])) {
-
为了访问速度,仅显示最近20张图片;鉴黄需要在安全设置->开启图片鉴黄。
+
为了访问速度,仅显示最近20张图片;鉴黄需要在安全设置->图片鉴黄。
key申请地址: https://client.moderatecontent.com/
获得key后打开->API 设置->Moderate Key->填入
@@ -697,39 +684,47 @@ if (isset($_GET['reimg'])) {
-
-
-
-
-
-
+
+
+
+
+
+
+
+
" placeholder="隐藏的保存">
diff --git a/application/FsockService.php b/application/FsockService.php
deleted file mode 100755
index fbb4a69..0000000
--- a/application/FsockService.php
+++ /dev/null
@@ -1,102 +0,0 @@
- $value) {
- if (is_array($value)) {
- $date[$key] = serialize($value);
- } else {
- $date[$key] = $value;
- }
- }
- }
-
- if ($method == "GET") {
- $query = $date ? http_build_query($date) : '';
- $path .= "?" . $query;
- } else {
- $query = json_encode($date);
- }
-
- //http消息头
- $out = $method . " " . $path . " HTTP/1.1\r\n";
- $out .= "HOST: " . $host . "\r\n";
- if ($method == "POST") {
- $out .= "Content-Length:" . strlen($query) . "\r\n";
- }
- $out .= "Accept: application/json, text/plain, */*\r\n";
- $out .= "Access-Control-Allow-Credentials: true\r\n";
- $out .= "Content-Type: application/x-www-form-urlencoded\r\n";
- $out .= "Connection: Close\r\n\r\n";
- if ($method == "POST") {
- $out .= $query;
- }
-
- fputs($fp, $out);
- usleep(20000);
- //忽略执行结果
- /*while (!feof($fp)) {
- echo fgets($fp, 128);
- }*/
- fclose($fp);
-
- return true;
-}
-/*
-$p = array(
- 'test'=>1222,
- 'test1'=>2222,
- );
-var_dump(request_asynchronous('/test.php', 'GET', $p, 'https://png.cm'));
-*/
\ No newline at end of file
diff --git a/application/function.php b/application/function.php
index de709a2..8b1a779 100755
--- a/application/function.php
+++ b/application/function.php
@@ -139,7 +139,7 @@ function imgName($source = null)
return sha1(microtime());
break;
default:
- return base_convert(date('His') . mt_rand(1024, 9999), 10, 36); // 将上传时间+随机数转换为36进制 例:vx77yu
+ return base_convert(date('His') . mt_rand(1001, 9999), 10, 36); // 将上传时间+随机数转换为36进制 例:vx77yu
}
}
@@ -269,7 +269,7 @@ function getFile($dir)
*/
function get_file_by_glob($dir_fileName_suffix, $type = 'list')
{
-
+ global $config;
$glob = glob($dir_fileName_suffix, GLOB_BRACE);
// 获取所有文件
@@ -277,6 +277,14 @@ function get_file_by_glob($dir_fileName_suffix, $type = 'list')
foreach ($glob as $v) {
if (is_file($v)) $res[] = basename($v);
}
+ // 排序
+ if ($res) {
+ switch ($config['showSort']) {
+ case 1:
+ $res = array_reverse($res);
+ break;
+ }
+ }
}
if ($type == 'number') {
diff --git a/application/process.php b/application/process.php
index 5c0a929..aa6aee9 100755
--- a/application/process.php
+++ b/application/process.php
@@ -127,13 +127,4 @@ function write_log($filePath, $sourceName, $absolutePath, $fileSize, $from = "We
$log = array_replace($logs, $log);
cache_write($logFileName, $log, 'logs');
*/
-}
-
-if (isset($_GET['auth'])) {
- $checkAuth = md5($config['domain'] . $config['password']);
-
- // 鉴权
- if ($_GET['auth'] == $checkAuth) {
- process_checkImg($_GET['img']);
- }
-}
+}
\ No newline at end of file
diff --git a/application/upload.php b/application/upload.php
index dbc085b..0268d23 100755
--- a/application/upload.php
+++ b/application/upload.php
@@ -103,18 +103,6 @@ if ($handle->uploaded) {
/** 后续处理 */
require __DIR__ . '/process.php';
- /*
- require __DIR__ . '/FsockService.php';
-
- // 使用fosksock异步申请鉴黄
- if ($config['checkImg']) {
- $process = array(
- 'auth' => md5($config['domain'] . $config['password']),
- 'img' => $imageUrl
- );
- @request_asynchronous('/application/process.php', 'GET', $process, $config['domain']);
- }
- */
// 使用fastcgi_finish_request操作
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
diff --git a/config/config.php b/config/config.php
index 5250edf..3e93607 100755
--- a/config/config.php
+++ b/config/config.php
@@ -4,8 +4,8 @@ $config=Array
'title'=>'简单图床 - EasyImage',
'keywords'=>'简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序,最新html5自适应页面兼容手机电脑,上传后返回图片直链,markdown图片,论坛贴图bbscode链接,简单方便支持一键复制,支持多域名,api上传。',
- 'tips'=>'
单文件≤10M,单次上传≤30张
-
简单图床是一款开源图床, 支持多文件上传无数据库
+ 'tips'=>'
单文件≤10M,单次上传≤30张
+
简单图床是一款开源图床, 支持多文件上传无数据库
如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧',
'domain'=>'http://127.0.0.1',
'imgurl'=>'http://127.0.0.1',
@@ -47,15 +47,15 @@ $config=Array
'checkImg_value'=>50,
'moderatecontent_key'=>'',
'nsfwjs_url'=>'',
- 'footer'=>'
请勿上传违反中国政策的图片
-',
'ad_top'=>0,
'ad_top_info'=>'
@@ -63,11 +63,12 @@ var _hmt = _hmt || [];
',
'ad_bot'=>0,
- 'ad_bot_info'=>'
-