本文整理汇总了PHP中updatemoderate函数的典型用法代码示例。如果您正苦于以下问题:PHP updatemoderate函数的具体用法?PHP updatemoderate怎么用?PHP updatemoderate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatemoderate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: while
<?php
/**
* DiscuzX Convert
*
* $Id: stamp.php 15786 2010-08-27 00:27:21Z monkey $
*/
$table_target = $db_target->tablepre . 'common_moderate';
$table_target_thread = $db_target->tablepre . 'forum_thread';
$table_target_post = $db_target->tablepre . 'forum_post';
$db_target->query("TRUNCATE {$table_target}");
$query = $db_target->query("SELECT tid FROM {$table_target_thread} WHERE displayorder='-2'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate('tid', $row['tid']);
}
$query = $db_target->query("SELECT pid FROM {$table_target_post} WHERE invisible='-2' AND first='0'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate('pid', $row['pid']);
}
function updatemoderate($idtype, $ids)
{
global $table_target, $db_target;
$ids = is_array($ids) ? $ids : array($ids);
if (!$ids) {
return;
}
$time = time();
foreach ($ids as $id) {
$db_target->query("INSERT INTO {$table_target} (id,idtype,status,dateline) VALUES ('{$id}','{$idtype}','0','{$time}')");
}
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:moderate.php
示例2: showsubmit
}
showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> <a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> <a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> <a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
showtablefooter();
showformfooter();
} else {
$moderation = array('validate' => array(), 'delete' => array(), 'ignore' => array());
$validates = $deletes = $ignores = 0;
if (is_array($moderate)) {
foreach ($moderate as $cid => $act) {
$moderation[$act][] = $cid;
}
}
if ($moderation['validate']) {
$validates = C::t('portal_comment')->update($moderation['validate'], array('status' => '0'));
updatemoderate($idtype . '_cid', $moderation['validate'], 2);
}
if ($moderation['delete']) {
$validates = C::t('portal_comment')->delete($moderation['delete']);
updatemoderate($idtype . '_cid', $moderation['delete'], 2);
}
if ($moderation['ignore']) {
$validates = C::t('portal_comment')->update($ignore_cids, array('status' => '2'));
updatemoderate($idtype . '_cid', $moderation['ignore'], 1);
}
if ($_GET['fast']) {
echo callback_js($_GET['cid']);
exit;
} else {
cpmsg('moderate_' . $operation . '_succeed', "action=moderate&operation={$operation}&page={$page}&filter={$filter}&dateline={$_GET['dateline']}&username={$_GET['username']}&keyword={$_GET['keyword']}&catid={$_GET['catid']}&tpp={$_GET['tpp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'deletes' => $deletes));
}
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:moderate_portalcomment.php
示例3: blog_post
//.........这里部分代码省略.........
unset($uploads[$urlmd5]);
}
}
}
foreach ($uploads as $value) {
$picurl = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote'], 0);
$message .= "<div class=\"uchome-message-pic\"><img src=\"$picurl\"><p>$value[title]</p></div>";
}
}
$ckmessage = preg_replace("/(\<div\>|\<\/div\>|\s|\ \;|\<br\>|\<p\>|\<\/p\>)+/is", '', $message);
if(empty($ckmessage)) {
return false;
}
if(checkperm('manageblog')) {
$blogarr['hot'] = intval($POST['hot']);
}
if($olds['blogid']) {
if($blogarr['catid'] != $olds['catid']) {
if($olds['catid']) {
C::t('home_blog_category')->update_num_by_catid(-1, $olds['catid'], true, true);
}
if($blogarr['catid']) {
C::t('home_blog_category')->update_num_by_catid(1, $blogarr['catid']);
}
}
$blogid = $olds['blogid'];
C::t('home_blog')->update($blogid, $blogarr);
$fuids = array();
$blogarr['uid'] = $olds['uid'];
$blogarr['username'] = $olds['username'];
} else {
if($blogarr['catid']) {
C::t('home_blog_category')->update_num_by_catid(1, $blogarr['catid']);
}
$blogarr['uid'] = $_G['uid'];
$blogarr['username'] = $_G['username'];
$blogarr['dateline'] = empty($POST['dateline'])?$_G['timestamp']:$POST['dateline'];
$blogid = C::t('home_blog')->insert($blogarr, true);
C::t('common_member_status')->update($_G['uid'], array('lastpost' => $_G['timestamp']));
C::t('common_member_field_home')->update($_G['uid'], array('recentnote'=>$POST['subject']));
}
$blogarr['blogid'] = $blogid;
$class_tag = new tag();
$POST['tag'] = $olds ? $class_tag->update_field($POST['tag'], $blogid, 'blogid') : $class_tag->add_tag($POST['tag'], $blogid, 'blogid');
$fieldarr = array(
'message' => $message,
'postip' => $_G['clientip'],
'target_ids' => $POST['target_ids'],
'tag' => $POST['tag']
);
if(!empty($titlepic)) {
$fieldarr['pic'] = $titlepic;
}
if($olds) {
C::t('home_blogfield')->update($blogid, $fieldarr);
} else {
$fieldarr['blogid'] = $blogid;
$fieldarr['uid'] = $blogarr['uid'];
C::t('home_blogfield')->insert($fieldarr);
}
if($isself && !$olds && $blog_status == 0) {
updatecreditbyaction('publishblog', 0, array('blogs' => 1));
include_once libfile('function/stat');
updatestat('blog');
}
if($olds['blogid'] && $blog_status == 1) {
updatecreditbyaction('publishblog', 0, array('blogs' => -1), '', -1);
include_once libfile('function/stat');
updatestat('blog');
}
if($POST['makefeed'] && $blog_status == 0) {
include_once libfile('function/feed');
feed_publish($blogid, 'blogid', $olds?0:1);
}
if(!empty($__G)) $_G = $__G;
if($blog_status == 1) {
updatemoderate('blogid', $blogid);
manage_addnotify('verifyblog');
}
return $blogarr;
}
开发者ID:xDiglett,项目名称:discuzx30,代码行数:101,代码来源:function_blog.php
示例4: lang
$share['title_template'] = lang('spacecp', 'share_image');
break;
case 'article':
$feed_hash_data = 'articleid' . $share['itemid'];
$share['title_template'] = lang('spacecp', 'share_article');
break;
case 'link':
$feed_hash_data = '';
break;
}
feed_add('share', '{actor} ' . $share['title_template'], array('hash_data' => $feed_hash_data), $share['body_template'], dunserialize($share['body_data']), $share['body_general'], array($share['image']), array($share['image_link']), '', '', '', 0, 0, '', $share['uid'], $share['username']);
}
updatemoderate('sid', $moderation['validate'], 2);
}
if (!empty($moderation['delete'])) {
require libfile('function/delete');
$shares = deleteshares($moderation['delete']);
$deletes = count($shares);
updatemoderate('sid', $moderation['delete'], 2);
}
if ($ignore_sids = dimplode($moderation['ignore'])) {
$ignores = C::t('home_share')->update($moderation['ignore'], array('status' => 2));
updatemoderate('sid', $moderation['ignore'], 1);
}
if ($_GET['fast']) {
echo callback_js($_GET['sid']);
exit;
} else {
cpmsg('moderate_shares_succeed', "action=moderate&operation=shares&page={$page}&filter={$filter}&dateline={$_GET['dateline']}&username={$_GET['username']}&keyword={$_GET['keyword']}&tpp={$_GET['tpp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'deletes' => $deletes));
}
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:moderate_share.php
示例5: updatemoderate
if ($_G['forum_auditstatuson']) {
if ($audit == 1) {
updatemoderate($isfirstpost ? 'tid' : 'pid', $isfirstpost ? $_G['tid'] : $pid, '2');
showmessage('auditstatuson_succeed', $redirecturl, $param);
} else {
updatemoderate($isfirstpost ? 'tid' : 'pid', $isfirstpost ? $_G['tid'] : $pid);
showmessage('audit_edit_succeed', '', $param);
}
} else {
if (!empty($_G['gp_delete']) && $isfirstpost) {
my_thread_log('delete', array('tid' => $_G['tid']));
showmessage('post_edit_delete_succeed', "forum.php?mod=forumdisplay&fid={$_G['fid']}", $param);
} elseif (!empty($_G['gp_delete'])) {
my_post_log('delete', array('pid' => $pid));
showmessage('post_edit_delete_succeed', "forum.php?mod=viewthread&tid={$_G['tid']}&page={$_G['gp_page']}&extra={$extra}" . ($vid && $isfirstpost ? "&vid={$vid}" : ''), $param);
} else {
if ($isfirstpost && $modnewthreads) {
updatemoderate('tid', $_G['tid']);
showmessage('edit_newthread_mod_succeed', $redirecturl, $param);
} elseif (!$isfirstpost && $modnewreplies) {
updatemoderate('pid', $pid);
showmessage('edit_reply_mod_succeed', "forum.php?mod=forumdisplay&fid={$_G['fid']}", $param);
} else {
if ($pinvisible != -3) {
my_post_log('update', array('pid' => $pid));
}
showmessage('post_edit_succeed', $redirecturl, $param);
}
}
}
}
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:post_editpost.php
示例6: addportalarticlecomment
function addportalarticlecomment($id, $message, $idtype = 'aid')
{
global $_G;
$id = intval($id);
if (empty($id)) {
return 'comment_comment_noexist';
}
$message = getstr($message, $_G['group']['allowcommentarticle'], 0, 0, 1, 0);
if (strlen($message) < 2) {
return 'content_is_too_short';
}
$idtype = in_array($idtype, array('aid', 'topicid')) ? $idtype : 'aid';
$tablename = $idtype == 'aid' ? 'portal_article_title' : 'portal_topic';
$data = C::t($tablename)->fetch($id);
if (empty($data)) {
return 'comment_comment_noexist';
}
if ($data['allowcomment'] != 1) {
return 'comment_comment_notallowed';
}
$message = censor($message);
if (censormod($message)) {
$comment_status = 1;
} else {
$comment_status = 0;
}
$setarr = array('uid' => $_G['uid'], 'username' => $_G['username'], 'id' => $id, 'idtype' => $idtype, 'postip' => $_G['clientip'], 'dateline' => $_G['timestamp'], 'status' => $comment_status, 'message' => $message);
$pcid = C::t('portal_comment')->insert($setarr, true);
if ($comment_status == 1) {
updatemoderate($idtype . '_cid', $pcid);
$notifykey = $idtype == 'aid' ? 'verifyacommont' : 'verifytopiccommont';
manage_addnotify($notifykey);
}
$tablename = $idtype == 'aid' ? 'portal_article_count' : 'portal_topic';
C::t($tablename)->increase($id, array('commentnum' => 1));
C::t('common_member_status')->update($_G['uid'], array('lastpost' => $_G['timestamp']), 'UNBUFFERED');
if ($data['uid'] != $_G['uid']) {
updatecreditbyaction('portalcomment', 0, array(), $idtype . $id);
}
return 'do_success';
}
开发者ID:softhui,项目名称:discuz,代码行数:41,代码来源:function_portalcp.php
示例7: updatemoderate
$displayorder = '-1';
break;
}
}
}
if ($displayorder < 0) {
if ($displayorder == '-2' && $first == 0) {
if (DB::affected_rows(DB::query("UPDATE " . DB::table($posttable) . " SET invisible = '{$displayorder}' WHERE pid = {$pid} AND invisible >= 0")) > 0) {
$xver >= 2 && updatemoderate('pid', $pid);
$posts_mod++;
}
} else {
if (DB::affected_rows(DB::query("UPDATE " . DB::table('forum_thread') . " SET displayorder = '{$displayorder}' WHERE tid = {$tid} and displayorder >= 0")) > 0) {
if ($displayorder == '-2') {
$threads_mod++;
$xver >= 2 && updatemoderate('tid', $tid);
}
$displayorder == '-1' && $threads_banned++;
}
}
}
$subject = preg_replace($array_find, $array_replace, addslashes($subject));
$message = preg_replace($array_find, $array_replace, addslashes($message));
if ($subject != addslashes($row['subject']) || $message != addslashes($row['message'])) {
if (DB::query("UPDATE " . DB::table($posttable) . " SET subject = '{$subject}', message = '{$message}' WHERE pid = {$pid}")) {
$convertedrows++;
}
}
$converted = 1;
}
$sql2 = "SELECT tid,subject from " . DB::table('forum_thread') . " where tid >= {$start} and tid <= {$end} AND displayorder = 0 {$sqlplus}";
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:censor_scanbbs.inc.php
示例8: getstr
C::t('common_member_field_home')->update($_G['uid'], $setarr);
if ($_POST['to_signhtml'] && $_G['group']['maxsigsize']) {
if ($_G['group']['maxsigsize'] < 200) {
$signhtml = getstr($_POST['message'], $_G['group']['maxsigsize'], 0, 0, 1);
$signhtml = preg_replace("/\\<br.*?\\>/i", ' ', $signhtml);
} else {
$signhtml = $message;
}
C::t('common_member_field_forum')->update($_G['uid'], array('sightml' => $signhtml));
}
if (helper_access::check_module('feed') && ckprivacy('doing', 'feed') && $doing_status == '0') {
$feedarr = array('appid' => '', 'icon' => 'doing', 'uid' => $_G['uid'], 'username' => $_G['username'], 'dateline' => $_G['timestamp'], 'title_template' => lang('feed', 'feed_doing_title'), 'title_data' => serialize(array('message' => $message)), 'body_template' => '', 'body_data' => '', 'id' => $newdoid, 'idtype' => 'doid');
C::t('home_feed')->insert($feedarr);
}
if ($doing_status == '1') {
updatemoderate('doid', $newdoid);
manage_addnotify('verifydoing');
}
require_once libfile('function/stat');
updatestat('doing');
C::t('common_member_status')->update($_G['uid'], array('lastpost' => TIMESTAMP), 'UNBUFFERED');
if (!empty($_GET['fromcard'])) {
showmessage($message . lang('spacecp', 'card_update_doing'));
} else {
showmessage('do_success', dreferer(), array('doid' => $newdoid), $_GET['spacenote'] ? array('showmsg' => false) : array('header' => true));
}
} elseif (submitcheck('commentsubmit')) {
if (!checkperm('allowdoing')) {
showmessage('no_privilege_doing_comment');
}
cknewuser();
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:spacecp_doing.php
示例9: elseif
}
$query = DB::query("SELECT idtype, cid FROM ".DB::table('home_comment')." WHERE status='1'");
while($row = DB::fetch($query)) {
updatemoderate($row['idtype'].'_cid', $row['cid']);
}
$query = DB::query("SELECT aid FROM ".DB::table('portal_article_title')." WHERE status='1'");
while($row = DB::fetch($query)) {
updatemoderate('aid', $row['aid']);
}
$query = DB::query("SELECT cid FROM ".DB::table('portal_comment')." WHERE idtype='aid' AND status='1'");
while($row = DB::fetch($query)) {
updatemoderate('aid_cid', $row['cid']);
}
$query = DB::query("SELECT cid FROM ".DB::table('portal_comment')." WHERE idtype='topic' AND status='1'");
while($row = DB::fetch($query)) {
updatemoderate('topicid_cid', $row['cid']);
}
}
show_msg("Kiểm toán nâng cấp dữ liệu", "$theurl?step=data&op=$nextop");
} elseif($_GET['op'] == 'moderate_update') {
$nextop = 'founder';
if($first_to_2_5 && DB::fetch_first("SHOW TABLES LIKE '".DB::table('common_moderate')."'")) {
$tables = array(
'tid' => 'forum_thread_moderate',
'pid' => 'forum_post_moderate',
'blogid' => 'home_blog_moderate',
'picid' => 'home_pic_moderate',
'doid' => 'home_doing_moderate',
'sid' => 'home_share_moderate',
开发者ID:vuchannguyen,项目名称:vuchan,代码行数:31,代码来源:update.php
示例10: array
if (isset($_G['gp_' . $pm]) && $_G['gp_' . $pm] != '' && $post['authorid']) {
$pmlist[] = array('action' => 'modreplies_validate', 'notevar' => array('pid' => $post['pid'], 'tid' => $post['tid'], 'post' => dhtmlspecialchars(cutstr($post['message'], 30)), 'reason' => dhtmlspecialchars($_G['gp_' . $pm])), 'authorid' => $post['authorid']);
}
}
foreach ($threads as $tid => $thread) {
DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies+{$thread['posts']} {$thread['lastpostadd']} {$thread['attachadd']} WHERE tid='{$tid}'", 'UNBUFFERED');
}
foreach (array_unique($forums) as $fid) {
updateforumcount($fid);
}
if (!empty($pidarray)) {
DB::query("UPDATE " . DB::table(getposttable($posttable)) . " SET status='4' WHERE pid IN (0," . implode(',', $pidarray) . ") AND status='0' AND invisible='-2'");
DB::query("UPDATE " . DB::table(getposttable($posttable)) . " SET invisible='0' WHERE pid IN (0," . implode(',', $pidarray) . ")");
$validates = DB::affected_rows();
updatemodworks('MOD', $validates);
updatemoderate('pid', $pidarray, 2);
} else {
updatemodworks('MOD', 1);
}
}
if ($pmlist) {
foreach ($pmlist as $pm) {
notification_add($pm['authorid'], 'system', $pm['action'], $pm['notevar'], 1);
}
}
if ($_G['gp_fast']) {
echo callback_js($_G['gp_pid']);
exit;
} else {
cpmsg('moderate_replies_succeed', "action=moderate&operation=replies&page={$page}&filter={$filter}&modfid={$modfid}&posttableid={$posttable}&dateline={$_G['gp_dateline']}&username={$_G['gp_username']}&title={$_G['gp_title']}&ppp={$_G['gp_ppp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'recycles' => $recycles, 'deletes' => $deletes));
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:moderate_reply.php
示例11: array
if ($article_status == 1) {
DB::update('portal_article_title', array('status' => '1'), array('aid' => $aid));
}
unset($contents[0]);
}
if ($contents) {
$inserts = array();
foreach ($contents as $key => $value) {
$value = trim($value);
$inserts[] = "('{$aid}', '" . (empty($pagetitle[$key - 1]) ? $_POST['pagetitle'] : $pagetitle[$key - 1]) . "', '{$value}', '" . ($pageorder + $key) . "', '{$_G['timestamp']}', '{$id}', '{$idtype}')";
}
DB::query("INSERT INTO " . DB::table('portal_article_content') . "\r\n\t\t\t(aid, title, content, pageorder, dateline, id, idtype)\r\n\t\t\tVALUES " . implode(',', $inserts));
DB::query('UPDATE ' . DB::table('portal_article_title') . " SET status = '{$article_status}', contents = contents+" . count($inserts) . " WHERE aid='{$aid}'");
}
if ($article_status == 1) {
updatemoderate('aid', $aid);
manage_addnotify('verifyarticle');
}
$newaids = array();
$_POST['attach_ids'] = explode(',', $_POST['attach_ids']);
foreach ($_POST['attach_ids'] as $newaid) {
$newaid = intval($newaid);
if ($newaid) {
$newaids[$newaid] = $newaid;
}
}
if ($newaids) {
DB::update('portal_attachment', array('aid' => $aid), "attachid IN (" . dimplode($newaids) . ") AND aid='0'");
}
DB::query("DELETE FROM " . DB::table('portal_article_related') . " WHERE aid='{$aid}' OR raid='{$aid}'");
if ($_POST['raids']) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:portalcp_article.php
示例12: blog_post
//.........这里部分代码省略.........
if (!empty($POST['picids'])) {
$picids = array_keys($POST['picids']);
$query = DB::query("SELECT * FROM " . DB::table('home_pic') . " WHERE picid IN (" . dimplode($picids) . ") AND uid='{$_G['uid']}'");
while ($value = DB::fetch($query)) {
if (empty($titlepic) && $value['thumb']) {
$titlepic = getimgthumbname($value['filepath']);
$blogarr['picflag'] = $value['remote'] ? 2 : 1;
}
$uploads[$POST['picids'][$value['picid']]] = $value;
}
if (empty($titlepic) && $value) {
$titlepic = $value['filepath'];
$blogarr['picflag'] = $value['remote'] ? 2 : 1;
}
}
if ($uploads) {
preg_match_all("/\\[imgid\\=(\\d+)\\]/i", $message, $mathes);
if (!empty($mathes[1])) {
$searchs = $replaces = array();
foreach ($mathes[1] as $key => $value) {
if (!empty($uploads[$value])) {
$picurl = pic_get($uploads[$value]['filepath'], 'album', $uploads[$value]['thumb'], $uploads[$value]['remote'], 0);
$searchs[] = "[imgid={$value}]";
$replaces[] = "<img src=\"{$picurl}\">";
unset($uploads[$value]);
}
}
if ($searchs) {
$message = str_replace($searchs, $replaces, $message);
}
}
foreach ($uploads as $value) {
$picurl = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote'], 0);
$message .= "<div class=\"uchome-message-pic\"><img src=\"{$picurl}\"><p>{$value['title']}</p></div>";
}
}
$ckmessage = preg_replace("/(\\<div\\>|\\<\\/div\\>|\\s|\\ \\;|\\<br\\>|\\<p\\>|\\<\\/p\\>)+/is", '', $message);
if (empty($ckmessage)) {
return false;
}
$message = addslashes($message);
if (checkperm('manageblog')) {
$blogarr['hot'] = intval($POST['hot']);
}
if ($olds['blogid']) {
if ($blogarr['catid'] != $olds['catid']) {
if ($olds['catid']) {
DB::query("UPDATE " . DB::table('home_blog_category') . " SET num=num-1 WHERE catid='{$olds['catid']}' AND num>0");
}
if ($blogarr['catid']) {
DB::query("UPDATE " . DB::table('home_blog_category') . " SET num=num+1 WHERE catid='{$blogarr['catid']}'");
}
}
$blogid = $olds['blogid'];
DB::update('home_blog', $blogarr, array('blogid' => $blogid));
$fuids = array();
$blogarr['uid'] = $olds['uid'];
$blogarr['username'] = $olds['username'];
} else {
if ($blogarr['catid']) {
DB::query("UPDATE " . DB::table('home_blog_category') . " SET num=num+1 WHERE catid='{$blogarr['catid']}'");
}
$blogarr['uid'] = $_G['uid'];
$blogarr['username'] = $_G['username'];
$blogarr['dateline'] = empty($POST['dateline']) ? $_G['timestamp'] : $POST['dateline'];
$blogid = DB::insert('home_blog', $blogarr, 1);
DB::update('common_member_status', array('lastpost' => $_G['timestamp']), array('uid' => $_G['uid']));
DB::update('common_member_field_home', array('recentnote' => $POST['subject']), array('uid' => $_G['uid']));
}
$blogarr['blogid'] = $blogid;
$POST['tag'] = $olds ? modblogtag($POST['tag'], $blogid) : addblogtag($POST['tag'], $blogid);
$fieldarr = array('message' => $message, 'postip' => $_G['clientip'], 'target_ids' => $POST['target_ids'], 'tag' => $POST['tag']);
if (!empty($titlepic)) {
$fieldarr['pic'] = $titlepic;
}
if ($olds) {
DB::update('home_blogfield', $fieldarr, array('blogid' => $blogid));
} else {
$fieldarr['blogid'] = $blogid;
$fieldarr['uid'] = $blogarr['uid'];
DB::insert('home_blogfield', $fieldarr);
}
if ($isself && !$olds && $blog_status == 0) {
updatecreditbyaction('publishblog', 0, array('blogs' => 1));
include_once libfile('function/stat');
updatestat('blog');
}
if ($POST['makefeed'] && $blog_status == 0) {
include_once libfile('function/feed');
feed_publish($blogid, 'blogid', $olds ? 0 : 1);
}
if (!empty($__G)) {
$_G = $__G;
}
if ($blog_status == 1) {
updatemoderate('blogid', $blogid);
manage_addnotify('verifyblog');
}
return $blogarr;
}
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:101,代码来源:function_blog.php
示例13: while
while ($row = $db_target->fetch_array($query)) {
updatemoderate('blogid', $row['blogid']);
}
$query = $db_target->query("SELECT doid FROM {$table_target_home_doing} WHERE status='1'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate('doid', $row['doid']);
}
$query = $db_target->query("SELECT picid FROM {$table_target_home_pic} WHERE status='1'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate('picid', $row['picid']);
}
$query = $db_target->query("SELECT sid FROM {$table_target_home_share} WHERE status='1'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate('sid', $row['sid']);
}
$query = $db_target->query("SELECT idtype, cid FROM {$table_target_home_comment} WHERE status='1'");
while ($row = $db_target->fetch_array($query)) {
updatemoderate($row['idtype'] . '_cid', $row['cid']);
}
function updatemoderate($idtype, $ids)
{
global $table_target, $db_target;
$ids = is_array($ids) ? $ids : array($ids);
if (!$ids) {
return;
}
$time = time();
foreach ($ids as $id) {
$db_target->query("INSERT INTO {$table_target} (id,idtype,status,dateline) VALUES ('{$id}','{$idtype}','0','{$time}')");
}
}
开发者ID:tanxiniao,项目名称:bce,代码行数:31,代码来源:moderate.php
示例14: showtablefooter
showtablefooter();
showformfooter();
} else {
$moderation = array('validate' => array(), 'delete' => array(), 'ignore' => array());
$validates = $deletes = $ignores = 0;
$moderatedata = array();
if (is_array($moderate)) {
foreach ($moderate as $cid => $act) {
$moderation[$act][] = $cid;
$moderatedata[$act][$_G['gp_idtypes'][$cid]][] = $cid;
}
}
foreach ($moderatedata as $act => $typeids) {
foreach ($typeids as $idtype => $ids) {
$op = $act == 'ignore' ? 1 : 2;
updatemoderate($idtype . '_cid', $ids, $op);
}
}
if ($validate_cids = dimplode($moderation['validate'])) {
DB::update('home_comment', array('status' => '0'), "cid IN ({$validate_cids})");
$validates = DB::affected_rows();
}
if (!empty($moderation['delete'])) {
require_once libfile('function/delete');
$comments = deletecomments($moderation['delete']);
$deletes = count($comments);
}
if ($ignore_cids = dimplode($moderation['ignore'])) {
DB::update('home_comment', array('status' => '2'), "cid IN ({$ignore_cids})");
$ignores = DB::affected_rows();
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_comment.php
示例15: add_comment
//.........这里部分代码省略.........
$comment_status = 0;
}
$setarr = array('uid' => $tospace['uid'], 'id' => $id, 'idtype' => $idtype, 'authorid' => $_G['uid'], 'author' => $_G['username'], 'dateline' => $_G['timestamp'], 'message' => $message, 'ip' => $_G['clientip'], 'port' => $_G['remoteport'], 'status' => $comment_status);
$cid = C::t('home_comment')->insert($setarr, true);
$action = 'comment';
$becomment = 'getcomment';
$note = $q_note = '';
$note_values = $q_values = array();
switch ($idtype) {
case 'uid':
$n_url = "home.php?mod=space&uid={$tospace['uid']}&do=wall&cid={$cid}";
$note_type = 'wall';
$note = 'wall';
$note_values = array('url' => $n_url);
$q_note = 'wall_reply';
$q_values = array('url' => $n_url);
if ($comment) {
$msg = 'note_wall_reply_success';
$magvalues = array('username' => $tospace['username']);
$becomment = '';
} else {
$msg = 'do_success';
$magvalues = array();
$becomment = 'getguestbook';
}
$action = 'guestbook';
break;
case 'picid':
$n_url = "home.php?mod=space&uid={$tospace['uid']}&do=album&picid={$id}&cid={$cid}";
$note_type = 'comment';
$note = 'pic_comment';
$note_values = array('url' => $n_url);
$q_note = 'pic_comment_reply';
$q_values = array('url' => $n_url);
$msg = 'do_success';
$magvalues = array();
break;
case 'blogid':
$n_url = "home.php?mod=space&uid={$tospace['uid']}&do=blog&id={$id}&cid={$cid}";
$note_type = 'comment';
$note = 'blog_comment';
$note_values = array('url' => $n_url, 'subject' => $blog['subject']);
$q_note = 'blog_comment_reply';
$q_values = array('url' => $n_url);
$msg = 'do_success';
$magvalues = array();
break;
case 'sid':
$n_url = "home.php?mod=space&uid={$tospace['uid']}&do=share&id={$id}&cid={$cid}";
$note_type = 'comment';
$note = 'share_comment';
$note_values = array('url' => $n_url);
$q_note = 'share_comment_reply';
$q_values = array('url' => $n_url);
$msg = 'do_success';
$magvalues = array();
break;
}
if (empty($comment)) {
if ($tospace['uid'] != $_G['uid']) {
if (ckprivacy('comment', 'feed')) {
require_once libfile('function/feed');
$fs['title_data']['hash_data'] = "{$idtype}{$id}";
feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general'], $fs['images'], $fs['image_links'], $fs['target_ids'], $fs['friend']);
}
$note_values['from_id'] = $id;
$note_values['from_idtype'] = $idtype;
$note_values['url'] .= "&goto=new#comment_{$cid}_li";
notification_add($tospace['uid'], $note_type, $note, $note_values);
}
} elseif ($comment['authorid'] != $_G['uid']) {
notification_add($comment['authorid'], $note_type, $q_note, $q_values);
}
if ($comment_status == 1) {
updatemoderate($idtype . '_cid', $cid);
manage_addnotify('verifycommontes');
}
if ($stattype) {
include_once libfile('function/stat');
updatestat($stattype);
}
if ($tospace['uid'] != $_G['uid']) {
$needle = $id;
if ($idtype != 'uid') {
$needle = $idtype . $id;
} else {
$needle = $tospace['uid'];
}
updatecreditbyaction($action, 0, array(), $needle);
if ($becomment) {
if ($idtype == 'uid') {
$needle = $_G['uid'];
}
updatecreditbyaction($becomment, $tospace['uid'], array(), $needle);
}
}
C::t('common_member_status')->update($_G['uid'], array('lastpost' => $_G['timestamp']), 'UNBUFFERED');
$magvalues['cid'] = $cid;
return array('cid' => $cid, 'msg' => $msg, 'magvalues' => $magvalues);
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:101,代码来源:function_comment.php
示例16: libfile
case 'pic':
DB::query("UPDATE " . DB::table('home_pic') . " SET sharetimes=sharetimes+1 WHERE picid='{$picid}'");
break;
case 'thread':
DB::query("UPDATE " . DB::table('forum_thread') . " SET sharetimes=sharetimes+1 WHERE tid='{$id}'");
if ($_G['setting']['heatthread']['type'] == 2) {
require_once libfile('function/forum');
update_threadpartake($id);
}
break;
case 'article':
DB::query("UPDATE " . DB::table('portal_article_count') . " SET sharetimes=sharetimes+1 WHERE aid='{$id}'");
break;
}
if ($arr['status'] == 1) {
updatemoderate('sid', $sid);
manage_addnotify('verifyshare');
}
if ($type == 'link' || !DB::result_first("SELECT COUNT(*) FROM " . DB::table('home_share') . " WHERE uid='{$_G['uid']}' AND itemid='{$id}' AND type='{$type}'")) {
include_once libfile('function/stat');
updatestat('share');
}
if ($note_uid && $note_uid != $_G['uid']) {
notification_add($note_uid, 'sharenotice', $note_message, $note_values);
}
$needle = $id ? $type . $id : '';
updatecreditbyaction('createshare', $_G['uid'], array('sharings' => 1), $needle);
$referer = "home.php?mod=space&uid={$_G['uid']}&do=share&view={$_GET['view']}&from={$_GET['from']}";
$magvalues['sid'] = $sid;
if (!$redirecturl) {
$redirecturl = dreferer();
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php
示例17: array
$moderate[$act][] = $blogid;
}
}
if ($validate_blogids = dimplode($moderate['validate'])) {
DB::update('home_blog', array('status' => '0'), "blogid IN ({$validate_blogids})");
$validates = DB::affected_rows();
$query_t = DB::query("SELECT uid, COUNT(blogid) AS count\r\n\t\t\tFROM " . DB::table('home_blog') . "\r\n\t\t\tWHERE blogid IN ({$validate_blogids})\r\n\t\t\tGROUP BY uid");
while ($blog_user = DB::fetch($query_t)) {
$credit_times = $blog_user['count'];
updatecreditbyaction('publishblog', $blog_user['uid'], array('blogs' => 1), '', $credit_times);
}
updatemoderate('blogid', $moderate['validate'], 2);
}
if ($moderate['delete']) {
require_once libfile('function/delete');
$delete_blogs = deleteblogs($moderate['delete']);
$deletes = count($delete_blogs);
updatemoderate('blogid', $moderate['delete'], 2);
}
if ($ignore_blogids = dimplode($moderate['ignore'])) {
DB::update('home_blog', array('status' => '2'), "blogid IN ({$ignore_blogids})");
$ignores = DB::affected_rows();
updatemoderate('blogid', $moderate['ignore'], 1);
}
if ($_G['gp_fast']) {
echo callback_js($_G['gp_blogid']);
exit;
} else {
cpmsg('moderate_blogs_succeed', "action=moderate&operation=blogs&page={$page}&filter={$filter}&dateline={$_G['gp_dateline']}&username={$_G['gp_username']}&title={$_G['gp_title']}&tpp={$_G['gp_tpp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'recycles' => $recycles, 'deletes' => $deletes));
}
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_blog.php
示例18: dimplode
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']}");
}
$modcount = C::t('common_moderate')->count_by_seach_for_thread($moderatestatus, $modfids ? explode(',', $modfids) : null);
$multipage = multi($modcount, $_G['tpp'], $page, "{$cpscript}?mod=modcp&action={$_GET['action']}&op={$op}&filter={$filter}&fid={$_G['fid']}");
if ($modcount) {
$posttablearr = array();
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:modcp_moderate.php
示例19: newreply
public function newreply($parameters)
{
$this->_init_parameters($parameters);
if ($this->thread['closed'] && !$this->forum['ismoderator'] && !$this->thread['isgroup']) {
return $this->showmessage('post_thread_closed');
} elseif (!$this->thread['isgroup'] && ($post_autoclose = checkautoclose($this->thread))) {
return $this->showmessage($post_autoclose, '', array('autoclose' => $this->forum['autoclose']));
}
if (trim($this->param['subject']) == '' && trim($this->param['message']) == '' && $this->thread['special'] != 2) {
return $this->showmessage('post_sm_isnull');
} elseif ($post_invalid = checkpost($this->param['subject'], $this->param['message'], $this->param['special'] == 2 && $this->group['allowposttrade'])) {
return $this->showmessage($post_invalid, '', array('minpostsize' => $this->setting['minpostsize'], 'maxpostsize' => $this->setting['maxpostsize']));
} elseif (checkflood()) {
return $this->showmessage('post_flood_ctrl', '', array('floodctrl' => $this->setting['floodctrl']));
} elseif (checkmaxperhour('pid')) {
return $this->showmessage('post_flood_ctrl_posts_per_hour', '', array('posts_per_hour' => $this->group['maxpostsperhour']));
}
$heatthreadset = update_threadpartake($this->thread['tid'], true);
$bbcodeoff = checkbbcodes($this->param['message'], !empty($this->param['bbcodeoff']));
$smileyoff = checksmilies($this->param['message'], !empty($this->param['smileyoff']));
$parseurloff = !empty($th
|
请发表评论