destoon采集论坛

 找回密码
 立即注册
查看: 1379|回复: 0

destoon怎样获取用户上传占用图片空间大小的配置方法

[复制链接]

198

主题

91

回帖

2918

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2918
发表于 2017-12-31 20:35:10 | 显示全部楼层 |阅读模式
DESTOON可能针对不同的会员设置上传图片空间的大小,如何才能知道用户上传了多少M的图片呢?下面就来解决这个问题!
首先打开文件“根目录/include/global.func.php”最后,粘贴下面的代码:
  1. //=================================
  2. //获取会员图片空间
  3. //=================================
  4. function get_imgsize_user($username)
  5. {
  6.         global $db;
  7.         $_sum_sql = "SELECT sum(countx) as up_sum FROM ((select sum(filesize) as countx from destoon_upload_0 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_1 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_2 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_3 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_5 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_5 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_6 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_7 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_8 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_9 where username = '".$username."')) AS sun_biao";
  8.         $up_sum = $db->get_one($_sum_sql, 'CACHE');
  9.         
  10.         return  byteFormat($up_sum["up_sum"], "MB");
  11. }
复制代码


游客,如果您要查看本帖隐藏内容请回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|destoon采集论坛

GMT+8, 2025-11-23 10:39 , Processed in 0.013126 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表