• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updatemembercount函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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


示例3: 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


示例4: usesubmit

 function usesubmit()
 {
     global $_G;
     $getmoney = rand(1, intval($this->magic['price'] * 1.5));
     updatemembercount($_G['uid'], array($_G['setting']['creditstransextra'][3] => $getmoney), 1, 'MRC', $this->magic['magicid']);
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'uid', $_G['uid']);
     showmessage('magics_credit_message', '', array('credit' => $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][3]]['title'] . ' ' . $getmoney . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][3]]['unit']), array('showdialog' => 1));
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:9,代码来源:magic_money.php


示例5: memcp_get_succeed

 function memcp_get_succeed($setting)
 {
     global $_G;
     if ($setting['MarketCredit']) {
         $creditArr = $setting['MarketCredit'];
         foreach ($creditArr as $id => &$value) {
             $value *= -1;
         }
         updatemembercount($_G['uid'], $creditArr);
     }
 }
开发者ID:v998,项目名称:dsu-medal-center,代码行数:11,代码来源:script_market.php


示例6: expiration_finished

 public function expiration_finished($days)
 {
     $expiration = TIMESTAMP - intval($days) * 86400;
     $logs = DB::fetch_all("SELECT * FROM %t WHERE sellerid>0 AND status=5 AND lastupdate<%d", array($this->_table, $expiration));
     $members = array();
     foreach ($logs as $log) {
         $members[$log['sellerid']]['extcredits' . $log['basecredit']] += $log['credit'];
     }
     foreach ($members as $uid => $data) {
         updatemembercount($uid, $data);
     }
     DB::query("DELETE FROM %t WHERE sellerid>0 AND status=5 AND lastupdate<%d", array($this->_table, $expiration));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:13,代码来源:table_forum_tradelog.php


示例7: dsu_amucallme_output

 function dsu_amucallme_output($a)
 {
     global $_G;
     if ($_G['uid'] && in_array($_G['fid'], $this->fids)) {
         $turl = "forum.php?mod=redirect&goto=findpost&ptid={$a['values']['tid']}&pid={$a['values']['pid']}";
         $url = $_G["siteurl"] . $turl;
         $msg = $this->message;
         $reply = $_G["siteurl"] . "forum.php?mod=post&action=reply&tid={$a['values']['tid']}&repquote={$a['values']['pid']}";
         if (!$msg) {
             if (!function_exists('discuzcode')) {
                 include libfile('function/discuzcode');
             }
             $msg = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . cutstr(strip_tags(discuzcode($_G['gp_message'], 1, 0)), 40, '...');
         }
         $sendmsg = lang('plugin/dsu_amucallme', 'sendmsg', array('username' => $_G['username'], 'url' => $url, 'reply' => $reply, 'message' => $msg));
         $cmcost = array();
         if (file_exists('./data/plugindata/dsu_amucallme.data.php')) {
             require_once DISCUZ_ROOT . './data/plugindata/dsu_amucallme.data.php';
             $data_f2a = dstripslashes($data_f2a);
             $cmcost = $data_f2a[$_G['groupid']];
             $cmcost['cost'] = $cmcost['cost'] * '-1';
         }
         $max = 0;
         if ($cmcost['extcredits'] && $cmcost['cost']) {
             $max = intval($_G['member']["extcredits{$cmcost['extcredits']}"] / $cmcost['cost']);
         } else {
             $max = 100;
         }
         if ($a['values']['tid'] && $a['values']['pid'] && $max) {
             foreach ($this->usernames as $key => $val) {
                 if ($val && $_G['uid'] != $val && $max) {
                     updatemembercount($_G['uid'], array("extcredits{$cmcost['extcredits']}" => $cmcost['cost']), true, '', 0);
                     notification_add($val, $_G['uid'], $sendmsg, '', 0);
                     $max--;
                 }
             }
             foreach ($this->gusernames as $key => $val) {
                 if ($val && $_G['uid'] != $val && $max) {
                     updatemembercount($_G['uid'], array("extcredits{$cmcost['extcredits']}" => $cmcost['cost']), true, '', 0);
                     notification_add($val, $_G['uid'], $sendmsg, '', 0);
                     $max--;
                 }
             }
         }
     }
 }
开发者ID:v998,项目名称:dsu,代码行数:46,代码来源:callme.class.php


示例8: global_header

 function global_header()
 {
     global $_G;
     $sendConfig = array();
     $sendConfig = $_G['cache']['plugin']['send_jinbi'];
     //缓存插件变量值
     if (intval($sendConfig['status']) == 1) {
         //是否启动插件
         if (isset($_POST['regsubmit'])) {
             //会员注册后
             $uid = intval($_G['member']['uid']);
             if ($uid) {
                 $jinbi_num = intval($sendConfig['jinbi_num']);
                 //送金币数量
                 updatemembercount($uid, array("extcredits2" => $jinbi_num));
                 //更新金币数 (这个是function_core.php的现成函数)
                 //这里可以进行任何数据库的操作
             }
         }
     }
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:21,代码来源:send_jinbi.class.php


示例9: common

 function common()
 {
     global $_G;
     if (!$_G['uid'] || !in_array('wechat', $_G['setting']['plugins']['available'])) {
         mobile_core::result(mobile_core::variable(array()));
     }
     $_G['wechat']['setting'] = unserialize($_G['setting']['mobilewechat']);
     if (!$_G['wechat']['setting']['wsq_apicredit']) {
         mobile_core::result(mobile_core::variable(array()));
     }
     $extcredit = 'extcredits' . $_G['wechat']['setting']['wsq_apicredit'];
     $ac = $_GET['ac'];
     $return = array();
     if (submitcheck('creditsubmit') && ($ac == 'inc' || $ac == 'dec') && $_GET['value'] > 0) {
         $v = $ac == 'inc' ? $_GET['value'] : -$_GET['value'];
         $log = lang('plugin/wechat', 'wsq_apicredit_log_' . $ac);
         updatemembercount(array($_G['uid']), array($extcredit => $v), true, '', 0, '', $log);
         $data = C::t('common_member_count')->fetch($_G['uid']);
         $return['extcredit'] = $data[$extcredit];
     } elseif ($ac == 'get') {
         $return['extcredit'] = getuserprofile($extcredit);
     }
     mobile_core::result(mobile_core::variable($return));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:24,代码来源:credit.php


示例10: foreach

                        // 特殊奖励(N)非循环
                        if (is_array($teshu)) {
                            foreach ($teshu as $id => $result) {
                                updatemembercount($_G['uid'], array("extcredits{$result['extcredits']}" => $result['reward']), true, '', 0);
                            }
                        }
                        updatemembercount($_G['uid'], array("extcredits{$thisvars['ptjf']}" => $pt), true, '', 0);
                        break;
                    case 4:
                        // 特殊奖励(Y)循环
                        if (is_array($teshu)) {
                            foreach ($teshu as $id => $result) {
                                updatemembercount($_G['uid'], array("extcredits{$result['extcredits']}" => $result['reward']), true, '', 0);
                            }
                        }
                        updatemembercount($_G['uid'], array("extcredits{$thisvars['ptjf']}" => $pt), true, '', 0);
                        break;
                }
            }
        }
    }
}
//elseif($this_time == 0 && $this_H){
//    //今天连续打卡&整点打卡
//    $Hreward = rand($this_Hs['minreward'],$this_Hs['maxreward']);
//    $return_msg = '整点签到成功! 获得额外奖励'.$ptjfname.'+'.$Hreward;
//    C::t('#dsu_amupper#plugin_dsuamupper')->update($_G['uid'],array('lasttime'=> $_G['timestamp']));
//    updatemembercount($_G['uid'], array("extcredits{$thisvars['ptjf']}" => $Hreward), true,'',0);
//}
if ($return_msg) {
    if (defined('VIP_INITED')) {
开发者ID:vanloswang,项目名称:discuzx-1,代码行数:31,代码来源:dsu_amupper.inc.php


示例11: showmessage

                 showmessage('activity_exile_field');
             }
             $ufielddata['userfield'][$key] = $value;
         }
     }
     if (!empty($activity['ufield']['extfield'])) {
         foreach ($activity['ufield']['extfield'] as $fieldid) {
             $value = cutstr(dhtmlspecialchars(trim($_GET['' . $fieldid])), 50, '.');
             $ufielddata['extfield'][$fieldid] = $value;
         }
     }
     $ufielddata = !empty($ufielddata) ? serialize($ufielddata) : '';
 }
 if ($_G['setting']['activitycredit'] && $activity['credit'] && empty($applyinfo['verified'])) {
     checklowerlimit(array('extcredits' . $_G['setting']['activitycredit'] => '-' . $activity['credit']));
     updatemembercount($_G['uid'], array($_G['setting']['activitycredit'] => '-' . $activity['credit']), true, 'ACC', $_G['tid']);
 }
 if ($applyinfo && $applyinfo['verified'] == 2) {
     $newinfo = array('tid' => $_G['tid'], 'username' => $_G['username'], 'uid' => $_G['uid'], 'message' => $message, 'verified' => $verified, 'dateline' => $_G['timestamp'], 'payment' => $payment, 'ufielddata' => $ufielddata);
     C::t('forum_activityapply')->update($applyinfo['appyid'], $newinfo);
 } else {
     $data = array('tid' => $_G['tid'], 'username' => $_G['username'], 'uid' => $_G['uid'], 'message' => $message, 'verified' => $verified, 'dateline' => $_G['timestamp'], 'payment' => $payment, 'ufielddata' => $ufielddata);
     C::t('forum_activityapply')->insert($data);
 }
 $applynumber = C::t('forum_activityapply')->fetch_count_for_thread($_G['tid']);
 C::t('forum_activity')->update($_G['tid'], array('applynumber' => $applynumber));
 if ($thread['authorid'] != $_G['uid']) {
     notification_add($thread['authorid'], 'activity', 'activity_notice', array('tid' => $_G['tid'], 'subject' => $thread['subject']));
     $space = array();
     space_merge($space, 'field_home');
     if (!empty($space['privacy']['feed']['newreply'])) {
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:forum_misc.php


示例12: before_deletepost

 public function before_deletepost($parameters)
 {
     $isfirstpost = $this->post['first'] ? 1 : 0;
     if ($this->thread['special'] == 3) {
         if ($this->thread['price'] < 0 && $this->thread['dateline'] + 1 == $this->post['dateline']) {
             showmessage('post_edit_reward_nopermission', NULL);
         }
     }
     if ($this->thread['special'] == 3 && $isfirstpost) {
         updatemembercount($this->post['authorid'], array($this->setting['creditstransextra'][2] => $this->thread['price']));
         C::t('common_credit_log')->delete_by_uid_operation_relatedid($this->thread['authorid'], 'RTC', $this->thread['tid']);
     }
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:13,代码来源:extend_thread_reward.php


示例13: empty

$discuz = C::app();
$discuz->init();
$apitype = empty($_GET['attach']) || !preg_match('/^[a-z0-9]+$/i', $_GET['attach']) ? 'alipay' : $_GET['attach'];
require_once DISCUZ_ROOT . './api/trade/api_' . $apitype . '.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
$_G['siteurl'] = dhtmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . preg_replace("/\\/+(api\\/trade)?\\/*\$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))) . '/');
$notifydata = trade_notifycheck('credit');
if ($notifydata['validator']) {
    $orderid = $notifydata['order_no'];
    $postprice = $notifydata['price'];
    $order = C::t('forum_order')->fetch($orderid);
    $order = array_merge($order, C::t('common_member')->fetch_by_username($order['uid']));
    if ($order && floatval($postprice) == floatval($order['price']) && ($apitype == 'tenpay' || strtolower($_G['setting']['ec_account']) == strtolower($_REQUEST['seller_email']))) {
        if ($order['status'] == 1) {
            C::t('forum_order')->update($orderid, array('status' => '2', 'buyer' => "{$notifydata['trade_no']}\t{$apitype}", 'confirmdate' => $_G['timestamp']));
            updatemembercount($order['uid'], array($_G['setting']['creditstrans'] => $order['amount']), 1, 'AFD', $order['uid']);
            updatecreditbyaction($action, $uid = 0, $extrasql = array(), $needle = '', $coef = 1, $update = 1, $fid = 0);
            C::t('forum_order')->delete_by_submitdate($_G['timestamp'] - 60 * 86400);
            $submitdate = dgmdate($order['submitdate']);
            $confirmdate = dgmdate(TIMESTAMP);
            notification_add($order['uid'], 'credit', 'addfunds', array('orderid' => $order['orderid'], 'price' => $order['price'], 'value' => $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['title'] . ' ' . $order['amount'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['unit']), 1);
        }
    }
}
if ($notifydata['location']) {
    $url = rawurlencode('home.php?mod=spacecp&ac=credit');
    if ($apitype == 'tenpay') {
        echo <<<EOS
<meta name="TENCENT_ONLINE_PAYMENT" content="China TENCENT">
<html>
<body>
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:notify_credit.php


示例14: reward_credit

 function reward_credit($extcreditid, $credits)
 {
     global $_G;
     $creditsarray[$extcreditid] = $credits;
     updatemembercount($_G['uid'], $creditsarray, 1, 'TRC', $this->task['taskid']);
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:6,代码来源:class_task.php


示例15: array

        C::t('common_member_field_home')->update($uid, array('magicgift' => $info['left'] > 0 ? serialize($info) : ''));
        $credittype = '';
        if (preg_match('/^extcredits[1-8]$/', $info['credittype'])) {
            $extcredits = str_replace('extcredits', '', $info['credittype']);
            updatemembercount($_G['uid'], array($extcredits => $percredit), 1, 'AGC', $info['magicid']);
            $credittype = $_G['setting']['extcredits'][$extcredits]['title'];
        }
        showmessage('haved_red_bag_gain', dreferer(), array('percredit' => $percredit, 'credittype' => $credittype), array('showdialog' => 1, 'locationtime' => true));
    }
    showmessage('space_no_red_bag', dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
} elseif ($op == 'retiregift') {
    $mid = 'gift';
    $memberfieldhome = C::t('common_member_field_home')->fetch($_G['uid']);
    $info = $memberfieldhome['magicgift'] ? dunserialize($memberfieldhome['magicgift']) : array();
    unset($memberfieldhome);
    $leftcredit = intval($info['left']);
    if ($leftcredit <= 0) {
        C::t('common_member_field_home')->update($_G['uid'], array('magicgift' => ''));
        showmessage('red_bag_no_credits');
    }
    $extcredits = str_replace('extcredits', '', $info['credittype']);
    $credittype = $_G['setting']['extcredits'][$extcredits]['title'];
    if (submitcheck('cancelsubmit')) {
        C::t('common_member_field_home')->update($_G['uid'], array('magicgift' => ''));
        if (preg_match('/^extcredits[1-8]$/', $info['credittype'])) {
            updatemembercount($_G['uid'], array($extcredits => $leftcredit), 1, 'RGC', $info['magicid']);
        }
        showmessage('return_red_bag', dreferer(), array('leftcredit' => $leftcredit, 'credittype' => $credittype), array('showdialog' => 1, 'locationtime' => true));
    }
}
include_once template('home/spacecp_magic');
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:spacecp_magic.php


示例16: array

        $diffarray = array();
        $sql = $comma = '';
        if (is_array($_G['gp_extcreditsnew'])) {
            foreach ($_G['gp_extcreditsnew'] as $id => $value) {
                if ($member['extcredits' . $id] != ($value = intval($value))) {
                    $diffarray[$id] = $value - $member['extcredits' . $id];
                    $sql .= $comma . "extcredits{$id}='{$value}'";
                    $comma = ', ';
                }
            }
        }
        if ($diffarray) {
            foreach ($diffarray as $id => $diff) {
                $logs[] = dhtmlspecialchars("{$_G['timestamp']}\t{$_G[member][username]}\t{$_G['adminid']}\t{$member['username']}\t{$id}\t{$diff}\t0\t\t{$_G['gp_reason']}");
            }
            updatemembercount($_G['gp_uid'], $diffarray);
            writelog('ratelog', $logs);
        }
        cpmsg('members_edit_credits_succeed', "action=members&operation=credit&uid={$_G['gp_uid']}", 'succeed');
    }
} elseif ($operation == 'medal') {
    if (empty($_G['gp_uid']) && empty($_G['gp_username'])) {
        cpmsg('members_nonexistence', 'action=members&operation=medal' . (!empty($_G['gp_highlight']) ? "&highlight={$_G['gp_highlight']}" : ''), 'form', array(), '<input type="text" name="username" value="" class="txt" />');
    } else {
        $condition = !empty($_G['gp_uid']) ? "m.uid='{$_G['gp_uid']}'" : "m.username='{$_G['gp_username']}'";
    }
    $member = DB::fetch_first("SELECT m.uid, m.username, mf.medals\r\n\t\tFROM " . DB::table('common_member') . " m\r\n\t\tLEFT JOIN " . DB::table('common_member_field_forum') . " mf ON m.uid=mf.uid\r\n\t\tWHERE {$condition}");
    if (!$member) {
        cpmsg('members_edit_nonexistence', '', 'error');
    }
    if (!submitcheck('medalsubmit')) {
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:admincp_members.php


示例17: list

        list($tmp['uid']) = $ucresult;
        if ($tmp['uid'] <= 0) {
            showmessage('credits_password_invalid', '', array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
        }
        if (!$outexange) {
            updatemembercount($_G['uid'], array($fromcredits => -$netamount, $tocredits => $exchangeamount), 1, 'CEC', $_G['uid']);
        } else {
            if (!array_key_exists($fromcredits, $_CACHE['creditsettings'][$tocredits]['creditsrc'])) {
                showmessage('extcredits_dataerror', NULL);
            }
            list($toappid, $tocredits) = explode('|', $tocredits);
            $ucresult = uc_credit_exchange_request($_G['uid'], $fromcredits, $tocredits, $toappid, $exchangeamount);
            if (!$ucresult) {
                showmessage('extcredits_dataerror', NULL);
            }
            updatemembercount($_G['uid'], array($fromcredits => -$netamount), 1, 'ECU', $_G['uid']);
            $netamount = $amount;
            $amount = $tocredits = 0;
        }
        showmessage('credits_transaction_succeed', 'home.php?mod=spacecp&ac=credit&op=exchange', array(), array('showdialog' => 1, 'showmsg' => true, 'locationtime' => true));
    }
} else {
    $wheresql = '';
    $list = array();
    $rid = intval($_GET['rid']);
    if ($_GET['rid']) {
        $wheresql = " AND rid='{$rid}'";
    }
    require_once libfile('function/forumlist');
    $select = forumselect(false, 0, $_GET['fid']);
    $keys = array_keys($_G['setting']['extcredits']);
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:spacecp_credit_base.php


示例18: deletealbums

function deletealbums($albumids)
{
    global $_G;
    $sizes = $dels = $newids = $counts = array();
    $allowmanage = checkperm('managealbum');
    $value = C::t('home_album')->fetch($albumids);
    if ($value['albumid']) {
        if ($allowmanage || $value['uid'] == $_G['uid']) {
            $dels[] = $value;
            $newids[] = $value['albumid'];
            if (!empty($value['pic'])) {
                include_once libfile('function/home');
                pic_delete($value['pic'], 'album', 0, $value['picflag'] == 2 ? 1 : 0);
            }
        }
        $counts[$value['uid']]['albums'] -= 1;
    }
    if (empty($dels)) {
        return array();
    }
    $pics = $picids = array();
    $query = C::t('home_pic')->fetch_all_by_albumid($newids);
    foreach ($query as $value) {
        $pics[] = $value;
        $picids[] = $value['picid'];
        $sizes[$value['uid']] = $sizes[$value['uid']] + $value['size'];
    }
    if ($picids) {
        deletepics($picids);
    }
    C::t('home_album')->delete($newids);
    C::t('home_feed')->delete_by_id_idtype($newids, 'albumid');
    if ($picids) {
        C::t('home_clickuser')->delete_by_id_idtype($picids, 'picid');
    }
    if ($sizes) {
        foreach ($sizes as $uid => $value) {
            $attachsize = intval($sizes[$uid]);
            $albumnum = $counts[$uid]['albums'] ? $counts[$uid]['albums'] : 0;
            updatemembercount($uid, array('albums' => $albumnum, 'attachsize' => -$attachsize), false);
        }
    }
    return $dels;
}
开发者ID:softhui,项目名称:discuz,代码行数:44,代码来源:function_delete.php


示例19: array

        $diffarray = array();
        $sql = $comma = '';
        if (is_array($_GET['extcreditsnew'])) {
            foreach ($_GET['extcreditsnew'] as $id => $value) {
                if ($member['extcredits' . $id] != ($value = intval($value))) {
                    $diffarray[$id] = $value - $member['extcredits' . $id];
                    $sql .= $comma . "extcredits{$id}='{$value}'";
                    $comma = ', ';
                }
            }
        }
        if ($diffarray) {
            foreach ($diffarray as $id => $diff) {
                $logs[] = dhtmlspecialchars("{$_G['timestamp']}\t{$_G[member][username]}\t{$_G['adminid']}\t{$member['username']}\t{$id}\t{$diff}\t0\t\t{$_GET['reason']}");
            }
            updatemembercount($_GET['uid'], $diffarray);
            writelog('ratelog', $logs);
        }
        cpmsg('members_edit_credits_succeed', "action=members&operation=credit&uid={$_GET['uid']}", 'succeed');
    }
} elseif ($operation == 'medal') {
    $membermf = C::t('common_member_field_forum' . $tableext)->fetch($_GET['uid']);
    $member = array_merge($member, $membermf);
    if (!submitcheck('medalsubmit')) {
        $medals = '';
        $membermedals = array();
        loadcache('medals');
        foreach (explode("\t", $member['medals']) as $key => $membermedal) {
            list($medalid, $medalexpiration) = explode("|", $membermedal);
            if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
                $membermedals[$key] = $medalid;
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:admincp_members.php


示例20: while

 }
 while ($attach = DB::fetch($query)) {
     if (in_array($attach['uid'], $puidarray)) {
         $auidarray[$attach['uid']] = !empty($auidarray[$attach['uid']]) ? $auidarray[$attach['uid']] + 1 : 1;
     }
     dunlink($attach);
 }
 if ($auidarray) {
     updateattachcredits('-', $auidarray, $postattachcredits);
 }
 $logs = array();
 if ($pids) {
     $query = DB::query("SELECT r.extcredits, r.score, p.authorid, p.author FROM " . DB::table('forum_ratelog') . " r LEFT JOIN " . DB::table($posttable) . " p ON r.pid=p.pid WHERE r.pid IN ({$pids})");
     while ($author = DB::fetch($query)) {
         if ($author['score'] > 0) {
             updatemembercount($author['authorid'], array($author['extcredits'] => -$author['score']));
             $author['score'] = $_G['setting']['extcredits'][$id]['title'] . ' ' . -$author['score'] . ' ' . $_G['setting']['extcredits'][$id]['unit'];
             $logs[] = dhtmlspecialchars("{$_G['timestamp']}\t{$_G[member][username]}\t{$_G['adminid']}\t{$author['author']}\t{$author['extcredits']}\t{$author['score']}\t{$thread['tid']}\t{$thread['subject']}\t{$delpostsubmit}");
         }
     }
 }
 if (!empty($logs)) {
     writelog('ratelog', $logs);
     unset($logs);
 }
 DB::delete('common_credit_log', "operation='PRC' AND relatedid IN({$pids})");
 DB::query("DELETE FROM " . DB::table('forum_ratelog') . " WHERE pid IN ({$pids})");
 DB::query("DELETE FROM " . DB::table('forum_attachment') . " WHERE pid IN ({$pids})");
 DB::query("DELETE FROM " . DB::table('forum_attachmentfield') . " WHERE pid IN ({$pids})");
 DB::query("DELETE FROM " . DB::table('forum_postcomment') . " WHERE pid IN ({$pids})");
 DB::query("DELETE FROM " . DB::table($posttable) . " WHERE pid IN ({$pids})");
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:topicadmin_delpost.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updatemenu函数代码示例发布时间:2022-05-23
下一篇:
PHP updatemagicthreadlog函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap