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


PHP cthumb函数代码示例

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


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

示例1: getMansongRuleListByID

 /**
  * 读取满即送规则列表
  * @param array $mansong_id 查询条件
  * @param int $page 分页数
  * @param string $order 排序
  * @param string $field 所需字段
  * @return array 满即送套餐列表
  *
  */
 public function getMansongRuleListByID($mansong_id)
 {
     $condition = array();
     $condition['mansong_id'] = $mansong_id;
     $mansong_rule_list = $this->where($condition)->order('price desc')->select();
     if (!empty($mansong_rule_list)) {
         $model_goods = Model('goods');
         for ($i = 0, $j = count($mansong_rule_list); $i < $j; $i++) {
             $goods_id = intval($mansong_rule_list[$i]['goods_id']);
             if (!empty($goods_id)) {
                 $goods_info = $model_goods->getGoodsOnlineInfo(array('goods_id' => $goods_id));
                 if (!empty($goods_info)) {
                     if (empty($mansong_rule_list[$i]['mansong_goods_name'])) {
                         $mansong_rule_list[$i]['mansong_goods_name'] = $goods_info['goods_name'];
                     }
                     $mansong_rule_list[$i]['goods_image'] = $goods_info['goods_image'];
                     $mansong_rule_list[$i]['goods_image_url'] = cthumb($goods_info['goods_image'], $goods_info['store_id']);
                     $mansong_rule_list[$i]['goods_storage'] = $goods_info['goods_storage'];
                     $mansong_rule_list[$i]['goods_id'] = $goods_id;
                     $mansong_rule_list[$i]['goods_url'] = urlShop('goods', 'index', array('goods_id' => $goods_id));
                 }
             }
         }
     }
     return $mansong_rule_list;
 }
开发者ID:norain2050,项目名称:xingkang,代码行数:35,代码来源:p_mansong_rule.model.php

示例2: goodImage

/**
 * 取得商品图片
 *
 * @param string $image_name
 * @return string
 */
function goodImage($image_name = '', $store_id = '')
{
    if ($image_name != '') {
        return cthumb($image_name, 240, $store_id);
    }
    return UPLOAD_SITE_URL . '/' . ATTACH_GOODS . '/default_goods_image.gif';
}
开发者ID:norain2050,项目名称:xingkang,代码行数:13,代码来源:search.php

示例3: cart_infoOp

 /**
  * 购物车列表 v3-b12
  */
 public function cart_infoOp()
 {
     $model_cart = Model('cart');
     $condition = array('buyer_id' => $this->member_info['member_id']);
     $cart_info = $model_cart->listCart('db', $condition);
     $sum = 0;
     if (cookie('cart_goods_num') != null) {
         $num = intval(cookie('cart_goods_num'));
     } else {
         //已登录状态,存入数据库,未登录时,优先存入缓存,否则存入COOKIE
         if ($_SESSION['member_id']) {
             $save_type = 'db';
         } else {
             $save_type = 'cookie';
         }
         $num = Model('cart')->getCartNum($save_type, array('buyer_id' => $_SESSION['member_id']));
         //查询购物车商品种类
     }
     foreach ($cart_info as $key => $value) {
         $cart_info[$key]['goods_image_url'] = cthumb($value['goods_image'], $value['store_id']);
         $cart_info[$key]['goods_sum'] = ncPriceFormat($value['goods_price'] * $value['goods_num']);
         $sum += $cart_info[$key]['goods_sum'];
     }
     output_data(array('num' => $num, 'sum' => ncPriceFormat($sum)));
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:28,代码来源:member_cart.php

示例4: getBuyStepData

 /**
  * 得到虚拟商品购买数据(商品、店铺、会员)
  * @param int $goods_id 商品ID
  * @param int $quantity 购买数量
  * @param int $member_id 会员ID
  * @return array
  */
 public function getBuyStepData($goods_id, $quantity, $member_id)
 {
     $goods_info = Model('goods')->getVirtualGoodsOnlineInfoByID($goods_id);
     if (empty($goods_info)) {
         return callback(false, '该商品不符合购买条件,可能的原因有:下架、不存在、过期等');
     }
     if ($goods_info['virtual_limit'] > $goods_info['goods_storage']) {
         $goods_info['virtual_limit'] = $goods_info['goods_storage'];
     }
     //取得抢购信息
     $goods_info = $this->_getGroupbuyInfo($goods_info);
     $quantity = abs(intval($quantity));
     $quantity = $quantity == 0 ? 1 : $quantity;
     $quantity = $quantity > $goods_info['virtual_limit'] ? $goods_info['virtual_limit'] : $quantity;
     if ($quantity > $goods_info['goods_storage']) {
         return callback(false, '该商品库存不足');
     }
     $goods_info['quantity'] = $quantity;
     $goods_info['goods_total'] = ncPriceFormat($goods_info['goods_price'] * $goods_info['quantity']);
     $goods_info['goods_image_url'] = cthumb($goods_info['goods_image'], 240, $goods_info['store_id']);
     $return = array();
     $return['goods_info'] = $goods_info;
     $return['store_info'] = Model('store')->getStoreOnlineInfoByID($goods_info['store_id'], 'store_name,store_id,member_id');
     $return['member_info'] = Model('member')->getMemberInfoByID($member_id);
     //        $model_payment = Model('payment');
     //        $pd_payment_info = Model('payment')->getPaymentOpenInfo(array('payment_code'=>'predeposit'));
     //        if (empty($pd_payment_info)) {
     //            $return['member_info']['available_predeposit'] = 0;
     //            $return['member_info']['available_rc_balance'] = 0;
     //        }
     return callback(true, '', $return);
 }
开发者ID:noikiy,项目名称:cunkou,代码行数:39,代码来源:buy_virtual.logic.php

示例5: cart_item_listOp

 /**
  * 购物车列表
  */
 public function cart_item_listOp()
 {
     $model_cart = Model('cart');
     $condition = array('buyer_id' => $this->member_info['member_id']);
     $cart_list = $model_cart->listCart('db', $condition);
     $model_mansong = Model('p_mansong');
     $model_voucher = Model('voucher');
     $model_store = Model('store');
     $sum = 0;
     foreach ($cart_list as $key => $value) {
         $cart_list[$key]['goods_image_url'] = cthumb($value['goods_image'], $value['store_id']);
         $cart_list[$key]['goods_sum'] = ncPriceFormat($value['goods_price'] * $value['goods_num']);
         $cart_list[$key]['goods_num'] = $value['goods_num'];
         $cart_list[$key]['p_mansong'] = $value['goods_num'];
         $sum += $cart_list[$key]['goods_sum'];
     }
     $newarray = array();
     foreach ($cart_list as $key => $value) {
         $newarray[$value['store_id']] = $model_store->getStoreInfoByID($value['store_id']);
     }
     foreach ($cart_list as $key => $value) {
         $newarray[$value['store_id']]['cart_item_list'][] = $cart_list[$key];
         $newarray[$value['store_id']]['mansong_info'] = $model_mansong->getMansongInfoByStoreID($value['store_id']);
         $_condition['voucher_store_id'] = $value['store_id'];
         $newarray[$value['store_id']]['store_voucher_list'] = $model_voucher->getCurrentAvailableVoucher($_condition);
     }
     $newarray2 = array_values($newarray);
     output_data(array('cart_list' => $newarray2, 'sum' => ncPriceFormat($sum)));
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:32,代码来源:member_cart.php

示例6: image_uploadOp

 /**
  * ajax上传图片
  */
 public function image_uploadOp()
 {
     // 判断图片数量是否超限
     $model_album = Model('album');
     $album_limit = $this->store_grade['sg_album_limit'];
     if ($album_limit > 0) {
         $album_count = $model_album->getCount(array('store_id' => 0));
         if ($album_count >= $album_limit) {
             $error = L('store_goods_album_climit');
             if (strtoupper(CHARSET) == 'GBK') {
                 $error = Language::getUTF8($error);
             }
             exit(json_encode(array('error' => $error)));
         }
     }
     // $class_info = $model_album->getOne(array('store_id' => 0, 'is_default' => 1), 'album_class');
     // 上传图片
     $upload = new UploadFile();
     $upload->set('default_dir', ATTACH_GOODS . DS . '0' . DS . $upload->getSysSetPath());
     $upload->set('max_size', C('image_max_filesize'));
     $upload->set('thumb_width', GOODS_IMAGES_WIDTH);
     $upload->set('thumb_height', GOODS_IMAGES_HEIGHT);
     $upload->set('thumb_ext', GOODS_IMAGES_EXT);
     $upload->set('fprefix', '0');
     $upload->set('allow_type', array('gif', 'jpg', 'jpeg', 'png'));
     $result = $upload->upfile($_POST['id']);
     if (!$result) {
         if (strtoupper(CHARSET) == 'GBK') {
             $upload->error = Language::getUTF8($upload->error);
         }
         $output = array();
         $output['error'] = $upload->error;
         $output = json_encode($output);
         exit($output);
     }
     $img_path = $upload->getSysSetPath() . $upload->file_name;
     $thumb_page = $upload->getSysSetPath() . $upload->thumb_image;
     // 取得图像大小
     list($width, $height, $type, $attr) = getimagesize(UPLOAD_SITE_URL . '/' . ATTACH_GOODS . '/' . '0' . DS . $img_path);
     // 存入相册
     $image = explode('.', $_FILES[$_POST['id']]["name"]);
     $insert_array = array();
     $insert_array['apic_name'] = $image['0'];
     $insert_array['apic_tag'] = '';
     $insert_array['aclass_id'] = 0;
     $insert_array['apic_cover'] = $img_path;
     $insert_array['apic_size'] = intval($_FILES[$_POST['id']]['size']);
     $insert_array['apic_spec'] = $width . 'x' . $height;
     $insert_array['upload_time'] = TIMESTAMP;
     $insert_array['store_id'] = '0';
     $model_album->addPic($insert_array);
     $data = array();
     $data['image'] = cthumb($img_path, 240, '0');
     $data['filename'] = $img_path;
     // 整理为json格式
     $output = json_encode($data);
     echo $output;
     exit;
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:62,代码来源:upload.php

示例7: indexOp

 public function indexOp()
 {
     $model_xianshi_goods = Model('p_xianshi_goods');
     $model_goods = Model('goods');
     $condition = array();
     $condition['state'] = 1;
     $condition['start_time'] = array('elt', TIMESTAMP);
     $condition['end_time'] = array('gt', TIMESTAMP);
     if ($_GET['gc_id']) {
         $condition['gc_id_1'] = intval($_GET['gc_id']);
     }
     $goods_list = $model_xianshi_goods->getXianshiGoodsExtendList($condition, self::PAGESIZE, 'xianshi_goods_id desc');
     $total_page = pagecmd('gettotalpage');
     if (intval($_GET['curpage'] > $total_page)) {
         exit;
     }
     $xs_goods_list = array();
     foreach ($goods_list as $k => $goods_info) {
         $xs_goods_list[$goods_info['goods_id']] = $goods_info;
         $xs_goods_list[$goods_info['goods_id']]['image_url_240'] = cthumb($goods_info['goods_image'], 240, $goods_info['store_id']);
         $xs_goods_list[$goods_info['goods_id']]['down_price'] = $goods_info['goods_price'] - $goods_info['xianshi_price'];
     }
     $condition = array('goods_id' => array('in', array_keys($xs_goods_list)));
     $goods_list = $model_goods->getGoodsOnlineList($condition, 'goods_id,gc_id_1,evaluation_good_star,store_id,store_name', 0, '', self::PAGESIZE, null, false);
     foreach ($goods_list as $k => $goods_info) {
         $xs_goods_list[$goods_info['goods_id']]['evaluation_good_star'] = $goods_info['evaluation_good_star'];
         $xs_goods_list[$goods_info['goods_id']]['store_name'] = $goods_info['store_name'];
         if ($xs_goods_list[$goods_info['goods_id']]['gc_id_1'] != $goods_info['gc_id_1']) {
             //兼容以前版本,如果限时商品表没有保存一级分类ID,则马上保存
             $model_xianshi_goods->editXianshiGoods(array('gc_id_1' => $goods_info['gc_id_1']), array('xianshi_goods_id' => $xs_goods_list[$goods_info['goods_id']]['xianshi_goods_id']));
         }
     }
     //查询商品评分信息
     $goodsevallist = Model("evaluate_goods")->getEvaluateGoodsList(array('geval_goodsid' => array('in', array_keys($xs_goods_list))));
     $eval_list = array();
     if (!empty($goodsevallist)) {
         foreach ($goodsevallist as $v) {
             if ($v['geval_content'] == '' || count($eval_list[$v['geval_goodsid']]) >= 2) {
                 continue;
             }
             $eval_list[$v['geval_goodsid']][] = $v;
         }
     }
     Tpl::output('goodsevallist', $eval_list);
     Tpl::output('goods_list', $xs_goods_list);
     if (!empty($_GET['curpage'])) {
         Tpl::showpage('promotion.item', 'null_layout');
     } else {
         //导航
         $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => SHOP_SITE_URL), 1 => array('title' => '限时折扣'));
         Tpl::output('nav_link_list', $nav_link);
         //查询商品分类
         $goods_class = Model('goods_class')->getGoodsClassListByParentId(0);
         Tpl::output('goods_class', $goods_class);
         Tpl::output('total_page', pagecmd('gettotalpage'));
         Tpl::showpage('promotion');
     }
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:58,代码来源:promotion.php

示例8: cart_listOp

 /**
  * 购物车列表
  */
 public function cart_listOp()
 {
     $model_cart = Model('cart');
     $logic_buy_1 = logic('buy_1');
     $del_ids = $_POST['del_ids'];
     //购物车列表
     $cart_list = $model_cart->listCart('db', array('buyer_id' => $this->member_info['member_id']));
     // 购物车列表 [得到最新商品属性及促销信息]
     $cart_list = $logic_buy_1->getGoodsCartList($cart_list, $jjgObj, true);
     //购物车商品以店铺ID分组显示,并计算商品小计,店铺小计与总价由JS计算得出
     $store_cart_list = array();
     $total_price = 0;
     $total_save = 0;
     foreach ($cart_list as $cart) {
         $cart['goods_image_url'] = cthumb($cart['goods_image'], $cart['store_id']);
         $cart['goods_total'] = $cart['goods_price'] * $cart['goods_num'];
         if (in_array($cart['cart_id'], $del_ids)) {
             $cart['is_selected'] = 0;
         } else {
             $cart['is_selected'] = 1;
             $total_price += $cart['goods_total'];
             $total_save += ($cart['goods_marketprice'] - $cart['goods_price']) * $cart['goods_num'];
             $store_cart_list[$cart['store_id']]['cart_count'] += $cart['goods_num'];
             $store_cart_list[$cart['store_id']]['cart_price'] += $cart['goods_total'];
         }
         $store_cart_list[$cart['store_id']]['store_id'] = $cart['store_id'];
         $store_cart_list[$cart['store_id']]['store_name'] = $cart['store_name'];
         $store_cart_list[$cart['store_id']]['cart_list'][] = $cart;
     }
     // 店铺优惠券
     //        $condition = array();
     //        $condition['voucher_t_gettype'] = 3;
     //        $condition['voucher_t_state'] = 1;
     //        $condition['voucher_t_end_date'] = array('gt', time());
     //        $condition['voucher_t_mgradelimit'] = array('elt', $this->member_info['level']);
     //        $condition['voucher_t_store_id'] = array('in', array_keys($store_cart_list));
     //        $voucher_template = Model('voucher')->getVoucherTemplateList($condition);
     //        $voucher_template = array_under_reset($voucher_template, 'voucher_t_store_id', 2);
     //        Tpl::output('voucher_template', $voucher_template);
     //取得店铺级活动 - 可用的满即送活动
     $mansong_rule_list = $logic_buy_1->getMansongRuleList(array_keys($store_cart_list));
     //取得哪些店铺有满免运费活动
     $free_freight_list = $logic_buy_1->getFreeFreightActiveList(array_keys($store_cart_list));
     $is_selected = 1;
     foreach ($store_cart_list as $k => $v) {
         $store_cart_list[$k]['mansong'] = $mansong_rule_list[$k]['desc'];
         $store_cart_list[$k]['free_freight'] = $free_freight_list[$k];
         $store_cart_list[$k]['is_selected'] = 1;
         foreach ($v['cart_list'] as $kk => $vv) {
             if ($vv['is_selected'] == 0) {
                 $store_cart_list[$k]['is_selected'] = 0;
                 $is_selected = 0;
             }
         }
     }
     output_data(array('store_cart_list' => $store_cart_list, 'total_price' => $total_price, 'total_save' => $total_save, 'is_selected' => $is_selected));
 }
开发者ID:sdjncjc,项目名称:meizhan,代码行数:60,代码来源:mz_member_cart.php

示例9: order_listOp

 /**
  * 订单列表
  */
 public function order_listOp()
 {
     $model_order = Model('order');
     $condition = array();
     $condition['buyer_id'] = $this->member_info['member_id'];
     $order_list_array = $model_order->getNormalOrderList($condition, $this->page, '*', 'order_id desc', '', array('order_goods'));
     $order_group_list = array();
     $order_pay_sn_array = array();
     foreach ($order_list_array as $value) {
         //显示取消订单
         $value['if_cancel'] = $model_order->getOrderOperateState('buyer_cancel', $value);
         //显示收货
         $value['if_receive'] = $model_order->getOrderOperateState('receive', $value);
         //显示锁定中
         $value['if_lock'] = $model_order->getOrderOperateState('lock', $value);
         //显示物流跟踪
         $value['if_deliver'] = $model_order->getOrderOperateState('deliver', $value);
         //商品图
         foreach ($value['extend_order_goods'] as $k => $goods_info) {
             $value['extend_order_goods'][$k]['goods_image_url'] = cthumb($goods_info['goods_image'], 240, $value['store_id']);
         }
         $order_group_list[$value['pay_sn']]['order_list'][] = $value;
         //如果有在线支付且未付款的订单则显示合并付款链接
         if ($value['order_state'] == ORDER_STATE_NEW) {
             $order_group_list[$value['pay_sn']]['pay_amount'] += $value['order_amount'] - $value['rcb_amount'] - $value['pd_amount'];
         }
         $order_group_list[$value['pay_sn']]['add_time'] = $value['add_time'];
         //记录一下pay_sn,后面需要查询支付单表
         $order_pay_sn_array[] = $value['pay_sn'];
     }
     $new_order_group_list = array();
     foreach ($order_group_list as $key => $value) {
         $value['pay_sn'] = strval($key);
         $new_order_group_list[] = $value;
     }
     $page_count = $model_order->gettotalpage();
     $array_data = array('order_group_list' => $new_order_group_list);
     if (isset($_GET['getpayment']) && $_GET['getpayment'] == "true") {
         $model_mb_payment = Model('mb_payment');
         $payment_list = $model_mb_payment->getMbPaymentOpenList();
         //print_r($payment_list);
         $payment_array = array();
         if (!empty($payment_list)) {
             foreach ($payment_list as $value) {
                 $payment_array[] = array('payment_code' => $value['payment_code'], 'payment_name' => $value['payment_name']);
             }
         }
         $array_data['payment_list'] = $payment_array;
     }
     //output_data(array('order_group_list' => $array_data), mobile_page($page_count));
     output_data($array_data, mobile_page($page_count));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:55,代码来源:member_order.php

示例10: cart_listOp

 /**
  * 购物车列表
  */
 public function cart_listOp()
 {
     $model_cart = Model('cart');
     $condition = array('buyer_id' => $this->member_info['member_id']);
     $cart_list = $model_cart->listCart('db', $condition);
     $sum = 0;
     foreach ($cart_list as $key => $value) {
         $cart_list[$key]['goods_image_url'] = cthumb($value['goods_image'], $value['store_id']);
         $cart_list[$key]['goods_sum'] = ncPriceFormat($value['goods_price'] * $value['goods_num']);
         $sum += $cart_list[$key]['goods_sum'];
     }
     output_data(array('cart_list' => $cart_list, 'sum' => ncPriceFormat($sum)));
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:16,代码来源:member_cart.php

示例11: indexOp

 /**
  * 发货列表
  *
  */
 public function indexOp()
 {
     $model_order = Model('order');
     if (!in_array($_GET['state'], array('deliverno', 'delivering', 'delivered'))) {
         $_GET['state'] = 'deliverno';
     }
     $order_state = str_replace(array('deliverno', 'delivering', 'delivered'), array(ORDER_STATE_PAY, ORDER_STATE_SEND, ORDER_STATE_SUCCESS), $_GET['state']);
     $condition = array();
     $condition['store_id'] = $_SESSION['store_id'];
     $condition['order_state'] = $order_state;
     if ($_GET['buyer_name'] != '') {
         $condition['buyer_name'] = $_GET['buyer_name'];
     }
     if ($_GET['order_sn'] != '') {
         $condition['order_sn'] = $_GET['order_sn'];
     }
     $if_start_date = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_start_date']);
     $if_end_date = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_end_date']);
     $start_unixtime = $if_start_date ? strtotime($_GET['query_start_date']) : null;
     $end_unixtime = $if_end_date ? strtotime($_GET['query_end_date']) : null;
     if ($start_unixtime || $end_unixtime) {
         $condition['add_time'] = array('time', array($start_unixtime, $end_unixtime));
     }
     $order_list = $model_order->getOrderList($condition, 5, '*', 'order_id desc', '', array('order_goods', 'order_common', 'member'));
     foreach ($order_list as $key => $order_info) {
         foreach ($order_info['extend_order_goods'] as $value) {
             $value['image_60_url'] = cthumb($value['goods_image'], 60, $value['store_id']);
             $value['image_240_url'] = cthumb($value['goods_image'], 240, $value['store_id']);
             $value['goods_type_cn'] = orderGoodsType($value['goods_type']);
             $value['goods_url'] = urlShop('goods', 'index', array('goods_id' => $value['goods_id']));
             if ($value['goods_type'] == 5) {
                 $order_info['zengpin_list'][] = $value;
             } else {
                 $order_info['goods_list'][] = $value;
             }
         }
         if (empty($order_info['zengpin_list'])) {
             $order_info['goods_count'] = count($order_info['goods_list']);
         } else {
             $order_info['goods_count'] = count($order_info['goods_list']) + 1;
         }
         $order_list[$key] = $order_info;
     }
     Tpl::output('order_list', $order_list);
     Tpl::output('show_page', $model_order->showpage());
     self::profile_menu('deliver', $_GET['state']);
     Tpl::showpage('store_order.deliver');
 }
开发者ID:uwitec,项目名称:xbshop,代码行数:52,代码来源:store_deliver.php

示例12: order_listOp

 /**
  * 订单列表
  */
 public function order_listOp()
 {
     $model_vr_order = Model('vr_order');
     $condition = array();
     $condition['buyer_id'] = $this->member_info['member_id'];
     $order_list = $model_vr_order->getOrderList($condition, $this->page, '*', 'order_id desc');
     foreach ($order_list as $key => $order) {
         //显示取消订单
         $order_list[$key]['if_cancel'] = $model_vr_order->getOrderOperateState('buyer_cancel', $order);
         //显示支付
         $order_list[$key]['if_pay'] = $model_vr_order->getOrderOperateState('payment', $order);
         $order_list[$key]['goods_image_url'] = cthumb($order['goods_image'], 240, $order['store_id']);
     }
     $page_count = $model_vr_order->gettotalpage();
     output_data(array('order_list' => $order_list), mobile_page($page_count));
 }
开发者ID:qqq232575,项目名称:shopx,代码行数:19,代码来源:member_vr_order.php

示例13: favorites_listOp

 /**
  * 收藏列表
  */
 public function favorites_listOp()
 {
     $model_favorites = Model('favorites');
     $favorites_list = $model_favorites->getGoodsFavoritesList(array('member_id' => $this->member_info['member_id']), '*', $this->page);
     $page_count = $model_favorites->gettotalpage();
     $favorites_id = '';
     foreach ($favorites_list as $value) {
         $favorites_id .= $value['fav_id'] . ',';
     }
     $favorites_id = rtrim($favorites_id, ',');
     $model_goods = Model('goods');
     $field = 'goods_id,goods_name,goods_price,goods_image,store_id';
     $goods_list = $model_goods->getGoodsList(array('goods_id' => array('in', $favorites_id)), $field);
     foreach ($goods_list as $key => $value) {
         $goods_list[$key]['fav_id'] = $value['goods_id'];
         $goods_list[$key]['goods_image_url'] = cthumb($value['goods_image'], 240, $value['store_id']);
     }
     output_data(array('favorites_list' => $goods_list), mobile_page($page_count));
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:22,代码来源:member_favorites.php

示例14: work_favorites_listOp

 /**
  * 收藏列表
  */
 public function work_favorites_listOp()
 {
     $model_favorites = Model('favorites');
     $favorites_list = $model_favorites->getWorkFavoritesList(array('member_id' => $this->member_info['member_id']), '*', $this->page);
     $page_count = $model_favorites->gettotalpage();
     $favorites_id = '';
     foreach ($favorites_list as $value) {
         $favorites_id .= $value['fav_id'] . ',';
     }
     $favorites_id = rtrim($favorites_id, ',');
     $model_work = Model('designer_work');
     $field = '*';
     $work_list = $model_work->getDesignerWorkList(array('id' => array('in', $favorites_id)), $field);
     foreach ($work_list as $key => $value) {
         $work_list[$key]['fav_id'] = $value['id'];
         $work_list[$key]['work_image_url'] = cthumb($value['sn_work_pic'], 240, $value['store_id']);
     }
     output_data(array('favorites_list' => $work_list), mobile_page($page_count));
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:22,代码来源:decoration_social.php

示例15: bundling_listOp

 /**
  * 发布的活动列表
  */
 public function bundling_listOp()
 {
     $model = Model();
     // 检查是否已购买套餐
     $bundling_quota = $this->bundlingQuotaCheck();
     Tpl::output('bundling_quota_flag', $bundling_quota);
     if ($bundling_quota) {
         // 计算已经发布活动、剩余活动数量
         $count = $model->table('p_bundling')->where('store_id=' . $_SESSION['store_id'])->count();
         $bundling_published = intval($count);
         $bundling_surplus = intval(C('promotion_bundling_sum')) - $bundling_published;
         // 查询活动
         $where = 'store_id=' . $_SESSION['store_id'];
         // 查询条件。
         if ($_GET['bundling_name'] != '') {
             $where .= ' and bl_name like "%' . trim($_GET['bundling_name']) . '%"';
             Tpl::output('bundling_name', trim($_GET['bundling_name']));
         }
         if (is_numeric($_GET['state'])) {
             $where .= ' and bl_state =' . $_GET['state'];
             Tpl::output('state', $_GET['state']);
         }
         $bundling_count = $model->table('p_bundling')->where($where)->count();
         $bundling_list = $model->table('p_bundling,p_bundling_goods')->field('count(p_bundling_goods.bl_id) as count,p_bundling.*')->join('left')->on('p_bundling.bl_id=p_bundling_goods.bl_id')->group('bl_id')->where($where)->order('p_bundling.bl_id desc')->page(10, $bundling_count)->select();
         if (is_array($bundling_list)) {
             foreach ($bundling_list as $key => $val) {
                 $a = explode(',', $val['bl_img_more']);
                 $bundling_list[$key]['img'] = cthumb($a[0], 'tiny', $_SESSION['store_id']);
             }
         }
         $page = $model->showpage(2);
         Tpl::output('show_page', $page);
         Tpl::output('list', $bundling_list);
         Tpl::output('bundling_quota', $bundling_quota);
         Tpl::output('bundling_published', $bundling_published);
         Tpl::output('bundling_surplus', $bundling_surplus);
         $this->bundlingState();
     }
     $this->profile_menu('bundling_list', 'bundling_list');
     Tpl::showpage('store_promotion_bundling.list');
 }
开发者ID:dw250100785,项目名称:shopnc,代码行数:44,代码来源:store_promotion_bundling.php


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