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


PHP pagecmd函数代码示例

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


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

示例1: 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

示例2: buildSelectSql

 public function buildSelectSql($options = array())
 {
     if (is_numeric($options['page'])) {
         $page = pagecmd("obj");
         if ($options['limit'] !== 1) {
             $options['limit'] = $page->getLimitStart() . "," . $page->getEachNum();
         }
     }
     $sql = $this->parseSql($this->selectSql, $options);
     return $sql;
 }
开发者ID:my1977,项目名称:shopnc,代码行数:11,代码来源:db.php

示例3: goods_listOp

    /**
     * 商品列表
     */
    public function goods_listOp() {
        $model_goods = Model('goods');
        $model_search = Model('search');

        //查询条件
        $condition = array();
        if(!empty($_GET['gc_id']) && intval($_GET['gc_id']) > 0) {
            $condition['gc_id'] = $_GET['gc_id'];
        } elseif (!empty($_GET['keyword'])) {
            $condition['goods_name|goods_jingle'] = array('like', '%' . $_GET['keyword'] . '%');
        }

        //所需字段
        $fieldstr = "goods_id,goods_commonid,store_id,goods_name,goods_price,goods_marketprice,goods_image,goods_salenum,evaluation_good_star,evaluation_count";

        // 添加3个状态字段
        $fieldstr .= ',is_virtual,is_presell,is_fcode,have_gift';

        //排序方式
        $order = $this->_goods_list_order($_GET['key'], $_GET['order']);

        //优先从全文索引库里查找
        list($indexer_ids,$indexer_count) = $model_search->indexerSearch($_GET,$this->page);
        if (is_array($indexer_ids)) {
            //商品主键搜索
            $goods_list = $model_goods->getGoodsOnlineList(array('goods_id'=>array('in',$indexer_ids)), $fieldstr, 0, $order, $this->page, null, false);

            //如果有商品下架等情况,则删除下架商品的搜索索引信息
            if (count($goods_list) != count($indexer_ids)) {
                $model_search->delInvalidGoods($goods_list, $indexer_ids);
            }
            pagecmd('setEachNum',$this->page);
            pagecmd('setTotalNum',$indexer_count);
        } else {
            $goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fieldstr, $order, $this->page);
        }
        $page_count = $model_goods->gettotalpage();

        //处理商品列表(抢购、限时折扣、商品图片)
        $goods_list = $this->_goods_list_extend($goods_list);

        output_data(array('goods_list' => $goods_list), mobile_page($page_count));
    }
开发者ID:noikiy,项目名称:ejia,代码行数:46,代码来源:goods.php

示例4: goods_listOp

 /**
  * 商品列表
  */
 public function goods_listOp()
 {
     $model_goods = Model('goods');
     $model_search = Model('search');
     $_GET['is_book'] = 0;
     //查询条件
     $condition = array();
     // ==== 暂时不显示定金预售商品,手机端未做。  ====
     $condition['is_book'] = 0;
     // ==== 暂时不显示定金预售商品,手机端未做。  ====
     if (!empty($_GET['gc_id']) && intval($_GET['gc_id']) > 0) {
         $condition['gc_id'] = $_GET['gc_id'];
     } elseif (!empty($_GET['keyword'])) {
         $condition['goods_name|goods_jingle'] = array('like', '%' . $_GET['keyword'] . '%');
     } elseif (!empty($_GET['barcode'])) {
         $condition['goods_barcode'] = $_GET['barcode'];
     } elseif (!empty($_GET['b_id']) && intval($_GET['b_id'] > 0)) {
         $condition['brand_id'] = intval($_GET['b_id']);
     }
     //所需字段
     $fieldstr = "goods_id,goods_commonid,store_id,goods_name,goods_price,goods_promotion_price,goods_promotion_type,goods_marketprice,goods_image,goods_salenum,evaluation_good_star,evaluation_count";
     // 添加3个状态字段
     $fieldstr .= ',is_virtual,is_presell,is_fcode,have_gift';
     //排序方式
     $order = $this->_goods_list_order($_GET['key'], $_GET['order']);
     //优先从全文索引库里查找
     list($goods_list, $indexer_count) = $model_search->indexerSearch($_GET, $this->page);
     if (!is_null($goods_list)) {
         $goods_list = array_values($goods_list);
         pagecmd('setEachNum', $this->page);
         pagecmd('setTotalNum', $indexer_count);
     } else {
         $goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fieldstr, $order, $this->page);
     }
     $page_count = $model_goods->gettotalpage();
     //处理商品列表(团购、限时折扣、商品图片)
     $goods_list = $this->_goods_list_extend($goods_list);
     output_data(array('goods_list' => $goods_list), mobile_page($page_count));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:42,代码来源:goods.php

示例5: followingOp

 /**
  * GET 用户所有关注人
  */
 public function followingOp()
 {
     $friend_model = Model('sns_friend');
     //关注列表
     $page = new Page();
     pagecmd('setEachNum', $this->page);
     $field = 'member_id,member_name,member_avatar,member_sex,friend_followstate';
     $follow_list = $friend_model->listFriend(array('friend_frommid' => $this->member_id), $field, $page, 'detail');
     if (!empty($follow_list)) {
         foreach ($follow_list as $k => $v) {
             $v['member_avatar'] = getMemberAvatar($v['member_avatar']);
             $v['sex_class'] = $this->m_sex($v['member_sex']);
             $follow_list[$k] = $v;
         }
     }
     $pageCount = pagecmd('gettotalpage', $this->page);
     output_data(array('followings' => $follow_list), mobile_page($pageCount));
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:21,代码来源:user_center.php

示例6: album_picOp

 /**
  * GET 相册图片列表
  *
  */
 public function album_picOp()
 {
     $model = Model();
     $where = array();
     if (intval($_GET['class_id']) > 0) {
         $where['ac_id'] = intval($_GET['class_id']);
     }
     $where['member_id'] = $this->member_id;
     $m_albumpic = $model->table('sns_albumpic')->where($where);
     //设置每页数量和总数!!!
     pagecmd('setEachNum', $this->page);
     pagecmd('setTotalNum', $m_albumpic->count());
     $pageCount = $m_albumpic->gettotalpage();
     $pic_list = $m_albumpic->page($this->page)->select();
     output_data(array('pic_list' => $pic_list), mobile_page($pageCount));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:20,代码来源:member_center.php

示例7: buildSelectSql

 public function buildSelectSql($options = array())
 {
     if (is_numeric($options['page'])) {
         $page = pagecmd('obj');
         if ($options['limit'] !== 1) {
             $options['limit'] = $page->getLimitStart() . "," . $page->getEachNum();
         }
     }
     $sql = $this->parseSql($this->selectSql, $options);
     $sql .= $this->parseLock(isset($options['lock']) ? $options['lock'] : false);
     return $sql;
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:12,代码来源:model.php

示例8: indexOp

 public function indexOp()
 {
     Language::read('home_goods_class_index');
     $this->_model_search = Model('search');
     //显示左侧分类
     //默认分类,从而显示相应的属性和品牌
     $default_classid = intval($_GET['cate_id']);
     if (intval($_GET['cate_id']) > 0) {
         $goods_class_array = $this->_model_search->getLeftCategory(array($_GET['cate_id']));
     } elseif ($_GET['keyword'] != '') {
         //从TAG中查找分类
         $goods_class_array = $this->_model_search->getTagCategory($_GET['keyword']);
         //取出第一个分类作为默认分类,从而显示相应的属性和品牌
         $default_classid = $goods_class_array[0];
         $goods_class_array = $this->_model_search->getLeftCategory($goods_class_array, 1);
     }
     Tpl::output('goods_class_array', $goods_class_array);
     Tpl::output('default_classid', $default_classid);
     //优先从全文索引库里查找
     list($indexer_ids, $indexer_count) = $this->_model_search->indexerSearch($_GET, self::PAGESIZE);
     //获得经过属性过滤的商品信息 v3-b12
     list($goods_param, $brand_array, $initial_array, $attr_array, $checked_brand, $checked_attr) = $this->_model_search->getAttr($_GET, $default_classid);
     Tpl::output('brand_array', $brand_array);
     Tpl::output('initial_array', $initial_array);
     Tpl::output('attr_array', $attr_array);
     Tpl::output('checked_brand', $checked_brand);
     Tpl::output('checked_attr', $checked_attr);
     //处理排序
     $order = 'is_own_shop desc,goods_id desc';
     if (in_array($_GET['key'], array('1', '2', '3'))) {
         $sequence = $_GET['order'] == '1' ? 'asc' : 'desc';
         $order = str_replace(array('1', '2', '3'), array('goods_salenum', 'goods_click', 'goods_promotion_price'), $_GET['key']);
         $order .= ' ' . $sequence;
     }
     $model_goods = Model('goods');
     // 字段
     $fields = "goods_id,goods_commonid,goods_name,goods_jingle,gc_id,store_id,store_name,goods_price,goods_promotion_price,goods_promotion_type,goods_marketprice,goods_storage,goods_image,goods_freight,goods_salenum,color_id,evaluation_good_star,evaluation_count,is_virtual,is_fcode,is_appoint,is_presell,have_gift";
     $condition = array();
     if (is_array($indexer_ids)) {
         //商品主键搜索
         $condition['goods_id'] = array('in', $indexer_ids);
         $goods_list = $model_goods->getGoodsOnlineList($condition, $fields, 0, $order, self::PAGESIZE, null, false);
         //如果有商品下架等情况,则删除下架商品的搜索索引信息
         if (count($goods_list) != count($indexer_ids)) {
             $this->_model_search->delInvalidGoods($goods_list, $indexer_ids);
         }
         pagecmd('setEachNum', self::PAGESIZE);
         pagecmd('setTotalNum', $indexer_count);
     } else {
         //执行正常搜索
         if (isset($goods_param['class'])) {
             $condition['gc_id_' . $goods_param['class']['depth']] = $goods_param['class']['gc_id'];
         }
         if (intval($_GET['b_id']) > 0) {
             $condition['brand_id'] = intval($_GET['b_id']);
         }
         if ($_GET['keyword'] != '') {
             $condition['goods_name|goods_jingle'] = array('like', '%' . $_GET['keyword'] . '%');
         }
         if (intval($_GET['area_id']) > 0) {
             $condition['areaid_1'] = intval($_GET['area_id']);
         }
         if ($_GET['type'] == 1) {
             $condition['is_own_shop'] = 1;
         }
         if ($_GET['gift'] == 1) {
             $condition['have_gift'] = 1;
         }
         if (isset($goods_param['goodsid_array'])) {
             $condition['goods_id'] = array('in', $goods_param['goodsid_array']);
         }
         $goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fields, $order, self::PAGESIZE);
     }
     Tpl::output('show_page1', $model_goods->showpage(4));
     Tpl::output('show_page', $model_goods->showpage(5));
     // 商品多图
     if (!empty($goods_list)) {
         $commonid_array = array();
         // 商品公共id数组
         $storeid_array = array();
         // 店铺id数组
         foreach ($goods_list as $value) {
             $commonid_array[] = $value['goods_commonid'];
             $storeid_array[] = $value['store_id'];
         }
         $commonid_array = array_unique($commonid_array);
         $storeid_array = array_unique($storeid_array);
         // 商品多图
         $goodsimage_more = Model('goods')->getGoodsImageList(array('goods_commonid' => array('in', $commonid_array)));
         // 店铺
         $store_list = Model('store')->getStoreMemberIDList($storeid_array);
         //搜索的关键字
         $search_keyword = trim($_GET['keyword']);
         foreach ($goods_list as $key => $value) {
             // 商品多图
             //v3-b11 商品列表主图限制不越过5个
             $n = 0;
             foreach ($goodsimage_more as $v) {
                 if ($value['goods_commonid'] == $v['goods_commonid'] && $value['store_id'] == $v['store_id'] && $value['color_id'] == $v['color_id']) {
                     $n++;
//.........这里部分代码省略.........
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:101,代码来源:search.php

示例9: indexOp

 public function indexOp()
 {
     Language::read('home_goods_class_index');
     $this->_model_search = Model('search');
     //优先从全文索引库里查找
     list($indexer_ids, $indexer_count) = $this->_indexer_search();
     $data_attr = $this->_get_attr_list();
     //处理排序
     $order = 'goods_id desc';
     if (in_array($_GET['key'], array('1', '2', '3'))) {
         $sequence = $_GET['order'] == '1' ? 'asc' : 'desc';
         $order = str_replace(array('1', '2', '3'), array('goods_salenum', 'goods_click', 'goods_price'), $_GET['key']);
         $order .= ' ' . $sequence;
     }
     $model_goods = Model('goods');
     if (!isset($data_attr['sign']) || $data_attr['sign'] === true) {
         // 字段
         $fields = "goods_id,goods_commonid,goods_name,goods_jingle,gc_id,store_id,store_name,goods_price,goods_marketprice,goods_storage,goods_image,goods_freight,goods_salenum,color_id,evaluation_good_star,evaluation_count";
         $condition = array();
         if (is_array($indexer_ids)) {
             //商品主键搜索
             $condition['goods_id'] = array('in', $indexer_ids);
             $goods_list = $model_goods->getGoodsOnlineList($condition, $fields, 0, $order, self::PAGESIZE, null, false);
             pagecmd('setEachNum', self::PAGESIZE);
             pagecmd('setTotalNum', $indexer_count);
         } else {
             //执行正常搜索
             if (isset($data_attr['gcid_array'])) {
                 $condition['gc_id'] = array('in', $data_attr['gcid_array']);
             }
             if (intval($_GET['b_id']) > 0) {
                 $condition['brand_id'] = intval($_GET['b_id']);
             }
             if ($_GET['keyword'] != '') {
                 $condition['goods_name|goods_jingle'] = array('like', '%' . $_GET['keyword'] . '%');
             }
             if (intval($_GET['area_id']) > 0) {
                 $condition['areaid_1'] = intval($_GET['area_id']);
             }
             if (in_array($_GET['type'], array(1, 2))) {
                 if ($_GET['type'] == 1) {
                     $condition['store_id'] = DEFAULT_PLATFORM_STORE_ID;
                 } else {
                     if ($_GET['type'] == 2) {
                         $condition['store_id'] = array('neq', DEFAULT_PLATFORM_STORE_ID);
                     }
                 }
             }
             if (isset($data_attr['goodsid_array'])) {
                 $condition['goods_id'] = array('in', $data_attr['goodsid_array']);
             }
             $goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fields, $order, self::PAGESIZE);
         }
         Tpl::output('show_page1', $model_goods->showpage(4));
         Tpl::output('show_page', $model_goods->showpage(5));
         // 商品多图
         if (!empty($goods_list)) {
             $goodsid_array = array();
             // 商品id数组
             $commonid_array = array();
             // 商品公共id数组
             $storeid_array = array();
             // 店铺id数组
             foreach ($goods_list as $value) {
                 $goodsid_array[] = $value['goods_id'];
                 $commonid_array[] = $value['goods_commonid'];
                 $storeid_array[] = $value['store_id'];
             }
             $goodsid_array = array_unique($goodsid_array);
             $commonid_array = array_unique($commonid_array);
             $storeid_array = array_unique($storeid_array);
             // 商品多图
             $goodsimage_more = Model('goods')->getGoodsImageList(array('goods_commonid' => array('in', $commonid_array)));
             // 店铺
             $store_list = Model('store')->getStoreMemberIDList($storeid_array);
             // 团购
             if (C('groupbuy_allow')) {
                 $groupbuy_list = Model('groupbuy')->getGroupbuyListByGoodsCommonIDString(implode(',', $commonid_array));
             }
             if (C('promotion_allow')) {
                 // 限时折扣
                 $xianshi_list = Model('p_xianshi_goods')->getXianshiGoodsListByGoodsString(implode(',', $goodsid_array));
             }
             foreach ($goods_list as $key => $value) {
                 // 商品多图
                 foreach ($goodsimage_more as $v) {
                     if ($value['goods_commonid'] == $v['goods_commonid'] && $value['store_id'] == $v['store_id'] && $value['color_id'] == $v['color_id']) {
                         $goods_list[$key]['image'][] = $v;
                     }
                 }
                 // 店铺的开店会员编号
                 $store_id = $value['store_id'];
                 $goods_list[$key]['member_id'] = $store_list[$store_id]['member_id'];
                 $goods_list[$key]['store_domain'] = $store_list[$store_id]['store_domain'];
                 // 团购
                 if (isset($groupbuy_list[$value['goods_commonid']])) {
                     $goods_list[$key]['goods_price'] = $groupbuy_list[$value['goods_commonid']]['groupbuy_price'];
                     $goods_list[$key]['group_flag'] = true;
                 }
                 if (isset($xianshi_list[$value['goods_id']]) && !$goods_list[$key]['group_flag']) {
//.........这里部分代码省略.........
开发者ID:norain2050,项目名称:xingkang,代码行数:101,代码来源:search.php

示例10: buildSelectSql

 public function buildSelectSql($options = array())
 {
     if (is_numeric($options['page'])) {
         $page = pagecmd('obj');
         if ($options['limit'] !== 1) {
             $options['limit'] = $page->getLimitStart() . "," . $page->getEachNum();
         }
     }
     $presql = $this->selectSql;
     if (isset($options['field'])) {
         $fields = explode(',', $options['field']);
         $flag = false;
         for ($i = 0; $i < count($fields); $i++) {
             if (strpos(strtolower($fields[$i]), 'count(') < 0) {
                 $flag = true;
             }
         }
     } else {
         $flag = true;
     }
     if (!$flag) {
         $presql = $this->selectSqlSimple;
     }
     $sql = $this->parseSql($presql, $options);
     $sql .= $this->parseLock(isset($options['lock']) ? $options['lock'] : false);
     return $sql;
 }
开发者ID:norain2050,项目名称:xingkang,代码行数:27,代码来源:model.php

示例11: buildSelectSql

 public function buildSelectSql($options = array())
 {
     if (is_numeric($options['page'])) {
         $page = pagecmd('obj');
         if ($options['limit'] !== 1) {
             $options['limit'] = $page->getLimitStart() . "," . $page->getEachNum();
         }
     }
     if ($options['attr'] != 'FOR UPDATE') {
         $func = 'parseSql';
     } else {
         $func = 'parseSql2';
     }
     $sql = $this->{$func}($this->selectSql, $options);
     return $sql;
 }
开发者ID:noikiy,项目名称:shopnc-2,代码行数:16,代码来源:model.php

示例12: daigousdOp

 public function daigousdOp()
 {
     if (empty($_GET['stype'])) {
         $s_type = '1';
     } else {
         $s_type = $_GET['stype'];
     }
     if ($s_type == '1') {
         $string = '商店';
     } else {
         $string = '产品';
     }
     if (intval($_GET['count']) > 0) {
         //获取国家值
         $dbs = Model('count')->getCountInfo(array('count_id' => $_GET['count']), 'count_name');
         $count_name = $dbs['count_name'];
     } else {
         $count_name = '国家';
     }
     Tpl::output('count_name', $count_name);
     Tpl::output('string', $string);
     Tpl::output('stype', $s_type);
     $this->_model_search = Model('search');
     //优先从全文索引库里查找
     list($indexer_ids, $indexer_count) = $this->_indexer_search();
     $data_attr = $this->_get_attr_list();
     //处理排序
     $order = 'goods_id desc';
     if (in_array($_GET['key'], array('1', '2', '3'))) {
         $sequence = $_GET['order'] == '1' ? 'asc' : 'desc';
         $order = str_replace(array('1', '2', '3'), array('goods_salenum', 'goods_click', 'goods_price'), $_GET['key']);
         $order .= ' ' . $sequence;
     }
     $model_goods = Model('goods');
     if (!isset($data_attr['sign']) || $data_attr['sign'] === true) {
         // 字段
         $fields = "goods_id,goods_commonid,goods_name,goods_jingle,gc_id,store_id,store_name,goods_price,goods_marketprice,goods_storage,goods_image,goods_freight,goods_salenum,color_id,evaluation_good_star,evaluation_count";
         $condition = array();
         if (is_array($indexer_ids)) {
             //商品主键搜索
             $condition['goods_id'] = array('in', $indexer_ids);
             $goods_list = $model_goods->getGoodsOnlineList($condition, $fields, 0, $order, self::PAGESIZE, null, false);
             pagecmd('setEachNum', self::PAGESIZE);
             pagecmd('setTotalNum', $indexer_count);
         } else {
             if (intval($_GET['count']) > 0) {
                 $condition['goods_count'] = intval($_GET['count']);
             }
             //执行正常搜索
             if (isset($data_attr['gcid_array'])) {
                 $condition['gc_id'] = array('in', $data_attr['gcid_array']);
             }
             if (intval($_GET['b_id']) > 0) {
                 $condition['brand_id'] = intval($_GET['b_id']);
             }
             if ($_GET['keyword'] != '') {
                 $condition['goods_name|goods_jingle'] = array('like', '%' . $_GET['keyword'] . '%');
             }
             if (intval($_GET['area_id']) > 0) {
                 $condition['areaid_1'] = intval($_GET['area_id']);
             }
             $condition['store_id'] = '3';
             if (isset($data_attr['goodsid_array'])) {
                 $condition['goods_id'] = array('in', $data_attr['goodsid_array']);
             }
             $goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fields, $order, self::PAGESIZE);
         }
         Tpl::output('show_page1', $model_goods->showpage(4));
         Tpl::output('show_page', $model_goods->showpage(6));
         // 商品多图
         if (!empty($goods_list)) {
             $goodsid_array = array();
             // 商品id数组
             $commonid_array = array();
             // 商品公共id数组
             $storeid_array = array();
             // 店铺id数组
             foreach ($goods_list as $value) {
                 $goodsid_array[] = $value['goods_id'];
                 $commonid_array[] = $value['goods_commonid'];
                 $storeid_array[] = $value['store_id'];
             }
             $goodsid_array = array_unique($goodsid_array);
             $commonid_array = array_unique($commonid_array);
             $storeid_array = array_unique($storeid_array);
             // 商品多图
             $goodsimage_more = Model('goods')->getGoodsImageList(array('goods_commonid' => array('in', $commonid_array)));
             // 店铺
             $store_list = Model('store')->getStoreMemberIDList($storeid_array);
             foreach ($goods_list as $key => $value) {
                 // 商品多图
                 foreach ($goodsimage_more as $v) {
                     if ($value['goods_commonid'] == $v['goods_commonid'] && $value['store_id'] == $v['store_id'] && $value['color_id'] == $v['color_id']) {
                         $goods_list[$key]['image'][] = $v;
                     }
                 }
                 // 店铺的开店会员编号
                 $store_id = $value['store_id'];
                 $goods_list[$key]['member_id'] = $store_list[$store_id]['member_id'];
                 $goods_list[$key]['store_domain'] = $store_list[$store_id]['store_domain'];
//.........这里部分代码省略.........
开发者ID:bubargaininc,项目名称:oak_oak,代码行数:101,代码来源:category.php

示例13: showpage

 public function showpage($style = NULL)
 {
     return pagecmd("show", $style);
 }
开发者ID:my1977,项目名称:shopnc,代码行数:4,代码来源:model.php


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