diff --git a/web/app/controllers/image_hosting/index.php b/web/app/controllers/image_hosting/index.php index d86685e..6063c55 100644 --- a/web/app/controllers/image_hosting/index.php +++ b/web/app/controllers/image_hosting/index.php @@ -14,7 +14,9 @@ } $limit = $myUser['images_size_limit']; - $used = DB::select("SELECT SUM(size) FROM `users_images` WHERE uploader = {$myUser['username']}")["SUM(size)"]; + $_result = DB::selectFirst("SELECT SUM(size), count(*) FROM `users_images` WHERE uploader = '{$myUser['username']}'"); + $used = $_result["SUM(size)"]; + $count = $_result["count(*)"]; function throwError($msg) { die(json_encode(['status' => 'error', 'message' => $msg])); @@ -120,76 +122,87 @@
-
-
- - 点击此处选择图片 -
- -