本文整理汇总了PHP中uc_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_avatar函数的具体用法?PHP uc_avatar怎么用?PHP uc_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uc_avatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _uploadAvatarByUcenter
private function _uploadAvatarByUcenter($uid, $fileName, $fileData)
{
$image = '';
loaducenter();
$uc_avatarflash = uc_avatar($uid, 'virtual', 0);
if (!empty($uc_avatarflash[7])) {
$parse = parse_url($uc_avatarflash[7]);
if (!empty($parse['query'])) {
$url = sprintf('%s/index.php?m=user&a=uploadavatar&%s', UC_API, $parse['query']);
$res = WebUtils::httpRequestByDiscuzApi($url, array('Filedata' => $fileData), '', array('Filedata' => $fileName));
strpos($res, 'http') !== false && ($image = $res);
}
}
return $image;
}
示例2: uc_avatar
<form action="?action=profile" method="post">
<table class="formtable">
<tr><th>个人签名</th><td><input type="text" name="qm"></td></tr>
<tr><th>手机串号</th><td><input type="text" name="imei"></td></tr>
<tr><th></th><td><input type="submit" value="提交"></td></tr>
</table>
</form>
<?php
break;
case '3':
echo '
<img src="' . UC_API . '/avatar.php?uid=' . $Cta_uid . '&size=big">
<img src="' . UC_API . '/avatar.php?uid=' . $Cta_uid . '&size=middle">
<img src="' . UC_API . '/avatar.php?uid=' . $Cta_uid . '&size=small">
<br><br>' . uc_avatar($Cta_uid);
break;
}
?>
</div>
<div class="side">
<div class="sideinner">
<ul class="tabs">
<li class="current"><a href="?typeid=2">个人资料</a></li>
<li class="current"><a href="?typeid=3">修改头像</a></li>
</ul>
</div>
</div>
</div>
示例3: user_avatar
/**
* 修改头像
* @param type $uid 用户 ID
* @param type $type 头像类型
* real:真实头像
* virtual:(默认值) 虚拟头像
* @param type $returnhtml 是否返回 HTML 代码
* 1:(默认值) 是,返回设置头像的 HTML 代码
* 0:否,返回设置头像的 Flash 调用数组
* @return string:返回设置头像的 HTML 代码
* array:返回设置头像的 Flash 调用数组
*/
public function user_avatar($uid, $type = 'virtual', $returnhtml = 1)
{
if ($this->UCenter) {
return uc_avatar($uid, $type, $returnhtml);
} else {
$auth_data = urlencode(authcode($uid, ''));
$upurl = base64_encode(CONFIG_SITEURL . 'index.php?g=Member&m=Index&a=uploadavatar&auth_data=' . $auth_data);
$html = '<script type="text/javascript">
var flashvars = {
"upurl": "' . $upurl . '&callback=return_avatar&"
};
var params = {
"align": "middle",
"play": "true",
"loop": "false",
"scale": "showall",
"wmode": "window",
"devicefont": "true",
"id": "Main",
"bgcolor": "#ffffff",
"name": "Main",
"allowscriptaccess": "always"
};
var attributes = {
};
swfobject.embedSWF("' . CONFIG_SITEURL . 'statics/images/main.swf", "myContent", "490", "434", "9.0.0", "' . CONFIG_SITEURL . 'statics/images/expressInstall.swf", flashvars, params, attributes);
function return_avatar(data) {
if (data == 1) {
window.location.reload();
} else {
alert("failure");
}
}
</script>';
return $html;
}
}
示例4: exit
[UCenter Home] (C) 2007-2008 Comsenz Inc.
$Id: cp_avatar.php 10586 2008-12-10 06:53:47Z liguode $
*/
if (!defined('IN_UCHOME')) {
exit('Access Denied');
}
if (submitcheck('avatarsubmit')) {
if ($_POST['guidemode']) {
showmessage('do_success', 'space.php?do=home&view=guide&step=2', 0);
} else {
showmessage('do_success', 'cp.php?ac=avatar', 0);
}
}
//头像
include_once S_ROOT . './uc_client/client.php';
$uc_avatarflash = uc_avatar($_SGLOBAL['supe_uid'], empty($_SCONFIG['avatarreal']) ? 'virtual' : 'real');
//判断用户是否设置了头像
$setarr = array();
$avatar_exists = ckavatar($space['uid']);
if ($avatar_exists) {
if (!$space['avatar']) {
$setarr['avatar'] = 1;
$setarr['updatetime'] = $_SGLOBAL['timestamp'];
}
} else {
if ($space['avatar']) {
$setarr['avatar'] = 0;
}
}
if ($setarr) {
updatetable('space', $setarr, array('uid' => $space['uid']));
示例5: exit
<?php
/*
[SupeSite] (C) 2007-2009 Comsenz Inc.
$Id: admin_avatar.php 10898 2008-12-31 02:58:50Z zhaofei $
*/
if (!defined('IN_SUPESITE_ADMINCP')) {
exit('Access Denied');
}
//ͷ��
include_once S_ROOT . './uc_client/client.php';
$uc_avatarflash = uc_avatar($_SGLOBAL['supe_uid']);
include template('admin/tpl/avatar.htm', 1);
示例6: addFace
function addFace()
{
if (MEMBER_ID < 1) {
$this->Messager(NULL, jurl('index.php?mod=member'));
}
$menuHTML = $this->getRegiterMenu(5);
if ($this->Config['reg_step6_radio']) {
$redirect_to = jurl('index.php?mod=member&code=member_profile');
} elseif ($this->Config['reg_step7_radio']) {
$redirect_to = jurl('index.php?mod=member&code=do_first_topic');
} else {
$redirect_to = jurl('index.php?mod=topic');
}
if (!$this->Config['reg_step5_radio']) {
$this->Messager(NULL, $redirect_to, 0);
}
$member = jsg_member_info(MEMBER_ID);
$temp_face = '';
if ($this->Get['temp_face'] && is_image($this->Get['temp_face'])) {
$temp_face = $this->Get['temp_face'];
$member['face_original'] = $temp_face;
}
if (true === UCENTER_FACE && true === UCENTER) {
include_once ROOT_PATH . './api/uc_client/client.php';
$uc_avatarflash = uc_avatar(MEMBER_UCUID, 'avatar', 'returnhtml');
}
$this->Title = '上传头像';
include template('register/register_member_face');
}
示例7: Face
function Face()
{
exit();
$sql = 'select ucuid from ' . TABLE_PREFIX . 'system_members where uid = ' . MEMBER_ID;
$query = $this->DatabaseHandler->Query($sql);
$usr = $query->GetRow();
if ( UCENTER )
{
include_once (UC_CLIENT_ROOT . './client.php');
$face = uc_avatar($usr['ucuid']);
}
else
{
;
}
include ($this->TemplateHandler->Template("tttuangou_face"));
}
示例8: empty
$typeid = empty($typeid) || !in_array($typeid, array(1, 2, 3, 4, 5, 6)) ? 2 : $typeid;
require_once DISCUZ_ROOT . './forumdata/cache/cache_profilefields.php';
$member = $db->fetch_first("SELECT * FROM {$tablepre}members m\r\n\t\tLEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid\r\n\t\tWHERE m.uid='{$discuz_uid}'");
$seccodecheck = $seccodestatus & 8 && (!$seccodedata['minposts'] || $posts < $seccodedata['minposts']);
$secqaacheck = false;
$member['msn'] = explode("\t", $member['msn']);
if (!submitcheck('editsubmit', 0, $seccodecheck)) {
if ($typeid == 1) {
if ($seccodecheck) {
$seccode = random(6, 1) + $seccode[0] * 1000000;
}
} elseif ($typeid == 2) {
require_once DISCUZ_ROOT . './include/editor.func.php';
require_once DISCUZ_ROOT . '/uc_client/client.php';
$gendercheck = array($member['gender'] => 'selected="selected"');
$uc_avatarflash = uc_avatar($discuz_uid, '', 0);
$member['bio'] = preg_replace("/<imme>(.+)<\\/imme>/is", '[imme]', $member['bio']);
$member['sightml'] = preg_replace("/<imme>(.+)<\\/imme>/is", '[imme]', $member['sightml']);
$member['bio'] = html2bbcode($member['bio']);
$member['signature'] = html2bbcode($member['sightml']);
} elseif ($typeid == 5) {
$invisiblechecked = $member['invisible'] ? 'checked="checked"' : '';
$emailchecked = $member['showemail'] ? 'checked="checked"' : '';
$newschecked = $member['newsletter'] ? 'checked="checked"' : '';
$tppchecked = array($member['tpp'] => 'checked="checked"');
$pppchecked = array($member['ppp'] => 'checked="checked"');
$toselect = array(strval((double) $member['timeoffset']) => 'selected="selected"');
$pscheck = array(intval($member['pmsound']) => 'checked="checked"');
$emcheck = array($member['editormode'] => 'checked="checked"');
$tfcheck = array($member['timeformat'] => 'checked="checked"');
$dfcheck = array($member['dateformat'] => 'checked="checked"');
示例9:
<?php
/**
* UCenter 应用程序开发 Example
*
* 设置头像的 Example 代码
*/
echo '
<img src="'.UC_API.'/avatar.php?uid='.$Example_uid.'&size=big">
<img src="'.UC_API.'/avatar.php?uid='.$Example_uid.'&size=middle">
<img src="'.UC_API.'/avatar.php?uid='.$Example_uid.'&size=small">
<br><br>'.uc_avatar($Example_uid);
?>
示例10: _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');
}
}
示例11: 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');
}
示例12: set_avatar
function set_avatar($uid)
{
return uc_avatar($uid);
}
示例13: ucAvatar
/**
* 修改用户头像ucenter
* @param $user
* @return array|string
*/
public static function ucAvatar($user)
{
UcenterInterface::getInstance();
$ucUser = self::getUser($user->username);
return uc_avatar($ucUser[0], 'virtual');
}
示例14: 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>';
}
示例15: 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;
//.........这里部分代码省略.........