From 02bb5f492701284b750908c613106a1ea05b5e02 Mon Sep 17 00:00:00 2001 From: xiaoz Date: Tue, 1 May 2018 14:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++++------ functions/class/class.admin.php | 16 +++++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d5274f7..46f1056 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,13 @@ location ~* \.(db3)$ { ![](https://imgurl.org/upload/1804/3ccc55eeb47965c3.png) - -### 联系我 -* Blog:[https://www.xiaoz.me/](https://www.xiaoz.me/) -* QQ:337003006 - ### 鸣谢 ImgURL的诞生离不开以下开源项目。 * LayUI: [https://github.com/sentsin/layui](https://github.com/sentsin/layui) * class.upload.php: [https://github.com/verot/class.upload.php](https://github.com/verot/class.upload.php) -* clipBoard.js: [https://github.com/baixuexiyang/clipBoard.js](https://github.com/baixuexiyang/clipBoard.js) \ No newline at end of file +* clipBoard.js: [https://github.com/baixuexiyang/clipBoard.js](https://github.com/baixuexiyang/clipBoard.js) + +### 联系我 +* Blog:[https://www.xiaoz.me/](https://www.xiaoz.me/) +* QQ:337003006 \ No newline at end of file diff --git a/functions/class/class.admin.php b/functions/class/class.admin.php index ad272b4..ff41f31 100644 --- a/functions/class/class.admin.php +++ b/functions/class/class.admin.php @@ -31,13 +31,15 @@ //分页计算 $start = ($page - 1) * 12; - $end = $page * 12; + //$end = $page * 12; if(($page == '') || (!isset($page))) { $page = 1; } - + //要查询的条数 + $num = 12; + //判断类型 switch ($type) { case 'user': @@ -45,17 +47,17 @@ $datas = $database->select("imginfo", "*", [ "dir" => $config['userdir'], "ORDER" => ["id" => "DESC"], - "LIMIT" => [$start,$end] + "LIMIT" => [$start,$num] ]); - //var_dump( $database->log() ); - //exit; + // var_dump( $database->log() ); + // exit; return $datas; break; case 'admin': $datas = $database->select("imginfo", "*", [ "dir" => $config['admindir'], "ORDER" => ["id" => "DESC"], - "LIMIT" => [$start,$end] + "LIMIT" => [$start,$num] ]); return $datas; break; @@ -63,7 +65,7 @@ $datas = $database->select("imginfo", "*", [ "level" => 3, "ORDER" => ["id" => "DESC"], - "LIMIT" => [$start,$end] + "LIMIT" => [$start,$num] ]); return $datas; break;