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

PHP updatecreditbyaction函数代码示例

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

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



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

示例1: onCreditSign

 public function onCreditSign($uId)
 {
     global $_G;
     if ($uId) {
         return updatecreditbyaction('mobileoemdaylogin', $uId) ? 1 : 0;
     }
     return 0;
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:8,代码来源:Credit.php


示例2: onUserApplicationRemove

 public function onUserApplicationRemove($uId, $appIds)
 {
     $result = C::t('home_userapp')->delete_by_uid_appid($uId, $appIds);
     C::t('home_userappfield')->delete_by_uid_appid($uId, $appIds);
     updatecreditbyaction('installapp', $uId, array(), $appId, -1);
     require_once libfile('function/cache');
     updatecache('userapp');
     return $result;
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:9,代码来源:UserApplication.php


示例3: common

 function common()
 {
     global $_G;
     if (submitcheck('hash', true) && $_G['uid']) {
         $r = updatecreditbyaction('mobilesign', $_G['uid']);
         if ($r['updatecredit']) {
             $_G['messageparam'][0] = 'mobilesign_success';
         } else {
             $_G['messageparam'][0] = 'mobilesign_failed';
         }
     } else {
         $_G['messageparam'][0] = 'mobilesign_formhash_failed';
     }
     mobile_core::result(mobile_core::variable(array()));
 }
开发者ID:sayhanabi,项目名称:sayhanabi_forum,代码行数:15,代码来源:mobilesign.php


示例4: xwb_setSiteUserLogin

function xwb_setSiteUserLogin($uid)
{
    global $_G;
    if (empty($uid)) {
        return false;
    }
    //登录
    $member = DB::fetch_first("SELECT * FROM " . DB::table('common_member') . " WHERE uid='" . $uid . "'");
    if (!$member) {
        return false;
    }
    setloginstatus($member, time() + 60 * 60 * 24 ? 2592000 : 0);
    DB::query("UPDATE " . DB::table('common_member_status') . " SET lastip='" . $_G['clientip'] . "', lastvisit='" . time() . "' WHERE uid='{$uid}'");
    include_once libfile('function/stat');
    updatestat('login');
    updatecreditbyaction('daylogin', $uid);
    checkusergroup($uid);
    return true;
}
开发者ID:chibimiku,项目名称:xweibo_for_discuz_x2_php7,代码行数:19,代码来源:xwbSite.inc.php


示例5: exit

<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: spacecp_avatar.php 18515 2010-11-25 07:35:31Z zhengqingpeng $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (submitcheck('avatarsubmit')) {
    showmessage('do_success', 'cp.php?ac=avatar&quickforward=1');
}
loaducenter();
$uc_avatarflash = uc_avatar($_G['uid'], 'virtual', 0);
if (empty($space['avatarstatus']) && uc_check_avatar($_G['uid'], 'middle')) {
    DB::update('common_member', array('avatarstatus' => '1'), array('uid' => $_G['uid']));
    updatecreditbyaction('setavatar');
    manyoulog('user', $_G['uid'], 'update');
}
$actives = array('avatar' => ' class="a"');
include template("home/spacecp_avatar");
开发者ID:pan289091315,项目名称:Discuz,代码行数:23,代码来源:spacecp_avatar.php


示例6: onVideoAuthAuth

 function onVideoAuthAuth($uId, $picData, $picExt = 'jpg', $isReward = false)
 {
     global $_G;
     $res = $this->getUserSpace($uId);
     if (!$res) {
         return new ErrorResponse('1', "User({$uId}) Not Exists");
     }
     $pic = base64_decode($picData);
     if (!$pic || strlen($pic) == strlen($picData)) {
         $errCode = '200';
         $errMessage = 'Error argument';
         return new ErrorResponse($errCode, $errMessage);
     }
     $secret = md5($_G['timestamp'] . "\t" . $_G['uid']);
     $picDir = DISCUZ_ROOT . './data/avatar/' . substr($secret, 0, 1);
     if (!is_dir($picDir)) {
         if (!mkdir($picDir, 0777)) {
             $errCode = '300';
             $errMessage = 'Cannot create directory';
             return new ErrorResponse($errCode, $errMessage);
         }
     }
     $picDir .= '/' . substr($secret, 1, 1);
     if (!is_dir($picDir)) {
         if (!@mkdir($picDir, 0777)) {
             $errCode = '300';
             $errMessage = 'Cannot create directory';
             return new ErrorResponse($errCode, $errMessage);
         }
     }
     $picPath = $picDir . '/' . $secret . '.' . $picExt;
     $fp = @fopen($picPath, 'wb');
     if ($fp) {
         if (fwrite($fp, $pic) !== FALSE) {
             fclose($fp);
             DB::update('common_member', array('videophotostatus' => 1), array('uid' => $uId));
             $fields = array('videophoto' => $secret);
             DB::update('common_member_field_home', $fields, array('uid' => $uId));
             $result = DB::affected_rows();
             if ($isReward) {
                 updatecreditbyaction('videophoto', $uId);
             }
             return $result;
         }
         fclose($fp);
     }
     $errCode = '300';
     $errMessage = 'Video Auth Error';
     return new ErrorResponse($errCode, $errMessage);
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:50,代码来源:my.php


示例7: hot_update

function hot_update($idtype, $id, $hotuser)
{
    global $_G;
    $hotusers = empty($hotuser) ? array() : explode(',', $hotuser);
    if ($hotusers && in_array($_G['uid'], $hotusers)) {
        return false;
    } else {
        $hotusers[] = $_G['uid'];
        $hotuser = implode(',', $hotusers);
    }
    $newhot = count($hotusers) + 1;
    if ($newhot == $_G['setting']['feedhotmin']) {
        $tablename = gettablebyidtype($idtype);
        $query = DB::query("SELECT uid FROM " . DB::table($tablename) . " WHERE {$idtype}='{$id}'");
        $item = DB::fetch($query);
        updatecreditbyaction('hotinfo', $item['uid']);
    }
    switch ($idtype) {
        case 'blogid':
            DB::query("UPDATE " . DB::table('home_blogfield') . " SET hotuser='{$hotuser}' WHERE blogid='{$id}'");
            DB::query("UPDATE " . DB::table('home_blog') . " SET hot=hot+1 WHERE blogid='{$id}'");
            break;
        case 'picid':
            DB::query("REPLACE INTO " . DB::table('home_picfield') . " (picid, hotuser) VALUES ('{$id}', '{$hotuser}')");
            DB::query("UPDATE " . DB::table('home_pic') . " SET hot=hot+1 WHERE picid='{$id}'");
            break;
        case 'sid':
            DB::query("UPDATE " . DB::table('home_share') . " SET hot=hot+1, hotuser='{$hotuser}' WHERE sid='{$id}'");
            break;
        default:
            return false;
    }
    $query = DB::query("SELECT feedid, friend FROM " . DB::table('home_feed') . " WHERE id='{$id}' AND idtype='{$idtype}'");
    if ($feed = DB::fetch($query)) {
        if (empty($feed['friend'])) {
            DB::query("UPDATE " . DB::table('home_feed') . " SET hot=hot+1 WHERE feedid='{$feed['feedid']}'");
        }
    } elseif ($idtype == 'picid') {
        require_once libfile('function/feed');
        feed_publish($id, $idtype);
    }
    return true;
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:43,代码来源:function_spacecp.php


示例8: dgmdate

    $rushresult['starttimeto'] = $rushresult['starttimeto'] ? dgmdate($rushresult['starttimeto']) : '';
    $rushresult['creditlimit_title'] = $_G['setting']['creditstransextra'][11] ? $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][11]]['title'] : lang('forum/misc', 'credit_total');
}
if ($_G['forum_thread']['replycredit'] > 0) {
    $_G['forum_thread']['replycredit_rule'] = C::t('forum_replycredit')->fetch($thread['tid']);
    $_G['forum_thread']['replycredit_rule']['remaining'] = $_G['forum_thread']['replycredit'] / $_G['forum_thread']['replycredit_rule']['extcredits'];
    $_G['forum_thread']['replycredit_rule']['extcreditstype'] = $_G['forum_thread']['replycredit_rule']['extcreditstype'] ? $_G['forum_thread']['replycredit_rule']['extcreditstype'] : $_G['setting']['creditstransextra'][10];
}
$_G['group']['raterange'] = $_G['setting']['modratelimit'] && $adminid == 3 && !$_G['forum']['ismoderator'] ? array() : $_G['group']['raterange'];
$_G['group']['allowgetattach'] = !empty($_G['forum']['allowgetattach']) || $_G['group']['allowgetattach'] && !$_G['forum']['getattachperm'] || forumperm($_G['forum']['getattachperm']);
$_G['group']['allowgetimage'] = !empty($_G['forum']['allowgetimage']) || $_G['group']['allowgetimage'] && !$_G['forum']['getattachperm'] || forumperm($_G['forum']['getattachperm']);
$_G['getattachcredits'] = '';
if ($_G['forum_thread']['attachment']) {
    $exemptvalue = $_G['forum']['ismoderator'] ? 32 : 4;
    if (!($_G['group']['exempt'] & $exemptvalue)) {
        $creditlog = updatecreditbyaction('getattach', $_G['uid'], array(), '', 1, 0, $_G['forum_thread']['fid']);
        $p = '';
        if ($creditlog['updatecredit']) {
            for ($i = 1; $i <= 8; $i++) {
                if ($policy = $creditlog['extcredits' . $i]) {
                    $_G['getattachcredits'] .= $p . $_G['setting']['extcredits'][$i]['title'] . ' ' . $policy . ' ' . $_G['setting']['extcredits'][$i]['unit'];
                    $p = ', ';
                }
            }
        }
    }
}
$exemptvalue = $_G['forum']['ismoderator'] ? 64 : 8;
$_G['forum_attachmentdown'] = $_G['group']['exempt'] & $exemptvalue;
list($seccodecheck, $secqaacheck) = seccheck('post', 'reply');
$usesigcheck = $_G['uid'] && $_G['group']['maxsigsize'];
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_viewthread.php


示例9: updateattachcredits

function updateattachcredits($operator, $uidarray)
{
    global $_G;
    foreach ($uidarray as $uid => $attachs) {
        updatecreditbyaction('postattach', $uid, array(), '', $operator == '-' ? -$attachs : $attachs, 1, $_G['fid']);
    }
}
开发者ID:v998,项目名称:discuzx-en,代码行数:7,代码来源:function_post.php


示例10: while

 $thread_attachment = $post_attachment = 0;
 $query = DB::query("SELECT pid, attachment, thumb, remote, aid FROM " . DB::table(getattachtablebytid($_G['tid'])) . " WHERE tid='{$_G['tid']}'");
 while ($attach = DB::fetch($query)) {
     if ($attach['pid'] == $pid) {
         if ($thread['displayorder'] >= 0) {
             $post_attachment++;
         }
         dunlink($attach);
     } else {
         $thread_attachment = 1;
     }
 }
 if ($post_attachment) {
     DB::query("DELETE FROM " . DB::table('forum_attachment') . " WHERE pid='{$pid}'", 'UNBUFFEREED');
     DB::query("DELETE FROM " . DB::table(getattachtablebytid($_G['tid'])) . " WHERE pid='{$pid}'", 'UNBUFFEREED');
     updatecreditbyaction('postattach', $orig['authorid'], array(), '', -$post_attachment);
 }
 DB::query("DELETE FROM " . DB::table($posttable) . " WHERE pid='{$pid}'");
 DB::delete('forum_postcomment', "rpid='{$pid}'");
 if ($thread['special'] == 2) {
     DB::query("DELETE FROM " . DB::table('forum_trade') . " WHERE pid='{$pid}'");
 }
 if ($isfirstpost) {
     $forumadd = 'threads=threads-\'1\', posts=posts-\'1\'';
     $tablearray = array('forum_threadmod', 'forum_relatedthread', 'forum_thread', 'forum_debate', 'forum_debatepost', 'forum_polloption', 'forum_poll', 'forum_typeoptionvar');
     foreach ($tablearray as $table) {
         DB::query("DELETE FROM " . DB::table($table) . " WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     }
     if ($_G['setting']['globalstick'] && in_array($thread['displayorder'], array(2, 3))) {
         require_once libfile('function/cache');
         updatecache('globalstick');
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:post_editpost.php


示例11: updatemodlog

         updatemodlog($recyclebintids, 'DEL');
     }
     require_once libfile('function/delete');
     deletethread($deletetids);
     updatemoderate('tid', $moderation['delete'], 2);
 }
 if ($validatetids = dimplode($moderation['validate'])) {
     $tids = $moderatedthread = array();
     foreach (C::t('forum_thread')->fetch_all_by_tid_displayorder($moderation['validate'], $pstat, '=', $modfids ? explode(',', $modfids) : null) as $thread) {
         $tids[] = $thread['tid'];
         $poststatus = C::t('forum_post')->fetch_threadpost_by_tid_invisible($thread['tid']);
         $poststatus = $poststatus['status'];
         if (getstatus($poststatus, 3) == 0) {
             updatepostcredits('+', $thread['authorid'], 'post', $thread['fid']);
             $attachcount = C::t('forum_attachment_n')->count_by_id('tid:' . $thread['tid'], 'tid', $thread['tid']);
             updatecreditbyaction('postattach', $thread['authorid'], array(), '', $attachcount, 1, $thread['fid']);
         }
         $validatedthreads[] = $thread;
         if ($thread['authorid'] && $thread['authorid'] != $_G['uid']) {
             $pmlist[] = array('act' => 'modthreads_validate', 'notevar' => array('reason' => dhtmlspecialchars($_GET['reason']), 'tid' => $thread['tid'], 'threadsubject' => $thread['subject'], 'from_id' => 0, 'from_idtype' => 'modthreads'), 'authorid' => $thread['authorid']);
         }
     }
     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']);
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:modcp_moderate.php


示例12: showmessage

        } else {
            if (isblacklist($updo['uid'])) {
                showmessage('is_blacklist');
            }
        }
        $updo['id'] = intval($updo['id']);
        $updo['grade'] = intval($updo['grade']);
        $setarr = array('doid' => $updo['doid'], 'upid' => $updo['id'], 'uid' => $_G['uid'], 'username' => $_G['username'], 'dateline' => $_G['timestamp'], 'message' => $message, 'ip' => $_G['clientip'], 'grade' => $updo['grade'] + 1);
        if ($updo['grade'] >= 3) {
            $setarr['upid'] = $updo['upid'];
        }
        $newid = C::t('home_docomment')->insert($setarr, true);
        C::t('home_doing')->update_replynum_by_doid(1, $updo['doid']);
        if ($updo['uid'] != $_G['uid']) {
            notification_add($updo['uid'], 'comment', 'doing_reply', array('url' => "home.php?mod=space&uid={$updo['uid']}&do=doing&view=me&doid={$updo['doid']}&highlight={$newid}", 'from_id' => $updo['doid'], 'from_idtype' => 'doid'));
            updatecreditbyaction('comment', 0, array(), 'doing' . $updo['doid']);
        }
        include_once libfile('function/stat');
        updatestat('docomment');
        C::t('common_member_status')->update($_G['uid'], array('lastpost' => TIMESTAMP), 'UNBUFFERED');
        showmessage('do_success', dreferer(), array('doid' => $updo['doid']));
    }
}
if ($_GET['op'] == 'delete') {
    if (submitcheck('deletesubmit')) {
        if ($id) {
            $allowmanage = checkperm('managedoing');
            if ($value = C::t('home_docomment')->fetch($id)) {
                $home_doing = C::t('home_doing')->fetch($value['doid']);
                $value['duid'] = $home_doing['uid'];
                if ($allowmanage || $value['uid'] == $_G['uid'] || $value['duid'] == $_G['uid']) {
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:spacecp_doing.php


示例13: _init_misc

 function _init_misc()
 {
     if (!$this->init_misc) {
         return false;
     }
     lang('core');
     if ($this->init_setting && $this->init_user) {
         if (!isset($this->var['member']['timeoffset']) || $this->var['member']['timeoffset'] == 9999 || $this->var['member']['timeoffset'] === '') {
             $this->var['member']['timeoffset'] = $this->var['setting']['timeoffset'];
         }
     }
     $timeoffset = $this->init_setting ? $this->var['member']['timeoffset'] : $this->var['setting']['timeoffset'];
     $this->var['timenow'] = array('time' => dgmdate(TIMESTAMP), 'offset' => $timeoffset >= 0 ? $timeoffset == 0 ? '' : '+' . $timeoffset : $timeoffset);
     $this->timezone_set($timeoffset);
     $this->var['formhash'] = formhash();
     define('FORMHASH', $this->var['formhash']);
     if ($this->init_user) {
         if ($this->var['group'] && isset($this->var['group']['allowvisit']) && !$this->var['group']['allowvisit']) {
             if ($this->var['uid']) {
                 sysmessage('user_banned', null);
             } elseif ((!defined('ALLOWGUEST') || !ALLOWGUEST) && !in_array(CURSCRIPT, array('member', 'api')) && !$this->var['inajax']) {
                 dheader('location: member.php?mod=logging&action=login&referer=' . rawurlencode($_SERVER['REQUEST_URI']));
             }
         }
         if ($this->var['member']['status'] == -1) {
             sysmessage('user_banned', null);
         }
     }
     if ($this->var['setting']['ipaccess'] && !ipaccess($this->var['clientip'], $this->var['setting']['ipaccess'])) {
         sysmessage('user_banned', null);
     }
     if ($this->var['setting']['bbclosed']) {
         if ($this->var['uid'] && ($this->var['group']['allowvisit'] == 2 || $this->var['groupid'] == 1)) {
         } elseif (in_array(CURSCRIPT, array('admin', 'member', 'api')) || defined('ALLOWGUEST') && ALLOWGUEST) {
         } else {
             $closedreason = DB::result_first("SELECT svalue FROM " . DB::table('common_setting') . " WHERE skey='closedreason'");
             $closedreason = str_replace(':', '&#58;', $closedreason);
             showmessage($closedreason ? $closedreason : 'board_closed', NULL, array('adminemail' => $this->var['setting']['adminemail']), array('login' => 1));
         }
     }
     if (CURSCRIPT != 'admin' && !in_array($this->var['mod'], array('logging', 'seccode'))) {
         periodscheck('visitbanperiods');
     }
     if (defined('IN_MOBILE')) {
         $this->var['tpp'] = $this->var['setting']['mobile']['mobiletopicperpage'] ? intval($this->var['setting']['mobile']['mobiletopicperpage']) : 20;
         $this->var['ppp'] = $this->var['setting']['mobile']['mobilepostperpage'] ? intval($this->var['setting']['mobile']['mobilepostperpage']) : 5;
     } else {
         $this->var['tpp'] = $this->var['setting']['topicperpage'] ? intval($this->var['setting']['topicperpage']) : 20;
         $this->var['ppp'] = $this->var['setting']['postperpage'] ? intval($this->var['setting']['postperpage']) : 10;
     }
     if ($this->var['setting']['nocacheheaders']) {
         @header("Expires: -1");
         @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
         @header("Pragma: no-cache");
     }
     if ($this->session->isnew && $this->var['uid']) {
         updatecreditbyaction('daylogin', $this->var['uid']);
         include_once libfile('function/stat');
         updatestat('login', 1);
         if (defined('IN_MOBILE')) {
             updatestat('mobilelogin', 1);
         }
         if ($this->var['setting']['connect']['allow'] && $this->var['member']['conisbind']) {
             updatestat('connectlogin', 1);
         }
     }
     if ($this->var['member']['conisbind'] && $this->var['setting']['connect']['newbiespan'] !== '') {
         $this->var['setting']['newbiespan'] = $this->var['setting']['connect']['newbiespan'];
     }
     $lastact = TIMESTAMP . "\t" . htmlspecialchars(basename($this->var['PHP_SELF'])) . "\t" . htmlspecialchars($this->var['mod']);
     dsetcookie('lastact', $lastact, 86400);
     setglobal('currenturl_encode', base64_encode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
     if ((!empty($this->var['gp_fromuid']) || !empty($this->var['gp_fromuser'])) && ($this->var['setting']['creditspolicy']['promotion_visit'] || $this->var['setting']['creditspolicy']['promotion_register'])) {
         require_once libfile('misc/promotion', 'include');
     }
     $this->var['seokeywords'] = !empty($this->var['setting']['seokeywords'][CURSCRIPT]) ? $this->var['setting']['seokeywords'][CURSCRIPT] : '';
     $this->var['seodescription'] = !empty($this->var['setting']['seodescription'][CURSCRIPT]) ? $this->var['setting']['seodescription'][CURSCRIPT] : '';
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:78,代码来源:class_core.php


示例14: notification_add

 if ($status != $tradelog['status']) {
     if ($status == STATUS_SELLER_SEND) {
         notification_add($tradelog['sellerid'], 'goods', 'trade_seller_send', array('buyerid' => $tradelog['buyerid'], 'buyer' => $tradelog['buyer'], 'orderid' => $orderid, 'subject' => $tradelog['subject']));
     } elseif ($status == STATUS_WAIT_BUYER) {
         notification_add($tradelog['buyerid'], 'goods', 'trade_buyer_confirm', array('sellerid' => $tradelog['sellerid'], 'seller' => $tradelog['seller'], 'orderid' => $orderid, 'subject' => $tradelog['subject']));
     } elseif ($status == STATUS_TRADE_SUCCESS) {
         if ($_G['setting']['creditstransextra'][5] != -1 && $tradelog['basecredit']) {
             $netcredit = round($tradelog['number'] * $tradelog['basecredit'] * (1 - $_G['setting']['creditstax']));
             updatemembercount($tradelog['sellerid'], array($_G['setting']['creditstransextra'][5] => $netcredit));
         } else {
             $netcredit = 0;
         }
         C::t('forum_trade')->update($tradelog['tid'], $tradelog['pid'], array('lastbuyer' => $tradelog['buyer'], 'lastupdate' => $_G['timestamp']));
         C::t('forum_trade')->update_counter($tradelog['tid'], $tradelog['pid'], $tradelog['number'], $tradelog['price'], $netcredit);
         updatecreditbyaction('tradefinished', $tradelog['sellerid']);
         updatecreditbyaction('tradefinished', $tradelog['buyerid']);
         notification_add($tradelog['sellerid'], 'goods', 'trade_success', array('orderid' => $orderid, 'subject' => $tradelog['subject']));
         notification_add($tradelog['buyerid'], 'goods', 'trade_success', array('orderid' => $orderid, 'subject' => $tradelog['subject']));
     } elseif ($status == STATUS_REFUND_CLOSE) {
         C::t('forum_trade')->update_counter($tradelog['tid'], $tradelog['pid'], 0, 0, 0, $tradelog['number']);
         notification_add($tradelog['sellerid'], 'goods', 'trade_fefund_success', array('orderid' => $orderid, 'subject' => $tradelog['subject']));
         notification_add($tradelog['buyerid'], 'goods', 'trade_fefund_success', array('orderid' => $orderid, 'subject' => $tradelog['subject']));
         if ($_G['setting']['creditstrans'] && $tradelog['buyerid']) {
             updatemembercount($tradelog['buyerid'], array($_G['setting']['creditstrans'] => $tradelog['buyercredits']));
         }
         if ($_G['setting']['creditstransextra'][5] != -1 && $tradelog['basecredit'] && $tradelog['buyerid']) {
             $credit = $tradelog['number'] * $tradelog['basecredit'];
             updatemembercount($tradelog['buyerid'], array($_G['setting']['creditstransextra'][5] => $credit));
         }
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:31,代码来源:notify_trade.php


示例15: updatemoderate

                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();
        }
        if (!$showmessagecontent) {
            $showmessagecontent = 'do_success';
        }
        showmessage($showmessagecontent, $redirecturl, $magvalues, $_G['inajax'] && $_GET['view'] != 'me' ? array('showdialog' => 1, 'showmsg' => true, 'closetime' => true) : array());
    }
    $arr['body_data'] = serialize($arr['body_data']);
    require_once libfile('function/share');
    $arr = mkshare($arr);
    $arr['dateline'] = $_G['timestamp'];
}
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php


示例16: 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|\&nbsp\;|\<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


示例17: template

    include template('common/footer_ajax');
    dexit();
} elseif ($_GET['action'] == 'get_rushreply_membernum') {
    $tid = intval($_GET['tid']);
    if ($tid) {
        $membernum = C::t('forum_post')->count_author_by_tid($tid);
        showmessage('thread_reshreply_membernum', '', array('membernum' => intval($membernum - 1)), array('alert' => 'info'));
    }
    dexit();
} elseif ($_GET['action'] == 'deleteattach') {
    $count = 0;
    if ($_GET['aids']) {
        foreach ($_GET['aids'] as $aid) {
            $attach = C::t('forum_attachment_n')->fetch('aid:' . $aid, $aid);
            if ($attach && ($attach['pid'] && $attach['pid'] == $_GET['pid'] && $_G['uid'] == $attach['uid'])) {
                updatecreditbyaction('postattach', $attach['uid'], array(), '', -1, 1, $_G['fid']);
            }
            if ($attach && ($attach['pid'] && $attach['pid'] == $_GET['pid'] && $_G['uid'] == $attach['uid'] || $_G['forum']['ismoderator'] || !$attach['pid'] && $_G['uid'] == $attach['uid'])) {
                C::t('forum_attachment_n')->delete('aid:' . $aid, $aid);
                C::t('forum_attachment')->delete($aid);
                dunlink($attach);
                $count++;
            }
        }
    }
    include template('common/header_ajax');
    echo $count;
    include template('common/footer_ajax');
    dexit();
} elseif ($_GET['action'] == 'secondgroup') {
    require_once libfile('function/group');
开发者ID:vanloswang,项目名称:DiscuzX,代码行数:31,代码来源:forum_ajax.php


示例18: empty

        $query = DB::query("SELECT dateline FROM " . DB::table('home_visitor') . " WHERE uid='{$space['uid']}' AND vuid='{$_G['uid']}'");
        $visitor = DB::fetch($query);
        $is_anonymous = empty($_G['cookie']['anonymous_visit_' . $_G['uid'] . '_' . $space['uid']]) ? 0 : 1;
        if (empty($visitor['dateline'])) {
            $setarr = array('uid' => $space['uid'], 'vuid' => $_G['uid'], 'vusername' => $is_anonymous ? '' : $_G['username'], 'dateline' => $_G['timestamp']);
            DB::insert('home_visitor', $setarr, 0, true);
            show_credit();
        } else {
            if ($_G['timestamp'] - $visitor['dateline'] >= 300) {
                DB::update('home_visitor', array('dateline' => $_G['timestamp'], 'vusername' => $is_anonymous ? '' : $_G['username']), array('uid' => $space['uid'], 'vuid' => $_G['uid']));
            }
            if ($_G['timestamp'] - $visitor['dateline'] >= 3600) {
                show_credit();
            }
        }
        updatecreditbyaction('visit', 0, array(), $space['uid']);
    }
    if ($do != 'profile' && !ckprivacy($do, 'view')) {
        $_G['privacy'] = 1;
        require_once libfile('space/profile', 'include');
        include template('home/space_privacy');
        exit;
    }
    $widths = getlayout($userdiy['currentlayout']);
    $leftlist = formatdata($userdiy, 'left', $space);
    $centerlist = formatdata($userdiy, 'center', $space);
    $rightlist = formatdata($userdiy, 'right', $space);
    dsetcookie('home_diymode', 1);
}
$navtitle = !empty($space['spacename']) ? $space['spacename'] : lang('space', 'sb_space', array('who' => $space['username']));
$metakeywords = lang('space', 'sb_space', array('who' => $space['username']));
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:space_index.php


示例19: empty

$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>
<script language="javascript" type="text/javascript">
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:notify_credit.php


示例20: strtolower

     $domain = strtolower(trim($_G['gp_domain']));
     if ($_G['setting']['allowgroupdomain'] && !empty($_G['setting']['domain']['root']['group']) && $domainlength) {
         checklowerlimit('modifydomain');
     }
     if (empty($domainlength) || empty($domain)) {
         $domain = '';
     } else {
         require_once libfile('function/domain');
         if (domaincheck($domain, $_G['setting']['domain']['root']['group'], $domainlength)) {
             require_once libfile('function/delete');
             deletedomain($_G['fid'], 'group');
             DB::insert('common_domain', array('domain' => $domain, 'domainroot' => addslashes($_G['setting']['domain']['root']['group']), 'id' => $_G['fid'], 'idtype' => 'group'));
         }
     }
     $forumarr['domain'] = $domain;
     updatecreditbyaction('modifydomain');
 }
 if ($_G['gp_name'] && !empty($specialswitch['allowchangename']) || $_G['gp_fup'] && !empty($specialswitch['allowchangetype'])) {
     if ($_G['uid'] != $_G['forum']['founderuid'] && $_G['adminid'] != 1) {
         showmessage('group_edit_only_founder');
     }
     if (isset($_G['gp_name'])) {
         $_G['gp_name'] = censor(addslashes(dhtmlspecialchars(cutstr(stripslashes(trim($_G['gp_name'])), 20, ''))));
         if (empty($_G['gp_name'])) {
             showmessage('group_name_empty');
         }
     } elseif (isset($_G['gp_fup']) && empty($_G['gp_fup'])) {
         showmessage('group_category_empty');
     }
     if (!empty($_G['gp_name']) && $_G['gp_name'] != addslashes($_G['forum']['name'])) {
         if (DB::result(DB::query("SELECT fid FROM " . DB::table('forum_forum') . " WHERE name='{$_G['gp_name']}'"), 0)) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_group.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP updatecredits函数代码示例发布时间:2022-05-23
下一篇:
PHP updatecache_conf函数代码示例发布时间: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