本文整理汇总了PHP中getMemberAvatarForID函数的典型用法代码示例。如果您正苦于以下问题:PHP getMemberAvatarForID函数的具体用法?PHP getMemberAvatarForID怎么用?PHP getMemberAvatarForID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMemberAvatarForID函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: user_trade_listOp
/**
* GET 用户的交易
*/
public function user_trade_listOp()
{
if (!isset($_GET['uid'])) {
output_error("缺少用户id参数");
die;
}
//TODO 查找uid是否存在,不存在则输出错误信息
$member_id = $_GET['uid'];
$where2 = $this->where + array('member_id' => $member_id);
$m_trade = Model('utrade');
$trade_list = $m_trade->field($this->fields)->where($where2)->order('goods_id desc')->page($this->page)->select();
$pageCount = $m_trade->gettotalpage();
if (is_array($trade_list) and !empty($trade_list)) {
foreach ($trade_list as $key => $val) {
$trade_list[$key]['member_avatar'] = getMemberAvatarForID($trade_list[$key]['member_id']);
$trade_list[$key]['fav_status'] = 0;
$trade_list[$key]['goods_image'] = $trade_list[$key]['goods_image'] == '' ? '' : UPLOAD_SITE_URL . '/' . ATTACH_MALBUM . '/' . $trade_list[$key]['member_id'] . '/' . str_replace('_1024', '_240', $val['goods_image']);
}
}
output_data(array('trades' => $trade_list), mobile_page($pageCount));
}
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:24,代码来源:trade.php
示例17: indexOp
/**
* AJAX for membership information
*/
public function indexOp()
{
$ownid = $_SESSION['member_id'];
$uid = intval($_GET['uid']);
$model = Model();
$member_info = $model->table('member')->field('member_id, member_name, member_truename, member_sex, member_email, member_qq, member_ww, member_areainfo, member_birthday, member_privacy')->find($uid);
if (empty($member_info)) {
echo 'false';
exit;
}
if ($member_info['member_privacy'] != '') {
$member_info['member_privacy'] = unserialize($member_info['member_privacy']);
}
if ($ownid == $uid) {
$followed = 2;
} else {
// Whether to pay attention to yourself(own)
$followed = 0;
// 0 stranger, 1 friend, 2 own
$where = array();
$where['friend_frommid'] = $uid;
$where['friend_tomid'] = $ownid;
$friend_info = $model->table('sns_friend')->where($where)->find();
if (!empty($friend_info)) {
$followed = 1;
}
}
$data = array();
$data['id'] = $member_info['member_id'];
$data['name'] = $member_info['member_name'];
$data['avatar'] = getMemberAvatarForID($member_info['member_id']);
$data['truename'] = $followed >= intval($member_info['member_privacy']['truename']) ? $member_info['member_truename'] : '';
$data['sex'] = $followed >= intval($member_info['member_privacy']['sex']) ? $member_info['member_sex'] : 3;
$data['email'] = $followed >= intval($member_info['member_privacy']['email']) ? $member_info['member_email'] : L('home_member_privary');
$data['qq'] = $followed >= intval($member_info['member_privacy']['qq']) ? $member_info['member_qq'] : '';
$data['ww'] = $followed >= intval($member_info['member_privacy']['ww']) ? $member_info['member_ww'] : '';
$data['areainfo'] = $followed >= intval($member_info['member_privacy']['area']) ? $member_info['member_areainfo'] : L('home_member_privary');
$data['birthday'] = $followed >= intval($member_info['member_privacy']['birthday']) ? $member_info['member_birthday'] : L('home_member_privary');
switch ($_GET['from']) {
case 'shop':
$data['url'] = SHOP_SITE_URL;
break;
case 'cms':
$data['url'] = CMS_SITE_URL;
break;
case 'circle':
$data['url'] = CIRCLE_SITE_URL;
break;
case 'microshop':
$data['url'] = MICROSHOP_SITE_URL;
break;
default:
$data['url'] = '';
break;
}
if ($ownid == $uid) {
$data['follow'] = 2;
// 0 stranger, 1 friend, 2 own
} else {
// Whether to pay attention to me
$where = array();
$where['friend_frommid'] = $ownid;
$where['friend_tomid'] = $uid;
$friend_info = $model->table('sns_friend')->where($where)->find();
$data['follow'] = !empty($friend_info) ? 1 : 0;
}
// Pay attention to the number of
$data['attention_count'] = $model->table('sns_friend')->where(array('friend_frommid' => $uid))->count();
// Number of fans
$data['fans_count'] = $model->table('sns_friend')->where(array('friend_tomid' => $uid))->count();
echo $_GET['callback'] . '(' . json_encode($data) . ')';
//Tpl::output('data', $data);
//Tpl::showpage('member_card','null_layout');
}
开发者ID:Maplecms,项目名称:shopnc-yhmall,代码行数:77,代码来源:member_card.php
示例18: userAnswersOp
/**
* 用户的回帖
*/
public function userAnswersOp()
{
// 回复列表
$where = array();
$types = array(5, 6);
$model = new Model();
$m_reply = $model->table('circle_threply');
$where['circle_threply.member_id'] = $this->member_id;
$where['circle_theme.thclass_id'] = array('not in', $types);
$reply_info = $model->table('circle_threply,circle_theme')->join('right join')->on('circle_threply.theme_id=circle_theme.theme_id')->where($where)->page($this->page)->order('reply_addtime desc')->select();
$pageCount = $m_reply->gettotalpage();
if (!empty($reply_info)) {
foreach ($reply_info as $key => $val) {
$reply_info[$key]['member_avatar'] = getMemberAvatarForID($reply_info[$key]['member_id']);
}
}
output_data(array('answers' => $reply_info), mobile_page($pageCount));
}
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:21,代码来源:user_center.php
示例19: 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('商品不存在');
}
//推荐商品
$model_store = Model('store');
$hot_sales = $model_store->getHotSalesList($goods_detail['goods_info']['store_id'], 6);
$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_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'];
//显示QQ及旺旺 好商城V3
$goods_detail['store_info']['store_qq'] = $store_info['store_qq'];
$goods_detail['store_info']['store_ww'] = $store_info['store_ww'];
$goods_detail['store_info']['store_phone'] = $store_info['store_phone'];
$goods_detail['store_info']['member_name'] = $store_info['member_name'];
$goods_detail['store_info']['avatar'] = getMemberAvatarForID($store_info['member_id']);
//店铺信誉 v3-b12
$model_store = Model('store');
$store_info = $model_store->getStoreInfoByID($store_info['store_id']);
$model_evaluate_store = Model('evaluate_store');
$store_evaluate_info = $model_evaluate_store->getEvaluateStoreInfoByStoreID($store_info['store_id'], $goods_detail['goods_info']['gc_id']);
$goods_detail['store_info']['store_credit'] = $store_evaluate_info['store_credit'];
$goods_detail['store_info']['store_qq'] = $store_info['store_qq'];
//评价处理 v3-b12
$goods_evaluate_info = Model('evaluate_goods')->getEvaluateGoodsInfoByGoodsID($goods_id);
$goods_detail['store_info']['good_percent'] = $goods_evaluate_info['good_percent'];
$goods_detail['store_info']['all'] = $goods_evaluate_info['all'];
//商品详细信息处理
$goods_detail = $this->_goods_detail_extend($goods_detail);
//v3-b11 抢购商品是否开始
$goods_info = $goods_detail['goods_info'];
//print_r($goods_info);
$IsHaveBuy = 0;
if (!empty($_COOKIE['username'])) {
$model_member = Model('member');
$member_info = $model_member->getMemberInfo(array('member_name' => $_COOKIE['username']));
$buyer_id = $member_info['member_id'];
$promotion_type = $goods_info["promotion_type"];
if ($promotion_type == 'groupbuy') {
//检测是否限购数量
$upper_limit = $goods_info["upper_limit"];
if ($upper_limit > 0) {
//查询些会员的订单中,是否已买过了
$model_order = Model('order');
//取商品列表
$order_goods_list = $model_order->getOrderGoodsList(array('goods_id' => $goods_id, 'buyer_id' => $buyer_id, 'goods_type' => 2));
if ($order_goods_list) {
//取得上次购买的活动编号(防一个商品参加多次团购活动的问题)
$promotions_id = $order_goods_list[0]["promotions_id"];
//用此编号取数据,检测是否这次活动的订单商品。
$model_groupbuy = Model('groupbuy');
$groupbuy_info = $model_groupbuy->getGroupbuyInfo(array('groupbuy_id' => $promotions_id));
if ($groupbuy_info) {
$IsHaveBuy = 1;
} else {
$IsHaveBuy = 0;
}
}
}
}
}
$goods_detail['IsHaveBuy'] = $IsHaveBuy;
//v3-b11 end
output_data($goods_detail);
}
开发者ID:1290800466,项目名称:mac_win,代码行数:84,代码来源:goods.php
示例20: foreach
}
?>
</span>
<span class="fright"><?php
echo $output['goods_info']['evaluation_count'];
?>
人综合评价</span>
</div>
<?php
if (!empty($outpu
|
请发表评论