本文整理汇总了PHP中updatemodlog函数的典型用法代码示例。如果您正苦于以下问题:PHP updatemodlog函数的具体用法?PHP updatemodlog怎么用?PHP updatemodlog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatemodlog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: 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'])) {
if ($stampaction == 'SPD') {
DB::query("UPDATE " . DB::table('forum_thread') . " SET stamp='-1' WHERE tid IN ({$moderatetids})");
} else {
DB::query("UPDATE " . DB::table('forum_thread') . " SET stamp='" . $_G['cache']['stamptypeid'][$typeid] . "' WHERE tid IN ({$moderatetids})");
}
!empty($moderatetids) && updatemodlog($moderatetids, $stampaction, $expiration, 0, '', $_G['cache']['stamptypeid'][$typeid]);
}
}
开发者ID:v998,项目名称:discuzx-en,代码行数:16,代码来源:topicadmin_moderate.php
示例17: editpost
//.........这里部分代码省略.........
$this->param['threadupdatearr']['readperm'] = $this->param['readperm'];
}
$this->param['threadupdatearr']['price'] = $this->param['price'];
$this->param['threadupdatearr']['status'] = $this->thread['status'];
if (getglobal('forum_auditstatuson') && $this->param['audit'] == 1) {
$this->param['threadupdatearr']['displayorder'] = 0;
$this->param['threadupdatearr']['moderated'] = 1;
} else {
$this->param['threadupdatearr']['displayorder'] = $displayorder;
}
C::t('forum_thread')->update($this->thread['tid'], $this->param['threadupdatearr'], true);
if ($this->thread['tid'] > 1) {
if ($this->thread['closed'] > 1) {
C::t('forum_thread')->update($this->thread['closed'], array('subject' => $this->param['subject']), true);
} elseif (empty($this->thread['isgroup'])) {
$threadclosed = C::t('forum_threadclosed')->fetch($thread['tid']);
if ($threadclosed['redirect']) {
C::t('forum_thread')->update($threadclosed['redirect'], array('subject' => $this->param['subject']), true);
}
}
}
$class_tag = new tag();
$tagstr = $class_tag->update_field($this->param['tags'], $this->thread['tid'], 'tid', $this->thread);
} else {
if ($this->param['subject'] == '' && $this->param['message'] == '' && $this->thread['special'] != 2) {
showmessage('post_sm_isnull');
}
}
$this->param['htmlon'] = $this->group['allowhtml'] && !empty($this->param['htmlon']) ? 1 : 0;
if ($this->setting['editedby'] && TIMESTAMP - $this->post['dateline'] > 60 && $this->member['adminid'] != 1) {
$editor = $this->param['isanonymous'] && $isorigauthor ? lang('forum/misc', 'anonymous') : $this->member['username'];
$edittime = dgmdate(TIMESTAMP);
$this->param['message'] = lang('forum/misc', $this->param['htmlon'] ? 'post_edithtml' : (!$this->forum['allowbbcode'] || $this->param['bbcodeoff'] ? 'post_editnobbcode' : 'post_edit'), array('editor' => $editor, 'edittime' => $edittime)) . $this->param['message'];
}
$this->param['bbcodeoff'] = checkbbcodes($this->param['message'], !empty($this->param['bbcodeoff']));
$this->param['smileyoff'] = checksmilies($this->param['message'], !empty($this->param['smileyoff']));
$tagoff = $isfirstpost ? !empty($tagoff) : 0;
if (getglobal('forum_auditstatuson') && $this->param['audit'] == 1) {
C::t('forum_post')->update($this->thread['posttableid'], $this->post['pid'], array('status' => 4), false, false, null, -2, null, 0);
updatepostcredits('+', $this->post['authorid'], $isfirstpost ? 'post' : 'reply', $this->forum['fid']);
updatemodworks('MOD', 1);
updatemodlog($this->thread['tid'], 'MOD');
}
$displayorder = $pinvisible = 0;
if ($isfirstpost) {
$displayorder = $this->param['modnewthreads'] ? -2 : $this->thread['displayorder'];
$pinvisible = $this->param['modnewthreads'] ? -2 : (empty($this->param['save']) ? 0 : -3);
} else {
$pinvisible = $this->param['modnewreplies'] ? -2 : ($this->thread['displayorder'] == -4 ? -3 : 0);
}
$this->param['message'] = preg_replace('/\\[attachimg\\](\\d+)\\[\\/attachimg\\]/is', '[attach]\\1[/attach]', $this->param['message']);
$this->param['parseurloff'] = !empty($this->param['parseurloff']);
$setarr = array('message' => $this->param['message'], 'usesig' => $this->param['usesig'], 'htmlon' => $this->param['htmlon'], 'bbcodeoff' => $this->param['bbcodeoff'], 'parseurloff' => $this->param['parseurloff'], 'smileyoff' => $this->param['smileyoff'], 'subject' => $this->param['subject'], 'tags' => $tagstr, 'port' => getglobal('remoteport'));
$setarr['status'] = $this->post['status'];
if ($this->param['modstatus']) {
foreach ($this->param['modstatus'] as $modbit => $modvalue) {
$setarr['status'] = setstatus($modbit, $modvalue, $setarr['status']);
}
}
if ($anonymousadd !== '') {
$setarr['anonymous'] = $anonymousadd;
}
if ($publishdate) {
$setarr['dateline'] = $publishdate;
}
if (getglobal('forum_auditstatuson') && $this->param['audit'] == 1) {
$setarr['invisible'] = 0;
} else {
$setarr['invisible'] = $pinvisible;
}
C::t('forum_post')->update('tid:' . $this->thread['tid'], $this->post['pid'], $setarr);
$this->forum['lastpost'] = explode("\t", $this->forum['lastpost']);
if ($this->post['dateline'] == $this->forum['lastpost'][2] && ($this->post['author'] == $this->forum['lastpost'][3] || $this->forum['lastpost'][3] == '' && $this->post['anonymous'])) {
$lastpost = $this->thread['tid'] . "\t" . ($isfirstpost ? $this->param['subject'] : $this->thread['subject']) . "\t" . $this->post['dateline'] . "\t" . ($this->param['isanonymous'] ? '' : $this->post['author']);
C::t('forum_forum')->update($this->forum['fid'], array('lastpost' => $lastpost));
}
if (!getglobal('forum_auditstatuson') || $this->param['audit'] != 1) {
if ($isfirstpost && $this->param['modnewthreads']) {
C::t('forum_thread')->update($this->thread['tid'], array('displayorder' => -2));
manage_addnotify('verifythread');
} elseif (!$isfirstpost && $this->param['modnewreplies']) {
C::t('forum_thread')->increase($this->thread['tid'], array('replies' => -1));
manage_addnotify('verifypost');
}
if ($this->param['modnewreplies'] || $this->param['modnewthreads']) {
C::t('forum_forum')->update($this->forum['fid'], array('modworks' => '1'));
}
}
if ($this->thread['lastpost'] == $this->post['dateline'] && (!$this->post['anonymous'] && $this->thread['lastposter'] == $this->post['author'] || $this->post['anonymous'] && $this->thread['lastposter'] == '') && $this->post['anonymous'] != $this->param['isanonymous']) {
C::t('forum_thread')->update($this->thread['tid'], array('lastposter' => $this->param['isanonymous'] ? '' : $this->post['author']), true);
}
if (!$isorigauthor) {
updatemodworks('EDT', 1);
require_once libfile('function/misc');
modlog($this->thread, 'EDT');
}
if ($isfirstpost && $this->thread['displayorder'] == -4 && empty($this->param['save'])) {
threadpubsave($this->thread['tid']);
}
}
开发者ID:MCHacker,项目名称:docker-discuz,代码行数:101,代码来源:model_forum_post.php
示例18: array
if (!empty($infloat)) {
$viewpid = $db->result_first("SELECT pid FROM {$tablepre}posts WHERE tid='{$tid}' AND first='1' LIMIT 1");
$redirecturl = "viewthread.php?tid={$tid}&viewpid={$viewpid}#pid{$viewpid}";
} else {
$redirecturl = "viewthread.php?do=tradeinfo&tid={$tid}&pid={$pid}";
}
}
}
$feed = array();
if ($special == 127) {
$message .= chr(0) . chr(0) . chr(0) . $specialextra;
}
if ($auditstatuson && $audit == 1) {
updatepostcredits('+', $orig['authorid'], $isfirstpost ? $postcredits : $replycredits);
updatemodworks('MOD', 1);
updatemodlog($tid, 'MOD');
}
$displayorder = $pinvisible = 0;
if ($isfirstpost) {
$displayorder = $modnewthreads ? -2 : $thread['displayorder'];
$pinvisible = $modnewthreads ? -2 : 0;
} else {
$pinvisible = $modnewreplies ? -2 : 0;
}
$message = preg_replace('/\\[attachimg\\](\\d+)\\[\\/attachimg\\]/is', '[attach]\\1[/attach]', $message);
$db->query("UPDATE {$tablepre}posts SET message='{$message}', usesig='{$usesig}', htmlon='{$htmlon}', bbcodeoff='{$bbcodeoff}', parseurloff='{$parseurloff}',\r\n\t\t\tsmileyoff='{$smileyoff}', subject='{$subject}' " . ($db->result_first("SELECT aid FROM {$tablepre}attachments WHERE pid='{$pid}' LIMIT 1") ? ", attachment='1'" : '') . " {$anonymousadd} " . ($auditstatuson && $audit == 1 ? ",invisible='0'" : ", invisible='{$pinvisible}'") . " WHERE pid='{$pid}'");
$forum['lastpost'] = explode("\t", $forum['lastpost']);
if ($orig['dateline'] == $forum['lastpost'][2] && ($orig['author'] == $forum['lastpost'][3] || $forum['lastpost'][3] == '' && $orig['anonymous'])) {
$lastpost = "{$tid}\t" . ($isfirstpost ? $subject : addslashes($thread['subject'])) . "\t{$orig['dateline']}\t" . ($isanonymous ? '' : addslashes($orig['author']));
$db->query("UPDATE {$tablepre}forums SET lastpost='{$lastpost}' WHERE fid='{$fid}'", 'UNBUFFERED');
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:31,代码来源:editpost.inc.php
示例19: sendPost
//.........这里部分代码省略.........
$_GET['replycredit_random'] = $_GET['replycredit_random'] < 0 || $_GET['replycredit_random'] > 99 ? 0 : $_GET['replycredit_random'] ;
$replycredit = $replycredit_real = 0;
if($_GET['replycredit_extcredits'] > 0 && $_GET['replycredit_times'] > 0) {
$replycredit_real = ceil(($_GET['replycredit_extcredits'] * $_GET['replycredit_times']) + ($_GET['replycredit_extcredits'] * $_GET['replycredit_times'] * $_G['setting']['creditstax']));
if($replycredit_real > getuserprofile('extcredits'.$_G['setting']['creditstransextra'][10])) {
return WebUtils::makeErrorInfo_oldVersion($res, 'forum_passwd');
showmessage('replycredit_morethan_self');
} else {
$replycredit = ceil($_GET['replycredit_extcredits'] * $_GET['replycredit_times']);
}
}
} */
$newthread = array('fid' => $_G['fid'], 'posttableid' => 0, 'readperm' => $readperm, 'price' => $price, 'typeid' => $typeid, 'sortid' => $sortid, 'author' => $author, 'authorid' => $_G['uid'], 'subject' => $subject, 'dateline' => $publishdate, 'lastpost' => $publishdate, 'lastposter' => $author, 'displayorder' => $displayorder, 'digest' => $digest, 'special' => $special, 'attachment' => 0, 'moderated' => $moderated, 'status' => $thread['status'] | $topicStatus, 'isgroup' => $isgroup, 'replycredit' => $replycredit, 'closed' => $closed ? 1 : 0);
$tid = C::t('forum_thread')->insert($newthread, true);
useractionlog($_G['uid'], 'tid');
if (!getuserprofile('threads') && $_G['setting']['newbie']) {
C::t('forum_thread')->update($tid, array('icon' => $_G['setting']['newbie']));
}
if ($publishdate != $_G['timestamp']) {
loadcache('cronpublish');
$cron_publish_ids = dunserialize($_G['cache']['cronpublish']);
$cron_publish_ids[$tid] = $tid;
$cron_publish_ids = serialize($cron_publish_ids);
savecache('cronpublish', $cron_publish_ids);
}
if (!$isanonymous) {
C::t('common_member_field_home')->update($_G['uid'], array('recentnote' => $subject));
}
if ($special == 3 && $_G['group']['allowpostreward']) {
updatemembercount($_G['uid'], array($_G['setting']['creditstransextra'][2] => -$realprice), 1, 'RTC', $tid);
}
if ($moderated) {
updatemodlog($tid, $displayorder > 0 ? 'STK' : 'DIG');
updatemodworks($displayorder > 0 ? 'STK' : 'DIG', 1);
}
/* if($special == 1) {
foreach($pollarray['options'] as $polloptvalue) {
$polloptvalue = dhtmlspecialchars(trim($polloptvalue));
C::t('forum_polloption')->insert(array('tid' => $tid, 'polloption' => $polloptvalue));
}
$polloptionpreview = '';
$query = C::t('forum_polloption')->fetch_all_by_tid($tid, 1, 2);
foreach($query as $option) {
$polloptvalue = preg_replace("/\[url=(https?){1}:\/\/([^\[\"']+?)\](.+?)\[\/url\]/i", "<a href=\"\\1://\\2\" target=\"_blank\">\\3</a>", $option['polloption']);
$polloptionpreview .= $polloptvalue."\t";
}
$polloptionpreview = daddslashes($polloptionpreview);
$data = array('tid' => $tid, 'multiple' => $pollarray['multiple'], 'visible' => $pollarray['visible'], 'maxchoices' => $pollarray['maxchoices'], 'expiration' => $pollarray['expiration'], 'overt' => $pollarray['overt'], 'pollpreview' => $polloptionpreview);
C::t('forum_poll')->insert($data);
} */
if ($_G['forum']['threadsorts']['types'][$sortid] && !empty($_G['forum_optiondata']) && is_array($_G['forum_optiondata'])) {
$filedname = $valuelist = $separator = '';
foreach ($_G['forum_optiondata'] as $optionid => $value) {
if ($value) {
$filedname .= $separator . $_G['forum_optionlist'][$optionid]['identifier'];
$valuelist .= $separator . "'" . daddslashes($value) . "'";
|
请发表评论