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


PHP updatemagiclog函数代码示例

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


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

示例1: usesubmit

 function usesubmit()
 {
     global $_G;
     $list = $uids = array();
     $num = !empty($this->parameters['num']) ? intval($this->parameters['num']) : 10;
     $limit = $num + 20;
     $giftMagicID = C::t('common_magic')->fetch_by_identifier('gift');
     $mid = $giftMagicID['available'] ? intval($giftMagicID['magicid']) : 0;
     if ($mid) {
         foreach (C::t('common_magiclog')->fetch_all_by_magicid_action_uid($mid, 2, $_G['uid'], 0, $limit) as $value) {
             $uids[] = intval($value['uid']);
         }
     }
     if ($uids) {
         $counter = 0;
         $members = C::t('common_member')->fetch_all($uids);
         foreach (C::t('common_member_field_home')->fetch_all($uids) as $uid => $value) {
             $value = array_merge($members[$uid], $value);
             $info = !empty($value['magicgift']) ? unserialize($value['magicgift']) : array();
             if (!empty($info['left']) && (empty($info['receiver']) || !in_array($_G['uid'], $info['receiver']))) {
                 $value['avatar'] = addcslashes(avatar($uid, 'small'), "'");
                 $list[$uid] = $value;
                 $counter++;
                 if ($counter >= $num) {
                     break;
                 }
             }
         }
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     $op = 'show';
     include template('home/magic_detector');
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:34,代码来源:magic_detector.php

示例2: usesubmit

 function usesubmit()
 {
     global $_G;
     $list = $uids = array();
     $num = !empty($this->parameters['num']) ? intval($this->parameters['num']) : 10;
     $limit = $num + 20;
     loadcache('magics');
     $mid = !empty($_G['magics']['gift']) ? intval($_G['magics']['gift']['magicid']) : 0;
     if ($mid) {
         $query = DB::query('SELECT * FROM ' . DB::table('common_magiclog') . " WHERE magicid = '{$mid}' AND action='2' AND uid != '{$_G['uid']}' ORDER BY dateline DESC LIMIT 0,{$limit}");
         while ($value = DB::fetch($query)) {
             $uids[] = intval($value['uid']);
         }
     }
     if ($uids) {
         $counter = 0;
         $query = DB::query('SELECT m.username, mfh.uid, mfh.magicgift FROM ' . DB::table('common_member') . " m LEFT JOIN " . DB::table('common_member_field_home') . " mfh USING(uid) WHERE m.uid IN (" . dimplode($uids) . ")");
         while ($value = DB::fetch($query)) {
             $info = !empty($value['magicgift']) ? unserialize($value['magicgift']) : array();
             if (!empty($info['left']) && (empty($info['receiver']) || !in_array($_G['uid'], $info['receiver']))) {
                 $value['avatar'] = addcslashes(avatar($value['uid'], 'small'), "'");
                 $list[$value['uid']] = $value;
                 $counter++;
                 if ($counter >= $num) {
                     break;
                 }
             }
         }
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     $op = 'show';
     include template('home/magic_detector');
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:34,代码来源:magic_detector.php

示例3: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_pid'])) {
         showmessage(lang('magic/repent', 'repent_info_nonexistence'));
     }
     $_G['tid'] = $_G['gp_ptid'];
     $post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
     $this->_check($post);
     require_once libfile('function/post');
     require_once libfile('function/delete');
     if ($post['first']) {
         if ($have_replycredit = DB::fetch_first("SELECT * FROM " . DB::table('forum_replycredit') . " WHERE tid ='{$post['tid']}' LIMIT 1")) {
             if ($replycredit = DB::result_first("SELECT replycredit FROM " . DB::table('forum_thread') . " WHERE tid = '{$post['tid']}'")) {
                 updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
             }
             DB::delete('forum_replycredit', "tid = '{$post['tid']}'");
             DB::delete('common_credit_log', "operation IN ('RCT', 'RCA', 'RCB') AND relatedid IN({$post['tid']})");
         }
         deletethread(array($post['tid']));
         updateforumcount($post['fid']);
     } else {
         if ($post['replycredit'] > 0) {
             updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
             DB::delete('common_credit_log', "uid = '{$post['authorid']}' AND operation = 'RCA' AND relatedid IN({$post['tid']})");
         }
         deletepost(array($_G['gp_pid']));
         updatethreadcount($post['tid']);
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
     showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:33,代码来源:magic_repent.php

示例4: usesubmit

 function usesubmit()
 {
     global $_G;
     $id = intval($_GET['id']);
     $idtype = $_GET['idtype'];
     $blog = magic_check_idtype($id, $idtype);
     $num = 10;
     $list = $ids = $note_inserts = array();
     $fusername = dimplode($_POST['fusername']);
     if ($fusername) {
         $query = C::t('home_friend')->fetch_all_by_uid_username($_G['uid'], $_POST['fusername'], 0, $num);
         $note = lang('spacecp', 'magic_call', array('url' => "home.php?mod=space&uid={$_G['uid']}&do=blog&id={$id}"));
         foreach ($query as $value) {
             $ids[] = $value['fuid'];
             $value['avatar'] = str_replace("'", "\\'", avatar($value[fuid], 'small'));
             $list[] = $value;
             $note_inserts[] = array('uid' => $value['fuid'], 'type' => $name, 'new' => 1, 'authorid' => $_G['uid'], 'author' => $_G['username'], 'note' => $note, 'dateline' => $_G['timestamp']);
         }
     }
     if (empty($ids)) {
         showmessage('magicuse_has_no_valid_friend');
     }
     foreach ($note_inserts as $note_insert) {
         C::t('home_notification')->insert($note_insert);
     }
     C::t('common_member')->increase($ids, array('newprompt' => 1));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', $idtype, $id);
     $op = 'show';
     include template('home/magic_call');
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:magic_call.php

示例5: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_pid'])) {
         showmessage(lang('magic/namepost', 'namepost_info_nonexistence'));
     }
     $_G['tid'] = $_G['gp_ptid'];
     $post = getpostinfo($_G['gp_pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.dateline', 'p.anonymous'));
     $this->_check($post);
     $query = DB::query("SELECT username FROM " . DB::table('common_member') . " WHERE uid='{$post['authorid']}'");
     $author = daddslashes(DB::result($query, 0), 1);
     $thread = getpostinfo($post['tid'], 'tid', array('tid', 'subject', 'author', 'replies', 'lastposter'));
     $posttable = getposttablebytid($post['tid']);
     if ($post['first']) {
         $lastposter = $thread['replies'] > 0 ? $thread['lastposter'] : $author;
         DB::query("UPDATE " . DB::table($posttable) . " SET anonymous='0' WHERE tid='{$post['tid']}' AND first='1'");
     } else {
         $lastposter = $author;
         $author = $thread['author'];
         DB::query("UPDATE " . DB::table($posttable) . " SET anonymous='0' WHERE pid='{$_G['gp_pid']}'");
     }
     $forum['lastpost'] = explode("\t", DB::result_first("SELECT lastpost FROM " . DB::table('forum_forum') . " WHERE fid='{$post['fid']}'"));
     if ($thread['subject'] == $forum['lastpost'][1] && ($forum['lastpost'][3] == '' && $post['anonymous'])) {
         $lastpost = "{$thread['tid']}\t{$thread['subject']}\t{$_G['timestamp']}\t{$lastposter}";
         DB::query("UPDATE " . DB::table('forum_forum') . " SET lastpost='{$lastpost}' WHERE fid='{$post['fid']}'", 'UNBUFFERED');
     }
     DB::query("UPDATE " . DB::table('forum_thread') . " SET author='{$author}', lastposter='{$lastposter}' WHERE tid='{$post['tid']}'");
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     if ($post['authorid'] != $_G['uid']) {
         notification_add($post['authorid'], 'magic', lang('magic/namepost', 'namepost_notification'), array('pid' => $_G['gp_pid'], 'tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/namepost', 'namepost_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:34,代码来源:magic_namepost.php

示例6: usesubmit

 function usesubmit()
 {
     global $_G;
     $info = array('credits' => intval($_POST['credits']), 'percredit' => intval($_POST['percredit']), 'credittype' => $_G['gp_credittype'], 'left' => intval($_POST['credits']), 'magicid' => intval($this->magic['magicid']), 'receiver' => array());
     if ($info['credits'] < 1) {
         showmessage(lang('magic/gift', 'gift_bad_credits_input'));
     }
     if ($info['percredit'] < 1 || $info['percredit'] > $info['credits']) {
         showmessage(lang('magic/gift', 'gift_bad_percredit_input'));
     }
     $member = array();
     if (preg_match('/^extcredits[1-8]$/', $info['credittype'])) {
         $member = DB::fetch_first('SELECT * FROM ' . DB::table('common_member_count') . " WHERE uid = '{$_G['uid']}'");
         if ($member[$info['credittype']] < $info['credits']) {
             showmessage(lang('magic/gift', 'gift_credits_out_of_own'));
         }
         $extcredits = str_replace('extcredits', '', $info['credittype']);
         updatemembercount($_G['uid'], array($extcredits => -$info['credits']), 1, 'BGC', $this->magic['magicid']);
     } else {
         showmessage(lang('magic/gift', 'gift_bad_credittype_input'));
     }
     DB::update('common_member_field_home', array('magicgift' => addslashes(serialize($info))), array('uid' => $_G['uid']));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     showmessage(lang('magic/gift', 'gift_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:26,代码来源:magic_gift.php

示例7: usesubmit

 function usesubmit()
 {
     global $_G;
     $idtype = !empty($_GET['idtype']) ? $_GET['idtype'] : '';
     if (!in_array($idtype, $this->idtypearray)) {
         showmessage(lang('magic/highlight', 'highlight_info_notype'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
     }
     if (empty($_GET['id'])) {
         showmessage(lang('magic/highlight', 'highlight_info_nonexistence_' . $idtype));
     }
     if ($idtype == 'tid') {
         $info = getpostinfo($_GET['id'], $idtype, array('fid', 'authorid', 'subject'));
         $this->_check($info['fid']);
         magicthreadmod($_GET['id']);
         C::t('forum_thread')->update($_GET['id'], array('highlight' => $_GET['highlight_color'], 'moderated' => 1));
         $this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
         $expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
         updatemagicthreadlog($_GET['id'], $this->magic['magicid'], $expiration > 0 ? 'EHL' : 'HLT', $expiration);
         if ($info['authorid'] != $_G['uid']) {
             notification_add($info['authorid'], 'magic', lang('magic/highlight', 'highlight_notification'), array('tid' => $_GET['id'], 'subject' => $info['subject'], 'magicname' => $this->magic['name']));
         }
     } elseif ($idtype == 'blogid') {
         $info = getpostinfo($_GET['id'], $idtype, array('uid', 'subject'));
         C::t('home_blogfield')->update($_GET['id'], array('magiccolor' => $_GET['highlight_color']));
         if ($info['uid'] != $_G['uid']) {
             notification_add($info['uid'], 'magic', lang('magic/highlight', 'highlight_notification_blogid'), array('blogid' => $_GET['id'], 'subject' => $info['subject'], 'magicname' => $this->magic['name']));
         }
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, $idtype, $_GET['id']);
     showmessage(lang('magic/highlight', 'highlight_succeed_' . $idtype), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:32,代码来源:magic_highlight.php

示例8: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_GET['username'])) {
         showmessage(lang('magic/checkonline', 'checkonline_info_nonexistence'));
     }
     $member = getuserinfo($_GET['username']);
     $this->_check($member['groupid']);
     $online = C::app()->session->fetch_by_uid($member['uid']);
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'uid', $member['uid']);
     if ($member['uid'] != $_G['uid']) {
         notification_add($member['uid'], 'magic', lang('magic/checkonline', 'checkonline_notification'), array('magicname' => $this->magic['name']), 1);
     }
     if ($online) {
         $time = dgmdate($online['lastactivity'], 'u');
         if ($online['invisible']) {
             showmessage(lang('magic/checkonline', 'checkonline_hidden_message'), '', array('username' => $_GET['username'], 'time' => $time), array('alert' => 'info', 'showdialog' => 1));
         } else {
             showmessage(lang('magic/checkonline', 'checkonline_online_message'), '', array('username' => $_GET['username'], 'time' => $time), array('alert' => 'info', 'showdialog' => 1));
         }
     } else {
         showmessage(lang('magic/checkonline', 'checkonline_offline_message'), '', array('username' => $_GET['username']), array('alert' => 'info', 'showdialog' => 1));
     }
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:25,代码来源:magic_checkonline.php

示例9: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_username'])) {
         showmessage(lang('magic/checkonline', 'checkonline_info_nonexistence'));
     }
     $member = getuserinfo($_G['gp_username'], array('uid', 'groupid'));
     $this->_check($member['groupid']);
     $online = DB::fetch_first("SELECT action, lastactivity, invisible FROM " . DB::table('common_session') . " WHERE uid='{$member['uid']}'");
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'uid', $member['uid']);
     if ($member['uid'] != $_G['uid']) {
         notification_add($member['uid'], 'magic', lang('magic/checkonline', 'checkonline_notification'), array('magicname' => $this->magic['name']), 1);
     }
     if ($online) {
         $time = dgmdate($online['lastactivity'], 'u');
         if ($online['invisible']) {
             showmessage(lang('magic/checkonline', 'checkonline_hidden_message'), '', array('username' => stripslashes($_G['gp_username']), 'time' => $time), array('showdialog' => 1));
         } else {
             showmessage(lang('magic/checkonline', 'checkonline_online_message'), '', array('username' => stripslashes($_G['gp_username']), 'time' => $time), array('showdialog' => 1));
         }
     } else {
         showmessage(lang('magic/checkonline', 'checkonline_offline_message'), '', array('username' => stripslashes($_G['gp_username'])), array('showdialog' => 1));
     }
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:25,代码来源:magic_checkonline.php

示例10: usesubmit

 function usesubmit()
 {
     global $_G;
     $id = intval($_GET['id']);
     if (empty($id)) {
         showmessage(lang('magic/namepost', 'namepost_info_nonexistence'));
     }
     $idtype = !empty($_GET['idtype']) ? dhtmlspecialchars($_GET['idtype']) : '';
     if (!in_array($idtype, array('pid', 'cid'))) {
         showmessage(lang('magic/namepost', 'namepost_use_error'));
     }
     if ($idtype == 'pid') {
         $_G['tid'] = intval($_GET['ptid']);
         $post = getpostinfo($id, 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.dateline', 'p.anonymous'));
         $this->_check($post);
         $authorid = $post['authorid'];
         $author = $post['anonymous'] ? '' : 1;
     } elseif ($idtype == 'cid') {
         $comment = C::t('home_comment')->fetch($id);
         $authorid = $comment['authorid'];
         $author = $comment['author'];
     }
     if ($author) {
         showmessage('magicuse_bad_object');
     }
     $member = getuserbyuid($authorid);
     if (!checkmagicperm($this->parameters['targetgroups'], $member['groupid'])) {
         showmessage(lang('magic/namepost', 'namepost_info_user_noperm'));
     }
     $author = daddslashes($member['username']);
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, $idtype, $id);
     showmessage(lang('magic/namepost', 'magic_namepost_succeed'), 'javascript:;', array('uid' => $authorid, 'username' => $author, 'avatar' => 1), array('alert' => 'right'));
 }
开发者ID:softhui,项目名称:discuz,代码行数:34,代码来源:magic_namepost.php

示例11: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_G['gp_tid'])) {
         showmessage(lang('magic/sofa', 'sofa_info_nonexistence'));
     }
     $thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'dateline', 'subject'));
     $this->_check($thread);
     $firstsofa = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_threadmod') . " WHERE magicid='" . $this->magic['magicid'] . "' AND tid='{$_G['gp_tid']}'");
     if ($firstsofa >= 1) {
         showmessage(lang('magic/sofa', 'sofa_info_sofaexistence'), '', array(), array('login' => 1));
     }
     $sofamessage = lang('magic/sofa', 'sofa_text', array('actor' => $_G['member']['username'], 'time' => dgmdate(TIMESTAMP), 'magicname' => $this->magic['name']));
     $dateline = $thread['dateline'] + 1;
     insertpost(array('fid' => $thread['fid'], 'tid' => $_G['gp_tid'], 'first' => '0', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'dateline' => $dateline, 'message' => $sofamessage, 'useip' => $_G['clientip'], 'usesig' => '1'));
     DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies+1, moderated='1' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     DB::query("UPDATE " . DB::table('forum_forum') . " SET posts=posts+1, todayposts=todayposts+1 WHERE fid='{$post['fid']}'", 'UNBUFFERED');
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
     updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid']);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/sofa', 'sofa_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/sofa', 'sofa_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:25,代码来源:magic_sofa.php

示例12: usesubmit

 function usesubmit()
 {
     global $_G;
     $id = intval($_G['gp_id']);
     $idtype = $_G['gp_idtype'];
     $blog = magic_check_idtype($id, $idtype);
     $num = 10;
     $list = $ids = $note_inserts = array();
     $fusername = dimplode($_POST['fusername']);
     if ($fusername) {
         $query = DB::query('SELECT * FROM ' . DB::table('home_friend') . " WHERE uid='{$_G['uid']}' AND fusername IN (" . $fusername . ") LIMIT {$num}");
         $note = lang('spacecp', 'magic_call', array('url' => "home.php?mod=space&uid={$_G['uid']}&do=blog&id={$id}"));
         while ($value = DB::fetch($query)) {
             $ids[] = $value['fuid'];
             $value['avatar'] = str_replace("'", "\\'", avatar($value[fuid], 'small'));
             $list[] = $value;
             $note_inserts[] = "('{$value['fuid']}', '{$name}', '1', '{$_G['uid']}', '{$_G['username']}', '{$note}', '{$_G['timestamp']}')";
         }
     }
     if (empty($ids)) {
         showmessage('magicuse_has_no_valid_friend');
     }
     DB::query('INSERT INTO ' . DB::table('home_notification') . '(uid, type, new, authorid, author, note, dateline) VALUES ' . implode(',', $note_inserts));
     DB::query('UPDATE ' . DB::table('common_member') . ' SET newprompt = newprompt + 1 WHERE uid IN (' . dimplode($ids) . ')');
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', $idtype, $id);
     $op = 'show';
     include template('home/magic_call');
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:29,代码来源:magic_call.php

示例13: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_GET['pid'])) {
         showmessage(lang('magic/repent', 'repent_info_nonexistence'));
     }
     $_G['tid'] = $_GET['ptid'];
     $post = getpostinfo($_GET['pid'], 'pid', array('p.first', 'p.tid', 'p.fid', 'p.authorid', 'p.replycredit', 't.status as thread_status'));
     $this->_check($post);
     require_once libfile('function/post');
     require_once libfile('function/delete');
     if ($post['first']) {
         if ($have_replycredit = C::t('forum_replycredit')->fetch($post['tid'])) {
             $thread = C::t('forum_thread')->fetch($post['tid']);
             if ($thread['replycredit']) {
                 updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => $replycredit));
             }
             C::t('forum_replycredit')->delete($post['tid']);
             C::t('common_credit_log')->delete_by_operation_relatedid(array('RCT', 'RCA', 'RCB'), $post['tid']);
         }
         deletethread(array($post['tid']));
         updateforumcount($post['fid']);
     } else {
         if ($post['replycredit'] > 0) {
             updatemembercount($post['authorid'], array($_G['setting']['creditstransextra'][10] => -$post['replycredit']));
             C::t('common_credit_log')->delete_by_uid_operation_relatedid($post['authorid'], 'RCA', $post['tid']);
         }
         deletepost(array($_GET['pid']));
         updatethreadcount($post['tid']);
     }
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['tid']);
     showmessage(lang('magic/repent', 'repent_succeed'), $post['first'] ? 'forum.php?mod=forumdisplay&fid=' . $post['fid'] : dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:34,代码来源:magic_repent.php

示例14: usesubmit

 function usesubmit()
 {
     global $_G;
     DB::update('home_comment', array('magicflicker' => 1), array('cid' => intval($_G['gp_id']), 'authorid' => $_G['uid']));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0');
     showmessage(lang('magic/flicker', 'flicker_succeed'), '', array(), array('showdialog' => 1, 'closetime' => true));
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:8,代码来源:magic_flicker.php

示例15: usesubmit

 function usesubmit()
 {
     global $_G;
     C::t('home_comment')->update($_GET['id'], array('magicflicker' => 1), $_G['uid']);
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0');
     showmessage(lang('magic/flicker', 'flicker_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'closetime' => true, 'locationtime' => true));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:8,代码来源:magic_flicker.php


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