本文整理汇总了PHP中updateforumcount函数的典型用法代码示例。如果您正苦于以下问题:PHP updateforumcount函数的具体用法?PHP updateforumcount怎么用?PHP updateforumcount使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updateforumcount函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_pid'])) {
showmessage(lang('magic/repent', 'repent_info_nonexistence'));
}
$_G['tid'] = $_G['gp_ptid'];
$post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
$this->_check($post);
require_once libfile('function/post');
require_once libfile('function/delete');
if ($post['first']) {
if ($have_replycredit = DB::fetch_first("SELECT * FROM " . DB::table('forum_replycredit') . " WHERE tid ='{$post['tid']}' LIMIT 1")) {
if ($replycredit = DB::result_first("SELECT replycredit FROM " . DB::table('forum_thread') . " WHERE tid = '{$post['tid']}'")) {
updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
}
DB::delete('forum_replycredit', "tid = '{$post['tid']}'");
DB::delete('common_credit_log', "operation IN ('RCT', 'RCA', 'RCB') AND relatedid IN({$post['tid']})");
}
deletethread(array($post['tid']));
updateforumcount($post['fid']);
} else {
if ($post['replycredit'] > 0) {
updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
DB::delete('common_credit_log', "uid = '{$post['authorid']}' AND operation = 'RCA' AND relatedid IN({$post['tid']})");
}
deletepost(array($_G['gp_pid']));
updatethreadcount($post['tid']);
}
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
}
示例2: usesubmit
function usesubmit()
{
global $_G;
if (empty($_GET['pid'])) {
showmessage(lang('magic/repent', 'repent_info_nonexistence'));
}
$_G['tid'] = $_GET['ptid'];
$post = getpostinfo($_GET['pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
$this->_check($post);
require_once libfile('function/post');
require_once libfile('function/delete');
if ($post['first']) {
if ($have_replycredit = C::t('forum_replycredit')->fetch($post['tid'])) {
$thread = C::t('forum_thread')->fetch($post['tid']);
if ($thread['replycredit']) {
updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
}
C::t('forum_replycredit')->delete($post['tid']);
C::t('common_credit_log')->delete_by_operation_relatedid(array('RCT', 'RCA', 'RCB'), $post['tid']);
}
deletethread(array($post['tid']));
updateforumcount($post['fid']);
} else {
if ($post['replycredit'] > 0) {
updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
C::t('common_credit_log')->delete_by_uid_operation_relatedid($post['authorid'], 'RCA', $post['tid']);
}
deletepost(array($_GET['pid']));
updatethreadcount($post['tid']);
}
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
}
示例3: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_pid'])) {
showmessage(lang('magic/repent', 'repent_info_nonexistence'));
}
$_G['tid'] = $_G['gp_ptid'];
$post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid'));
$this->_check($post);
require_once libfile('function/post');
require_once libfile('function/delete');
if ($post['first']) {
deletethread("tid='{$post['tid']}'");
updateforumcount($post['fid']);
} else {
deletepost("pid='{$_G['gp_pid']}'");
updatethreadcount($post['tid']);
}
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
}
示例4: showmessage
if (!substr(sprintf('%04b', $forum['allowpostspecial']), -$thread['special'], 1)) {
showmessage('admin_move_nopermission');
}
}
$query = $db->query("SELECT postperm FROM {$tablepre}forumfields WHERE fid='{$moveto}'");
if ($forum = $db->fetch_array($query)) {
if (!$forum['postperm'] && !$allowpost) {
showmessage('group_nopermission');
} elseif ($forum['postperm'] && !forumperm($forum['postperm'])) {
showmessage('post_forum_newthread_nopermission');
}
}
$db->query("UPDATE {$tablepre}threads SET fid='{$moveto}', moderated='1' WHERE tid='{$tid}'");
$db->query("UPDATE {$tablepre}posts SET fid='{$moveto}' WHERE tid='{$tid}'");
require_once DISCUZ_ROOT . './include/post.func.php';
updateforumcount($moveto);
updateforumcount($thread['fid']);
usemagic($magicid, $magic['num']);
updatemagiclog($magicid, '2', '1', '0', $tid);
updatemagicthreadlog($tid, $magicid, $magic['identifier']);
showmessage('magics_operation_succeed', '', 1);
}
function showmagic()
{
global $tid, $lang;
require_once DISCUZ_ROOT . './include/forum.func.php';
magicshowtype($lang['option'], 'top');
magicshowsetting($lang['target_tid'], 'tid', $tid, 'text');
magicshowsetting($lang['MVK_target'], '', '', '<select name="moveto">' . forumselect() . '</select>');
magicshowtype('', 'bottom');
}
示例5: undeletethreads
function undeletethreads($tids)
{
global $_G;
$threadsundel = 0;
if ($tids && is_array($tids)) {
foreach ($tids as $t) {
my_thread_log('restore', array('tid' => $t));
}
$tids = '\'' . implode('\',\'', $tids) . '\'';
$tuidarray = $ruidarray = $fidarray = array();
$postarray = getfieldsofposts('fid, first, authorid', "tid IN ({$tids})");
foreach ($postarray as $post) {
if ($post['first']) {
$tuidarray[] = $post['authorid'];
} else {
$ruidarray[] = $post['authorid'];
}
if (!in_array($post['fid'], $fidarray)) {
$fidarray[] = $post['fid'];
}
}
if ($tuidarray) {
updatepostcredits('+', $tuidarray, 'post');
}
if ($ruidarray) {
updatepostcredits('+', $ruidarray, 'reply');
}
updatepost(array('invisible' => '0'), "tid IN ({$tids})", true);
DB::query("UPDATE " . DB::table('forum_thread') . " SET displayorder='0', moderated='1' WHERE tid IN ({$tids})");
$threadsundel = DB::affected_rows();
updatemodlog($tids, 'UDL');
updatemodworks('UDL', $threadsundel);
foreach ($fidarray as $fid) {
updateforumcount($fid);
}
}
return $threadsundel;
}
示例6: libfile
$thread['id'] = 'normalthread_' . $thread['tid'];
if ($thread['folder'] == 'common' && $thread['dblastpost'] >= $forumlastvisit || !$forumlastvisit) {
$thread['new'] = 1;
$thread['folder'] = 'new';
$thread['weeknew'] = TIMESTAMP - 604800 <= $thread['dbdateline'];
}
}
if (isset($_G['setting']['verify']['enabled']) && $_G['setting']['verify']['enabled']) {
$verifyuids[$thread['authorid']] = $thread['authorid'];
}
$threadids[] = $thread['tid'];
$_G['forum_threadlist'][] = $thread;
}
if (empty($_G['forum_threadlist']) && $page <= ceil($_G['forum_threadcount'] / $_G['tpp'])) {
require_once libfile('function/post');
updateforumcount($_G['fid']);
}
if ($_G['setting']['verify']['enabled'] && $verifyuids) {
$verifyquery = DB::query("SELECT * FROM " . DB::table('common_member_verify') . " WHERE uid IN(" . dimplode($verifyuids) . ")");
while ($value = DB::fetch($verifyquery)) {
foreach ($_G['setting']['verify'] as $vid => $vsetting) {
if ($vsetting['available'] && $vsetting['showicon'] && !empty($vsetting['icon']) && $value['verify' . $vid] == 1) {
$verify[$value['uid']] .= "<a href=\"home.php?mod=spacecp&ac=profile&op=verify&vid={$vid}\" target=\"_blank\">" . (!empty($vsetting['icon']) ? '<img src="' . $vsetting['icon'] . '" class="vm" alt="' . $vsetting['title'] . '" title="' . $vsetting['title'] . '" />' : $vsetting['title']) . '</a>';
}
}
}
}
$_G['forum_threadnum'] = count($_G['forum_threadlist']) - $separatepos;
if (!empty($grouptids)) {
$query = DB::query("SELECT t.tid, t.views, f.name, f.fid FROM " . DB::table('forum_thread') . " t LEFT JOIN " . DB::table('forum_forum') . " f ON f.fid=t.fid WHERE t.tid IN(" . dimplode($grouptids) . ")");
while ($row = DB::fetch($query)) {
示例7: undeletethreads
function undeletethreads($tids)
{
global $db, $tablepre, $creditspolicy;
$threadsundel = 0;
if ($tids && is_array($tids)) {
$tids = '\'' . implode('\',\'', $tids) . '\'';
$tuidarray = $ruidarray = $fidarray = array();
$query = $db->query("SELECT fid, first, authorid FROM {$tablepre}posts WHERE tid IN ({$tids})");
while ($post = $db->fetch_array($query)) {
if ($post['first']) {
$tuidarray[] = $post['authorid'];
} else {
$ruidarray[] = $post['authorid'];
}
if (!in_array($post['fid'], $fidarray)) {
$fidarray[] = $post['fid'];
}
}
if ($tuidarray) {
updatepostcredits('+', $tuidarray, $creditspolicy['post']);
}
if ($ruidarray) {
updatepostcredits('+', $ruidarray, $creditspolicy['reply']);
}
$db->query("UPDATE {$tablepre}posts SET invisible='0' WHERE tid IN ({$tids})", 'UNBUFFERED');
$db->query("UPDATE {$tablepre}threads SET displayorder='0', moderated='1' WHERE tid IN ({$tids})");
$threadsundel = $db->affected_rows();
updatemodlog($tids, 'UDL');
updatemodworks('UDL', $threadsundel);
foreach ($fidarray as $fid) {
updateforumcount($fid);
}
}
return $threadsundel;
}
示例8: deleteuser
function deleteuser($get, $post)
{
$uids = $get['ids'];
!API_DELETEUSER && exit(API_RETURN_FORBIDDEN);
$threads = array();
$query = $this->db->query("SELECT f.fid, t.tid FROM " . $this->tablepre . "threads t LEFT JOIN " . $this->tablepre . "forums f ON t.fid=f.fid WHERE t.authorid IN ({$uids}) ORDER BY f.fid");
while ($thread = $this->db->fetch_array($query)) {
$threads[$thread['fid']] .= ($threads[$thread['fid']] ? ',' : '') . $thread['tid'];
}
if ($threads) {
require_once $this->appdir . './forumdata/cache/cache_settings.php';
foreach ($threads as $fid => $tids) {
$query = $this->db->query("SELECT attachment, thumb, remote FROM " . $this->tablepre . "attachments WHERE tid IN ({$tids})");
while ($attach = $this->db->fetch_array($query)) {
@unlink($_DCACHE['settings']['attachdir'] . '/' . $attach['attachment']);
$attach['thumb'] && @unlink($_DCACHE['settings']['attachdir'] . '/' . $attach['attachment'] . '.thumb.jpg');
}
foreach (array('threads', 'threadsmod', 'relatedthreads', 'posts', 'polls', 'polloptions', 'trades', 'activities', 'activityapplies', 'debates', 'debateposts', 'attachments', 'favorites', 'mythreads', 'myposts', 'subscriptions', 'typeoptionvars', 'forumrecommend') as $value) {
$this->db->query("DELETE FROM " . $this->tablepre . "{$value} WHERE tid IN ({$tids})", 'UNBUFFERED');
}
require_once $this->appdir . './include/post.func.php';
updateforumcount($fid);
}
if ($globalstick && $stickmodify) {
require_once $this->appdir . './include/cache.func.php';
updatecache('globalstick');
}
}
$query = $this->db->query("DELETE FROM " . $this->tablepre . "members WHERE uid IN ({$uids})");
$this->db->query("DELETE FROM " . $this->tablepre . "access WHERE uid IN ({$uids})", 'UNBUFFERED');
$this->db->query("DELETE FROM " . $this->tablepre . "memberfields WHERE uid IN ({$uids})", 'UNBUFFERED');
$this->db->query("DELETE FROM " . $this->tablepre . "favorites WHERE uid IN ({$uids})", 'UNBUFFERED');
$this->db->query("DELETE FROM " . $this->tablepre . "moderators WHERE uid IN ({$uids})", 'UNBUFFERED');
$this->db->query("DELETE FROM " . $this->tablepre . "subscriptions WHERE uid IN ({$uids})", 'UNBUFFERED');
$this->db->query("DELETE FROM " . $this->tablepre . "validating WHERE uid IN ({$uids})", 'UNBUFFERED');
$query = $this->db->query("SELECT uid, attachment, thumb, remote FROM " . $this->tablepre . "attachments WHERE uid IN ({$uids})");
while ($attach = $this->db->fetch_array($query)) {
@unlink($_DCACHE['settings']['attachdir'] . '/' . $attach['attachment']);
$attach['thumb'] && @unlink($_DCACHE['settings']['attachdir'] . '/' . $attach['attachment'] . '.thumb.jpg');
}
$this->db->query("DELETE FROM " . $this->tablepre . "attachments WHERE uid IN ({$uids})");
$this->db->query("DELETE FROM " . $this->tablepre . "posts WHERE authorid IN ({$uids})");
$this->db->query("DELETE FROM " . $this->tablepre . "trades WHERE sellerid IN ({$uids})");
return API_RETURN_SUCCEED;
}
示例9: deletepost
$prune['forums'][] = $post['fid'];
$prune['thread'][$post['tid']]++;
if ($post['first']) {
$tidsdelete[] = $post['tid'];
}
$pidsdelete[] = $post['pid'];
}
deletepost($pidsdelete, 'pid', false, $posttableid);
}
deletethread($tidsdelete);
if (!empty($prune)) {
foreach ($prune['thread'] as $tid => $decrease) {
updatethreadcount($tid);
}
foreach (array_unique($prune['forums']) as $fid) {
updateforumcount($fid);
}
}
if ($_G['setting']['globalstick']) {
updatecache('globalstick');
}
}
$membercount['posts'] = 0;
}
if (in_array('blog', $_G['gp_clear'])) {
$blogids = array();
$query = DB::query("SELECT blogid FROM " . DB::table('home_blog') . " WHERE uid='{$member['uid']}'");
while ($value = DB::fetch($query)) {
$blogids[] = $value['blogid'];
}
if (!empty($blogids)) {
示例10: array
$validatedthreads[] = $thread;
if ($thread['authorid'] && $thread['authorid'] != $_G['uid']) {
$pmlist[] = array('act' => 'modthreads_validate', 'notevar' => array('reason' => dhtmlspecialchars($_GET['reason']), 'tid' => $thread['tid'], 'threadsubject' => $thread['subject'], 'from_id' => 0, 'from_idtype' => 'modthreads'), 'authorid' => $thread['authorid']);
}
}
if ($tids) {
$tidstr = dimplode($tids);
C::t('forum_post')->update_by_tid(0, $tids, array('invisible' => 0), true, false, 1);
C::t('forum_thread')->update($tids, array('displayorder' => 0, 'moderated' => 1));
$threadsmod = DB::affected_rows();
if ($_G['fid']) {
updateforumcount($_G['fid']);
} else {
$fids = array_keys($modforums['list']);
foreach ($fids as $f) {
updateforumcount($f);
}
}
updatemodworks('MOD', $threadsmod);
updatemodlog($tidstr, 'MOD');
updatemoderate('tid', $tids, 2);
}
}
if ($pmlist) {
foreach ($pmlist as $pm) {
$threadsubject = $pm['thread'];
$_G['tid'] = intval($pm['tid']);
notification_add($pm['authorid'], 'system', $pm['act'], $pm['notevar'], 1);
}
}
showmessage('modcp_mod_succeed', "{$cpscript}?mod=modcp&action={$_GET['action']}&op={$op}&filter={$filter}&fid={$_G['fid']}");
示例11: getpostinfo
}
$post = getpostinfo($pid, 'pid', array('t.tid', 't.fid', 't.authorid', 'first'));
checkmagicperm($magicperm['forum'], $post['fid']);
if ($post['authorid'] != $discuz_uid) {
showmessage('magics_operation_nopermission');
}
require_once DISCUZ_ROOT . './include/post.func.php';
if ($post['first']) {
foreach (array('threads', 'threadsmod', 'relatedthreads', 'posts', 'polls', 'polloptions', 'trades', 'activities', 'activityapplies', 'attachments', 'favorites', 'debates', 'debateposts', 'typeoptionvars', 'forumrecommend') as $value) {
$db->query("DELETE FROM {$tablepre}{$value} WHERE tid='{$post['tid']}'", 'UNBUFFERED');
}
$query = $db->query("SELECT uid, attachment, dateline, thumb, remote FROM {$tablepre}attachments WHERE tid='{$post['tid']}'");
while ($attach = $db->fetch_array($query)) {
dunlink($attach['attachment'], $attach['thumb'], $attach['remote']);
}
updateforumcount($post['fid']);
} else {
$db->query("DELETE FROM {$tablepre}posts WHERE pid='{$pid}'", 'UNBUFFERED');
$db->query("DELETE FROM {$tablepre}attachments WHERE pid='{$pid}'", 'UNBUFFERED');
$db->query("DELETE FROM {$tablepre}attachmentfields WHERE pid='{$pid}'", 'UNBUFFERED');
$query = $db->query("SELECT uid, attachment, dateline, thumb, remote FROM {$tablepre}attachments WHERE pid='{$pid}'");
while ($attach = $db->fetch_array($query)) {
dunlink($attach['attachment'], $attach['thumb'], $attach['remote']);
}
updatethreadcount($post['tid']);
}
usemagic($magicid, $magic['num']);
updatemagiclog($magicid, '2', '1', '0', '0', $pid);
showmessage('magics_operation_succeed', '', 1);
}
function showmagic()
示例12: deletethread
$deletedthreads = deletethread("tid IN ({$tidsdelete})");
if (count($prune['thread']) < 50) {
foreach ($prune['thread'] as $tid => $decrease) {
updatethreadcount($tid);
}
} else {
$repliesarray = array();
foreach ($prune['thread'] as $tid => $decrease) {
$repliesarray[$decrease][] = $tid;
}
foreach ($repliesarray as $decrease => $tidarray) {
DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies-{$decrease} WHERE tid IN (" . implode(',', $tidarray) . ")");
}
}
foreach (array_unique($prune['forums']) as $id) {
updateforumcount($id);
}
}
$do = 'list';
}
if ($do == 'search' && submitcheck('searchsubmit', 1)) {
if ($starttime == '0' && $endtime == '0' || $keywords == '' && $useip == '' && $users == '') {
$error = 1;
return;
}
$sql = '';
if ($threadoption == 1) {
$sql .= " AND first='1'";
} elseif ($threadoption == 2) {
$sql .= " AND first='0'";
}
示例13: showsubmit
echo $threads;
echo $multipage;
showsubmit('', '', '', "<input type=\"submit\" class=\"btn\" name=\"delsortsubmit\" value=\"{$lang[threadtype_content_delete]}\"/>");
showtablefooter();
showformfooter();
} elseif (submitcheck('delsortsubmit')) {
require_once libfile('function/post');
if ($_G['gp_tidsarray']) {
require_once libfile('function/delete');
deletethread($_G['gp_tidsarray']);
if ($_G['setting']['globalstick']) {
updatecache('globalstick');
}
if ($_G['gp_fidsarray']) {
foreach (explode(',', $_G['gp_fidsarray']) as $fid) {
updateforumcount(intval($fid));
}
}
}
cpmsg('threadtype_content_delete_succeed', 'action=threadtypes&operation=content', 'succeed');
}
}
} elseif ($operation == 'classlist') {
$classoptions = '';
$classidarray = array();
$classid = $_G['gp_classid'] ? $_G['gp_classid'] : 0;
$query = DB::query("SELECT optionid, title FROM " . DB::table('forum_typeoption') . " WHERE classid='{$classid}' ORDER BY displayorder");
while ($option = DB::fetch($query)) {
$classidarray[] = $option['optionid'];
$classoptions .= "<a href=\"#ol\" onclick=\"ajaxget('" . ADMINSCRIPT . "?action=threadtypes&operation=optionlist&typeid={$_G['gp_typeid']}&classid={$option['optionid']}', 'optionlist', 'optionlist', 'Loading...', '', checkedbox)\">{$option['title']}</a> ";
}
示例14: recyclebinpostundelete
function recyclebinpostundelete($undeletepids, $posttableid = false)
{
global $_G;
if ($_G['setting']['plugins']['func'][HOOKTYPE]['recyclebinpostundelete']) {
$param = func_get_args();
hookscript('recyclebinpostundelete', 'global', 'funcs', array('param' => $param), 'recyclebinpostundelete');
}
$postsundel = 0;
if (empty($undeletepids)) {
return $postsundel;
}
loadcache('posttableids');
$posttableids = !empty($_G['cache']['posttableids']) ? $posttableid !== false && in_array($posttableid, $_G['cache']['posttableids']) ? array($posttableid) : $_G['cache']['posttableids'] : array('0');
$postarray = $ruidarray = $fidarray = $tidarray = array();
foreach ($posttableids as $ptid) {
foreach (C::t('forum_post')->fetch_all($ptid, $undeletepids, false) as $post) {
if (!$post['first']) {
$ruidarray[$post['fid']][] = $post['authorid'];
}
$fidarray[$post['fid']] = $post['fid'];
$tidarray[$post['tid']] = $post['tid'];
}
}
if (empty($fidarray)) {
return $postsundel;
}
C::t('forum_post')->update($posttableid, $undeletepids, array('invisible' => '0'), true);
include_once libfile('function/post');
if ($ruidarray) {
foreach ($ruidarray as $fid => $ruids) {
updatepostcredits('+', $ruids, 'reply', $fid);
}
}
foreach ($tidarray as $tid) {
updatethreadcount($tid, 1);
}
foreach ($fidarray as $fid) {
updateforumcount($fid);
}
return count($undeletepids);
}
示例15: _adminTopic
//.........这里部分代码省略.........
}
if ($thread['isgroup'] == 1 && $thread['closed'] > 1) {
$remarkclosed[] = $thread['closed'];
}
}
$modaction = 'DEL';
require_once libfile('function/delete');
$tids = array_keys($threadlist);
if ($_G['forum']['recyclebin']) {
deletethread($tids, true, true, true);
manage_addnotify('verifyrecycle', $modpostsnum);
} else {
deletethread($tids, true, true);
$updatemodlog = FALSE;
}
$forumstickthreads = $_G['setting']['forumstickthreads'];
$forumstickthreads = !empty($forumstickthreads) ? dunserialize($forumstickthreads) : array();
$delkeys = array_keys($threadlist);
foreach ($delkeys as $k) {
unset($forumstickthreads[$k]);
}
C::t('common_setting')->update('forumstickthreads', $forumstickthreads);
C::t('forum_forum_threadtable')->delete_none_threads();
if (!empty($deleteredirect)) {
deletethread($deleteredirect);
}
if (!empty($remarkclosed)) {
C::t('forum_thread')->update($remarkclosed, array('closed' => 0));
}
if ($_G['setting']['globalstick'] && $stickmodify) {
require_once libfile('function/cache');
updatecache('globalstick');
}
updateforumcount($_G['fid']);
if ($_GET['crimerecord']) {
include_once libfile('function/member');
foreach ($threadlist as $thread) {
crime('recordaction', $thread['authorid'], 'crime_delpost', lang('forum/misc', 'crime_postreason', array('reason' => $reason, 'tid' => $thread['tid'], 'pid' => 0)));
}
}
break;
case 'close':
if (!$_G['group']['allowclosethread']) {
$this->_exitWithHtmlAlert('no_privilege_closethread');
}
$expiration = checkexpiration($_GET['expirationclose'], $operation);
$modaction = $expiration ? 'ECL' : 'CLS';
C::t('forum_thread')->update($tidsarr, array('closed' => 1, 'moderated' => 1), true);
C::t('forum_threadmod')->update_by_tid_action($tidsarr, array('CLS', 'OPN', 'ECL', 'UCL', 'EOP', 'UEO'), array('status' => 0));
break;
case 'open':
if (!$_G['group']['allowclosethread']) {
$this->_exitWithHtmlAlert('no_privilege_openthread');
}
$expiration = checkexpiration($_GET['expirationclose'], $operation);
$modaction = $expiration ? 'EOP' : 'OPN';
C::t('forum_thread')->update($tidsarr, array('closed' => 0, 'moderated' => 1), true);
C::t('forum_threadmod')->update_by_tid_action($tidsarr, array('CLS', 'OPN', 'ECL', 'UCL', 'EOP', 'UEO'), array('status' => 0));
break;
case 'move':
if (!$_G['group']['allowmovethread']) {
$this->_exitWithHtmlAlert('no_privilege_movethread');
}
$moveto = $_GET['moveto'];
$toforum = C::t('forum_forum')->fetch_info_by_fid($moveto);
if (!$toforum || $_G['adminid'] != 1 && $toforum['status'] != 1 || $toforum['type'] == 'group') {