本文整理汇总了PHP中sendreasonpm函数的典型用法代码示例。如果您正苦于以下问题:PHP sendreasonpm函数的具体用法?PHP sendreasonpm怎么用?PHP sendreasonpm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendreasonpm函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ceil
$rate += $ratelog['score'] = -$ratelog['score'];
$ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
updatemembercount($post['authorid'], array($ratelog['extcredits'] => $ratelog['score']));
C::t('common_credit_log')->delete_by_uid_operation_relatedid($post['authorid'], 'PRC', $_GET['pid']);
C::t('forum_ratelog')->delete_by_pid_uid_extcredits_dateline($_GET['pid'], $ratelog['uid'], $ratelog['extcredits'], $ratelog['dateline']);
$logs[] = dhtmlspecialchars("{$_G['timestamp']}\t{$_G[member][username]}\t{$_G['adminid']}\t{$ratelog['username']}\t{$ratelog['extcredits']}\t{$ratelog['score']}\t{$_G['tid']}\t{$thread['subject']}\t{$reason}\tD");
if ($sendreasonpm) {
$ratescore .= $slash . $_G['setting']['extcredits'][$ratelog['extcredits']]['title'] . ' ' . ($ratelog['score'] > 0 ? '+' . $ratelog['score'] : $ratelog['score']) . ' ' . $_G['setting']['extcredits'][$ratelog['extcredits']]['unit'];
$slash = ' / ';
}
}
}
C::t('forum_postcache')->delete($_GET['pid']);
writelog('ratelog', $logs);
if ($sendreasonpm) {
sendreasonpm($post, 'rate_removereason', array('tid' => $thread['tid'], 'pid' => $_GET['pid'], 'subject' => $thread['subject'], 'ratescore' => $ratescore, 'reason' => $reason, 'from_id' => 0, 'from_idtype' => 'removerate'));
}
C::t('forum_post')->increase_rate_by_pid('tid:' . $_G['tid'], $_GET['pid'], $rate, $ratetimes);
if ($post['first']) {
$threadrate = @intval(@($post['rate'] + $rate) / abs($post['rate'] + $rate));
C::t('forum_thread')->update($_G['tid'], array('rate' => $threadrate));
}
}
showmessage('thread_rate_removesucceed', dreferer());
}
} elseif ($_GET['action'] == 'viewratings' && $_GET['pid']) {
$loglist = $logcount = array();
$post = C::t('forum_post')->fetch('tid:' . $_G['tid'], $_GET['pid']);
if ($post['invisible'] != 0) {
$post = array();
}
示例2: checkreasonpm
$modaction = $banned ? 'BNP' : 'UBN';
checkreasonpm();
$db->query("UPDATE {$tablepre}posts SET status='{$banned}' WHERE pid IN ({$banpids}) AND tid='{$tid}'", 'UNBUFFERED');
$resultarray = array('redirect' => "viewthread.php?tid={$tid}&page={$page}", 'reasonpm' => $sendreasonpm ? array('data' => $posts, 'var' => 'post', 'item' => 'reason_ban_post') : array(), 'modtids' => 0, 'modlog' => $thread);
}
} else {
showmessage('undefined_action', NULL, 'HALTED');
}
if ($resultarray) {
if ($resultarray['modtids']) {
updatemodlog($resultarray['modtids'], $modaction, $resultarray['expiration']);
}
updatemodworks($modaction, $modpostsnum);
if (is_array($resultarray['modlog'])) {
if (isset($resultarray['modlog']['tid'])) {
modlog($resultarray['modlog'], $modaction);
} else {
foreach ($resultarray['modlog'] as $thread) {
modlog($thread, $modaction);
}
}
}
if ($resultarray['reasonpm']) {
include language('modactions');
$modaction = $modactioncode[$modaction];
foreach ($resultarray['reasonpm']['data'] as ${$resultarray['reasonpm']['var']}) {
sendreasonpm($resultarray['reasonpm']['var'], $resultarray['reasonpm']['item']);
}
}
showmessage(isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed', $resultarray['redirect']);
}
示例3: uc_user_deleteavatar
uc_user_deleteavatar($uid);
$cleartype[] = lang('forum/misc', 'avatar');
crime('recordaction', $uid, 'crime_avatar', lang('forum/misc', 'crime_reason', array('reason' => $reason)));
}
if (in_array('sightml', $_GET['operations'])) {
C::t('common_member_field_forum')->update($uid, array('sightml' => ''), 'UNBUFFERED');
$cleartype[] = lang('forum/misc', 'signature');
crime('recordaction', $uid, 'crime_sightml', lang('forum/misc', 'crime_reason', array('reason' => $reason)));
}
if (in_array('customstatus', $_GET['operations'])) {
C::t('common_member_field_forum')->update($uid, array('customstatus' => ''), 'UNBUFFERED');
$cleartype[] = lang('forum/misc', 'custom_title');
crime('recordaction', $uid, 'crime_customstatus', lang('forum/misc', 'crime_reason', array('reason' => $reason)));
}
if ($_G['group']['reasonpm'] == 2 || $_G['group']['reasonpm'] == 3 || !empty($_GET['sendreasonpm'])) {
sendreasonpm(array('authorid' => $uid), 'reason_quickclear', array('cleartype' => implode(',', $cleartype), 'reason' => $reason, 'from_id' => 0, 'from_idtype' => 'quickclear'));
}
showmessage('quickclear_success', $_POST['redirect'], array(), array('showdialog' => 1, 'closetime' => true, 'msgtype' => 2, 'locationtime' => 1));
}
} elseif ($_GET['action'] == 'getpostfeed') {
$tid = intval($_GET['tid']);
$pid = intval($_GET['pid']);
$flag = intval($_GET['flag']);
$feed = $thread = array();
if ($tid) {
$thread = C::t('forum_thread')->fetch($tid);
if ($flag) {
$post = C::t('forum_post')->fetch($thread['posttableid'], $pid);
require_once libfile('function/discuzcode');
require_once libfile('function/followcode');
$post['message'] = followcode($post['message'], $tid, $pid);
示例4: array
$thumbdata = array('bid' => $block['bid'], 'itemid' => 0, 'pic' => $thumbpath, 'picflag' => $picflag, 'type' => '0');
C::t('common_block_pic')->insert($thumbdata);
}
if (!empty($_POST['updateblock'])) {
block_updatecache($bid, true);
}
if ($_G['group']['reasonpm'] == 2 || $_G['group']['reasonpm'] == 3 || !empty($_GET['sendreasonpm'])) {
$sendreasonpm = 1;
} else {
$sendreasonpm = 0;
}
if ($sendreasonpm) {
require_once libfile('function/misc');
if (in_array($_GET['idtype'], array('tids', 'tid', 'gtid'))) {
$sendreasonpmcontent = C::t('forum_thread')->fetch($item['id']);
sendreasonpm($sendreasonpmcontent, 'recommend_note_post', array('tid' => $item['id'], 'subject' => $sendreasonpmcontent['subject'], 'from_id' => 0, 'from_idtype' => 'recommend'));
}
}
$showrecommendrate = '';
if ($_G['group']['raterange'] && in_array($_GET['idtype'], array('tids', 'tid', 'gtid'))) {
$showrecommendrate = 1;
}
if ($showrecommendrate) {
showmessage('do_success', dreferer('portal.php'), array(), array('showdialog' => true, 'closetime' => 0.01, 'extrajs' => '<script type="text/javascript" reload="1">
showWindow("rate", "forum.php?mod=misc&action=rate&tid=' . $item[id] . '&pid=' . $_GET[recommend_thread_pid] . '&showratetip=1", "get", -1);
</script>'));
} elseif ($_GET['showrecommendtip']) {
showmessage('do_success', dreferer('portal.php'), array(), array('showdialog' => true, 'closetime' => true, 'extrajs' => '<script type="text/javascript" reload="1">
window.location.reload();
</script>'));
} else {
示例5: updatemodlog
} else {
updatemodlog($moderatetids, $modaction, $expiration, 0, $reason);
}
}
updatemodworks($modaction, $modpostsnum);
foreach ($threadlist as $thread) {
modlog($thread, $modaction);
}
if ($sendreasonpm) {
$modactioncode = lang('forum/modaction');
$modaction = $modactioncode[$modaction];
foreach ($threadlist as $thread) {
if ($operation == 'move') {
sendreasonpm($thread, 'reason_move', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => stripslashes($reason), 'tofid' => $toforum['fid'], 'toname' => $toforum['name']));
} else {
sendreasonpm($thread, 'reason_moderate', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => stripslashes($reason)));
}
}
}
if ($stampstatus) {
set_stamp($stampstatus, $stampaction, $threadlist, $expiration);
}
}
showmessage('admin_succeed', $_G['referer']);
}
}
function checkexpiration($expiration, $operation)
{
global $_G;
if (!empty($expiration) && in_array($operation, array('recommend', 'stick', 'digest', 'highlight', 'close'))) {
$expiration = strtotime($expiration) - $_G['setting']['timeoffset'] * 3600 + date('Z');
示例6: while
while ($ratelog = $db->fetch_array($query)) {
if (in_array($ratelog['uid'] . ' ' . $ratelog['extcredits'] . ' ' . $ratelog['dateline'], $logidarray)) {
$rate += $ratelog['score'] = -$ratelog['score'];
$ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
updatecredits($post['authorid'], array($ratelog['extcredits'] => $ratelog['score']));
$db->query("DELETE FROM {$tablepre}ratelog WHERE pid='{$pid}' AND uid='{$ratelog['uid']}' AND extcredits='{$ratelog['extcredits']}' AND dateline='{$ratelog['dateline']}'", 'UNBUFFERED');
$logs[] = dhtmlspecialchars("{$timestamp}\t{$discuz_userss}\t{$adminid}\t{$post['author']}\t{$ratelog['extcredits']}\t{$ratelog['score']}\t{$tid}\t{$thread['subject']}\t{$reason}\tD");
if ($sendreasonpm) {
$ratescore .= $slash . $extcredits[$ratelog['extcredits']]['title'] . ' ' . ($ratelog['score'] > 0 ? '+' . $ratelog['score'] : $ratelog['score']) . ' ' . $extcredits[$ratelog['extcredits']]['unit'];
$slash = ' / ';
}
}
}
writelog('ratelog', $logs);
if ($sendreasonpm) {
sendreasonpm('post', 'rate_removereason');
}
$db->query("UPDATE {$tablepre}posts SET rate=rate+({$rate}), ratetimes=ratetimes-{$ratetimes} WHERE pid='{$pid}'");
if ($post['first']) {
$threadrate = @intval(@($post['rate'] + $rate) / abs($post['rate'] + $rate));
$db->query("UPDATE {$tablepre}threads SET rate='{$threadrate}' WHERE tid='{$tid}'");
}
}
showmessage('thread_rate_removesucceed', dreferer());
}
} elseif ($action == 'viewratings' && $pid) {
$queryr = $db->query("SELECT * FROM {$tablepre}ratelog WHERE pid='{$pid}' ORDER BY dateline");
$queryp = $db->query("SELECT p.* " . ($bannedmessages ? ", m.groupid " : '') . " FROM {$tablepre}posts p " . ($bannedmessages ? "LEFT JOIN {$tablepre}members m ON m.uid=p.authorid" : '') . " WHERE p.pid='{$pid}' AND p.invisible='0'");
if (!$db->num_rows($queryr) || !$db->num_rows($queryp)) {
showmessage('thread_rate_log_nonexistence');
}
示例7: _adminTopic
private function _adminTopic($fid, $tid, $pid, $act, $type)
{
global $_G;
$errorMsg = '';
$_GET['topiclist'] = array($_GET['pid']);
// 在DISCUZ_ROOT/source/module/forum/forum_topicadmin.php基础上进行二次开发
$_GET['topiclist'] = !empty($_GET['topiclist']) ? is_array($_GET['topiclist']) ? array_unique($_GET['topiclist']) : $_GET['topiclist'] : array();
loadcache(array('modreasons', 'stamptypeid', 'threadtableids'));
require_once libfile('function/post');
require_once libfile('function/misc');
$modpostsnum = 0;
$resultarray = $thread = array();
if ($_G['group']['reasonpm'] == 2 || $_G['group']['reasonpm'] == 3 || !empty($_GET['sendreasonpm'])) {
$forumname = strip_tags($_G['forum']['name']);
$sendreasonpm = 1;
} else {
$sendreasonpm = 0;
}
if ($type == 'topic') {
if ($act == 'band') {
$resultarray = $this->_topicAdmin_band($fid, $tid, $pid, $act, $type, array('sendreasonpm' => $sendreasonpm, 'thread' => $_G['forum_thread']));
} else {
// 在DISCUZ_ROOT/source/include/topicadmin/topicadmin_moderate.php基础上进行二次开发
$thread = $_G['forum_thread'];
$thread['dblastpost'] = $thread['lastpost'];
$threadlist[$thread['tid']] = $thread;
$modpostsnum = count($threadlist);
$stickcheck = $closecheck = $digestcheck = array('', '', '', '', '');
empty($threadlist[$_G['tid']]['displayorder']) ? $stickcheck[0] = 'selected="selected"' : ($stickcheck[$threadlist[$_G['tid']]['displayorder']] = 'selected="selected"');
empty($threadlist[$_G['tid']]['digest']) ? $digestcheck[0] = 'selected="selected"' : ($digestcheck[$threadlist[$_G['tid']]['digest']] = 'selected="selected"');
empty($threadlist[$_G['tid']]['closed']) ? $closecheck[0] = 'checked="checked"' : ($closecheck[1] = 'checked="checked"');
if (!empty($_POST)) {
$tidsarr = array_keys($threadlist);
$moderatetids = dimplode($tidsarr);
$reason = checkreasonpm();
$stampstatus = 0;
$stampaction = 'SPA';
$operationMap = array('top' => 'stick', 'marrow' => 'digest', 'delete' => 'delete');
$operation = $operationMap[$act];
$updatemodlog = TRUE;
switch ($act) {
case 'top':
$sticklevel = intval($_GET['sticklevel']);
if ($sticklevel < 0 || $sticklevel > 3 || $sticklevel > $_G['group']['allowstickthread']) {
// showmessage('no_privilege_stickthread');
$this->_exitWithHtmlAlert('no_privilege_stickthread');
}
$expiration = checkexpiration($_GET['expirationstick'], $operation);
$expirationstick = $sticklevel ? $_GET['expirationstick'] : 0;
$forumstickthreads = $_G['setting']['forumstickthreads'];
$forumstickthreads = isset($forumstickthreads) ? dunserialize($forumstickthreads) : array();
C::t('forum_thread')->update($tidsarr, array('displayorder' => $sticklevel, 'moderated' => 1), true);
$delkeys = array_keys($threadlist);
foreach ($delkeys as $k) {
unset($forumstickthreads[$k]);
}
C::t('common_setting')->update('forumstickthreads', $forumstickthreads);
$stickmodify = 0;
foreach ($threadlist as $thread) {
$stickmodify = (in_array($thread['displayorder'], array(2, 3)) || in_array($sticklevel, array(2, 3))) && $sticklevel != $thread['displayorder'] ? 1 : $stickmodify;
}
if ($_G['setting']['globalstick'] && $stickmodify) {
require_once libfile('function/cache');
updatecache('globalstick');
}
$modaction = $sticklevel ? $expiration ? 'EST' : 'STK' : 'UST';
C::t('forum_threadmod')->update_by_tid_action($tidsarr, array('STK', 'UST', 'EST', 'UES'), array('status' => 0));
if (!$sticklevel) {
$stampaction = 'SPD';
}
$stampstatus = 1;
break;
case 'marrow':
$digestlevel = intval($_GET['digestlevel']);
if ($digestlevel < 0 || $digestlevel > 3 || $digestlevel > $_G['group']['allowdigestthread']) {
// showmessage('no_privilege_digestthread');
$this->_exitWithHtmlAlert('no_privilege_digestthread');
}
$expiration = checkexpiration($_GET['expirationdigest'], $operation);
$expirationdigest = $digestlevel ? $expirationdigest : 0;
C::t('forum_thread')->update($tidsarr, array('digest' => $digestlevel, 'moderated' => 1), true);
foreach ($threadlist as $thread) {
if ($thread['digest'] != $digestlevel) {
if ($digestlevel == $thread['digest']) {
continue;
}
$extsql = array();
if ($digestlevel > 0 && $thread['digest'] == 0) {
$extsql = array('digestposts' => 1);
}
if ($digestlevel == 0 && $thread['digest'] > 0) {
$extsql = array('digestposts' => -1);
}
if ($digestlevel == 0) {
$stampaction = 'SPD';
}
updatecreditbyaction('digest', $thread['authorid'], $extsql, '', $digestlevel - $thread['digest']);
}
}
$modaction = $digestlevel ? $expiration ? 'EDI' : 'DIG' : 'UDG';
//.........这里部分代码省略.........
示例8: IN
}
$db->query("UPDATE {$tablepre}threads SET typeid='{$typeid}', moderated='1' WHERE tid IN ({$moderatetids})");
$modaction = 'TYP';
}
if ($updatemodlog) {
updatemodlog($moderatetids, $modaction, $expiration);
}
updatemodworks($modaction, $modpostsnum);
foreach ($threadlist as $thread) {
modlog($thread, $modaction);
}
if ($sendreasonpm) {
include_once language('modactions');
$modaction = $modactioncode[$modaction];
foreach ($threadlist as $thread) {
sendreasonpm('thread', $operation == 'move' ? 'reason_move' : 'reason_moderate');
}
}
procreportlog($moderatetids, '', $operation == 'delete');
if ($stampstatus) {
set_stamp($stampstatus);
}
}
showmessage('admin_succeed', $referer);
}
}
function checkexpiration($expiration)
{
global $operation, $timestamp, $timeoffset;
if (!empty($expiration) && in_array($operation, array('recommend', 'stick', 'digest', 'highlight', 'close'))) {
$expiration = strtotime($expiration) - $timeoffset * 3600 + date('Z');
示例9: ceil
if (in_array($ratelog['uid'] . ' ' . $ratelog['extcredits'] . ' ' . $ratelog['dateline'], $_G['gp_logidarray'])) {
$rate += $ratelog['score'] = -$ratelog['score'];
$ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
updatemembercount($post['authorid'], array($ratelog['extcredits'] => $ratelog['score']));
DB::delete('common_credit_log', array('uid' => $post['authorid'], 'operation' => 'PRC', 'relatedid' => $_G['gp_pid']));
DB::query("DELETE FROM " . DB::table('forum_ratelog') . " WHERE pid='{$_G['gp_pid']}' AND uid='{$ratelog['uid']}' AND extcredits='{$ratelog['extcredits']}' AND dateline='{$ratelog['dateline']}'", 'UNBUFFERED');
$logs[] = dhtmlspecialchars("{$_G['timestamp']}\t{$_G[member][username]}\t{$_G['adminid']}\t{$ratelog['username']}\t{$ratelog['extcredits']}\t{$ratelog['score']}\t{$_G['tid']}\t{$thread['subject']}\t{$reason}\tD");
if ($sendreasonpm) {
$ratescore .= $slash . $_G['setting']['extcredits'][$ratelog['extcredits']]['title'] . ' ' . ($ratelog['score'] > 0 ? '+' . $ratelog['score'] : $ratelog['score']) . ' ' . $_G['setting']['extcredits'][$ratelog['extcredits']]['unit'];
$slash = ' / ';
}
}
}
writelog('ratelog', $logs);
if ($sendreasonpm) {
sendreasonpm($post, 'rate_removereason', array('tid' => $thread['tid'], 'pid' => $_G['gp_pid'], 'subject' => $thread['subject'], 'ratescore' => $ratescore, 'reason' => stripslashes($reason)));
}
DB::query("UPDATE " . DB::table($posttable) . " SET rate=rate+({$rate}), ratetimes=ratetimes-{$ratetimes} WHERE pid='{$_G['gp_pid']}'");
if ($post['first']) {
$threadrate = @intval(@($post['rate'] + $rate) / abs($post['rate'] + $rate));
DB::query("UPDATE " . DB::table('forum_thread') . " SET rate='{$threadrate}' WHERE tid='{$_G['tid']}'");
}
}
showmessage('thread_rate_removesucceed', dreferer());
}
} elseif ($_G['gp_action'] == 'viewratings' && $_G['gp_pid']) {
$posttable = getposttablebytid($_G['tid']);
$queryr = DB::query("SELECT * FROM " . DB::table('forum_ratelog') . " WHERE pid='{$_G['gp_pid']}' ORDER BY dateline DESC");
$queryp = DB::query("SELECT p.* " . ($_G['setting']['bannedmessages'] ? ", m.groupid " : '') . " FROM " . DB::table($posttable) . " p " . ($_G['setting']['bannedmessages'] ? "LEFT JOIN " . DB::table('common_member') . " m ON m.uid=p.authorid" : '') . " WHERE p.pid='{$_G['gp_pid']}' AND p.invisible='0'");
if (!DB::num_rows($queryr) || !DB::num_rows($queryp)) {
showmessage('thread_rate_log_nonexistence');
示例10: _viewRate
private function _viewRate($res, $tid, $pid)
{
$res = $this->_checkRate($res, $tid, $pid);
$status = WebUtils::checkError($res);
$location = WebUtils::createUrl_oldVersion('index/returnmobileview');
if ($status) {
$str = <<<HTML
<script>
alert("{$res['head']['errInfo']}");
location.href = "{$location}";
</script>
HTML;
echo $str;
exit;
}
// [add]修复gbk编码导致的评分理由不显示。Author:HanPengyu Data:04.09.27
if (!empty($_POST)) {
// 把$_POST转成utf-8, 这是由于discuz源码会在mobile情况下把$_POST预先转码成对应的charset,
$_POST = array_intersect_key($_REQUEST, $_POST);
// 手动把转成utf-8的$_POST数据再次转成对应的charset
foreach ($_POST as $key => $value) {
if (is_string($value)) {
$_POST[$key] = WebUtils::t($value);
}
}
$_GET = array_merge($_GET, $_POST);
}
global $_G;
require_once libfile('function/misc');
require_once libfile('function/forum');
//今日剩余积分
$maxratetoday = $this->_getratingleft($_G['group']['raterange']);
$post = C::t('forum_post')->fetch('tid:' . $tid, $pid);
$thread = C::t('forum_thread')->fetch($tid);
if (!empty($_POST)) {
$reason = checkreasonpm();
$rate = $ratetimes = 0;
$creditsarray = $sub_self_credit = array();
getuserprofile('extcredits1');
foreach ($_G['group']['raterange'] as $id => $rating) {
$score = intval($_GET['score' . $id]);
if (isset($_G['setting']['extcredits'][$id]) && !empty($score)) {
if ($rating['isself'] && intval($_G['member']['extcredits' . $id]) - $score < 0) {
//抱歉,您的{extcreditstitle}(评分栏目)不足,无法评分
$errorMsg = lang('message', 'thread_rate_range_self_invalid', array('extcreditstitle' => $_G['setting']['extcredits'][$id]['title']));
$this->_renderTemplates($tid, $pid, $errorMsg);
exit;
}
if (abs($score) <= $maxratetoday[$id]) {
if ($score > $rating['max'] || $score < $rating['min']) {
//请输入正确的分值
$errorMsg = lang('message', 'thread_rate_range_invalid');
$this->_renderTemplates($tid, $pid, $errorMsg);
exit;
} else {
$creditsarray[$id] = $score;
if ($rating['isself']) {
$sub_self_credit[$id] = -abs($score);
}
$rate += $score;
$ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
}
} else {
//抱歉,24 小时评分数超过限制
$errorMsg = lang('message', 'thread_rate_ctrl');
$this->_renderTemplates($tid, $pid, $errorMsg);
exit;
}
}
}
if (!$creditsarray) {
//请输入正确的分值
$errorMsg = lang('message', 'thread_rate_range_invalid');
$this->_renderTemplates($tid, $pid, $errorMsg);
exit;
}
updatemembercount($post['authorid'], $creditsarray, 1, 'PRC', $_GET['pid']);
if (!empty($sub_self_credit)) {
updatemembercount($_G['uid'], $sub_self_credit, 1, 'RSC', $_GET['pid']);
}
C::t('forum_post')->increase_rate_by_pid('tid:' . $_G['tid'], $_GET['pid'], $rate, $ratetimes);
if ($post['first']) {
$threadrate = intval(@($post['rate'] + $rate) / abs($post['rate'] + $rate));
C::t('forum_thread')->update($_G['tid'], array('rate' => $threadrate));
}
require_once libfile('function/discuzcode');
$sqlvalues = $comma = '';
$sqlreason = censor(trim($_GET['reason']));
$sqlreason = cutstr(dhtmlspecialchars($sqlreason), 40, '.');
foreach ($creditsarray as $id => $addcredits) {
$insertarr = array('pid' => $_GET['pid'], 'uid' => $_G['uid'], 'username' => $_G['username'], 'extcredits' => $id, 'dateline' => $_G['timestamp'], 'score' => $addcredits, 'reason' => $sqlreason);
C::t('forum_ratelog')->insert($insertarr);
}
include_once libfile('function/post');
$_G['forum']['threadcaches'] && @deletethreadcaches($_G['tid']);
$reason = dhtmlspecialchars(censor(trim($reason)));
//对是否通知作者做的一些初始工作
if ($_G['group']['resasonpm'] == 2 || $_G['group']['reasonpm'] == 3 || !empty($_GET['sendreasonpm'])) {
$forumname = strip_tags($_G['forum']['name']);
$sendreasonpm = 1;
//.........这里部分代码省略.........
示例11: updatemodlog
updatemodlog($moderatetids, $modaction, $expiration, 0, $reason);
}
}
updatemodworks($modaction, $modpostsnum);
foreach ($threadlist as $thread) {
modlog($thread, $modaction);
}
if ($sendreasonpm) {
$modactioncode = lang('forum/modaction');
$modtype = $modaction;
$modaction = $modactioncode[$modaction];
foreach ($threadlist as $thread) {
if ($operation == 'move') {
sendreasonpm($thread, 'reason_move', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'tofid' => $toforum['fid'], 'toname' => $toforum['name'], 'from_id' => 0, 'from_idtype' => 'movethread'));
} else {
sendreasonpm($thread, 'reason_moderate', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'from_id' => 0, 'from_idtype' => 'moderate_' . $modtype));
}
}
}
if ($stampstatus) {
set_stamp($stampstatus, $stampaction, $threadlist, $expiration);
}
}
showmessage('admin_succeed', $_G['referer']);
}
}
function checkexpiration($expiration, $operation)
{
global $_G;
if (!empty($expiration) && in_array($operation, array('recommend', 'stick', 'digest', 'highlight', 'close'))) {
$expiration = strtotime($expiration) - $_G['setting']['timeoffset'] * 3600 + date('Z');
示例12: showmessage
$sendreasonpm = 0;
}
$_GET['handlekey'] = 'mods';
if (preg_match('/^\\w+$/', $_GET['action']) && file_exists($topicadminfile = libfile('topicadmin/' . $_GET['action'], 'include'))) {
require_once $topicadminfile;
} else {
showmessage('undefined_action', NULL);
}
if ($resultarray) {
if ($resultarray['modtids']) {
updatemodlog($resultarray['modtids'], $modaction, $resultarray['expiration']);
}
updatemodworks($modaction, $modpostsnum);
if (is_array($resultarray['modlog'])) {
if (isset($resultarray['modlog']['tid'])) {
modlog($resultarray['modlog'], $modaction);
} else {
foreach ($resultarray['modlog'] as $thread) {
modlog($thread, $modaction);
}
}
}
if ($resultarray['reasonpm']) {
$modactioncode = lang('forum/modaction');
$modaction = $modactioncode[$modaction];
foreach ($resultarray['reasonpm']['data'] as $var) {
sendreasonpm($var, $resultarray['reasonpm']['item'], $resultarray['reasonvar'], $resultarray['reasonpm']['notictype']);
}
}
showmessage(isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed', $resultarray['redirect']);
}