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

PHP getuserprofile函数代码示例

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

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



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

示例1: connectUserBindParams

 public function connectUserBindParams()
 {
     global $_G;
     $this->connectMergeMember();
     getuserprofile('birthyear');
     getuserprofile('birthmonth');
     getuserprofile('birthday');
     switch ($_G['member']['gender']) {
         case 1:
             $sex = 'male';
             break;
         case 2:
             $sex = 'female';
             break;
         default:
             $sex = 'unknown';
     }
     $is_public_email = 2;
     $is_use_qq_avatar = $_G['member']['conisqzoneavatar'] == 1 ? 1 : 2;
     $birthday = sprintf('%04d', $_G['member']['birthyear']) . '-' . sprintf('%02d', $_G['member']['birthmonth']) . '-' . sprintf('%02d', $_G['member']['birthday']);
     $agent = md5(time() . rand() . uniqid());
     $inputArray = array('uid' => $_G['uid'], 'agent' => $agent, 'time' => TIMESTAMP);
     require_once DISCUZ_ROOT . './config/config_ucenter.php';
     $input = 'uid=' . $_G['uid'] . '&agent=' . $agent . '&time=' . TIMESTAMP;
     $avatar_input = authcode($input, 'ENCODE', UC_KEY);
     $params = array('oauth_consumer_key' => $_G['setting']['connectappid'], 'u_id' => $_G['uid'], 'username' => $_G['member']['username'], 'email' => $_G['member']['email'], 'birthday' => $birthday, 'sex' => $sex, 'is_public_email' => $is_public_email, 'is_use_qq_avatar' => $is_use_qq_avatar, 's_id' => null, 'avatar_input' => $avatar_input, 'avatar_agent' => $agent, 'site_ucenter_id' => UC_APPID, 'source' => 'qzone');
     return $params;
 }
开发者ID:wait121000,项目名称:discuz3.0forsae,代码行数:28,代码来源:Connect.php


示例2: setloginstatus

function setloginstatus($member, $cookietime)
{
    global $_G;
    $_G['uid'] = $member['uid'];
    $_G['username'] = addslashes($member['username']);
    $_G['adminid'] = $member['adminid'];
    $_G['groupid'] = $member['groupid'];
    $_G['formhash'] = formhash();
    $_G['session']['invisible'] = getuserprofile('invisible');
    $_G['member'] = $member;
    loadcache('usergroup_' . $_G['groupid']);
    $discuz =& discuz_core::instance();
    $discuz->session->isnew = true;
    dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
    dsetcookie('loginuser');
    dsetcookie('activationauth');
    dsetcookie('pmnum');
    include_once libfile('function/stat');
    updatestat('login', 1);
    if (defined('IN_MOBILE')) {
        updatestat('mobilelogin', 1);
    }
    if ($_G['setting']['connect']['allow'] && $_G['member']['conisbind']) {
        updatestat('connectlogin', 1);
    }
    updatecreditbyaction('daylogin', $_G['uid']);
    checkusergroup($_G['uid']);
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:28,代码来源:function_member.php


示例3: common

 function common()
 {
     global $_G;
     $seccodecheck = $secqaacheck = false;
     if ($_GET['type'] == 'register') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 1;
         $secqaacheck = $_G['setting']['secqaa']['status'] & 1;
     } elseif ($_GET['type'] == 'login') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 2;
     } elseif ($_GET['type'] == 'post') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
         $secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
     }
     $sechash = random(8);
     if ($seccodecheck || $secqaacheck) {
         $variable = array('sechash' => $sechash);
         if ($seccodecheck) {
             $variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccode&sechash=' . $sechash . '&version=' . (empty($_GET['secversion']) ? '1' : $_GET['secversion']);
         }
         if ($secqaacheck) {
             require_once libfile('function/seccode');
             $variable['secqaa'] = make_secqaa($sechash);
         }
     }
     mobile_core::result(mobile_core::variable($variable));
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:26,代码来源:secure.php


示例4: generateSiteSignUrl

 public function generateSiteSignUrl($params = array())
 {
     global $_G;
     $utilService = Cloud::loadClass('Service_Util');
     @(include_once DISCUZ_ROOT . './source/discuz_version.php');
     if (!isset($_G['member']['conopenid'])) {
         $member_connect = $_G['uid'] ? C::t('#qqconnect#common_member_connect')->fetch($_G['uid']) : array();
         $_G['member'] = array_merge($_G['member'], $member_connect);
     }
     $ts = TIMESTAMP;
     $sKey = $_G['setting']['my_sitekey'];
     $params['clientIp'] = $_G['clientip'];
     $params['uid'] = $_G['uid'];
     $params['openId'] = getuserprofile('conopenid');
     $params['sId'] = $_G['setting']['siteuniqueid'];
     $params['appId'] = $_G['setting']['connectappid'];
     $params['ver'] = CLOUDCAPTCHA_VER;
     $params['dzVersion'] = DISCUZ_VERSION;
     $params['sId'] = $_G['setting']['my_siteid'];
     ksort($params);
     $str = $utilService->httpBuildQuery($params, '', '&');
     $sig = md5(sprintf('%s|%s|%s', $str, $sKey, $ts));
     $params['ts'] = $ts;
     $params['sig'] = $sig;
     $params = $utilService->httpBuildQuery($params, '', '&');
     return $params;
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:27,代码来源:class_captcha.php


示例5: before_editpost

 public function before_editpost($parameters)
 {
     $isfirstpost = $this->post['first'] ? 1 : 0;
     $isorigauthor = $this->member['uid'] && $this->member['uid'] == $this->post['authorid'];
     if ($isfirstpost) {
         if ($this->thread['special'] == 3) {
             $this->param['price'] = $isorigauthor ? $this->thread['price'] > 0 && $this->thread['price'] != $_GET['rewardprice'] ? $_GET['rewardprice'] : 0 : $this->thread['price'];
         }
         if ($this->thread['special'] == 3 && $isorigauthor) {
             $rewardprice = intval($_GET['rewardprice']);
             if ($this->thread['price'] > 0 && $this->thread['price'] != $_GET['rewardprice']) {
                 if ($rewardprice <= 0) {
                     showmessage('reward_credits_invalid');
                 }
                 $addprice = ceil($rewardprice - $this->thread['price'] + ($rewardprice - $this->thread['price']) * $this->setting['creditstax']);
                 if ($rewardprice < $this->thread['price']) {
                     showmessage('reward_credits_fall');
                 } elseif ($rewardprice < $this->group['minrewardprice'] || $this->group['maxrewardprice'] > 0 && $rewardprice > $this->group['maxrewardprice']) {
                     showmessage('reward_credits_between', '', array('minrewardprice' => $this->group['minrewardprice'], 'maxrewardprice' => $this->group['maxrewardprice']));
                 } elseif ($addprice > getuserprofile('extcredits' . $this->setting['creditstransextra'][2])) {
                     showmessage('reward_credits_shortage');
                 }
                 $realprice = ceil($this->thread['price'] + $this->thread['price'] * $this->setting['creditstax']);
                 updatemembercount($this->thread['authorid'], array($this->setting['creditstransextra'][2] => -$addprice));
                 C::t('common_credit_log')->update_by_uid_operation_relatedid($this->thread['authorid'], 'RTC', $this->thread['tid'], array('extcredits' . $this->setting['creditstransextra'][2] => $realprice));
             }
             if (!$this->forum['ismoderator']) {
                 if ($this->thread['replies'] > 1) {
                     $this->param['subject'] = addslashes($this->thread['subject']);
                 }
             }
             $this->param['price'] = $rewardprice;
         }
     }
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:35,代码来源:extend_thread_reward.php


示例6: updatemembercount

 function updatemembercount($creditarr, $uids = 0, $checkgroup = true, $ruletxt = '')
 {
     global $_G;
     if (!$uids) {
         $uids = intval($_G['uid']);
     }
     $uids = is_array($uids) ? $uids : array($uids);
     if ($uids && ($creditarr || $this->extrasql)) {
         if ($this->extrasql) {
             $creditarr = array_merge($creditarr, $this->extrasql);
         }
         $sql = array();
         $allowkey = array('extcredits1', 'extcredits2', 'extcredits3', 'extcredits4', 'extcredits5', 'extcredits6', 'extcredits7', 'extcredits8', 'friends', 'posts', 'threads', 'oltime', 'digestposts', 'doings', 'blogs', 'albums', 'sharings', 'attachsize', 'views', 'todayattachs', 'todayattachsize');
         $creditnotice = $_G['setting']['creditnotice'] && $_G['uid'] && $uids == array($_G['uid']);
         if ($creditnotice) {
             if (!isset($_G['cookiecredits'])) {
                 $_G['cookiecredits'] = !empty($_COOKIE['creditnotice']) ? explode('D', $_COOKIE['creditnotice']) : array_fill(0, 9, 0);
                 for ($i = 1; $i <= 8; $i++) {
                     $_G['cookiecreditsbase'][$i] = getuserprofile('extcredits' . $i);
                 }
             }
             if ($ruletxt) {
                 $_G['cookiecreditsrule'][$ruletxt] = $ruletxt;
             }
         }
         //$critarr 各项积分参数extcredit设置的值
         $settingValue = WebUtils::getDzPluginAppbymeAppConfig('dzsyscache_forum_extcredit_base');
         foreach ($creditarr as $key => $value) {
             $mutilute = 1;
             foreach ($settingValue as $k => $v) {
                 if ($key == 'extcredits' . $k) {
                     $mutilute = $v * 0.01;
                 }
             }
             if (!empty($key) && $value && in_array($key, $allowkey)) {
                 $sql[$key] = $value * $mutilute;
                 if ($creditnotice && substr($key, 0, 10) == 'extcredits') {
                     $i = substr($key, 10);
                     $_G['cookiecredits'][$i] += $value * $mutilute;
                 }
             }
         }
         if ($creditnotice) {
             dsetcookie('creditnotice', implode('D', $_G['cookiecredits']) . 'D' . $_G['uid']);
             dsetcookie('creditbase', '0D' . implode('D', $_G['cookiecreditsbase']));
             if (!empty($_G['cookiecreditsrule'])) {
                 dsetcookie('creditrule', strip_tags(implode("\t", $_G['cookiecreditsrule'])));
             }
         }
         //var_dump($sql);die;
         if ($sql) {
             C::t('common_member_count')->increase($uids, $sql);
         }
         if ($checkgroup && count($uids) == 1) {
             $this->checkusergroup($uids[0]);
         }
         $this->extrasql = array();
     }
 }
开发者ID:caidongyun,项目名称:CS,代码行数:59,代码来源:class_credit.php


示例7: csc

 function csc($task = array())
 {
     global $_G;
     if (getuserprofile('friends') >= 5) {
         return true;
     }
     return array('csc' => 0, 'remaintime' => 0);
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:8,代码来源:task_friend.php


示例8: output

 function output()
 {
     global $_G;
     $data = $GLOBALS['space'];
     $data['groupiconid'] = mobile_core::usergroupIconId($data['groupid']);
     if ($data['group']['type'] == 'member' && $data['group']['groupcreditslower'] != 999999999) {
         $data['upgradecredit'] = $data['group']['creditslower'] - $data['credits'];
         $data['upgradeprogress'] = 100 - ceil($data['upgradecredit'] / ($data['group']['creditslower'] - $data['group']['creditshigher']) * 100);
         $data['upgradeprogress'] = max($data['upgradeprogress'], 2);
     }
     unset($data['password'], $data['email'], $data['regip'], $data['lastip'], $data['regip_loc'], $data['lastip_loc']);
     $variable = array('space' => $data, 'extcredits' => $_G['setting']['extcredits'], 'wsq' => array('wsq_apicredit' => getuserprofile('extcredits' . $_G['wechat']['setting']['wsq_apicredit'])));
     mobile_core::result(mobile_core::variable($variable));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:14,代码来源:profile.php


示例9: setloginstatus

function setloginstatus($member, $cookietime)
{
    global $_G;
    $_G['uid'] = $member['uid'];
    $_G['username'] = $member['username'];
    $_G['adminid'] = $member['adminid'];
    $_G['groupid'] = $member['groupid'];
    $_G['formhash'] = formhash();
    $_G['session']['invisible'] = getuserprofile('invisible');
    $_G['member'] = $member;
    $_G['core']->session->isnew = 1;
    dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
    dsetcookie('loginuser');
    dsetcookie('activationauth');
    dsetcookie('pmnum');
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:16,代码来源:function_login.php


示例10: setloginstatus

function setloginstatus($member, $cookietime)
{
    global $_G;
    foreach ($_G['cookie'] as $k => $v) {
        dsetcookie($k);
    }
    $_G['uid'] = $member['uid'];
    $_G['username'] = addslashes($member['username']);
    $_G['adminid'] = $member['adminid'];
    $_G['groupid'] = $member['groupid'];
    $_G['formhash'] = formhash();
    $_G['session']['invisible'] = getuserprofile('invisible');
    $_G['member'] = $member;
    $discuz =& discuz_core::instance();
    $discuz->session->isnew = true;
    dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
    dsetcookie('loginuser');
    dsetcookie('activationauth');
    dsetcookie('pmnum');
}
开发者ID:v998,项目名称:discuzx-en,代码行数:20,代码来源:function_member.php


示例11: get_menu_foot

 function get_menu_foot($brandresult)
 {
     global $_G;
     $bid = $brandresult['bid'];
     $tid = $brandresult['tid'];
     $perpage = 5;
     $page = intval($_G[sr_page]);
     $page = max(1, intval($page));
     $start = ($page - 1) * $perpage;
     $start = max(0, $start);
     require_once libfile('function/discuzcode');
     $count = C::t('#sanree_brand#forum_post')->count_by_tid_post(0, $tid);
     if ($count > 0) {
         $postthread = C::t('#sanree_brand#forum_post')->fetch_all_by_tid(0, $tid, true, ' desc', ($page - 1) * $perpage, $perpage, 0, 0);
         foreach ($postthread as $key => $val) {
             $postthread[$key]['message'] = discuzcode($val['message'], 0, 0, 0, 1);
             $postthread[$key]['satisfaction'] = C::t('#sanree_brand#sanree_brand_voterlog')->getstar_by_tid_uid($val['authorid'], $tid) * 20;
             $postthread[$key]['dateline'] = dgmdate($val['dateline']);
             $postthread[$key]['img'] = avatar($val['authorid'], 'middle', 1);
         }
         $murl = $_G['item_detail'] == 'item' ? $is_rewrite ? getburl($brandresult) . '?t' . $extra : getburl($brandresult) . $extra : ($is_rewrite ? getdetailurl($brandresult) . '?t' . $extra : getdetailurl($brandresult) . $extra);
         $multi = multi($count, $perpage, $page, $murl);
     }
     $satisfaction = C::t('#sanree_brand#sanree_brand_voterlog')->getstar_by_tid_uid($_G['uid'], $tid) * 20;
     $seditor = array('fastpost', array('bold', 'color', 'link', 'quote', 'smilies'));
     $selfimg = avatar($_G['uid'], 'middle', 1);
     $wx_prefix = $_G['setting']['attachurl'] . 'category/';
     $appVer = $_G['setting']['version'];
     $dzv = array('X3.2', 'X3.1');
     if (in_array($appVer, $dzv)) {
         list($seccodecheck) = seccheck('publish');
         $dzvflag = true;
         $sectpl = '<div class="rfm"><table><tr><th><sec>: </th><td><span id="sec<hash>" onclick="showMenu({\'ctrlid\':\'sec<hash>\',\'pos\':\'*\'})"><sec></span><br /><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div></td></tr></table></div>';
     } else {
         $seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
         $secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
         $dzvflag = false;
     }
     include templateEx($this->_identifier . ':' . $this->_template . '/srfoot');
     $GLOBALS['srfoot'] = $srfoot;
 }
开发者ID:herosrx,项目名称:shops,代码行数:41,代码来源:class_sanree_brand_newmenu.php


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


示例13: libfile

    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']));
$metadescription = lang('space', 'sb_space', array('who' => $space['username']));
$space['medals'] = getuserprofile('medals');
if ($space['medals']) {
    loadcache('medals');
    foreach ($space['medals'] = explode("\t", $space['medals']) as $key => $medalid) {
        list($medalid, $medalexpiration) = explode("|", $medalid);
        if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
            $space['medals'][$key] = $_G['cache']['medals'][$medalid];
        } else {
            unset($space['medals'][$key]);
        }
    }
}
include_once template('home/space_index');
function formatdata($data, $position, $space)
{
    $list = array();
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:space_index.php


示例14: forumperm

$_G['group']['allowpostimage'] = $_G['forum']['allowpostimage'] != -1 && ($_G['forum']['allowpostimage'] == 1 || !$_G['forum']['postimageperm'] && $_G['group']['allowpostimage'] || $_G['forum']['postimageperm'] && forumperm($_G['forum']['postimageperm']));
$_G['group']['attachextensions'] = $_G['forum']['attachextensions'] ? $_G['forum']['attachextensions'] : $_G['group']['attachextensions'];
require_once libfile('function/upload');
$swfconfig = getuploadconfig($_G['uid'], $_G['fid']);
$imgexts = str_replace(array(';', '*.'), array(', ', ''), $swfconfig['imageexts']['ext']);
$allowuploadnum = $allowuploadtoday = TRUE;
if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
    if ($_G['group']['maxattachnum']) {
        $allowuploadnum = $_G['group']['maxattachnum'] - getuserprofile('todayattachs');
        $allowuploadnum = $allowuploadnum < 0 ? 0 : $allowuploadnum;
        if (!$allowuploadnum) {
            $allowuploadtoday = false;
        }
    }
    if ($_G['group']['maxsizeperday']) {
        $allowuploadsize = $_G['group']['maxsizeperday'] - getuserprofile('todayattachsize');
        $allowuploadsize = $allowuploadsize < 0 ? 0 : $allowuploadsize;
        if (!$allowuploadsize) {
            $allowuploadtoday = false;
        }
        $allowuploadsize = $allowuploadsize / 1048576 >= 1 ? round($allowuploadsize / 1048576, 1) . 'MB' : round($allowuploadsize / 1024) . 'KB';
    }
}
$allowpostimg = $_G['group']['allowpostimage'] && $imgexts;
$enctype = $_G['group']['allowpostattach'] || $_G['group']['allowpostimage'] ? 'enctype="multipart/form-data"' : '';
$maxattachsize_mb = $_G['group']['maxattachsize'] / 1048576 >= 1 ? round($_G['group']['maxattachsize'] / 1048576, 1) . 'MB' : round($_G['group']['maxattachsize'] / 1024) . 'KB';
$_G['group']['maxprice'] = isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]) ? $_G['group']['maxprice'] : 0;
$extra = !empty($_GET['extra']) ? rawurlencode($_GET['extra']) : '';
$notifycheck = empty($emailnotify) ? '' : 'checked="checked"';
$stickcheck = empty($sticktopic) ? '' : 'checked="checked"';
$digestcheck = empty($addtodigest) ? '' : 'checked="checked"';
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_post.php


示例15: protectguard

function protectguard($protect)
{
    global $_G, $member_verifys;
    if (!isset($member_verifys) && $_G['setting']['verify']['enabled']) {
        $member_verifys = array();
        getuserprofile('verify1');
        foreach ($_G['setting']['verify'] as $vid => $verify) {
            if ($verify['available'] && $_G['member']['verify' . $vid] == 1) {
                $member_verifys[] = $vid;
            }
        }
    }
    $verifyflag = 0;
    if ($_G['setting']['verify']['enabled'] && $protect['verify']) {
        if (array_intersect(explode("\t", $protect['verify']), $member_verifys)) {
            $verifyflag = 1;
        }
    }
    if ($protect['usergroup'] && strstr("\t" . $protect['usergroup'] . "\t", "\t{$_G['groupid']}\t") || empty($protect['usergroup']) && empty($protect['verify']) || $verifyflag || $_G['forum_thread']['authorid'] == $_G['uid']) {
        return false;
    } else {
        return true;
    }
}
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:24,代码来源:function_threadsort_bakfavicon.php


示例16: updatesession

 public function updatesession()
 {
     static $updated = false;
     if (!$updated && $this->isnew) {
         global $_G;
         C::t('common_member_status')->update($_G['uid'], array('lastip' => $_G['clientip'], 'lastactivity' => TIMESTAMP, 'lastvisit' => TIMESTAMP));
         dsetcookie('ulastactivity', TIMESTAMP . '|' . getuserprofile('invisible'), 31536000);
         $updated = true;
     }
     return $updated;
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:11,代码来源:discuz_session_close.php


示例17: viewthread_lastmod

}
if ($_G['forum_thread']['stamp'] >= 0) {
    $_G['forum_threadstamp'] = $_G['cache']['stamps'][$_G['forum_thread']['stamp']];
}
$lastmod = viewthread_lastmod($_G['forum_thread']);
$showsettings = str_pad(decbin($_G['setting']['showsettings']), 3, '0', STR_PAD_LEFT);
$showsignatures = $showsettings[0];
$showavatars = $showsettings[1];
$_G['setting']['showimages'] = $showsettings[2];
$highlightstatus = isset($_GET['highlight']) && str_replace('+', '', $_GET['highlight']) ? 1 : 0;
$_G['forum']['allowreply'] = isset($_G['forum']['allowreply']) ? $_G['forum']['allowreply'] : '';
$_G['forum']['allowpost'] = isset($_G['forum']['allowpost']) ? $_G['forum']['allowpost'] : '';
$allowpostreply = $_G['forum']['allowreply'] != -1 && ($_G['forum_thread']['isgroup'] || !$_G['forum_thread']['closed'] && !checkautoclose($_G['forum_thread']) || $_G['forum']['ismoderator']) && (!$_G['forum']['replyperm'] && $_G['group']['allowreply'] || $_G['forum']['replyperm'] && forumperm($_G['forum']['replyperm']) || $_G['forum']['allowreply']);
$fastpost = $_G['setting']['fastpost'] && !$_G['forum_thread']['archiveid'] && ($_G['forum']['status'] != 3 || $_G['isgroupuser']);
$allowfastpost = $_G['setting']['fastpost'] && $allowpostreply;
if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum']) || !$_G['adminid'] && (!cknewuser(1) || $_G['setting']['newbiespan'] && (!getuserprofile('lastpost') || TIMESTAMP - getuserprofile('lastpost') < $_G['setting']['newbiespan'] * 60) && TIMESTAMP - $_G['member']['regdate'] < $_G['setting']['newbiespan'] * 60)) {
    $allowfastpost = false;
}
$_G['group']['allowpost'] = $_G['forum']['allowpost'] != -1 && (!$_G['forum']['postperm'] && $_G['group']['allowpost'] || $_G['forum']['postperm'] && forumperm($_G['forum']['postperm']) || $_G['forum']['allowpost']);
$_G['forum']['allowpostattach'] = isset($_G['forum']['allowpostattach']) ? $_G['forum']['allowpostattach'] : '';
$allowpostattach = $allowpostreply && ($_G['forum']['allowpostattach'] != -1 && ($_G['forum']['allowpostattach'] == 1 || !$_G['forum']['postattachperm'] && $_G['group']['allowpostattach'] || $_G['forum']['postattachperm'] && forumperm($_G['forum']['postattachperm'])));
if ($_G['group']['allowpost']) {
    $_G['group']['allowpostpoll'] = $_G['group']['allowpostpoll'] && $_G['forum']['allowpostspecial'] & 1;
    $_G['group']['allowposttrade'] = $_G['group']['allowposttrade'] && $_G['forum']['allowpostspecial'] & 2;
    $_G['group']['allowpostreward'] = $_G['group']['allowpostreward'] && $_G['forum']['allowpostspecial'] & 4 && isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]);
    $_G['group']['allowpostactivity'] = $_G['group']['allowpostactivity'] && $_G['forum']['allowpostspecial'] & 8;
    $_G['group']['allowpostdebate'] = $_G['group']['allowpostdebate'] && $_G['forum']['allowpostspecial'] & 16;
} else {
    $_G['group']['allowpostpoll'] = $_G['group']['allowposttrade'] = $_G['group']['allowpostreward'] = $_G['group']['allowpostactivity'] = $_G['group']['allowpostdebate'] = FALSE;
}
$_G['forum']['threadplugin'] = $_G['group']['allowpost'] && $_G['setting']['threadplugins'] ? is_array($_G['forum']['threadplugin']) ? $_G['forum']['threadplugin'] : dunserialize($_G['forum']['threadplugin']) : array();
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_viewthread.php


示例18: elseif

     } elseif ($apitype == 'tenpay') {
         $paytype = 2;
     }
     C::t('forum_tradelog')->update($orderid, array('paytype' => $paytype));
     showmessage('trade_directtopay', $payurl);
 }
 if (submitcheck('offlinesubmit') && in_array($_GET['offlinestatus'], trade_offline($tradelog, 0))) {
     loaducenter();
     $ucresult = uc_user_login($_G['username'], $_GET['password']);
     list($tmp['uid']) = daddslashes($ucresult);
     if ($tmp['uid'] <= 0) {
         showmessage('trade_password_error', 'forum.php?mod=trade&orderid=' . $orderid);
     }
     if ($_GET['offlinestatus'] == 4) {
         if ($_G['setting']['creditstransextra'][5] != -1 && $tradelog['credit']) {
             if ($tradelog['credit'] > getuserprofile('extcredits' . $_G['setting']['creditstransextra'][5])) {
                 showmessage('trade_credit_lack');
             }
             updatemembercount($tradelog['buyerid'], array($_G['setting']['creditstransextra'][5] => -$tradelog['credit']));
         }
         $trade = C::t('forum_trade')->fetch_goods($tradelog['tid'], $tradelog['pid']);
         notification_add($tradelog['sellerid'], 'goods', 'trade_seller_send', array('buyerid' => $tradelog['buyerid'], 'buyer' => $tradelog['buyer'], 'orderid' => $orderid, 'subject' => $tradelog['subject']));
     } elseif ($_GET['offlinestatus'] == 5) {
         notification_add($tradelog['buyerid'], 'goods', 'trade_buyer_confirm', array('sellerid' => $tradelog['sellerid'], 'seller' => $tradelog['seller'], 'orderid' => $orderid, 'subject' => $tradelog['subject']));
     } elseif ($_GET['offlinestatus'] == 7) {
         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;
         }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:forum_trade.php


示例19: checkflood

function checkflood()
{
    global $_G;
    if (!$_G['group']['disablepostctrl'] && $_G['uid']) {
        $isflood = $_G['setting']['floodctrl'] && TIMESTAMP - $_G['setting']['floodctrl'] <= getuserprofile('lastpost');
        if (empty($isflood)) {
            return FALSE;
        } else {
            return TRUE;
        }
    }
    return FALSE;
}
开发者ID:v998,项目名称:discuzx-en,代码行数:13,代码来源:function_post.php


示例20: checkfollowfeed

function checkfollowfeed()
{
    global $_G;
    if ($_G['uid']) {
        $lastcheckfeed = 0;
        if (!empty($_G['cookie']['lastcheckfeed'])) {
            $time = explode('|', $_G['cookie']['lastcheckfeed']);
            if ($time[0] == $_G['uid']) {
                $lastcheckfeed = $time[1];
            }
        }
        if (!$lastcheckfeed) {
            $lastcheckfeed = getuserprofile('lastactivity');
        }
        dsetcookie('lastcheckfeed', $_G['uid'] . '|' . TIMESTAMP, 31536000);
        $followuser = C::t('home_follow')->fetch_all_following_by_uid($_G['uid']);
        $uids = array_keys($followuser);
        if (!empty($uids)) {
            $count = C::t('home_follow_feed')->count_by_uid_dateline($uids, $lastcheckfeed);
            if ($count) {
                notification_add($_G['uid'], 'follow', 'member_follow', array('count' => $count, 'from_id' => $_G['uid'], 'from_idtype' => 'follow'), 1);
            }
        }
    }
    dsetcookie('checkfollow', 1, 30);
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:26,代码来源:function_member.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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