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

PHP uc_check_avatar函数代码示例

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

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



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

示例1: task_csc

function task_csc($task = array())
{
    global $discuz_uid;
    include_once DISCUZ_ROOT . './uc_client/client.php';
    if (uc_check_avatar($discuz_uid)) {
        return true;
    }
    return array('csc' => 0, 'remaintime' => 0);
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:9,代码来源:newbie_uploadavatar.inc.php


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


示例3: getspace

 case 'space':
     $feed_hash_data = "uid{$id}";
     $tospace = getspace($id);
     if (empty($tospace)) {
         showmessage('space_does_not_exist');
     }
     if (isblacklist($tospace['uid'])) {
         showmessage('is_blacklist');
     }
     $arr['itemid'] = $id;
     $arr['fromuid'] = $id;
     $arr['title_template'] = lang('spacecp', 'share_space');
     $arr['body_template'] = '<b>{username}</b><br>{reside}<br>{spacenote}';
     $arr['body_data'] = array('username' => "<a href=\"home.php?mod=space&uid={$id}\">" . $tospace['username'] . "</a>", 'reside' => $tospace['resideprovince'] . $tospace['residecity'], 'spacenote' => $tospace['spacenote']);
     loaducenter();
     $isavatar = uc_check_avatar($id);
     $arr['image'] = $isavatar ? avatar($id, 'middle', true) : UC_API . '/images/noavatar_middle.gif';
     $arr['image_link'] = "home.php?mod=space&uid={$id}";
     $note_uid = $id;
     $note_message = 'share_space';
     break;
 case 'blog':
     $feed_hash_data = "blogid{$id}";
     $query = DB::query("SELECT b.*,bf.pic,bf.message,bf.hotuser FROM " . DB::table('home_blog') . " b\r\n\t\t\t\tLEFT JOIN " . DB::table('home_blogfield') . " bf ON bf.blogid=b.blogid\r\n\t\t\t\tWHERE b.blogid='{$id}'");
     if (!($blog = DB::fetch($query))) {
         showmessage('blog_does_not_exist');
     }
     if (in_array($blog['status'], array(1, 2))) {
         showmessage('moderate_blog_not_share');
     }
     if ($blog['friend']) {
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php


示例4: getAvatar

 public function getAvatar($userId, $size = 'middle')
 {
     $this->initDiscuzApi();
     if (uc_check_avatar($userId)) {
         return UC_API . "/avatar.php?uid=" . $userId . "&type=virtual&size=" . $size;
     } else {
         return null;
     }
 }
开发者ID:fujianguo,项目名称:EduSoho,代码行数:9,代码来源:DiscuzAuthProvider.php


示例5: submenu_customize_icon

 function submenu_customize_icon()
 {
     echo '<div class="wrap">';
     echo '<h2>' . __('Customize Icon', 'ucenter') . '</h2>';
     global $current_user;
     wp_get_current_user();
     list($uid, $_, $_) = uc_get_user($current_user->user_login);
     $icons = array('big' => __('Big Icon', 'ucenter'), 'middle' => __('Middle Icon', 'ucenter'), 'small' => __('Small Icon', 'ucenter'));
     echo '<div id="icon_list">';
     foreach ($icons as $size => $name) {
         if (uc_check_avatar($uid, $size) > 0) {
             echo "{$name}<br /><img src='" . UC_API . "/avatar.php?uid={$uid}&size={$size}&random=" . rand() . "' /><br />";
         }
     }
     echo '</div><div id="icon_show">';
     $html = uc_avatar($uid);
     echo $html;
     echo '</div></div>';
 }
开发者ID:hotmob,项目名称:likedome,代码行数:19,代码来源:ucenter.php


示例6: __construct

 function __construct($kptime = -1, $cache = FALSE)
 {
     global $dsql;
     if ($kptime == -1) {
         $this->M_KeepTime = 3600 * 24 * 7;
     } else {
         $this->M_KeepTime = $kptime;
     }
     $formcache = FALSE;
     $this->M_ID = $this->GetNum(GetCookie("DedeUserID"));
     $this->M_LoginTime = GetCookie("DedeLoginTime");
     $this->fields = array();
     $this->isAdmin = FALSE;
     if (empty($this->M_ID)) {
         $this->ResetUser();
     } else {
         $this->M_ID = intval($this->M_ID);
         if ($cache) {
             $this->fields = GetCache($this->memberCache, $this->M_ID);
             if (empty($this->fields)) {
                 $this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
             } else {
                 $formcache = TRUE;
             }
         } else {
             $this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
         }
         if (is_array($this->fields)) {
             #api{{
             if (defined('UC_API') && @(include_once DEDEROOT . '/uc_client/client.php')) {
                 if ($data = uc_get_user($this->fields['userid'])) {
                     if (uc_check_avatar($data[0]) && !strstr($this->fields['face'], UC_API)) {
                         $this->fields['face'] = UC_API . '/avatar.php?uid=' . $data[0] . '&size=middle';
                         $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `face`='" . $this->fields['face'] . "' WHERE `mid`='{$this->M_ID}'");
                     }
                 }
             }
             #/aip}}
             //间隔一小时更新一次用户登录时间
             if (time() - $this->M_LoginTime > 3600) {
                 $dsql->ExecuteNoneQuery("update `#@__member` set logintime='" . time() . "',loginip='" . GetIP() . "' where mid='" . $this->fields['mid'] . "';");
                 PutCookie("DedeLoginTime", time(), $this->M_KeepTime);
             }
             $this->M_LoginID = $this->fields['userid'];
             $this->M_MbType = $this->fields['mtype'];
             $this->M_Money = $this->fields['money'];
             $this->M_UserName = FormatUsername($this->fields['uname']);
             $this->M_Scores = $this->fields['scores'];
             $this->M_Face = $this->fields['face'];
             $this->M_Rank = $this->fields['rank'];
             $this->M_Spacesta = $this->fields['spacesta'];
             $sql = "Select titles From #@__scores where integral<={$this->fields['scores']} order by integral desc";
             $scrow = $dsql->GetOne($sql);
             $this->fields['honor'] = $scrow['titles'];
             $this->M_Honor = $this->fields['honor'];
             if ($this->fields['matt'] == 10) {
                 $this->isAdmin = TRUE;
             }
             $this->M_UpTime = $this->fields['uptime'];
             $this->M_ExpTime = $this->fields['exptime'];
             $this->M_JoinTime = MyDate('Y-m-d', $this->fields['jointime']);
             if ($this->M_Rank > 10 && $this->M_UpTime > 0) {
                 $this->M_HasDay = $this->Judgemember();
             }
             if (!$formcache) {
                 SetCache($this->memberCache, $this->M_ID, $this->fields, 1800);
             }
         } else {
             $this->ResetUser();
         }
     }
 }
开发者ID:hensonvip,项目名称:ymroad,代码行数:72,代码来源:memberlogin.class.php


示例7: UpdateAvatar

 function UpdateAvatar()
 {
     if (MEMBER_ID > 0) {
         $m = jsg_member_info(MEMBER_ID);
         if ($m && !$m['__face__'] && $m['ucuid'] > 0 && true === UCENTER && true === UCENTER_FACE) {
             include_once ROOT_PATH . 'api/uc_client/client.php';
             $r = uc_check_avatar($m['ucuid']);
             if ($r) {
                 DB::query("update " . TABLE_PREFIX . "members set `face`='./images/noavatar.gif' where `uid`='{$m['uid']}'");
             }
         }
     }
     exit;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:14,代码来源:user.mod.php


示例8: _member

 function _member($uid = 0)
 {
     $member = array();
     if ($uid < 1) {
         $member = jsg_member_info_by_mod();
     }
     $uid = (int) ($uid ? $uid : MEMBER_ID);
     if ($uid > 0 && !$member) {
         $member = $this->TopicLogic->GetMember($uid);
     }
     if (!$member) {
         return false;
     }
     $uid = $member['uid'];
     if (!$member['follow_html'] && $uid != MEMBER_ID && MEMBER_ID > 0) {
         $member['follow_html'] = buddy_follow_html($member, 'uid', 'follow_html', 1);
     }
     if (true === UCENTER_FACE && MEMBER_ID == $uid && MEMBER_UCUID > 0 && !$member['__face__']) {
         include_once ROOT_PATH . './api/uc_client/client.php';
         $uc_check_result = uc_check_avatar(MEMBER_UCUID);
         if ($uc_check_result) {
             $this->DatabaseHandler->Query("update " . TABLE_PREFIX . "members set `face`='./images/noavatar.gif' where `uid`='{$uid}'");
         }
     }
     if ($GLOBALS['_J']['plugins']['func']['printuser']) {
         jlogic('plugin')->hookscript('printuser', 'funcs', $member, 'printuser');
     }
     return $member;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:29,代码来源:topic.mod.php


示例9: elseif

    } elseif ($ucresult == -5) {
        showmessage('email_not_registered');
    } elseif ($ucresult == -6) {
        showmessage('email_has_been_registered');
    } elseif ($ucresult == -7) {
        showmessage('no_change');
    } elseif ($ucresult == -8) {
        showmessage('protection_of_users');
    }
    sclearcookie();
    showmessage('getpasswd_succeed', geturl('action/login'));
}
$op = trim($_GET['op']);
if ($op == 'avatar') {
    $uc_avatarflash = uc_avatar($_SGLOBAL['supe_uid']);
    include_once S_ROOT . './uc_client/client.php';
    if (uc_check_avatar($_SGLOBAL['supe_uid'])) {
        if (!$_SGLOBAL['member']['avatar']) {
            getreward('setavatar');
            updatetable('members', array('avatar' => 1), array('uid' => $_SGLOBAL['supe_uid']));
        }
    }
} elseif ($op == 'email') {
    if (empty($_SGLOBAL['email'])) {
        $userinfo = uc_get_user($_SGLOBAL['supe_username']);
        $email = $userinfo[2];
    } else {
        $email = $_SGLOBAL['email'];
    }
}
include template('cp_profile');
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:cp_profile.php


示例10: Main

 function Main()
 {
     $member = jsg_member_info(MEMBER_ID);
     $_act_list = array('imjiqiren' => 1, 'qqrobot' => 1, 'sms' => 1, 'sina' => 1, 'qqwb' => 1);
     if (isset($_act_list[$this->Code])) {
         $this->Messager(null, "index.php?mod=tools&code={$this->Code}");
     }
     if ('email' == $this->Code) {
         $this->Messager(null, 'index.php?mod=settings&code=base#modify_email_area');
     }
     $act_list = array('base' => '我的资料', 'face' => '我的头像', 'secret' => '修改密码', 'user_tag' => array('name' => '我的标签', 'link_mod' => 'user_tag'), 'vip_intro' => array('name' => '申请V认证', 'link_mod' => 'other', 'link_code' => 'vip_intro'));
     if ($member['validate'] && $member['validate_extra']) {
         $act_list['validate_extra'] = '专题设置';
     }
     if ($this->Config['sendmailday'] && $this->Config['sendmailday'] > 0) {
         $act_list['sendmail'] = '邮件提醒';
     }
     if ($this->Config['vest_enable']) {
         $act_list['vest'] = '我的马甲';
     }
     $this->Code = $act = $this->Code ? $this->Code : 'base';
     $member_nickname = $member['nickname'];
     if ('face' == $act) {
         if (true === UCENTER_FACE && true === UCENTER) {
             include_once ROOT_PATH . './api/uc_client/client.php';
             $uc_avatarflash = uc_avatar(MEMBER_UCUID, 'avatar', 'returnhtml');
             $query = $this->DatabaseHandler->Query("select * from " . TABLE_PREFIX . "members where `uid`='{$member['uid']}'");
             $_member_info = $query->GetRow();
             if ($member['uid'] > 0 && MEMBER_UCUID > 0 && !$_member_info['face']) {
                 $uc_check_result = uc_check_avatar(MEMBER_UCUID);
                 if ($uc_check_result) {
                     $this->DatabaseHandler->Query("update " . TABLE_PREFIX . "members set `face`='./images/noavatar.gif' where `uid`='{$member['uid']}'");
                 }
             }
         } elseif (true === UCENTER_FACE && true === PWUCENTER) {
             $pwuc_avatarflash = true;
             $pwurl_setuserface = UC_API . '/profile.php?action=modify&info_type=face';
         } else {
             $temp_face = '';
             if ($this->Get['temp_face'] && is_image($this->Get['temp_face'])) {
                 $temp_face = $this->Get['temp_face'];
                 $member['face_original'] = $temp_face;
             }
         }
     } elseif ('base' == $act) {
         $op = jget('op');
         $groupProfile = jconf::get('groupprofile');
         $sql = "select * from `" . TABLE_PREFIX . "memberfields` where `uid`='{$member['uid']}'";
         $query = $this->DatabaseHandler->Query($sql);
         $memberfields = $query->GetRow();
         if (!$memberfields) {
             $memberfields = array();
             $memberfields['uid'] = $member['uid'];
             $sql = "insert into `" . TABLE_PREFIX . "memberfields` (`uid`) values ('{$member['uid']}')";
             $this->DatabaseHandler->Query($sql);
         }
         $privacy = array();
         if ($memberfields['profile_set']) {
             $privacy = unserialize($memberfields['profile_set']);
         }
         #附加信息
         $member_profile = DB::fetch_first("select * from `" . TABLE_PREFIX . "members_profile` where `uid` = '{$member['uid']}'");
         if ($member_profile) {
             if ($member_profile['birthcity']) {
                 $birthcity = explode('-', $member_profile['birthcity']);
                 $b_province = $birthcity[0];
                 $b_city = $birthcity[1];
                 $b_area = $birthcity[2];
                 $b_street = $birthcity[3];
             }
             $member = array_merge($member_profile, $member);
         }
         $query = $this->DatabaseHandler->Query("select * from " . TABLE_PREFIX . "common_district where `upid` = '0' order by list");
         while ($rsdb = $query->GetRow()) {
             $province[$rsdb['id']]['value'] = $rsdb['id'];
             $province[$rsdb['id']]['name'] = $rsdb['name'];
             if ($member['province'] == $rsdb['name']) {
                 $province_id = $rsdb['id'];
             }
         }
         $b_province_list = jform()->Select("b_province", $province, $b_province, "onchange=\"changeProvince('b');\"");
         if (@is_file(ROOT_PATH . 'include/logic/cp.logic.php') && $this->Config['company_enable']) {
             if ($member['companyid']) {
                 $canmod = false;
             } else {
                 $canmod = true;
             }
             $companyselect = $this->CpLogic->get_cp_html($member['companyid'], 'company', 0, $canmod);
             if ($this->Config['department_enable']) {
                 if ($member['departmentid']) {
                     $danmod = false;
                 } else {
                     $danmod = true;
                 }
                 $departmentselect = $this->CpLogic->get_cp_html($member['departmentid'], 'department', $member['companyid'], $danmod);
             }
             if ($member['jobid']) {
                 $janmod = false;
             } else {
                 $janmod = true;
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:settings.mod.php


示例11: _updateAvatarStatus

 private function _updateAvatarStatus()
 {
     global $_G;
     loaducenter();
     $uc_avatarflash = uc_avatar($_G['uid'], 'virtual', 0);
     if (empty($space['avatarstatus']) && uc_check_avatar($_G['uid'], 'middle')) {
         C::t('common_member')->update($_G['uid'], array('avatarstatus' => '1'));
         updatecreditbyaction('setavatar');
         manyoulog('user', $_G['uid'], 'update');
     }
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:11,代码来源:SaveAvatarAction.php


示例12: Main

 function Main()
 {
     if ($this->MemberHandler->HasPermission($this->Module, $this->Code) == false) {
         $this->Messager($this->MemberHandler->GetError(), null);
     }
     $act = $this->Code;
     $act_list = array('nick' => '修改昵称', 'face' => '修改头像', 'aboutme' => '个人说明', 'signature' => '个人签名', 'sex' => '选择性别', 'user_tag' => '选择标签');
     $uid = MEMBER_ID;
     $member = $this->_member($uid);
     $member = wap_iconv($member);
     if ($member['validate']) {
         $member['validate_html'] = "<img class='vipImg' title='' src='" . $this->Config['site_url'] . "/images/vip.gif' />";
     }
     if ('face' == $act) {
         if (true === UCENTER_FACE) {
             include_once ROOT_PATH . './api/uc_client/client.php';
             $uc_avatarflash = uc_avatar(MEMBER_UCUID, 'avatar', 'returnhtml');
             $query = $this->DatabaseHandler->Query("select * from " . TABLE_PREFIX . "members where `uid`='{$member['uid']}'");
             $_member_info = $query->GetRow();
             if ($member['uid'] > 0 && MEMBER_UCUID > 0 && !$_member_info['face']) {
                 $uc_check_result = uc_check_avatar(MEMBER_UCUID);
                 if ($uc_check_result) {
                     $this->DatabaseHandler->Query("update " . TABLE_PREFIX . "members set `face`='./images/noavatar.gif' where `uid`='{$member['uid']}'");
                 }
             }
         } else {
             $temp_face = '';
             if ($this->Get['temp_face'] && is_image($this->Get['temp_face'])) {
                 $temp_face = $this->Get['temp_face'];
                 $member['face_original'] = $temp_face;
             }
         }
     } elseif ('usertag' == $act) {
         $where_list = '';
         $type = $this->Get['type'];
         $user_tag_list = array();
         if ($type == 'all') {
             $sql = "Select * From `" . TABLE_PREFIX . "user_tag` Order By id desc limit 0,20;";
             $query = $this->DatabaseHandler->Query($sql);
             while (false != ($row = $query->GetRow())) {
                 $row['name'] = wap_iconv($row['name']);
                 $user_tag_list[] = $row;
             }
         } elseif ($type == 'myadd') {
             $where_list = " where `uid` = '" . MEMBER_ID . "' ";
         }
         if ($where_list) {
             $sql = "Select * From `" . TABLE_PREFIX . "user_tag_fields` {$where_list} Order By id desc limit 0,20;";
             $query = $this->DatabaseHandler->Query($sql);
             while (false != ($row = $query->GetRow())) {
                 $row['name'] = wap_iconv($row['tag_name']);
                 $row['id'] = wap_iconv($row['tag_id']);
                 $user_tag_list[] = $row;
             }
         }
     } elseif ('base' == $act) {
         $sql = "Select * From `" . TABLE_PREFIX . "user_tag_fields` where `uid` = '{$uid}' Order By id desc limit 0,10;";
         $query = $this->DatabaseHandler->Query($sql);
         $my_user_tag = array();
         while (false != ($row = $query->GetRow())) {
             $row['tag_name'] = wap_iconv($row['tag_name']);
             $my_user_tag[] = $row;
         }
     }
     $setting_hb = 'hb';
     $this->Title = $act_list[$act];
     include template('setting_main');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:68,代码来源:settings.mod.php


示例13: login

 function login($_username, $_password)
 {
     if (H::valid_email($_username)) {
         // 使用 E-mail 登录
         list($uc_uid, $username, $password, $email) = uc_user_login($_username, $_password, 2);
     }
     if ($this->ucenter_charset != 'utf-8') {
         $username = convert_encoding($username, $this->ucenter_charset, 'UTF-8');
     }
     if (!$uc_uid) {
         if ($this->ucenter_charset != 'utf-8') {
             list($uc_uid, $username, $password, $email) = uc_user_login(convert_encoding($_username, 'utf-8', $this->ucenter_charset), $_password);
             if ($username) {
                 $username = convert_encoding($username, $this->ucenter_charset, 'UTF-8');
             }
         } else {
             list($uc_uid, $username, $password, $email) = uc_user_login($_username, $_password);
         }
     }
     if ($username) {
         $username = htmlspecialchars($username);
     }
     if ($uc_uid > 0) {
         if ($user_info = $this->get_uc_user_info($uc_uid)) {
             // Update password
             $this->model('account')->update_user_password_ingore_oldpassword($_password, $user_info['uid'], $user_info['salt']);
             // Update username
             if ($user_info['user_name'] != $username) {
                 if (!$this->model('account')->check_username($username)) {
                     $this->model('account')->update_user_name($username, $user_info['uid']);
                     $this->update('users_ucenter', array('username' => htmlspecialchars($username)), 'uc_uid = ' . intval($uc_uid));
                 }
             }
         } else {
             if ($site_user_info = $this->model('account')->get_user_info_by_email($email)) {
                 $this->insert('users_ucenter', array('uid' => $site_user_info['uid'], 'uc_uid' => $uc_uid, 'username' => $username, 'email' => $email));
                 return false;
             }
             if ($new_user_id = $this->model('account')->user_register($username, $_password, $email, TRUE)) {
                 if ($exists_uc_id = $this->is_uc_user($email)) {
                     $this->update('users_ucenter', array('username' => $username, 'uid' => $new_user_id), 'uc_uid = ' . intval($exists_uc_id));
                 } else {
                     $this->insert('users_ucenter', array('uid' => $new_user_id, 'uc_uid' => $uc_uid, 'username' => $username, 'email' => $email));
                 }
                 $user_info = $this->model('account')->get_user_info_by_uid($new_user_id, true, false);
             }
         }
     }
     if (uc_check_avatar($uc_uid, 'big')) {
         if (!$user_info['avatar_file']) {
             $this->model('account')->associate_remote_avatar($user_info['uid'], UC_API . '/avatar.php?uid=' . $uc_uid . '&size=big');
         }
     } else {
         if ($user_info['avatar_file'] and get_setting('ucenter_path')) {
             $avatar = get_setting('upload_dir') . '/avatar/' . $this->model('account')->get_avatar($user_info['uid'], '');
             $uc_avatar_dir = get_setting('ucenter_path') . '/data/avatar/' . $this->model('account')->get_avatar($uc_uid, '', 1);
             if (!file_exists($uc_avatar_dir)) {
                 make_dir($uc_avatar_dir);
             }
             foreach (AWS_APP::config()->get('image')->uc_avatar_thumbnail as $key => $val) {
                 AWS_APP::image()->initialize(array('quality' => 90, 'source_image' => $avatar, 'new_image' => $uc_avatar_dir . $this->model('account')->get_avatar($uc_uid, $key, 2), 'width' => $val['w'], 'height' => $val['h']))->resize();
             }
         }
     }
     return $user_info;
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:66,代码来源:ucenter.php


示例14: ckavatar

function ckavatar($uid) {
	global $_SC, $_SCONFIG;

	$type = empty($_SCONFIG['avatarreal'])?'virtual':'real';
	if(empty($_SCONFIG['uc_dir'])) {
		include_once(S_ROOT.'./uc_client/client.php');
		$file_exists = uc_check_avatar($uid, 'middle', $type);
		return $file_exists;
	} else {
		$file = $_SCONFIG['uc_dir'].'./data/avatar/'.avatar_file($uid, 'middle');
		return file_exists($file)?1:0;
	}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:13,代码来源:function_cp.php


示例15: doc_user_image

 function doc_user_image(&$editors, $doc)
 {
     if (uc_check_avatar($editors[$doc["author"]][uid])) {
         $editors[$doc["author"]]["image"] = UC_API . "/avatar.php?uid=" . $editors[$doc["author"]][uid] . "&size=small";
     }
     if (uc_check_avatar($editors[$doc["lasteditor"]][uid])) {
         $editors[$doc["lasteditor"]]["image"] = UC_API . "/avatar.php?uid=" . $editors[$doc["lasteditor"]][uid] . "&size=small";
     }
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:9,代码来源:ucenter.class.php


示例16: login

 function login($_username, $_password)
 {
     if (H::valid_email($_username)) {
         // 使用 E-mail 登录
         list($uc_uid, $username, $password, $email) = uc_user_login($_username, $_password, 2);
     }
     if ($this->ucenter_charset != 'utf-8') {
         $username = convert_encoding($username, $this->ucenter_charset, 'UTF-8');
     }
     if (!$uc_uid) {
         if ($this->ucenter_charset != 'utf-8') {
             list($uc_uid, $username, $password, $email) = uc_user_login(convert_encoding($_username, 'utf-8', $this->ucenter_charset), $_password);
             if ($username) {
                 $username = convert_encoding($username, $this->ucenter_charset, 'UTF-8');
             }
         } else {
             list($uc_uid, $username, $password, $email) = uc_user_login($_username, $_password);
         }
     }
     if ($username) {
         $username = htmlspecialchars($username);
     }
     if ($uc_uid > 0) {
         if (!($user_info = $this->get_uc_user_info($uc_uid))) {
             if ($site_user_info = $this->model('account')->get_user_info_by_email($email)) {
                 $this->insert('users_ucenter', array('uid' => $site_user_info['uid'], 'uc_uid' => $uc_uid, 'username' => $username, 'email' => $email));
                 return false;
             }
             if ($new_user_id = $this->model('account')->user_register($username, $_password, $email, TRUE)) {
                 if ($exists_uc_id = $this->is_uc_user($email)) {
                     $this->update('users_ucenter', array('username' => $username, 'uid' => $new_user_id), 'uc_uid = ' . intval($exists_uc_id));
                 } else {
                     $this->insert('users_ucenter', array('uid' => $new_user_id, 'uc_uid' => $uc_uid, 'username' => $username, 'email' => $email));
                     if (uc_check_avatar($uc_uid, 'big')) {
                         $avatar = @file_get_contents(UC_API . '/avatar.php?uid=' . $uc_uid . '&size=big');
                         if ($avatar) {
                             AWS_APP::upload()->initialize(array('allowed_types' => 'jpg,jpeg,png,gif', 'upload_path' => get_setting('upload_dir') . '/avatar/' . $this->model('account')->get_avatar($new_user_id, '', 1), 'is_image' => TRUE, 'max_size' => get_setting('upload_avatar_size_limit'), 'file_name' => $this->model('account')->get_avatar($new_user_id, '', 2), 'encrypt_name' => FALSE))->do_upload('aws_upload_file', $avatar);
                             if (!AWS_APP::upload()->get_error()) {
                                 $upload_data = AWS_APP::upload()->data();
                                 if ($upload_data) {
                                     if ($upload_data['is_image'] == 1) {
                                         foreach (AWS_APP::config()->get('image')->avatar_thumbnail as $key => $val) {
                                             $thumb_file[$key] = $upload_data['file_path'] . $this->model('account')->get_avatar($new_user_id, $key, 2);
                                             AWS_APP::image()->initialize(array('quality' => 90, 'source_image' => $upload_data['full_path'], 'new_image' => $thumb_file[$key], 'width' => $val['w'], 'height' => $val['h']))->resize();
                                         }
                                     }
                                     $update_data['avatar_file'] = $this->model('account')->get_avatar($new_user_id, null, 1) . basename($thumb_file['min']);
                                     // 更新主表
                                     $this->model('account')->update_users_fields($update_data, $new_user_id);
                                     if (!$this->model('integral')->fetch_log($new_user_id, 'UPLOAD_AVATAR')) {
                                         $this->model('integral')->process($new_user_id, 'UPLOAD_AVATAR', round(get_setting('integral_system_config_profile') * 0.2), '上传头像');
                                     }
                                 }
                             }
                         }
                     }
                 }
                 $user_info = $this->model('account')->get_user_info_by_uid($new_user_id, true, false);
             }
         } else {
             // Update password
             $this->model('account')->update_user_password_ingore_oldpassword($_password, $user_info['uid'], $user_info['salt']);
             // Update username
             if ($user_info['user_name'] != $username) {
                 if (!$this->model('account')->check_username($username)) {
                     $this->model('account')->update_user_name($username, $user_info['uid']);
                     $this->update('users_ucenter', array('username' => htmlspecialchars($username)), 'uc_uid = ' . intval($uc_uid));
                 }
             }
         }
     }
     return $user_info;
 }
开发者ID:Vizards,项目名称:HeavenSpree,代码行数:73,代码来源:ucenter.php


示例17: cpmsg

        if ($_GET['count']) {
            $max = $_GET['count'];
        } else {
            $max = DB::fetch_first("SELECT uid FROM " . DB::table('common_member') . " ORDER BY uid DESC");
            $max = $max['uid'];
        }
        if ($start >= $max) {
            cpmsg($toolslang['uc_avatar_done'], "action=plugins&pmod=maintain&cp=aboutucenter&operation={$operation}&do={$do}&mod={$mod}", 'succeed');
        }
        $query = DB::query("SELECT uid FROM " . DB::table('common_member') . " WHERE avatarstatus = '0' AND uid > '{$start}' LIMIT {$limit}");
        while ($userinfo = DB::fetch($query)) {
            $userinfos[] = $userinfo['uid'];
        }
        foreach ($userinfos as $value) {
            loaducenter();
            $hasavatar = uc_check_avatar($value);
            DB::query("UPDATE " . DB::table('common_member') . " SET avatarstatus = '{$hasavatar}' WHERE uid='{$value}'");
        }
        $nextstart = $start + $limit;
        cpmsg($toolslang['uc_avatar_jump'], "action=plugins&pmod=maintain&cp=aboutucenter&operation={$operation}&do={$do}&mod={$mod}&start={$nextstart}&max={$max}&avator_submit=yes", 'loading', array('start' => $start, 'limit' => $limit));
    }
} elseif (in_array($mod, array('synusername', 'clrnotice', 'synuid', 'clrfeed', 'avator'))) {
    showformheader("plugins&pmod=maintain&cp=aboutucenter&operation={$operation}&do={$do}&mod=" . $mod);
    showtableheaders();
    showsubmit($mod . '_submit', 'submit');
    showtablefooter();
    showformfooter();
} elseif ($mod == 'pm') {
    loaducenter();
    $uc_version = uc_check_version();
    if ($uc_version[file] >= '1.6') {
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:aboutucenter.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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