本文整理汇总了PHP中getuserbyuid函数的典型用法代码示例。如果您正苦于以下问题:PHP getuserbyuid函数的具体用法?PHP getuserbyuid怎么用?PHP getuserbyuid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getuserbyuid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: scan
public static function scan($param)
{
list($data) = $param;
self::_init();
global $_G;
if (!$_G['wechat']['setting']['wsq_allow']) {
return;
}
$authcode = C::t('#wechat#mobile_wechat_authcode')->fetch_by_code($data['key']);
if (!$authcode || $authcode['status']) {
// echo WeChatServer::getXml4Txt(lang('plugin/wechat', 'wechat_response_text_codeerror'));
} else {
if ($authcode['uid']) {
$member = getuserbyuid($authcode['uid'], 1);
if ($member['adminid'] == 0 && !$_G['wechat']['setting']['wechat_confirmtype']) {
C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $member['uid'], 'status' => 1));
$authcode['sid'] = '';
}
} else {
$wechatuser = C::t('#wechat#common_member_wechat')->fetch_by_openid($data['from']);
if ($wechatuser) {
$member = getuserbyuid($wechatuser['uid'], 1);
if ($member['adminid'] == 0 && !$_G['wechat']['setting']['wechat_confirmtype']) {
C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $member['uid'], 'status' => 1));
$authcode['sid'] = '';
}
} elseif ($_G['wechat']['setting']['wechat_allowregister'] && $_G['wechat']['setting']['wechat_allowfastregister'] && $_G['wechat']['setting']['wechat_mtype'] == 2) {
require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.class.php';
require_once libfile('function/member');
$uid = WeChat::register(WeChat::getnewname($data['from']), 1);
if ($uid) {
WeChatHook::bindOpenId($uid, $data['from'], 1);
C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $uid, 'status' => 1));
}
wsq::report('register');
$authcode['sid'] = '';
}
}
wsq::report('scanqr');
self::_show('scan', $data['from'] . "\t" . $authcode['sid']);
}
}
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:42,代码来源:response.class.php
示例2: user_login
function user_login($uid)
{
$member = getuserbyuid($uid);
$cookietime = 1296000;
require_once libfile('function/member');
setloginstatus($member, $cookietime);
}
开发者ID:NSDN,项目名称:nyasec,代码行数:7,代码来源:login.inc.php
示例3: poll_upload
function poll_upload()
{
global $_G;
$this->uid = intval($_G['gp_uid']);
$swfhash = md5(substr(md5($_G['config']['security']['authkey']), 8) . $this->uid);
if (!$_FILES['Filedata']['error'] && $_G['gp_hash'] == $swfhash && $this->uid) {
$this->aid = 0;
$this->simple = 0;
$this->user = getuserbyuid($this->uid);
if (empty($this->user['adminid'])) {
$this->uploadmsg(9);
}
$_G['uid'] = $this->uid;
$this->pollid = !empty($_G['gp_pollid']) ? intval($_G['gp_pollid']) : 0;
if ($this->pollid <= 0 || !intval(DB::result_first("SELECT contenttype FROM " . DB::table('poll_item') . " WHERE itemid='{$this->pollid}'"))) {
$this->uploadmsg(9);
}
$attach = upload_images($_FILES['Filedata'], 'poll', 176, 176);
$caption = dhtmlspecialchars(trim($attach['name']));
$caption = substr($caption, 0, -(strlen(fileext($caption)) + 1));
$data = array('itemid' => $this->pollid, 'caption' => $caption, 'displayorder' => 0, 'imageurl' => $attach['attachment'], 'aid' => $attach['aid']);
DB::insert('poll_choice', $data);
$this->aid = $this->pollid;
$this->uploadmsg(0);
}
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:26,代码来源:class_pollupload.php
示例4: getinvite
function getinvite()
{
global $_G;
$result = array();
$cookies = empty($_G['cookie']['invite_auth']) ? array() : explode(',', $_G['cookie']['invite_auth']);
$cookiecount = count($cookies);
if ($cookiecount == 2) {
$id = intval($cookies[0]);
$code = $cookies[1];
$query = DB::query("SELECT * FROM " . DB::table('common_invite') . " WHERE id='{$id}'");
if ($invite = DB::fetch($query)) {
if ($invite['code'] == $code && empty($invite['fuid']) && (empty($invite['endtime']) || $_G['timestamp'] < $invite['endtime'])) {
$result['uid'] = $invite['uid'];
$result['id'] = $invite['id'];
$result['appid'] = $invite['appid'];
}
}
} elseif ($cookiecount == 3) {
$uid = intval($cookies[0]);
$code = $cookies[1];
$appid = intval($cookies[2]);
$invite_code = space_key($uid, $appid);
if ($code == $invite_code) {
$result['uid'] = $uid;
$result['appid'] = $appid;
}
}
if ($result['uid']) {
$member = getuserbyuid($result['uid']);
$result['username'] = $member['username'];
} else {
dsetcookie('invite_auth', '', -86400 * 365);
}
return $result;
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:35,代码来源:member.php
示例5: _login
private function _login($res, $username, $password, $mobile, $code, $isValidation)
{
global $_G;
$username = rawurldecode($username);
$password = rawurldecode($password);
if ($username == MOBCENT_HACKER_USER && $password == MOBCENT_HACKER_PASSWORD) {
$token = isset($_GET['accessToken']) ? $_GET['accessToken'] : '';
$secret = isset($_GET['accessSecret']) ? $_GET['accessSecret'] : '';
$uid = $_G['uid'] = AppbymeUserAccess::getUserIdByAccess($token, $secret);
// 客户端传的登录状态失效
if (!$uid) {
return $this->makeErrorInfo($res, 'mobcent_login_status');
}
$result['member'] = getuserbyuid($uid);
$_G['username'] = $result['member']['username'];
// 把登录信息写入cookie中,并且更新登录的状态
UserUtils::updateCookie($result['member'], $uid);
// 需要整理token和secret再返回给客户端
$userInfo = array('token' => $token, 'secret' => $secret);
} else {
$username = WebUtils::t($username);
$logInfo = UserUtils::login($username, $password);
if ($logInfo['errcode']) {
UserUtils::delUserAccessByUsername($username);
return $this->makeErrorInfo($res, $logInfo['message']);
}
if ($isValidation == 1) {
// 是否开启了登录手机验证
$isLoginValidation = WebUtils::getDzPluginAppbymeAppConfig('mobcent_login_validation');
if ($isLoginValidation) {
$userMobileBind = AppbymeSendsms::getBindInfoByUid($_G['uid']);
if (!$userMobileBind) {
// 当前登录的用户没有绑定手机号码
if ($mobile == '' && $code == '') {
$res['isValidation'] = 1;
return $this->makeErrorInfo($res, '', array('noError' => 0, 'alert' => 0));
}
$checkInfo = UserUtils::checkMobileCode($res, $mobile, $code);
if ($checkInfo['rs'] == 0) {
return $this->makeErrorInfo($res, $checkInfo['errcode']);
}
$updataArr = array('uid' => $_G['uid']);
AppbymeSendsms::updateMobile($mobile, $updataArr);
}
}
}
$userInfo = AppbymeUserAccess::loginProcess($_G['uid'], $password);
}
$userAvatar = UserUtils::getUserAvatar($_G['uid']);
$res['isValidation'] = 0;
$res['token'] = (string) $userInfo['token'];
$res['secret'] = (string) $userInfo['secret'];
$res['uid'] = (int) $_G['uid'];
$res['avatar'] = (string) $userAvatar;
$res['userName'] = (string) $_G['username'];
return $res;
}
开发者ID:caidongyun,项目名称:CS,代码行数:57,代码来源:LoginAction.php
示例6: synlogin
public static function synlogin($get, $post)
{
global $_G;
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
$cookietime = 31536000;
$user_id = intval($get['user_id']);
if ($member = getuserbyuid($user_id)) {
self::dsetcookie('auth', self::authcode("{$member['password']}\t{$member['user_id']}", 'ENCODE'), $cookietime);
}
}
开发者ID:huming17,项目名称:dzmvc,代码行数:10,代码来源:class_ext.php
示例7: update_groupid_by_uid
public function update_groupid_by_uid($uid)
{
$user = getuserbyuid($uid);
if ($user['groupid'] == 1) {
return;
}
if (DB::result_first("select COUNT(*) from %t where uid=%d", array($this->_table, $uid))) {
$groupid = 2;
} else {
$groupid = 9;
}
return C::t('user')->update($uid, array('groupid' => $groupid));
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:13,代码来源:table_organization_admin.php
示例8: onUsersGetFormHash
public function onUsersGetFormHash($uId, $userAgent)
{
global $_G;
$uId = intval($uId);
if (!$uId) {
return false;
}
$member = getuserbyuid($uId, 1);
$_G['username'] = $member['username'];
$_G['uid'] = $member['uid'];
$_G['authkey'] = md5($_G['config']['security']['authkey'] . $userAgent);
return formhash();
}
开发者ID:softhui,项目名称:discuz,代码行数:13,代码来源:Users.php
示例9: fetch_perm_by_uid
public function fetch_perm_by_uid($uid, $cid)
{
$user = getuserbyuid($uid);
if ($user['adminid'] == 1) {
return 3;
}
if (DB::result_first("select COUNT(*) from %t where cid=%d and uid=%d", array($this->_table, $cid, $uid))) {
return DB::result_first("select `perm` from %t where cid=%d and uid=%d", array($this->_table, $cid, $uid));
} else {
return 0;
}
return DB::result_first("select perm from %t where cid=%d and uid=%d", array($this->_table, $cid, $uid));
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:13,代码来源:table_corpus_user.php
示例10: _inviteActiv
private function _inviteActiv($res, $accessToken, $accessSecret, $device, $activityId)
{
// 获取邀请注册活动的配置
$config = ActivityUtils::getInviteConfig($activityId);
if (empty($config) || !$config['is_run']) {
return $this->makeErrorInfo($res, 'mobcent_activity_invalid');
}
$res['body']['sponsor'] = (string) $config['sponsor'];
$res['body']['startTime'] = (string) $config['start_time'] . '000';
$res['body']['stopTime'] = (string) $config['stop_time'] . '000';
$res['body']['firstReward'] = (int) $config['first_reward'];
$res['body']['inviteReward'] = (int) $config['invite_reward'];
$res['body']['isShowCheck'] = 0;
$res['body']['exchangeNum'] = '';
$res['body']['activityRule'] = (string) $config['activity_rule'];
$res['body']['shareAppUrl'] = (string) $config['share_appurl'];
if ($accessToken !== '' && $accessSecret !== '') {
$uid = AppbymeUserAccess::getUserIdByAccess($accessToken, $accessSecret);
if ($uid) {
// 当前登录用户参加活动信息|appbyme_activity_invite_user
$exchangeInfo = AppbymeActivityInviteUser::getExchangeInfo($uid);
if ($exchangeInfo) {
$checkInvite = ActivityUtils::checkInvite($config, $uid, $device);
if ($checkInvite['rs']) {
$res['body']['isShowCheck'] = 1;
}
$res['body']['exchangeNum'] = $exchangeInfo['exchange_num'];
} else {
$checkInvite = ActivityUtils::checkInvite($config, $uid, $device);
$userInfo = getuserbyuid($uid);
$username = $userInfo['username'];
$rewardSum = $config['first_reward'];
$availableReward = $config['first_reward'];
$exchangeNum = $this->getUniqueNum($uid);
$joining = 0;
if (empty($checkInvite['rs'])) {
$joining = 1;
}
$insertUser = array('uid' => $uid, 'activity_id' => $activityId, 'username' => $username, 'reward_sum' => $rewardSum, 'available_reward' => $availableReward, 'exchange_num' => $exchangeNum, 'device' => $device, 'joining' => $joining);
if (AppbymeActivityInviteUser::insertUser($insertUser)) {
if ($checkInvite['rs']) {
$res['body']['isShowCheck'] = 1;
}
$res['body']['exchangeNum'] = (string) $exchangeNum;
}
}
}
}
return $res;
}
开发者ID:caidongyun,项目名称:CS,代码行数:50,代码来源:InviteActivityAction.php
示例11: sendpm
public static function sendpm($toid, $subject, $message, $fromid = '', $replypmid = 0, $isusername = 0, $type = 0)
{
global $_G;
if ($fromid === '') {
$fromid = $_G['uid'];
}
$author = '';
if ($fromid) {
if ($fromid == $_G['uid']) {
$sendpmmaxnum = $_G['group']['allowsendpmmaxnum'];
$author = $_G['username'];
} else {
$user = getuserbyuid($fromid);
$author = $user['username'];
loadcache('usergroup_' . $user['groupid']);
$sendpmmaxnum = $_G['cache']['usergroup_' . $user['groupid']]['allowsendpmmaxnum'];
}
$currentnum = C::t('common_member_action_log')->count_day_hours(getuseraction('pmid'), $fromid);
if ($sendpmmaxnum && $currentnum >= $sendpmmaxnum) {
return -16;
}
}
loaducenter();
$return = uc_pm_send($fromid, $toid, addslashes($subject), addslashes($message), 1, $replypmid, $isusername, $type);
if ($return > 0 && $fromid) {
if ($_G['setting']['cloud_status']) {
$msgService = Cloud::loadClass('Cloud_Service_Client_Message');
if (is_numeric($toid)) {
$tospace = getuserbyuid($toid);
if ($tospace['conisbind']) {
$msgService->add($toid, $fromid, $author, $_G['timestamp']);
}
} else {
$senduids = array();
foreach (C::t('common_member')->fetch_all_by_username(explode(',', $toid)) as $touser) {
if ($touser['conisbind']) {
$senduids[$touser['uid']] = $touser['uid'];
}
}
if ($senduids) {
$msgService->add($senduids, $fromid, $author, $_G['timestamp']);
}
}
}
foreach (explode(',', $fromid) as $v) {
useractionlog($fromid, 'pmid');
}
}
return $return;
}
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:50,代码来源:helper_pm.php
示例12: connect_login
function connect_login($connect_member)
{
global $_G;
if (!($member = getuserbyuid($connect_member['uid'], 1))) {
return false;
} else {
if (isset($member['_inarchive'])) {
C::t('common_member_archive')->move_to_master($member['uid']);
}
}
require_once libfile('function/member');
$cookietime = 1296000;
setloginstatus($member, $cookietime);
dsetcookie('connect_login', 1, $cookietime);
dsetcookie('connect_is_bind', '1', 31536000);
dsetcookie('connect_uin', $connect_member['conopenid'], 31536000);
return true;
}
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:18,代码来源:check.php
示例13: setAdministror
public function setAdministror($uid, $adminid)
{
$user = getuserbyuid($uid);
if ($user['adminid'] == $adminid) {
return true;
}
if (self::checkfounder($user)) {
//创始人不允许修改
return true;
}
$arr = array();
if ($adminid > 0) {
parent::update($uid, array('adminid' => 1, 'groupid' => 1));
} else {
$groupid = 9;
if (C::t('organization_admin')->fetch_orgids_by_uid($uid)) {
$groupid = 2;
}
parent::update($uid, array('adminid' => 0, 'groupid' => $groupid));
}
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:21,代码来源:table_user.php
示例14: notification_add
public static function notification_add($touid, $type, $note, $notevars = array(), $category = 0, $langfolder)
{
global $_G;
if (!($tospace = getuserbyuid($touid))) {
return false;
}
$notestring = lang('notification', $note, $notevars, '', $langfolder);
$notestring_wx = lang('notification', $note . '_wx', $notevars, '', $langfolder);
$redirect = lang('notification', $note . '_redirecturl', $notevars, '', $langfolder);
$title = lang('notification', $note . '_title', $notevars, '', $langfolder);
$oldnote = array();
//if($notevars['from_id'] && $notevars['from_idtype']) {
$oldnote = C::t('notification')->fetch_by_fromid_uid_type($notevars['from_id'], $notevars['from_idtype'], $touid, $type);
//}
if (empty($oldnote['from_num'])) {
$oldnote['from_num'] = 0;
}
$notevars['from_num'] = $notevars['from_num'] ? $notevars['from_num'] : 1;
$setarr = array('uid' => $touid, 'type' => $type, 'new' => 1, 'wx_new' => 1, 'wx_note' => $notestring_wx, 'redirecturl' => $redirect, 'title' => $title, 'authorid' => $_G['uid'], 'author' => $_G['username'], 'note' => $notestring, 'dateline' => $_G['timestamp'], 'from_id' => $notevars['from_id'], 'from_idtype' => $notevars['from_idtype'], 'from_num' => $oldnote['from_num'] + $notevars['from_num'], 'category' => $category);
if ($category == 1) {
$setarr['authorid'] = 0;
$setarr['author'] = '';
}
if ($oldnote['id']) {
$setarr['id'] = $oldnote['id'];
C::t('notification')->update($oldnote['id'], $setarr);
} else {
$oldnote['new'] = 0;
$setarr['id'] = C::t('notification')->insert($setarr, true);
}
//self::wx_notification($setarr);
//$banType = array('task');
if (empty($oldnote['new'])) {
C::t('user')->increase($touid, array('newprompt' => 1));
/*require_once libfile('function/mail');
$mail_subject = lang('notification', 'mail_to_user');
sendmail_touser($touid, $mail_subject, $notestring, $type);*/
}
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:39,代码来源:dzz_notification.php
示例15: _login
private function _login($res, $username, $password)
{
global $_G;
$username = rawurldecode($username);
$password = rawurldecode($password);
if ($username == MOBCENT_HACKER_USER && $password == MOBCENT_HACKER_PASSWORD) {
$token = isset($_GET['accessToken']) ? $_GET['accessToken'] : '';
$secret = isset($_GET['accessSecret']) ? $_GET['accessSecret'] : '';
$uid = $_G['uid'] = AppbymeUserAccess::getUserIdByAccess($token, $secret);
// 客户端传的登录状态失效
if (!$uid) {
return $this->makeErrorInfo($res, 'mobcent_login_status');
}
$result['member'] = getuserbyuid($uid);
$_G['username'] = $result['member']['username'];
// 把登录信息写入cookie中,并且更新登录的状态
UserUtils::updateCookie($result['member'], $uid);
// 需要整理token和secret再返回给客户端
$userInfo = array('token' => $token, 'secret' => $secret);
} else {
$username = WebUtils::t($username);
$logInfo = UserUtils::login($username, $password);
if ($logInfo['errcode']) {
UserUtils::delUserAccessByUsername($username);
return $this->makeErrorInfo($res, $logInfo['message']);
}
$userInfo = AppbymeUserAccess::loginProcess($_G['uid'], $password);
}
$userAvatar = UserUtils::getUserAvatar($_G['uid']);
$res['token'] = (string) $userInfo['token'];
$res['secret'] = (string) $userInfo['secret'];
$res['uid'] = (int) $_G['uid'];
$res['avatar'] = (string) $userAvatar;
$res['userName'] = (string) $_G['username'];
return $res;
}
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:36,代码来源:LoginAction.php
示例16: exit
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if (!isset($_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]])) {
showmessage('credits_transaction_disabled');
}
$extcredit = 'extcredits' . $_G['setting']['creditstransextra'][1];
$payment = C::t('common_credit_log')->count_stc_by_relatedid($_G['tid'], $_G['setting']['creditstransextra'][1]);
$thread['payers'] = $payment['payers'];
$thread['netprice'] = !$_G['setting']['maxincperthread'] || $_G['setting']['maxincperthread'] && $payment['income'] < $_G['setting']['maxincperthread'] ? floor($thread['price'] * (1 - $_G['setting']['creditstax'])) : 0;
$thread['creditstax'] = sprintf('%1.2f', $_G['setting']['creditstax'] * 100) . '%';
$thread['endtime'] = $_G['setting']['maxchargespan'] ? dgmdate($_G['forum_thread']['dateline'] + $_G['setting']['maxchargespan'] * 3600, 'u') : 0;
$thread['price'] = $_G['forum_thread']['price'];
$firstpost = C::t('forum_post')->fetch_threadpost_by_tid_invisible($_G['tid']);
if ($firstpost) {
$member = getuserbyuid($firstpost['authorid']);
$firstpost['groupid'] = $member['groupid'];
}
$pid = $firstpost['pid'];
$freemessage = array();
$freemessage[$pid]['message'] = '';
if (preg_match_all("/\\[free\\](.+?)\\[\\/free\\]/is", $firstpost['message'], $matches)) {
foreach ($matches[1] as $match) {
$freemessage[$pid]['message'] .= discuzcode($match, $firstpost['smileyoff'], $firstpost['bbcodeoff'], sprintf('%00b', $firstpost['htmlon']), $_G['forum']['allowsmilies'], $_G['forum']['allowbbcode'] ? -$firstpost['groupid'] : 0, $_G['forum']['allowimgcode'], $_G['forum']['allowhtml'], $_G['forum']['jammer'] && $post['authorid'] != $_G['uid'] ? 1 : 0, 0, $post['authorid'], $_G['forum']['allowmediacode'], $pid) . '<br />';
}
}
$attachtags = array();
if ($_G['group']['allowgetattach'] || $_G['group']['allowgetimage']) {
if (preg_match_all("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $freemessage[$pid]['message'], $matchaids)) {
$attachtags[$pid] = $matchaids[1];
}
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:thread_pay.php
示例17: showmessage
showmessage('信息不存在或已删除', dreferer());
}
include libfile('function/news');
//根据信息发布权限判断用户是否有查看权限
$perm = getPermByUid($_G['uid']);
if (!getViewPerm($news)) {
showmessage('您没有查看此信息的权限,请联系管理员', dreferer());
}
//获取分类名称
if ($news['catid']) {
$news['catname'] = DB::result_first("select name from %t where catid=%d", array('news_cat', $news['catid']));
}
if ($news['opuid'] && ($opuser = getuserbyuid($news['opuid']))) {
$news['opauthor'] = $opuser['username'];
}
if ($news['moduid'] && ($moduser = getuserbyuid($news['moduid']))) {
$news['modusername'] = $moduser['username'];
}
$navtitle = $news['subject'];
$navlast = getstr($news['subject'], 15);
$refer = empty($_GET['refer']) ? dreferer() : $_GET['refer'];
//获取信息的发布范围
$sel = array();
$sel_org = array();
$sel_user = array();
if ($news['orgids']) {
$orgids = explode(',', $news['orgids']);
$sel_org = C::t('organization')->fetch_all($orgids);
foreach ($sel_org as $value) {
$sel[] = $value['orgid'];
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:31,代码来源:view.php
示例18: intval
$pid = intval($_GET['pid']);
$thread = C::t('forum_thread')->fetch($tid);
$post = C::t('forum_post')->fetch($thread['posttableid'], $pid);
include template('forum/ajax_followpost');
} elseif ($_GET['action'] == 'quickclear') {
$uid = intval($_GET['uid']);
if ($_G['adminid'] != 1) {
showmessage('quickclear_noperm');
}
include_once libfile('function/misc');
include_once libfile('function/member');
if (!submitcheck('qclearsubmit')) {
$crimenum_avatar = crime('getcount', $uid, 'crime_avatar');
$crimenum_sightml = crime('getcount', $uid, 'crime_sightml');
$crimenum_customstatus = crime('getcount', $uid, 'crime_customstatus');
$crimeauthor = getuserbyuid($uid);
$crimeauthor = $crimeauthor['username'];
include template('forum/ajax');
} else {
if (empty($_GET['operations'])) {
showmessage('quickclear_need_operation');
}
$reason = checkreasonpm();
$allowop = array('avatar', 'sightml', 'customstatus');
$cleartype = array();
if (in_array('avatar', $_GET['operations'])) {
C::t('common_member')->update($uid, array('avatarstatus' => 0));
loaducenter();
uc_user_deleteavatar($uid);
$cleartype[] = lang('forum/misc', 'avatar');
crime('recordaction', $uid, 'crime_avatar', lang('forum/misc', 'crime_reason', array('reason' => $reason)));
开发者ID:vanloswang,项目名称:DiscuzX,代码行数:31,代码来源:forum_ajax.php
示例19: sendmail_touser
function sendmail_touser($touid, $subject, $message, $mailtype = '')
{
global $_G;
if (empty($_G['setting']['sendmailday'])) {
return false;
}
require_once libfile('function/home');
$tospace = getuserbyuid($touid);
if (empty($tospace['email'])) {
return false;
}
space_merge($tospace, 'field_home');
space_merge($tospace, 'status');
$acceptemail = $tospace['acceptemail'];
if (!empty($acceptemail[$mailtype]) && $_G['timestamp'] - $tospace['lastvisit'] > $_G['setting']['sendmailday'] * 86400) {
if (empty($tospace['lastsendmail'])) {
$tospace['lastsendmail'] = $_G['timestamp'];
}
$sendtime = $tospace['lastsendmail'] + $acceptemail['frequency'];
$value = C::t('common_mailcron')->fetch_all_by_touid($touid, 0, 1);
$value = $value[0];
if ($value) {
$cid = $value['cid'];
if ($value['sendtime'] < $sendtime) {
$sendtime = $value['sendtime'];
}
C::t('common_mailcron')->update($cid, array('email' => $tospace['email'], 'sendtime' => $sendtime));
} else {
$cid = C::t('common_mailcron')->insert(array('touid' => $touid, 'email' => $tospace['email'], 'sendtime' => $sendtime), true);
}
$message = preg_replace("/href\\=\"(?!(http|https)\\:\\/\\/)(.+?)\"/i", 'href="' . $_G['siteurl'] . '\\1"', $message);
$setarr = array('cid' => $cid, 'subject' => $subject, 'message' => $message, 'dateline' => $_G['timestamp']);
C::t('common_mailqueue')->insert($setarr);
return true;
}
return false;
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:37,代码来源:function_mail.php
示例20: array
$acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class', 'swfupload', 'poke', 'friend', 'eccredit', 'favorite', 'follow', 'avatar', 'profile', 'theme', 'feed', 'privacy', 'pm', 'share', 'invite', 'sendmail', 'credit', 'usergroup', 'domain', 'click', 'magic', 'top', 'videophoto', 'index', 'plugin', 'search', 'promotion');
$_GET['ac'] = $ac = empty($_GET['ac']) || !in_array($_GET['ac'], $acs) ? 'profile' : $_GET['ac'];
$op = empty($_GET['op']) ? '' : $_GET['op'];
if (!in_array($ac, array('doing', 'upload', 'blog', 'album'))) {
$_G['mnid'] = 'mn_common';
}
if ($ac != 'comment' || !$_G['group']['allowcomment']) {
if (empty($_G['uid'])) {
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
dsetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
} else {
dsetcookie('_refer', rawurlencode('home.php?mod=spacecp&ac=' . $ac));
}
showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1));
}
$space = getuserbyuid($_G['uid']);
if (empty($space)) {
showmessage('space_does_not_exist');
}
space_merge($space, 'field_home');
if (($space['status'] == -1 || in_array($space['groupid'], array(4, 5, 6))) && $ac != 'usergroup') {
showmessage('space_has_been_locked');
}
}
$actives = array($ac => ' class="a"');
list($seccodecheck, $secqaacheck) = seccheck('publish');
$navtitle = lang('core', 'title_setup');
if (lang('core', 'title_memcp_' . $ac)) {
$navtitle = lang('core', 'title_memcp_' . $ac);
}
$_G['disabledwidthauto'] = 0;
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:home_spacecp.php
注:本文中的getuserbyuid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论