当前位置: 首页>>代码示例>>PHP>>正文


PHP getMemberAvatarForID函数代码示例

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


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

示例1: ajax_quickreplyOp

 /**
  * ajax获取回复相关信息 话题列表页使用
  */
 public function ajax_quickreplyOp()
 {
     // 话题信息
     $this->themeInfo();
     $data = array();
     $data['form_action'] = CIRCLE_SITE_URL . '/index.php?act=theme&op=save_reply&type=quick&c_id=' . $this->c_id . '&t_id=' . $this->t_id;
     $data['member_avatar'] = getMemberAvatarForID($_SESSION['member_id']);
     // 头像
     // 回复
     $reply_list = Model()->table('circle_threply')->where(array('theme_id' => $this->t_id, 'circle_id' => $this->c_id))->order('reply_id desc')->limit(5)->select();
     if (!empty($reply_list)) {
         foreach ($reply_list as $key => $val) {
             $reply_list[$key]['member_avatar'] = getMemberAvatarForID($val['member_id']);
             $reply_list[$key]['reply_addtime'] = date('Y-m-d H:i', $val['reply_addtime']);
             $reply_list[$key]['reply_content'] = removeUBBTag($val['reply_content']);
         }
     }
     $data['reply_list'] = $reply_list;
     $data['c_istalk'] = intval(C('circle_istalk'));
     $data['c_contentleast'] = intval(C('circle_contentleast'));
     if (intval(C('circle_contentleast')) > 0) {
         $data['c_contentmsg'] = sprintf(L('nc_content_min_length'), intval(C('circle_contentleast')));
     } else {
         $data['c_contentmsg'] = L('nc_content_not_null');
     }
     if (strtoupper(CHARSET) == 'GBK') {
         $data = Language::getUTF8($data);
     }
     echo json_encode($data);
     exit;
 }
开发者ID:mengtaolin,项目名称:shopping,代码行数:34,代码来源:theme.php

示例2: listOp

 /**
  * 客户列表
  */
 public function listOp()
 {
     $model_stat = Model('stat');
     $member_list = array();
     $condition = array();
     $condition['store_id'] = $this->store_info['store_id'];
     if (!empty($_POST['member_name'])) {
         $condition['buyer_name'] = array('like', '%' . $_POST['member_name'] . '%');
     }
     $count = $model_stat->getStatOrderCount($condition, 'distinct buyer_id');
     $list = $model_stat->statByStatorder($condition, 'buyer_id', array($this->page, $count), 0, '', 'buyer_id');
     if (!empty($list)) {
         $memberid_array = array();
         foreach ($list as $val) {
             $memberid_array[] = $val['buyer_id'];
         }
         $member_list = Model('member')->getMemberList(array('member_id' => array('in', $memberid_array)), 'member_id,member_name,member_email,member_mobile');
     }
     if (!empty($member_list)) {
         foreach ($member_list as $key => $val) {
             $member_list[$key]['member_avatar'] = getMemberAvatarForID($val['member_id']);
         }
     }
     $page_count = $model_stat->gettotalpage();
     output_data(array('member_list' => $member_list), mobile_page($page_count));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:29,代码来源:seller_client.php

示例3: indexOp

    /**
     * 我的商城
     */
	public function indexOp() {
        $member_info = array();
        $member_info['user_name'] = $this->member_info['member_name'];
        $member_info['avator'] = getMemberAvatarForID($this->member_info['member_id']);
        $member_info['point'] = $this->member_info['member_points'];
        $member_info['predepoit'] = $this->member_info['available_predeposit'];

        output_data(array('member_info' => $member_info));
	}
开发者ID:noikiy,项目名称:ejia,代码行数:12,代码来源:member_index.php

示例4: getImToken

 private function getImToken($uid, $uname)
 {
     $p = new ServerApi('0vnjpoadnw2uz', 'hg0BUlbxV8a1');
     $r = $p->getToken($uid, $uname, getMemberAvatarForID($uid));
     //  处理返回的json数据
     $obj = json_decode($r);
     $imToken = $obj->token;
     //  TODO 将解析出的Token存入数据库
     return $imToken;
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:10,代码来源:login.php

示例5: trendsOp

 /**
  * 获取好友动态
  */
 public function trendsOp()
 {
     $id_array = $this->getFollowingsIds();
     $ids = array();
     foreach ($id_array as $val) {
         $ids[] = $val['member_id'];
     }
     $model = Model();
     $m_theme = $model->table('circle_theme');
     //从话题表中查找出关注人的话题,按发布时间排序
     $fields = "theme_id,theme_name,theme_content,circle_id,circle_name,thclass_id,thclass_name,member_id,member_name,theme_addtime";
     $theme_list = $m_theme->where(array('member_id' => array('in', $ids)))->field($fields)->page($this->page)->order('theme_addtime desc')->select();
     foreach ($theme_list as $key => $val) {
         $theme_list[$key]['member_avatar'] = getMemberAvatarForID($theme_list[$key]['member_id']);
     }
     $pageCount = $m_theme->gettotalpage();
     output_data(array('trends' => $theme_list), mobile_page($pageCount));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:21,代码来源:trend.php

示例6: defined

<?php

defined('InShopNC') or exit('Access Invalid!');
?>

<div class="my-info">
  <div class="avatar"><img src="<?php 
echo getMemberAvatarForID($_SESSION['member_id']);
?>
" /><a href="<?php 
echo SHOP_SITE_URL;
?>
/index.php?act=home&op=avatar" title="<?php 
echo $lang['nc_edit_avatar'];
?>
"><?php 
echo $lang['nc_edit_avatar'];
?>
</a></div>
  <dl>
    <dt>
      <h2><a href="index.php?act=p_center" target="_blank"><?php 
echo $_SESSION['member_name'];
?>
</a></h2>
    </dt>
    <dd><span><?php 
echo $lang['circle_theme'] . $lang['nc_colon'];
?>
<em>(<b><?php 
echo $output['cm_info']['cm_thcount'];
开发者ID:Maplecms,项目名称:shopnc-yhmall,代码行数:31,代码来源:group_manage_sidebar.php

示例7: getRecentFromList

 /**
  * get recent from msg
  *
  * @param
  * @return array
  */
 public function getRecentFromList($condition = array(), $limit = 5, $member_list = array())
 {
     $list = $this->getMemberFromList($condition, '', $limit);
     if (!empty($list) && is_array($list)) {
         foreach ($list as $k => $v) {
             $member = array();
             $u_id = $v['f_id'];
             $member['u_id'] = $u_id;
             $member['u_name'] = $v['f_name'];
             $member['avatar'] = getMemberAvatarForID($u_id);
             $member['recent'] = 1;
             $member['time'] = date("Y-m-d H:i:s", $v['addtime']);
             if (empty($member_list[$u_id])) {
                 $member_list[$u_id] = $member;
             } else {
                 $member_list[$u_id]['recent'] = 1;
                 $member_list[$u_id]['time'] = date("Y-m-d H:i:s", $v['addtime']);
             }
         }
     }
     return $member_list;
 }
开发者ID:noikiy,项目名称:shopnc-minion,代码行数:28,代码来源:web_chat.model.php

示例8: theme_detailOp

 /**
  * GET 话题回复信息
  */
 public function theme_detailOp()
 {
     $model = Model();
     $m_theme = $model->table('circle_theme');
     $theme = $m_theme->where(array("theme_id" => $this->t_id))->select();
     $this->c_id = $theme['circle_id'];
     // 会员信息
     $this->memberInfo();
     // 话题信息
     $this->themeInfo();
     // 验证阅读权限
     $this->readPermissions($this->cm_info);
     if ($this->m_readperm < $this->theme_info['theme_readperm']) {
         //没有权限
         output_error("没有阅读权限");
     }
     $model = Model();
     // 回复列表
     $where = array();
     $where['theme_id'] = $this->t_id;
     if ($_GET['only_id'] != '') {
         $where['member_id'] = intval($_GET['only_id']);
     }
     $m_reply = $model->table('circle_threply');
     $reply_info = $m_reply->where($where)->page($this->page)->order('adopt_state desc,reply_id asc')->select();
     $pageCount = $m_reply->gettotalpage();
     $replyid_array = array();
     $memberid_array = array();
     if (!empty($reply_info)) {
         foreach ($reply_info as $val) {
             $replyid_array[] = $val['reply_id'];
             $memberid_array[] = $val['member_id'];
         }
         foreach ($reply_info as $key => $val) {
             $reply_info[$key]['member_avatar'] = getMemberAvatarForID($reply_info[$key]['member_id']);
         }
     }
     $replyid_array[] = 0;
     ksort($replyid_array);
     $memberid_array[] = $this->theme_info['member_id'];
     $memberid_array = array_unique($memberid_array);
     ksort($memberid_array);
     $where = array();
     $where['theme_id'] = $this->t_id;
     $where['reply_id'] = array('in', $replyid_array);
     // member
     $member_list = $model->table('circle_member')->field('member_id,cm_level,cm_levelname')->where(array('circle_id' => $this->c_id, 'member_id' => array('in', $memberid_array)))->select();
     $member_list = array_under_reset($member_list, 'member_id');
     // 是否赞过话题
     $theme_nolike = 1;
     if (!empty($this->member_info['member_id'])) {
         // 是否赞过话题
         $like_info = $model->table('circle_like')->where(array('theme_id' => $this->t_id, 'member_id' => $this->member_info['member_id']))->find();
         if (empty($like_info)) {
             $theme_nolike = 1;
         } else {
             $theme_nolike = 0;
         }
     }
     output_data(array('replys' => $reply_info, 'member_list' => $member_list, 'theme_nolike' => $theme_nolike), mobile_page($pageCount));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:64,代码来源:circle_theme.php

示例9: if

<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div><?php if (!empty($output['store_closed'])) { ?>
  <div class="store-closed"><i class="icon-warning-sign"></i>
    <dl>
      <dt>您的店铺已被平台关闭</dt>
      <dd>关闭原因:<?php echo $output['store_close_info'];?></dd>
      <dd>在此期间,您的店铺以及商品将无法访问;如果您有异议或申诉请及时联系平台管理。</dd>
    </dl>
  </div>
  <?php } ?>
<header class="ncsc-head-layout w">
  <div class="wrapper">
    <div class="ncsc-admin">
      <dl class="ncsc-admin-info">
        <dt class="admin-avatar"><img src="<?php echo getMemberAvatarForID($_SESSION['member_id']);?>" width="32" class="pngFix" alt=""/></dt>
        <dd class="admin-permission">当前用户</dd>
        <dd class="admin-name"><?php echo $_SESSION['seller_name'];?></dd>
      </dl>
      <div class="ncsc-admin-function"><a href="<?php echo urlShop('show_store', 'index', array('store_id'=>$_SESSION['store_id']), $output['store_info']['store_domain']);?>" target="_blank" title="前往店铺" ><i class="icon-home"></i></a><a href="<?php echo urlShop('home', 'message');?>" title="站内消息" class="pr" target="_blank"><i class="icon-envelope-alt"></i><em><?php echo $output['message_num'];?></em></a><a href="<?php echo urlShop('home', 'passwd');?>" title="修改密码" target="_blank"><i class="icon-wrench"></i></a><a href="<?php echo urlShop('seller_logout', 'logout');;?>" title="安全退出"><i class="icon-signout"></i></a></div>
    </div>
    <div class="center-logo">
        <a href="<?php echo SHOP_SITE_URL;?>" target="_blank"><img src="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_COMMON.DS.C('seller_center_logo');?>" class="pngFix" alt=""/></a>
      <h1>商家中心</h1>
    </div>
    <div class="index-search-container">
      <div class="index-sitemap"><a href="javascript:void(0);">导航管理 <i class="icon-angle-down"></i></a>
        <div class="sitemap-menu-arrow"></div>
        <div class="sitemap-menu">
          <div class="title-bar">
            <h2>
开发者ID:noikiy,项目名称:travel,代码行数:31,代码来源:seller_layout.php

示例10: getMemberAvatarForID

                        ?>
        <div class="ban"><?php 
                        echo $lang['circle_nospeak_reply_prompt'];
                        ?>
</div>
        <?php 
                    }
                }
            }
        }
    }
}
?>
        <div class="quick-reply-member"><a id="quickReply"></a>
          <div class="member-avatar-m"><img src="<?php 
echo getMemberAvatarForID($output['cm_info']['member_id']);
?>
"/></div>
        </div>
        <form method="post" id="reply_form" action="<?php 
echo CIRCLE_SITE_URL;
?>
/index.php?act=theme&op=save_reply&c_id=<?php 
echo $output['c_id'];
?>
&t_id=<?php 
echo $output['t_id'];
?>
">
          <input type="hidden" name="form_submit" value="ok" />
          <?php 
开发者ID:Maplecms,项目名称:shopnc-yhmall,代码行数:31,代码来源:theme.detail.php

示例11: goods_detailOp

 /**
  * 商品详细页
  */
 public function goods_detailOp()
 {
     $goods_id = intval($_GET['goods_id']);
     // 商品详细信息
     $model_goods = Model('goods');
     $goods_detail = $model_goods->getGoodsDetail($goods_id);
     if (empty($goods_detail)) {
         output_error('商品不存在');
     }
     // 默认预订商品不支持手机端显示
     if ($goods_detail['is_book']) {
         output_error('预订商品不支持手机端显示');
     }
     //推荐商品
     $model_store = Model('store');
     $hot_sales = $model_store->getHotSalesList($goods_detail['goods_info']['store_id'], 6, true);
     $goodsid_array = array();
     foreach ($hot_sales as $value) {
         $goodsid_array[] = $value['goods_id'];
     }
     $sole_array = Model('p_sole')->getSoleGoodsList(array('goods_id' => array('in', $goodsid_array)));
     $sole_array = array_under_reset($sole_array, 'goods_id');
     $goods_commend_list = array();
     foreach ($hot_sales as $value) {
         $goods_commend = array();
         $goods_commend['goods_id'] = $value['goods_id'];
         $goods_commend['goods_name'] = $value['goods_name'];
         $goods_commend['goods_price'] = $value['goods_price'];
         $goods_commend['goods_promotion_price'] = $value['goods_promotion_price'];
         if (!empty($sole_array[$value['goods_id']])) {
             $goods_commend['goods_promotion_price'] = $sole_array[$value['goods_id']]['sole_price'];
         }
         $goods_commend['goods_image_url'] = cthumb($value['goods_image'], 240);
         $goods_commend_list[] = $goods_commend;
     }
     $goods_detail['goods_commend_list'] = $goods_commend_list;
     $store_info = $model_store->getStoreInfoByID($goods_detail['goods_info']['store_id']);
     $goods_detail['store_info']['store_id'] = $store_info['store_id'];
     $goods_detail['store_info']['store_name'] = $store_info['store_name'];
     $goods_detail['store_info']['member_id'] = $store_info['member_id'];
     $goods_detail['store_info']['member_name'] = $store_info['member_name'];
     $goods_detail['store_info']['avatar'] = getMemberAvatarForID($store_info['member_id']);
     $goods_detail['store_info']['goods_count'] = $store_info['goods_count'];
     if ($store_info['is_own_shop']) {
         $goods_detail['store_info']['store_credit'] = array('store_desccredit' => array('text' => '描述', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'), 'store_servicecredit' => array('text' => '服务', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'), 'store_deliverycredit' => array('text' => '物流', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'));
     } else {
         $storeCredit = array();
         $percentClassTextMap = array('equal' => '平', 'high' => '高', 'low' => '低');
         foreach ((array) $store_info['store_credit'] as $k => $v) {
             $v['percent_text'] = $percentClassTextMap[$v['percent_class']];
             $storeCredit[$k] = $v;
         }
         $goods_detail['store_info']['store_credit'] = $storeCredit;
     }
     //商品详细信息处理
     $goods_detail = $this->_goods_detail_extend($goods_detail);
     // 如果已登录 判断该商品是否已被收藏
     if ($memberId = $this->getMemberIdIfExists()) {
         $c = (int) Model('favorites')->getGoodsFavoritesCountByGoodsId($goods_id, $memberId);
         $goods_detail['is_favorate'] = $c > 0;
         $goods_detail['cart_count'] = Model('cart')->countCartByMemberId($memberId);
     }
     output_data($goods_detail);
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:67,代码来源:goods.php

示例12: answersOp

 /**
  * GET 消息中心的回答列表
  */
 public function answersOp()
 {
     $themeIds = $this->getMyThemeIds();
     $model = new Model();
     $types = array(5, 6);
     $m_reply = $model->table('circle_threply');
     $where['circle_threply.theme_id'] = array('in', $themeIds);
     $where['circle_theme.thclass_id'] = array('in', $types);
     $fields = "circle_threply.reply_content,circle_threply.reply_addtime,circle_threply.member_name,circle_threply.member_id,\n        circle_threply.circle_id,circle_threply.reply_id,circle_threply.theme_id,circle_theme.theme_name";
     $replies = $model->table('circle_threply,circle_theme')->join('right join')->on('circle_threply.theme_id=circle_theme.theme_id')->where($where)->field($fields)->page($this->page)->order('reply_addtime desc')->select();
     $pageCount = $m_reply->gettotalpage();
     if (!empty($replies)) {
         foreach ($replies as $key => $val) {
             $replies[$key]['member_avatar'] = getMemberAvatarForID($replies[$key]['member_id']);
         }
     }
     output_data(array('receiveAnswers' => $replies), mobile_page($pageCount));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:21,代码来源:member_center.php

示例13: get_user_listOp

 /**
  * friends info
  *
  */
 public function get_user_listOp()
 {
     $member_list = array();
     $model_chat = Model('web_chat');
     $member_id = $_SESSION['member_id'];
     $member_name = $_SESSION['member_name'];
     $f_id = intval($_GET['f_id']);
     if ($member_id < 1 || $member_id != $f_id) {
         $this->error(Language::get('nc_member_chat_login'));
     }
     $n = intval($_GET['n']);
     if ($n < 1) {
         $n = 50;
     }
     $list = $model_chat->getFriendList(array('friend_frommid' => $f_id), $n);
     if (!empty($list) && is_array($list)) {
         foreach ($list as $k => $v) {
             $member = array();
             $u_id = $v['friend_tomid'];
             $member['u_id'] = $u_id;
             $member['u_name'] = $v['friend_tomname'];
             $member['avatar'] = getMemberAvatarForID($u_id);
             $member['friend'] = 1;
             $member_list[$u_id] = $member;
         }
     }
     $add_time = date("Y-m-d");
     $add_time30 = strtotime($add_time) - 60 * 60 * 24 * 30;
     $list = $model_chat->getRecentList(array('f_id' => $f_id, 'add_time' => array('egt', $add_time30)), 10);
     if (!empty($list) && is_array($list)) {
         foreach ($list as $k => $v) {
             $member = array();
             $u_id = $v['t_id'];
             $member['u_id'] = $u_id;
             $member['u_name'] = $v['t_name'];
             $member['avatar'] = getMemberAvatarForID($u_id);
             $member['recent'] = 1;
             $member['time'] = date("Y-m-d H:i:s", $v['addtime']);
             if (empty($member_list[$u_id])) {
                 $member_list[$u_id] = $member;
             } else {
                 $member_list[$u_id]['recent'] = 1;
                 $member_list[$u_id]['time'] = date("Y-m-d H:i:s", $v['addtime']);
             }
         }
     }
     $list = $model_chat->getRecentFromList(array('t_id' => $f_id, 'add_time' => array('egt', $add_time30)), 10);
     if (!empty($list) && is_array($list)) {
         foreach ($list as $k => $v) {
             $member = array();
             $u_id = $v['f_id'];
             $member['u_id'] = $u_id;
             $member['u_name'] = $v['f_name'];
             $member['avatar'] = getMemberAvatarForID($u_id);
             $member['recent'] = 1;
             $member['time'] = date("Y-m-d H:i:s", $v['addtime']);
             if (empty($member_list[$u_id])) {
                 $member_list[$u_id] = $member;
             } else {
                 $member_list[$u_id]['recent'] = 1;
                 $member_list[$u_id]['time'] = date("Y-m-d H:i:s", $v['addtime']);
             }
         }
     }
     $this->json($member_list);
 }
开发者ID:noikiy,项目名称:haifenbao,代码行数:70,代码来源:web_chat.php

示例14: goods_detailOp

 /**
  * 商品详细页
  */
 public function goods_detailOp()
 {
     $goods_id = intval($_GET['goods_id']);
     // 商品详细信息
     $model_goods = Model('goods');
     $goods_detail = $model_goods->getGoodsDetail($goods_id);
     if (empty($goods_detail)) {
         output_error('商品不存在');
     }
     // 默认预订商品不支持手机端显示
     if ($goods_detail['is_book']) {
         output_error('预订商品不支持手机端显示');
     }
     //特卖
     $goods_detail['brandsale'] = Model('brandsale')->field('rec_id, brand_name, start_time, end_time, brand_pic, info, is_oversea')->where(array('is_open' => 1, 'brand_id' => $goods_detail['goods_info']['brand_id'], 'gc_id' => $goods_detail['goods_info']['gc_id_1']))->find();
     if ($goods_detail['brandsale']['start_time'] <= TIMESTAMP && $goods_detail['brandsale']['end_time'] > TIMESTAMP) {
         $goods_detail['goods_info']['remaining_time'] = $goods_detail['brandsale']['end_time'] - TIMESTAMP;
     }
     if ($goods_detail['brandsale']) {
         $goods_detail['brandsale']['brand_pic_url'] = brandImage($goods_detail['brandsale']['brand_pic']);
         $info = unserialize($goods_detail['brandsale']['info']);
         $goods_detail['brandsale']['special_content'] = '上新' . $info['data_cate'][0]['num'] . '款';
     }
     //国家
     $country_list = rkcache('country');
     $goods_detail['country'] = $country_list[$goods_detail['goods_info']['country_id']];
     //发货地区
     if ($goods_detail['goods_info']['country_id'] > 0 && $goods_detail['goods_info']['areaid_2']) {
         $area = Model('area')->field('area_name')->where(array('area_id' => $goods_detail['goods_info']['areaid_2']))->find();
         $goods_detail['goods_info']['send_area_name'] = $area['area_name'];
     }
     //折扣
     $goods_detail['goods_info']['discount'] = sprintf('%0.1f', $goods_detail['goods_info']['goods_promotion_price'] / $goods_detail['goods_info']['goods_marketprice'] * 10);
     //口碑
     $goods_detail['goodsevallist'] = Model('evaluate_goods')->field('geval_frommembername,geval_scores,geval_content')->where(array('geval_goodsid' => $goods_id))->order('geval_scores desc, geval_id desc')->limit(2)->select();
     //店铺
     $model_store = Model('store');
     $store_info = $model_store->getStoreInfoByID($goods_detail['goods_info']['store_id']);
     $goods_detail['store_info']['store_id'] = $store_info['store_id'];
     $goods_detail['store_info']['store_name'] = $store_info['store_name'];
     $goods_detail['store_info']['member_id'] = $store_info['member_id'];
     $goods_detail['store_info']['member_name'] = $store_info['member_name'];
     $goods_detail['store_info']['avatar'] = getMemberAvatarForID($store_info['member_id']);
     $goods_detail['store_info']['goods_count'] = $store_info['goods_count'];
     if ($store_info['is_own_shop']) {
         $goods_detail['store_info']['store_credit'] = array('store_desccredit' => array('text' => '描述', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'), 'store_servicecredit' => array('text' => '服务', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'), 'store_deliverycredit' => array('text' => '物流', 'credit' => 5, 'percent' => '----', 'percent_class' => 'equal', 'percent_text' => '平'));
     } else {
         $storeCredit = array();
         $percentClassTextMap = array('equal' => '平', 'high' => '高', 'low' => '低');
         foreach ((array) $store_info['store_credit'] as $k => $v) {
             $v['percent_text'] = $percentClassTextMap[$v['percent_class']];
             $storeCredit[$k] = $v;
         }
         $goods_detail['store_info']['store_credit'] = $storeCredit;
     }
     //商品详细信息处理
     $goods_detail = $this->_goods_detail_extend($goods_detail);
     // 如果已登录 判断该商品是否已被收藏
     if ($memberId = $this->getMemberIdIfExists()) {
         $c = (int) Model('favorites')->getGoodsFavoritesCountByGoodsId($goods_id, $memberId);
         $goods_detail['is_favorate'] = $c > 0;
         $cart_goods = Model('cart')->listCart('db', array('buyer_id' => $memberId));
         $cart_count = 0;
         if (!empty($cart_goods) && is_array($cart_goods)) {
             foreach ($cart_goods as $val) {
                 $cart_count += $val['goods_num'];
             }
         }
         $goods_detail['cart_count'] = $cart_count;
     }
     //print_r($goods_detail);
     output_data($goods_detail);
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:76,代码来源:mz_goods.php

示例15: foreach

    <?php 
if ($output['relation'] == 3) {
    ?>
    <ul id="visit_other" nc_type="visitlist" style="display: none;">
      <?php 
    if (!empty($output['visitother_list'])) {
        ?>
      <?php 
        foreach ($output['visitother_list'] as $k => $v) {
            ?>
      <li>
        <div class="visitor-pic"><span class="thumb size60"><i></i><a href="index.php?act=member_snshome&mid=<?php 
            echo $v['v_ownermid'];
            ?>
" target="_blank"> <img src="<?php 
            echo getMemberAvatarForID($v['v_ownermid']);
            ?>
" data-param="{'id':<?php 
            echo $v['v_ownermid'];
            ?>
}" nctype="mcard" onload="javascript:DrawImage(this,60,60);"> </a></span></div>
        <p class="visitor-name"><a href="index.php?act=member_snshome&mid=<?php 
            echo $v['v_ownermid'];
            ?>
" target="_blank" data-param="{'id':<?php 
            echo $v['v_ownermid'];
            ?>
}" nctype="mcard"><?php 
            echo $v['v_ownermname'];
            ?>
</a></p>
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:31,代码来源:sns_sidebar_visitor.php


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