81 lines
3.1 KiB
PHP
81 lines
3.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* This is NOT a freeware, use is subject to license terms
|
|
* 应用名称: 贴吧楼中楼回复 9.0
|
|
* 下载地址: https://addon.dismall.com/plugins/replyfloor.html
|
|
* 应用开发者: 乘凉
|
|
* 开发者QQ: 594433766
|
|
* 更新日期: 202505310549
|
|
* 授权域名: www.shitangsweet.com
|
|
* 授权码: 2025053105b89RrI3R9n
|
|
* 未经应用程序开发者/所有者的书面许可,不得进行反向工程、反向汇编、反向编译等,不得擅自复制、修改、链接、转载、汇编、发表、出版、发展与之有关的衍生产品、作品等
|
|
*/
|
|
|
|
|
|
/**
|
|
* $author: 乘凉 $
|
|
*/
|
|
|
|
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
|
exit('Access Denied');
|
|
}
|
|
|
|
$op = in_array($_GET['op'], array('index','member')) ? $_GET['op'] : 'index';
|
|
|
|
if($op == 'index') {
|
|
if(!submitcheck('savesubmit')) {
|
|
showtips(lang('plugin/'.$plugin['identifier'], 'counter_tips'));
|
|
showformheader($pluginurl);
|
|
showtableheader();
|
|
showsubtitle(array('', lang('plugin/'.$plugin['identifier'], 'counter_amount')));
|
|
showtablerow('', array('class="td21"'), array(
|
|
lang('plugin/'.$plugin['identifier'], 'counter_member').":",
|
|
'<input name="pertask" type="text" class="txt" value="1000" /><input name="op" type="hidden" value="member" /><input type="submit" class="btn" name="savesubmit" value="'.$lang['submit'].'" />'
|
|
));
|
|
showtablefooter();
|
|
showformfooter();
|
|
}
|
|
}elseif($op == 'member') {
|
|
$pertask = isset($_GET['pertask']) ? intval($_GET['pertask']) : 100;
|
|
$current = isset($_GET['current']) && $_GET['current'] > 0 ? intval($_GET['current']) : 0;
|
|
$next = $current + $pertask;
|
|
|
|
if(submitcheck('savesubmit', 1)) {
|
|
|
|
$nextlink = "action=".$pluginurl."&op=member¤t=$next&pertask=$pertask&savesubmit=yes";
|
|
$processed = 0;
|
|
|
|
$threadtableids = C::t('common_setting')->fetch('threadtableids', true);
|
|
$queryt = C::t('common_member')->range($current, $pertask);
|
|
foreach($queryt as $mem) {
|
|
$processed = 1;
|
|
$postcount = 0;
|
|
loadcache('posttable_info');
|
|
if(!empty($_G['cache']['posttable_info']) && is_array($_G['cache']['posttable_info'])) {
|
|
foreach($_G['cache']['posttable_info'] as $key => $value) {
|
|
$postcount += C::t('forum_post')->count_by_authorid($key, $mem['uid']);
|
|
}
|
|
} else {
|
|
$postcount += C::t('forum_post')->count_by_authorid(0, $mem['uid']);
|
|
}
|
|
$postcount += C::t('forum_postcomment')->count_by_authorid($mem['uid']);
|
|
$postcount += C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->count_by_authorid($mem['uid']);
|
|
|
|
C::t('common_member_count')->update($mem['uid'], array('posts' => $postcount));
|
|
}
|
|
|
|
if($processed) {
|
|
cpmsg(lang('plugin/'.$plugin['identifier'], 'counter_member').lang('plugin/'.$plugin['identifier'], 'counter_processing', array('current' => $current, 'next' => $next)), $nextlink, 'loading');
|
|
} else {
|
|
cpmsg(lang('plugin/'.$plugin['identifier'], 'counter_member_succeed'), 'action='.$pluginurl, 'succeed');
|
|
}
|
|
|
|
}else{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
?>
|