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

PHP getUserFace函数代码示例

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

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



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

示例1: getAll

 public function getAll()
 {
     $typeId = intval($_GET['typeId']);
     empty($typeId) && ($typeId = 2);
     $db_prefix = C('DB_PREFIX');
     if ($typeId == 2) {
         $follow = M('')->field('follow.fid AS fuid,user.uname AS funame')->table("{$db_prefix}user_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid")->where("follow.uid={$this->mid}")->order('follow.follow_id DESC')->findPage(15);
     } else {
         if ($typeId == 3) {
             $follow = M('')->field('follow.uid AS fuid,user.uname AS funame')->table("{$db_prefix}user_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.uid=user.uid")->where("follow.fid={$this->mid}")->order('follow.follow_id DESC')->findPage(15);
         } else {
             //目前没有好的方案高效的显示互粉的列表人.
             //默认显示互粉
             // $follow = M('')->field('follow.fid AS fuid,user.uname AS funame')
             // 			   ->table("{$db_prefix}user_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid")
             // 			   ->where("follow.uid={$this->mid} AND follow.fid IN (SELECT uid FROM {$db_prefix}user_follow WHERE fid={$this->mid})")
             // 			   ->order('follow.follow_id DESC')
             // 			   ->findPage(15);
             //$follow = M('User')->field('uid AS fuid,uname AS funame')->where("uid IN (SELECT uid FROM {$db_prefix}user_follow WHERE fid={$this->mid}) AND uid IN (SELECT fid FROM {$db_prefix}user_follow WHERE uid={$this->mid})")->findPage(15);
             //$follow = M('')->query("SELECT follow.fid AS fuid,user.uname AS funame FROM {$db_prefix}user_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid WHERE follow.uid={$this->mid} AND follow.type={$typeId}");
         }
     }
     foreach ($follow['data'] as $k => $v) {
         $out[$k]['fUid'] = $v['fuid'];
         $out[$k]['friendUserName'] = getShort($v['funame'], '3', '…');
         $out[$k]['friendHeadPic'] = getUserFace($v['fuid']);
     }
     exit(json_encode($out));
 }
开发者ID:omusico,项目名称:ThinkSNS-4,代码行数:29,代码来源:SelectFriendsAction.class.php


示例2: replaceRelatedUser

 public function replaceRelatedUser()
 {
     $related_user = unserialize($_SESSION['_widget_related_user']);
     if (empty($related_user)) {
         echo '0';
     } else {
         $html = '';
         $limit = min(intval($_POST['limit']), count($related_user));
         for ($i = 1; $i <= $limit; $i++) {
             $shifted_user = array_shift($related_user);
             $html .= '<li id="related_user_' . $shifted_user['uid'] . '">';
             $html .= '<div class="userPic">';
             $html .= '<a title="" href="' . U("home/Space/index", array("uid" => $shifted_user['uid'])) . '">';
             $html .= '<img src="' . getUserFace($shifted_user['uid'], 'm') . '" card="1">';
             $html .= '</a>';
             $html .= '</div>';
             $html .= '<div class="interest_info">';
             $html .= '<p><a href="' . U("home/Space/index", array("uid" => $shifted_user['uid'])) . '">' . getUserName($shifted_user['uid']) . '</a></p>';
             $html .= '<p><a href="javascript:void(0);" class="guanzhu" onclick="subscribe(' . $shifted_user['uid'] . ')">加关注</a></p>';
             $html .= '<p class="cGray2">' . $shifted_user['reason'] . '</p>';
             $html .= '</div>';
             $html .= '</li>';
         }
         $_SESSION['_widget_related_user'] = serialize($related_user);
         echo $html;
     }
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:27,代码来源:WidgetAction.class.php


示例3: doFollowRelatedUser

 public function doFollowRelatedUser()
 {
     $_POST['uid'] = intval($_POST['uid']);
     if (0 == $_POST['uid']) {
         echo 0;
     } else {
         D('Follow', 'weibo')->dofollow($this->mid, $_POST['uid']);
         $related_user = unserialize($_SESSION['related_user']);
         if (empty($related_user)) {
             echo '';
             return;
         } else {
             $shifted_user = array_shift($related_user);
             $_SESSION['related_user'] = serialize($related_user);
             $html = '';
             $html .= '<li id="related_user_' . $shifted_user . '">';
             $html .= '<span class="userPic"><a title="" href="' . U("home/Space/index", array("uid" => $shifted_user)) . '">';
             $html .= '<img src="' . getUserFace($shifted_user, 's') . '" card="1">';
             $html .= '</a></span>';
             $html .= '<div class="name"><a href="' . U("home/Space/index", array("uid" => $shifted_user)) . '">' . getUserName($shifted_user) . '</a></div>';
             $html .= '<div><a href="javascript:void(0);" class="cGray2" onclick="subscribe(' . $shifted_user . ');">加关注</a></div>';
             $html .= '</li>';
             echo $html;
         }
     }
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:26,代码来源:WidgetAction.class.php


示例4: doaddcomment

 function doaddcomment($uid, $post, $api = false)
 {
     $data['uid'] = $uid;
     $data['reply_comment_id'] = intval($post['reply_comment_id']);
     $data['weibo_id'] = intval($post['weibo_id']);
     $data['content'] = $post['content'];
     $data['ctime'] = time();
     $miniInfo = D('Weibo')->where('weibo_id=' . $data['weibo_id'])->find();
     if ($data['reply_comment_id']) {
         $replyInfo = $this->where('comment_id=' . $data['reply_comment_id'])->find();
         $data['reply_uid'] = $replyInfo['uid'];
     } else {
         $data['reply_uid'] = $miniInfo['uid'];
         $notify['reply_type'] = 'weibo';
     }
     if ($comment_id = $this->addcomment($data)) {
         //微博回复积分操作
         if ($data['uid'] != $data['reply_uid']) {
             X('Credit')->setUserCredit($data['uid'], 'reply_weibo')->setUserCredit($data['reply_uid'], 'replied_weibo');
         }
         $data['comment'] = $miniInfo['comment'] + 1;
         $return['data'] = $data;
         $return['html'] = '<div class="position_list" id="comment_list_c_' . $comment_id . '"> <a href="' . U('home/space/index', array('uid' => $this->mid)) . '" class="pic">
         		<img class="pic30" src="' . getUserFace($uid, 's') . '" /></a>
                   <p class="list_c"><a href="#">' . getUserName($uid) . '</a> ' . getUserGroupIcon($uid) . ' : ' . formatComment($data['content'], true) . ' (刚刚)</p>
                   <div class="alR clear"><a href="javascript:void(0)" onclick="ui.confirm(this,\'确认要删除此评论?\')" callback="delComment(' . $comment_id . ')">删除</a>&nbsp;&nbsp;<a href="javascript:void(0)" onclick="reply(\'' . getUserName($uid) . '\',' . $data['weibo_id'] . ')">回复</a></div>
                 </div>';
         if ($post['transpond'] != 0) {
             if ($miniInfo['transpond_id'] != 0) {
                 $transpondData['content'] = $data['content'] . " //@" . getUserName($miniInfo['uid']) . ":" . $miniInfo['content'];
                 $transpondData['transpond_id'] = $miniInfo['transpond_id'];
                 $transpondInfo = M('weibo')->where('weibo_id=' . $miniInfo['transpond_id'])->find();
                 $transpondData['transpond_uid'] = $transpondInfo['uid'];
             } else {
                 $transpondData['content'] = $data['content'];
                 $transpondData['transpond_id'] = $miniInfo['weibo_id'];
                 $transpondData['transpond_uid'] = $miniInfo['uid'];
             }
             $id = D('Weibo', 'weibo')->doSaveWeibo($uid, $transpondData, $post['from']);
             if ($id) {
                 //当转发的微博uid 与 回复人的uid不一致时发布@到我
                 if ($transpondData['transpond_uid'] != $data['reply_uid']) {
                     D('Weibo', 'weibo')->notifyToAtme($id, $transpondData['content'], $transpondData['transpond_uid']);
                 } else {
                     D('Weibo', 'weibo')->notifyToAtme($id, $transpondData['content'], $transpondData['transpond_uid'], false);
                 }
             }
         }
         //添加统计
         Model('UserCount')->addCount($data['reply_uid'], 'comment');
         if ($api) {
             return true;
         } else {
             return json_encode($return);
         }
     } else {
         return '0';
     }
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:59,代码来源:CommentModel.class.php


示例5: write

 function write()
 {
     $uid = intval($_GET["uid"]);
     if ($uid) {
         $toUserFace = getUserFace($uid);
         $toUserName = getUserName($uid);
         $this->assign("toUserFace", $toUserFace);
         $this->assign("toUserName", $toUserName);
     }
     $this->display();
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:11,代码来源:NotifyAction.class.php


示例6: __formatMessageDetail

 private function __formatMessageDetail($message)
 {
     unset($message['deleted_by']);
     $message['from_uname'] = getUserName($message['from_uid']);
     //$message['to_uname']	= getUserName($message['to_uid']);
     $message['from_face'] = getUserFace($message['from_uid']);
     //$message['to_face']		= getUserFace($message['to_uid']);
     $message['timestmap'] = $message['mtime'];
     $message['ctime'] = date('Y-m-d H:i', $message['mtime']);
     return $message;
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:11,代码来源:MessageApi.class.php


示例7: __formatMessageList

 private function __formatMessageList($message)
 {
     foreach ($message as $k => $v) {
         $message[$k]['from_uname'] = getUserName($v['from_uid']);
         $message[$k]['to_uname'] = getUserName($v['to_uid']);
         $message[$k]['from_face'] = getUserFace($v['from_uid']);
         $message[$k]['to_face'] = getUserFace($v['to_uid']);
         $message[$k]['timestmap'] = $v['ctime'];
         $message[$k]['ctime'] = date('Y-m-d H:i', $v['ctime']);
     }
     return $message;
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:12,代码来源:MessageApi.class.php


示例8: get_other_comment

 function get_other_comment()
 {
     $aid = intval($_POST["aid"]);
     $map["appid"] = $aid;
     $map["type"] = "mini";
     $comms = D("Comment")->where($map)->findAll();
     $num = count($comms);
     $comms2 = array_slice($comms, 1, $num - 2);
     for ($i = 0; $i < $num - 2; $i++) {
         $comms2[$i]["face"] = getUserFace($comms2[$i]["uid"]);
         $comms2[$i]['cTime'] = friendlyDate($comms2[$i]['cTime']);
     }
     echo json_encode($comms2);
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:14,代码来源:FeedAction.class.php


示例9: getAll

 public function getAll()
 {
     $typeId = intval($_GET['typeId']);
     //$limitstart =
     //$friends = $this->api->friend_getIdName($this->mid,$gid,intval($_GET["pageSize"]));
     $db_prefix = C('DB_PREFIX');
     if ($typeId == 2) {
         $follow = M('')->field('follow.fid AS fuid,user.uname AS funame')->table("{$db_prefix}weibo_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid")->where("follow.uid={$this->mid}")->order('follow.follow_id DESC')->findPage(15);
     } elseif ($typeId == 3) {
         $follow = M('')->field('follow.uid AS fuid,user.uname AS funame')->table("{$db_prefix}weibo_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.uid=user.uid")->where("follow.fid={$this->mid}")->order('follow.follow_id DESC')->findPage(15);
     } else {
         //默认显示互粉
         $follow = M('')->field('follow.fid AS fuid,user.uname AS funame')->table("{$db_prefix}weibo_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid")->where("follow.uid={$this->mid} AND follow.fid IN (SELECT uid FROM {$db_prefix}weibo_follow WHERE fid={$this->mid})")->order('follow.follow_id DESC')->findPage(15);
     }
     //$follow = M('')->query("SELECT follow.fid AS fuid,user.uname AS funame FROM {$db_prefix}weibo_follow AS follow LEFT JOIN {$db_prefix}user AS user ON follow.fid=user.uid WHERE follow.uid={$this->mid} AND follow.type={$typeId}");
     foreach ($follow['data'] as $k => $v) {
         $out[$k]['fUid'] = $v['fuid'];
         $out[$k]['friendUserName'] = $v['funame'];
         $out[$k]['friendHeadPic'] = getUserFace($v['fuid']);
     }
     echo json_encode($out);
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:22,代码来源:SelectFriendsAction.class.php


示例10: getOneApi

 public function getOneApi($id, $value, $uid = 0)
 {
     if (!$value && is_numeric($id)) {
         if (($value = object_cache_get("weibo_{$id}")) === false) {
             $value = $this->where('weibo_id="' . $id . '" AND isdel=0')->find();
         }
     }
     if (!$value) {
         return false;
     }
     $value['uname'] = getUserName($value['uid']);
     $value['face'] = getUserFace($value['uid']);
     if ($value['type'] == 1 && $value['transpond_id'] == 0) {
         $value['type_data'] = unserialize($value['type_data']);
         $value['type_data']['picurl'] = SITE_URL . '/data/uploads/' . $value['type_data']['picurl'];
         $value['type_data']['thumbmiddleurl'] = SITE_URL . '/data/uploads/' . $value['type_data']['thumbmiddleurl'];
         $value['type_data']['thumburl'] = SITE_URL . '/data/uploads/' . $value['type_data']['thumburl'];
     }
     $value['transpond_data'] = $value['transpond_id'] > 0 ? $this->getOneApi($value['transpond_id']) : '';
     $value['timestamp'] = $value['ctime'];
     $value['ctime'] = date('Y-m-d H:i', $value['ctime']);
     $value['from_data'] = unserialize($value['from_data']);
     $value['content'] = keyWordFilter($value['content']);
     if (isset($value['favorited'])) {
         $value['favorited'] = intval($value['favorited']);
     } else {
         $value['favorited'] = (int) D('Favorite', 'weibo')->isFavorited($id, $uid);
     }
     return $value;
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:30,代码来源:WeiboModel.class.php


示例11: doComment

 function doComment()
 {
     $this->check_login();
     //解析URL
     $parse_url = parse_url($_POST['type']);
     $parse_str = parse_str($parse_url['query'], $option);
     $type = $option['m'] . ',' . $option['a'];
     $result = trim($type, ',');
     //组装数据
     $replace = str_replace("\n", " ", $_POST['info']);
     $data['info'] = htmlspecialchars(ReplaceKeywords(trim(strip_tags($replace))));
     //评论替换
     $data['pid'] = $_POST['pid'];
     //$data['type']=$result;
     $data['type'] = "item,index";
     $data['uid'] = $_COOKIE['user']['id'];
     $data['uname'] = $_COOKIE['user']['name'];
     $user_rel = $this->user_mod->field('id,name')->where("id='{$data['uid']}'")->find();
     $user_rel['face'] = getUserFace($data['uid']);
     $data['status'] = 1;
     $data['add_time'] = time();
     if (M('UserComments')->add($data)) {
         $arr = array('id' => $data['pid'], 'comments' => $this->user_comments_mod->where('pid=' . $data['pid'] . ' and type="item,index"')->count());
         $this->items_mod->save($arr);
         $this->ajaxReturn($user_rel);
     } else {
         echo 0;
     }
 }
开发者ID:chenyongze,项目名称:januarybuy_develop,代码行数:29,代码来源:cateAction.class.php


示例12: searchUser

 function searchUser($key, $mid, $since_id, $max_id, $count = 20, $page = 1)
 {
     $key = t($key);
     if (!$key) {
         return false;
     }
     $limit = ($page - 1) * $count . ',' . $count;
     $map = 'uid>0';
     if ($since_id) {
         $map .= " AND uid > {$since_id}";
     } elseif ($max_id) {
         $map .= " AND uid < {$max_id}";
     }
     $list = $this->table(C('DB_PREFIX') . 'user')->where($map . " AND uname LIKE '%{$key}%'")->limit($limit)->findall();
     foreach ($list as $k => $v) {
         $list[$k]['mini'] = M('weibo')->where('uid=' . $v['uid'] . ' AND type=0')->order('weibo_id DESC')->find();
         $list[$k]['followed_count'] = M('weibo_follow')->where('uid=' . $v['uid'])->count();
         $list[$k]['followers_count'] = M('weibo_follow')->where('fid=' . $v['uid'])->count();
         $list[$k]['is_followed'] = getFollowState($mid, $v['uid']);
         $list[$k]['area'] = $v['location'];
         $list[$k]['face'] = getUserFace($v['uid']);
     }
     return $list;
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:24,代码来源:WeiboApiModel.class.php


示例13: u

                            echo $comments["info"];
                            ?>
</span></p></div><?php 
                        }
                    }
                } else {
                    echo "";
                }
            }
            if (isset($val['user'])) {
                ?>
<div class="clearfix comm_share"><div class="avatar"><a href="<?php 
                echo u('uc/index', array('uid' => $val['user']['id']));
                ?>
"><img src="<?php 
                echo getUserFace($val['user']['id']);
                ?>
" class="tipuser" uid='<?php 
                echo $val['user']['id'];
                ?>
' width="32px" height="32px"/></a></div><p><a href="<?php 
                echo u('uc/index', array('uid' => $val['user']['id']));
                ?>
"><em><?php 
                echo $val["user"]["name"];
                ?>
:</em></a>分享  
	                    <span><?php 
                if ($val["remark_status"] == 1) {
                    echo $val["remark"];
                }
开发者ID:chenyongze,项目名称:januarybuy_develop,代码行数:31,代码来源:8f8d6b856f56d6c25b5cc6639f2cab15.php


示例14: saveThumb

 function saveThumb()
 {
     //头像大方快的宽高
     $targ_w = 120;
     $targ_h = 120;
     //头像小方块的宽高
     $small_w = 50;
     $small_h = 50;
     //图像质量
     $jpeg_quality = 80;
     $src_arr = explode("?", $_POST['bigImage']);
     $src = $src_arr[0];
     $src = str_ireplace(SITE_URL, '.', $src);
     //获取图片的扩展名。来选择使用什么函数
     if ($arr = @getimagesize($src)) {
         $ext = image_type_to_extension($arr[2], false);
     } else {
         $this->error('对不起,GD库不存在或远程图片不存在');
     }
     $func = $ext != 'jpg' ? 'imagecreatefrom' . $ext : 'imagecreatefromjpeg';
     $img_r = call_user_func($func, $src);
     //开始切割大方块头像
     $dst_r = ImageCreateTrueColor($targ_w, $targ_h);
     $x = $targ_h / $_POST['txt_Zoom'];
     imagecopyresampled($dst_r, $img_r, 0, 0, $_POST['txt_left'] / $_POST['txt_Zoom'], $_POST['txt_top'] / $_POST['txt_Zoom'], $targ_w, $targ_h, $x, $x);
     $path = SITE_PATH . "data/thumb/";
     $filename = $path . 'xxx_s.jpg';
     $face_path = getFacePath($this->mid);
     mkdir($face_path, 0777, true);
     $middle_name = $face_path . $this->mid . "_middle_face.jpg";
     //中图
     imagejpeg($dst_r, $middle_name);
     //生成中图
     imagedestroy($dst_r);
     imagedestroy($img_r);
     $small_name = $face_path . $this->mid . "_small_face.jpg";
     //小图
     vendor("yu_image");
     $img = new yu_image();
     $img->param($middle_name)->thumb($small_name, $small_w, $small_h, 0);
     //缩出小图
     //添加一条动态
     $body_data["src"] = getUserFace($this->mid);
     $this->api->feed_publish("head", $title_data, $body_data);
     setScore($this->mid, 'update_face');
     $this->redirect("/Home/index");
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:47,代码来源:InfoAction.class.php


示例15: doaddShare

 function doaddShare()
 {
     $type['typeId'] = 10;
     $type['typeName'] = '用户';
     $type['alias'] = 'user';
     $info = h($_REQUEST['info']);
     $aimId = intval($_REQUEST['aimId']);
     $data['username'] = getUserName($aimId);
     $data['userface'] = getUserFace($aimId);
     //$data['city'] = getUserCity($aimId);
     //为了兼容其它应用而使用uid
     $data['uid'] = $aimId;
     //主人的心情
     $bq_config = D('MiniConfig')->getConfig('mini');
     $bq_emotion = D('Smile')->getSmile($bq_config['smiletype']);
     $the_mini = D("Mini")->getOneMini($aimId, $bq_emotion, $bq_config['smiletype']);
     $data['mini'] = $the_mini['content'];
     $result = $this->api->share_addShare($type, $aimId, $data, $info);
     echo $result;
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:20,代码来源:SpaceAction.class.php


示例16: __assignNameAndFace

 /**
  * 把用户姓名和头像赋值给模板
  *
  */
 private function __assignNameAndFace($uid)
 {
     if ($uid && $uid != $this->mid) {
         $toUserName = getUserName($uid);
         $toUserFace = getUserFace($uid);
         $this->assign('toUserName', $toUserName);
         $this->assign('toUserFace', $toUserFace);
     }
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:13,代码来源:IndexAction.class.php


示例17: face

 public function face($get)
 {
     if ($get['type'] !== 'face') {
         $uc_uid = $get['uid'];
         $uc_user_ref = ts_get_ucenter_user_ref('', $uc_uid);
         $user = M('user')->where("uid={$uc_user_ref['uid']}")->find();
         if ($user) {
             echo $user['uid'];
             /*cookie('LOGGED_USER',jiami('thinksns.'.$user['uid']),(3600*2))*/
         }
     } else {
         $data = 'http://dev.thinksns.com/ts/2.0/public/themes/classic2';
         $face = str_replace('THEME_URL', $data, getUserFace($get['uid']));
         $data = 'http://dev.thinksns.com/ts/2.0';
         $face = str_replace('SITE_URL', $data, $face);
         echo $face;
     }
 }
开发者ID:boxshadow,项目名称:ThinkSNS-4,代码行数:18,代码来源:common.php


示例18: getOneApi

 function getOneApi($id, $info)
 {
     if (!$info) {
         $info = $this->where('weibo_id=' . $id)->find();
     }
     if (!$info) {
         return false;
     }
     $info['uname'] = getUserName($info['uid']);
     $info['face'] = getUserFace($info['uid']);
     if ($info['type'] == 1 && $info['transpond_id'] == 0) {
         $info['type_data'] = unserialize($info['type_data']);
         $info['type_data']['picurl'] = SITE_URL . '/data/uploads/' . $info['type_data']['picurl'];
         $info['type_data']['thumbmiddleurl'] = SITE_URL . '/data/uploads/' . $info['type_data']['thumbmiddleurl'];
         $info['type_data']['thumburl'] = SITE_URL . '/data/uploads/' . $info['type_data']['thumburl'];
     }
     $info['transpond_data'] = $info['transpond_id'] != 0 ? $this->getOneApi($info['transpond_id']) : '';
     $info['timestamp'] = $info['ctime'];
     $info['ctime'] = date('Y-m-d H:i', $info['ctime']);
     $info['from_data'] = unserialize($info['from_data']);
     return $info;
 }
开发者ID:laiello,项目名称:thinksns-2,代码行数:22,代码来源:WeiboModel.class.php


示例19: getUserInfo

function getUserInfo($uid, $uname, $mid, $status = false)
{
    $data = array();
    $uid = intval($uid);
    $user = null;
    if ($uid > 0) {
        $user = D('User', 'home')->getUserByIdentifier($uid, 'uid');
    } else {
        if (!empty($uname)) {
            $user = D('User', 'home')->getUserByIdentifier($uname, 'uname');
        }
    }
    if (!$user) {
        return false;
    }
    if ($uid != $mid) {
        $isBlack = D('UserPrivacy', 'home')->isInBlackList($uid, $mid);
        $data['isInBlackList'] = $isBlack ? 1 : 0;
    }
    $data['uid'] = $user['uid'];
    $data['uname'] = $user['uname'];
    $data['province'] = $user['province'];
    $data['city'] = $user['city'];
    $data['location'] = $user['location'];
    $data['face'] = getUserFace($user['uid']);
    $data['space'] = $user['domain'] ? U('home/Space/index', array('uid' => $user['domain'])) : U('home/Space/index', array('uid' => $user['uid']));
    $data['sex'] = getSex($user['sex']);
    $data['weibo_count'] = model('UserCount')->getUserWeiboCount($user['uid']);
    $data['favorite_count'] = (int) M('weibo_favorite')->where('uid=' . $user['uid'])->count();
    $data['followers_count'] = model('UserCount')->getUserFollowerCount($user['uid']);
    $data['followed_count'] = model('UserCount')->getUserFollowingCount($user['uid']);
    $data['is_followed'] = getFollowState($mid, $user['uid']);
    $data['is_verified'] = intval(M('user_verified')->getField('verified', "uid={$uid}"));
    if ($status) {
        $status = M('weibo')->where('uid=' . $user['uid'])->order('weibo_id DESC')->find();
        $data['status'] = $status ? D('Weibo', 'weibo')->getOneApi('', $status) : '';
    }
    return $data;
}
开发者ID:alic1234567890,项目名称:wshowco,代码行数:39,代码来源:extend.php


示例20: replace

 private function replace($data)
 {
     foreach ($data as $key => &$value) {
         $value['face'] = getUserFace($value['uid']);
         $value['cTime'] = friendlyDate($value['cTime']);
         $value['comment'] = $this->replaceContent($value['comment'], 'mini');
         //TODO 表情多应用化
         $value['isDelete'] = $this->mid == $value['uid'] || $this->mid == $this->uid ? true : false;
         //悄悄话
     }
     return $data;
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:12,代码来源:CommentLwModel.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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