当前位置: 首页>>代码示例>>PHP>>正文


PHP updatemodlog函数代码示例

本文整理汇总了PHP中updatemodlog函数的典型用法代码示例。如果您正苦于以下问题:PHP updatemodlog函数的具体用法?PHP updatemodlog怎么用?PHP updatemodlog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了updatemodlog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _handleEvilPost

	protected function _handleEvilPost($tid, $pid, $evilType, $evilLevel = 1) {

/*vot*/		include_once DISCUZ_ROOT.'./source/language/'.DISCUZ_LANG.'/lang_admincp_cloud.php';

		$securityService = Cloud::loadClass('Service_Security');
		$securityService->writeLog($pid, 'pid');

		$evilPost = C::t('#security#security_evilpost')->fetch($pid);

		if (count($evilPost)) {
			return true;
		} else {
			require_once libfile('function/delete');
			require_once libfile('function/forum');
			require_once libfile('function/post');

			$data = array('pid' => $pid, 'tid' => $tid, 'evilcount' => 1, 'eviltype' => $evilType, 'createtime' => TIMESTAMP);
			$post = get_post_by_pid($pid);

			if (is_array($post) && count($post) > 0) {
				if ($tid != $post['tid']) {
					return false;
				}

				$thread = get_thread_by_tid($tid);

				if ($post['first']) {
					$data['type'] = 1;
					if ($this->_checkThreadIgnore($tid)) {
						return false;
					}
					C::t('#security#security_evilpost')->insert($data, false, true);
					$this->_updateEvilCount('thread');
					deletethread(array($tid), true, true, true);
					updatemodlog($tid, 'DEL', 0, 1, $extend_lang['security_modreason']);
				} else {
					$data['type'] = 0;
					if ($this->_checkPostIgnore($pid, $post)) {
						return false;
					}
					C::t('#security#security_evilpost')->insert($data, false, true);
					$this->_updateEvilCount('post');

					deletepost(array($pid), 'pid', true, false, true);
				}
				if(!empty($post['authorid'])) {
					$data = array('uid' => $post['authorid'], 'createtime' => TIMESTAMP);
					C::t('#security#security_eviluser')->insert($data, false, true);
				}
			} else {
				$data['operateresult'] = 2;
				C::t('#security#security_evilpost')->insert($data, false, true);
			}
		}

		return true;
	}
开发者ID:xDiglett,项目名称:discuzx30,代码行数:57,代码来源:Security.php

示例2: set_stamp

function set_stamp($typeid, $stampaction, &$threadlist, $expiration)
{
    global $_G;
    $moderatetids = dimplode(array_keys($threadlist));
    if (empty($threadlist)) {
        return false;
    }
    if (array_key_exists($typeid, $_G['cache']['stamptypeid'])) {
        DB::query("UPDATE " . DB::table('forum_thread') . " SET " . buildbitsql('status', 5, TRUE) . " WHERE tid IN ({$moderatetids})");
        if ($stampaction == 'SPD') {
            $stamptids = array();
            foreach ($threadlist as $stamptid => $thread) {
                $currentstamp = DB::fetch_first("SELECT * FROM " . DB::table('forum_threadmod') . " WHERE tid='{$stamptid}' AND status='1' ORDER BY dateline DESC LIMIT 1");
                if (!empty($currentstamp) && $currentstamp['stamp'] == $_G['cache']['stamptypeid'][$typeid]) {
                    $stamptids[] = $stamptid;
                }
            }
            if (!empty($stamptids)) {
                $moderatetids = dimplode($stamptids);
            } else {
                $moderatetids = '';
            }
        }
        !empty($moderatetids) && updatemodlog($moderatetids, $stampaction, $expiration, 0, $_G['cache']['stamptypeid'][$typeid]);
    }
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:26,代码来源:topicadmin_moderation.php

示例3: count

                }
                $uids = @array_unique($uids);
                $count = count($uids);
                $limit = intval($_GET['limit']);
                $per = 200;
                $uids = @array_slice($uids, $limit, $per);
                if ($uids) {
                    foreach ($uids as $uid) {
                        if (empty($uid)) {
                            continue;
                        }
                        foreach ($tagarray as $tagid => $tagname) {
                            C::t('common_tagitem')->insert(array('tagid' => $tagid, 'itemid' => $uid, 'idtype' => 'uid'), 0, 1);
                        }
                    }
                    updatemodlog($_G['tid'], 'AUT', 0, 0, implode(',', $tagarray));
                    showmessage('forum_usertag_set_continue', '', array('limit' => $limit, 'next' => min($limit + $per, $count), 'count' => $count), array('alert' => 'right'));
                }
                showmessage('forum_usertag_succeed', '', array(), array('alert' => 'right'));
            } else {
                showmessage('parameters_error', '', array('haserror' => 1));
            }
        }
    } else {
        showmessage('parameters_error', '', array('haserror' => 1));
    }
    include_once template("forum/usertag");
}
function getratelist($raterange)
{
    global $_G;
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:forum_misc.php

示例4: 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;
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:35,代码来源:cpanel.share.php

示例5: IN

             $threadimage = DB::fetch_first("SELECT attachment, remote FROM " . DB::table(getattachtablebytid($_G['tid'])) . " WHERE tid='{$_G['tid']}' AND isimage IN ('1', '-1') ORDER BY width DESC LIMIT 1");
         }
         DB::delete('forum_threadimage', "tid='{$_G['tid']}'");
         $threadimage = daddslashes($threadimage);
         DB::insert('forum_threadimage', array('tid' => $_G['tid'], 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
     }
 }
 $feed = array();
 if ($special == 127) {
     $message .= chr(0) . chr(0) . chr(0) . $specialextra;
 }
 if ($_G['forum_auditstatuson'] && $audit == 1) {
     DB::query("UPDATE " . DB::table(getposttable($thread['posttableid'])) . " SET status='4' WHERE pid='{$pid}' AND status='0' AND invisible='-2'");
     updatepostcredits('+', $orig['authorid'], $isfirstpost ? 'post' : 'reply', $_G['fid']);
     updatemodworks('MOD', 1);
     updatemodlog($_G['tid'], 'MOD');
 }
 $displayorder = $pinvisible = 0;
 if ($isfirstpost) {
     $displayorder = $modnewthreads ? -2 : $thread['displayorder'];
     $pinvisible = $modnewthreads ? -2 : (empty($_G['gp_save']) ? 0 : -3);
     if ($thread['displayorder'] == -4 && empty($_G['gp_save'])) {
         DB::query("UPDATE " . DB::table($posttable) . " SET dateline='{$_G['timestamp']}', invisible='0' WHERE tid='{$thread['tid']}'");
         DB::query("UPDATE " . DB::table('forum_thread') . " SET dateline='{$_G['timestamp']}', lastpost='{$_G['timestamp']}' WHERE tid='{$thread['tid']}'");
         $posts = $thread['replies'] + 1;
         if ($thread['replies']) {
             $dateline = $_G['timestamp'];
             $query = DB::query("SELECT pid FROM " . DB::table($posttable) . " WHERE tid='{$thread['tid']}' AND first='0'");
             while ($post = DB::fetch($query)) {
                 $dateline++;
                 DB::query("UPDATE " . DB::table($posttable) . " SET dateline='{$dateline}' WHERE pid='{$post['pid']}'");
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:post_editpost.php

示例6: IN

            case 'UEH':
                $db->query("UPDATE {$tablepre}threads SET highlight='0' WHERE tid IN ({$tids})", 'UNBUFFERED');
                $db->query("UPDATE {$tablepre}threadsmod SET status='0' WHERE tid IN ({$tids}) AND action IN ('EHL', 'CCK')", 'UNBUFFERED');
                break;
            case 'UEC':
            case 'UEO':
                $closed = $action == 'UEO' ? 1 : 0;
                $db->query("UPDATE {$tablepre}threads SET closed='{$closed}' WHERE tid IN ({$tids})", 'UNBUFFERED');
                $db->query("UPDATE {$tablepre}threadsmod SET status='0' WHERE tid IN ({$tids}) AND action IN ('EOP', 'ECL', 'CLK')", 'UNBUFFERED');
                break;
            case 'UED':
                $db->query("UPDATE {$tablepre}threadsmod SET status='0' WHERE tid IN ({$tids}) AND action='EDI'", 'UNBUFFERED');
                $digestarray = $authoridarry = array();
                $query = $db->query("SELECT authorid, digest FROM {$tablepre}threads WHERE tid IN ({$tids})");
                while ($digest = $db->fetch_array($query)) {
                    $authoridarry[] = $digest['authorid'];
                    $digestarray[$digest['digest']][] = $digest['authorid'];
                }
                $db->query("UPDATE {$tablepre}members SET digestposts=digestposts-1 WHERE uid IN (" . implode(',', $authoridarry) . ")", 'UNBUFFERED');
                foreach ($digestarray as $digest => $authorids) {
                    updatecredits(implode('\',\'', $authorids), $creditspolicy['digest'], 0 - $digest);
                }
                $db->query("UPDATE {$tablepre}threads SET digest='0' WHERE tid IN ({$tids})", 'UNBUFFERED');
                break;
        }
    }
    require_once DISCUZ_ROOT . './include/post.func.php';
    foreach ($actionarray as $action => $tids) {
        updatemodlog(implode(',', $tids), $action, 0, 1);
    }
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:threadexpiries_hourly.inc.php

示例7: libfile

 if ($pidsdelete) {
     require_once libfile('function/post');
     require_once libfile('function/delete');
     $forums = array();
     $query = DB::query('SELECT fid, recyclebin FROM ' . DB::table('forum_forum') . " WHERE fid IN (" . dimplode($prune['forums']) . ")");
     while ($value = DB::fetch($query)) {
         $forums[$value['fid']] = $value;
     }
     foreach ($pidsdelete as $fid => $pids) {
         foreach ($pids as $pid) {
             if (!$tidsdelete[$pid]) {
                 $deletedposts = deletepost($pid, 'pid', !getgpc('nocredit'), $posttableid, $forums[$fid]['recyclebin']);
                 updatemodlog($pids_tids[$pid], 'DLP');
             } else {
                 $deletedthreads = deletethread($tidsdelete[$pid], false, !getgpc('nocredit'), $forums[$fid]['recyclebin']);
                 updatemodlog($tidsdelete[$pid], 'DEL');
             }
         }
     }
     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) . ")");
         }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:modcp_thread.php

示例8: isset

        }
    }
}
$typeid = isset($typeid) ? $typeid : 0;
$displayorder = $modnewthreads ? -2 : ($_G['forum']['ismoderator'] && !empty($_G['gp_sticktopic']) ? 1 : 0);
$digest = $_G['forum']['ismoderator'] && !empty($addtodigest) ? 1 : 0;
$readperm = $_G['group']['allowsetreadperm'] ? $readperm : 0;
$isanonymous = $_G['gp_isanonymous'] && $_G['group']['allowanonymous'] ? 1 : 0;
$author = !$isanonymous ? $_G['username'] : '';
$moderated = $digest || $displayorder > 0 ? 1 : 0;
$posttableid = getposttableid('p');
$isgroup = $_G['forum']['status'] == 3 ? 1 : 0;
DB::query("INSERT INTO " . DB::table('forum_thread') . " (fid, posttableid, readperm, price, typeid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, special, attachment, moderated, replies, status, isgroup)\n\tVALUES ('{$_G['fid']}', '{$posttableid}', '{$readperm}', '{$price}', '{$typeid}', '{$author}', '{$_G['uid']}', '{$subject}', '{$_G['timestamp']}', '{$_G['timestamp']}', '{$author}', '{$displayorder}', '{$digest}', '{$special}', '{$attachment}', '{$moderated}', '1', '{$thread['status']}', '{$isgroup}')");
$tid = DB::insert_id();
if ($moderated) {
    updatemodlog($tid, $displayorder > 0 ? 'STK' : 'DIG');
    updatemodworks($displayorder > 0 ? 'STK' : 'DIG', 1);
}
$bbcodeoff = checkbbcodes($message, !empty($_G['gp_bbcodeoff']));
$smileyoff = checksmilies($message, !empty($_G['gp_smileyoff']));
$parseurloff = !empty($_G['gp_parseurloff']);
$htmlon = bindec(($_G['setting']['tagstatus'] && !empty($tagoff) ? 1 : 0) . ($_G['group']['allowhtml'] && !empty($_G['gp_htmlon']) ? 1 : 0));
$attentionon = empty($_G['gp_attention_add']) ? 0 : 1;
$pinvisible = $modnewthreads ? -2 : 0;
insertpost(array('fid' => $_G['fid'], 'tid' => $tid, 'first' => '1', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'subject' => $subject, 'dateline' => $_G['timestamp'], 'message' => '', 'useip' => $_G['clientip'], 'invisible' => $pinvisible, 'anonymous' => $isanonymous, 'usesig' => $_G['gp_usesig'], 'htmlon' => $htmlon, 'bbcodeoff' => $bbcodeoff, 'smileyoff' => $smileyoff, 'parseurloff' => $parseurloff, 'attachment' => '0'));
if ($_G['setting']['tagstatus'] && $_G['gp_tags'] != '') {
    $tags = str_replace(array(chr(0xa3) . chr(0xac), chr(0xa1) . chr(0x41), chr(0xef) . chr(0xbc) . chr(0x8c)), ',', censor($_G['gp_tags']));
    if (strexists($tags, ',')) {
        $tagarray = array_unique(explode(',', $tags));
    } else {
        $tags = str_replace(array(chr(0xa1) . chr(0xa1), chr(0xa1) . chr(0x40), chr(0xe3) . chr(0x80) . chr(0x80)), ' ', $tags);
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:post_newtrade.php

示例9: updatepostcredits

                $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 ({$undeletetids})", 'UNBUFFERED');
        $db->query("UPDATE {$tablepre}threads SET displayorder='0', moderated='1' WHERE tid IN ({$undeletetids})");
        $threadsundel = $db->affected_rows();
        updatemodlog($undeletetids, 'UDL');
        updatemodworks('UDL', $threadsundel);
        foreach ($fidarray as $fid) {
            updateforumcount($fid);
        }
    }
    cpmsg('recyclebin_succeed');
}
if (submitcheck('searchsubmit')) {
    $sql = '';
    $sql .= $inforum ? " AND t.fid='{$inforum}'" : '';
    $sql .= $authors != '' ? " AND t.author IN ('" . str_replace(',', '\',\'', str_replace(' ', '', $authors)) . "')" : '';
    $sql .= $admins != '' ? " AND tm.username IN ('" . str_replace(',', '\',\'', str_replace(' ', '', $admins)) . "')" : '';
    $sql .= $pstarttime != '' ? " AND t.dateline>='" . (strtotime($pstarttime) - $timeoffset * 3600) . "'" : '';
    $sql .= $pendtime != '' ? " AND t.dateline<'" . (strtotime($pendtime) - $timeoffset * 3600) . "'" : '';
    $sql .= $mstarttime != '' ? " AND tm.dateline>='" . (strtotime($mstarttime) - $timeoffset * 3600) . "'" : '';
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:recyclebin.inc.php

示例10: exit

 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (!$_G['group']['allowlivethread']) {
    showmessage('no_privilege_livethread');
}
if (!submitcheck('modsubmit')) {
    include template('forum/topicadmin_action');
} else {
    $modaction = $_GET['live'] ? 'LIV' : 'LIC';
    $reason = checkreasonpm();
    $expiration = $_GET['expirationlive'] ? dintval($_GET['expirationlive']) : 0;
    //删除缓存
    $mem_key = 'forum_forum_fetch_all_info_by_fids_' . $_G['fid'];
    memory('rm', $mem_key);
    //删除板块缓存
    $mem_key = 'forum_forum_fetch_info_by_fid_' . $_G['fid'];
    $res1 = memory('rm', $mem_key);
    if ($modaction == 'LIV') {
        C::t('forum_forumfield')->update($_G['fid'], array('livetid' => $_G['tid']));
    } elseif ($modaction == 'LIC') {
        if ($_G['tid'] != $_G['forum']['livetid']) {
            showmessage('topicadmin_live_noset_error');
        }
        C::t('forum_forumfield')->update($_G['fid'], array('livetid' => 0));
    }
    $resultarray = array('redirect' => "forum.php?mod=viewthread&tid={$_G['tid']}&page={$page}", 'reasonpm' => $sendreasonpm ? array('data' => array($thread), 'var' => 'thread', 'notictype' => 'post', 'item' => $_GET['live'] ? 'reason_live_update' : 'reason_live_cancle') : array(), 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason), 'modaction' => $modaction, 'modlog' => $thread);
    $modpostsnum = 1;
    updatemodlog($_G['tid'], $modaction, $expiration, 0, '', $modaction == 'LIV' ? 1 : 0);
}
开发者ID:vanloswang,项目名称:discuzx-1,代码行数:31,代码来源:topicadmin_live.php

示例11: handleEvilPost

function handleEvilPost($tid, $pid, $evilType, $evilLevel = 1)
{
    global $_G;
    if (notOpenService()) {
        return false;
    }
    include_once DISCUZ_ROOT . './source/language/lang_admincp_cloud.php';
    loadSecLog($pid, 'pid');
    $evilPost = DB::fetch_first("SELECT * FROM " . DB::table('security_evilpost') . " WHERE pid='{$pid}'");
    if (is_array($evilPost)) {
        $data = $evilPost;
        $data['evilcount'] = $evilPost['evilcount'] + 1;
    } else {
        require_once libfile('function/delete');
        require_once libfile('function/forum');
        require_once libfile('function/post');
        $data = array('pid' => $pid, 'tid' => $tid, 'evilcount' => 1, 'eviltype' => $evilType, 'createtime' => TIMESTAMP);
        $post = get_post_by_pid($pid);
        if (is_array($post) && count($post) > 0) {
            if ($tid != $post['tid']) {
                return false;
            }
            if ($post['first']) {
                $data['type'] = 1;
                if (checkThreadIgnore($tid)) {
                    return false;
                }
                DB::insert('security_evilpost', $data, 0, 1);
                updateEvilCount('thread');
                DB::query("UPDATE " . DB::table('forum_thread') . " SET displayorder='-1', digest='0', moderated='1' WHERE tid = '" . $tid . "'");
                deletethread(array($tid), true, true, true);
                updatepost(array('invisible' => '-1'), "tid = '" . $tid . "'");
                updatemodlog($tid, 'DEL', 0, 1, $extend_lang['security_modreason']);
            } else {
                $data['type'] = 0;
                if (checkPostIgnore($pid, $post)) {
                    return false;
                }
                DB::insert('security_evilpost', $data, 0, 1);
                updateEvilCount('post');
                deletepost(array($pid), 'pid', true, false, true);
            }
        } else {
            $data['operateresult'] = 2;
            DB::insert('security_evilpost', $data, 0, 1);
        }
    }
    return true;
}
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:49,代码来源:function_sec.php

示例12: set_stamp

function set_stamp($typeid, $stampaction, &$threadlist, $expiration)
{
    global $_G;
    $moderatetids = array_keys($threadlist);
    if (empty($threadlist)) {
        return false;
    }
    if (array_key_exists($typeid, $_G['cache']['stamptypeid'])) {
        if ($stampaction == 'SPD') {
            C::t('forum_thread')->update($moderatetids, array('stamp' => -1), true);
        } else {
            C::t('forum_thread')->update($moderatetids, array('stamp' => $_G['cache']['stamptypeid'][$typeid]), true);
        }
        !empty($moderatetids) && updatemodlog($moderatetids, $stampaction, $expiration, 0, '', $_G['cache']['stamptypeid'][$typeid]);
    }
}
开发者ID:dalinhuang,项目名称:healthshop,代码行数:16,代码来源:topicadmin_moderate.php

示例13: updatecache

         if ($globalstick && $stickmodify) {
             require_once DISCUZ_ROOT . './include/cache.func.php';
             updatecache('globalstick');
         }
         $modaction = 'MOV';
         updateforumcount($moveto);
         updateforumcount($fid);
     } elseif ($operation == 'type') {
         if (!isset($forum['threadtypes']['types'][$typeid]) && ($typeid != 0 || $forum['threadtypes']['required'])) {
             showmessage('admin_type_invalid');
         }
         $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');
 }
 showmessage('admin_succeed', $referer);
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:moderation.inc.php

示例14: exit

<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: topicadmin_stamplist.php 20099 2011-02-15 01:55:29Z monkey $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (!$_G['group']['allowstamplist']) {
    showmessage('no_privilege_stamplist');
}
loadcache('stamps');
if (!submitcheck('modsubmit')) {
    include template('forum/topicadmin_action');
} else {
    $_G['gp_stamplist'] = $_G['gp_stamplist'] !== '' ? $_G['gp_stamplist'] : -1;
    $modaction = $_G['gp_stamplist'] >= 0 ? 'L' . sprintf('%02d', $_G['gp_stamplist']) : 'SLD';
    $reason = checkreasonpm();
    DB::query("UPDATE " . DB::table('forum_thread') . " SET moderated='1', icon='{$_G['gp_stamplist']}' WHERE tid='{$_G['tid']}'");
    $resultarray = array('redirect' => "forum.php?mod=viewthread&tid={$_G['tid']}&page={$page}", 'reasonpm' => $sendreasonpm ? array('data' => array($thread), 'var' => 'thread', 'item' => $_G['gp_stamplist'] !== '' ? 'reason_stamplist_update' : 'reason_stamplist_delete') : array(), 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => stripslashes($reason), 'stamp' => $_G['cache']['stamps'][$_G['gp_stamplist']]['text']), 'modaction' => $modaction, 'modlog' => $thread);
    $modpostsnum = 1;
    updatemodlog($_G['tid'], $modaction);
}
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:26,代码来源:topicadmin_stamplist.php

示例15: set_stamp

function set_stamp($typeid)
{
    global $tablepre, $db, $_DCACHE, $moderatetids, $expiration;
    if (array_key_exists($typeid, $_DCACHE['stamptypeid'])) {
        $db->query("UPDATE {$tablepre}threads SET " . buildbitsql('status', 5, TRUE) . " WHERE tid IN ({$moderatetids})");
        updatemodlog($moderatetids, 'SPA', $expiration, 0, $_DCACHE['stamptypeid'][$typeid]);
    }
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:8,代码来源:moderation.inc.php


注:本文中的updatemodlog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。