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


PHP loadfunc函数代码示例

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


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

示例1: indexOp

 public function indexOp()
 {
     //读取语言包
     Language::read('home_store_list');
     //分类导航
     $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => 'index.php'), 1 => array('title' => Language::get('brand_index_all_brand')));
     Tpl::output('nav_link_list', $nav_link);
     $model_store = Model('store');
     //店铺列表
     //         $store_list = $model_store->getStoreList($condition, 10);
     $store_list = $model_store->getShowList(true, true);
     Tpl::output('store', $store_list);
     //         Tpl::output('brand_class',$brand_class);
     //         Tpl::output('brand_r',$brand_r_list);
     //         Tpl::output('html_title',Language::get('brand_index_brand_list'));
     //分页头
     Tpl::output('show_page1', $model_store->showpage(4));
     //分页尾
     Tpl::output('show_page', $model_store->showpage(5));
     //加载 shop/framework/function/search.php
     loadfunc('search');
     //页面输出
     Tpl::output('index_sign', 'store');
     Model('seo')->type('store')->show();
     Tpl::showpage('store_list');
 }
开发者ID:norain2050,项目名称:xingkang,代码行数:26,代码来源:store_list.php

示例2: listOp

 /**
  * 品牌商品列表
  */
 public function listOp()
 {
     Language::read('home_brand_index');
     $lang = Language::getLangContent();
     /**
      * 验证品牌
      */
     $model_brand = Model('brand');
     $brand_info = $model_brand->getBrandInfo(array('brand_id' => intval($_GET['brand'])));
     if (!$brand_info) {
         showMessage($lang['wrong_argument'], 'index.php', 'html', 'error');
     }
     /**
      * 获得推荐品牌
      */
     $brand_r_list = Model('brand')->getBrandPassedList(array('brand_recommend' => 1), 'brand_id,brand_name,brand_pic', 0, 'brand_sort asc, brand_id desc', 10);
     Tpl::output('brand_r', $brand_r_list);
     // 得到排序方式
     $order = 'is_own_shop desc,goods_id desc';
     if (!empty($_GET['key'])) {
         $order_tmp = trim($_GET['key']);
         $sequence = $_GET['order'] == 1 ? 'asc' : 'desc';
         switch ($order_tmp) {
             case '1':
                 // 销量
                 $order = 'goods_salenum' . ' ' . $sequence;
                 break;
             case '2':
                 // 浏览量
                 $order = 'goods_click' . ' ' . $sequence;
                 break;
             case '3':
                 // 价格
                 $order = 'goods_promotion_price' . ' ' . $sequence;
                 break;
         }
     }
     // 字段
     $fieldstr = "goods_id,goods_commonid,goods_name,goods_jingle,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";
     // 条件
     $where = array();
     $where['brand_id'] = $brand_info['brand_id'];
     if (intval($_GET['area_id']) > 0) {
         $where['areaid_1'] = intval($_GET['area_id']);
     }
     if ($_GET['type'] == 1) {
         $where['is_own_shop'] = 1;
     }
     if ($_GET['gift'] == 1) {
         $where['have_gift'] = 1;
     }
     $model_goods = Model('goods');
     $goods_list = $model_goods->getGoodsListByColorDistinct($where, $fieldstr, $order, 24);
     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);
         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'];
             //将关键字置红
             $goods_list[$key]['goods_name_highlight'] = $value['goods_name'];
         }
     }
     Tpl::output('goods_list', $goods_list);
     // 地区
     $province_array = Model('area')->getTopLevelAreas();
     Tpl::output('province_array', $province_array);
     loadfunc('search');
     /**
      * 取浏览过产品的cookie(最大四组)
      */
     $viewed_goods = Model('goods_browse')->getViewedGoodsList($_SESSION['member_id'], 20);
     Tpl::output('viewed_goods', $viewed_goods);
     /**
//.........这里部分代码省略.........
开发者ID:mengtaolin,项目名称:shopping,代码行数:101,代码来源:brand.php

示例3: groupbuy_detailOp

 /**
  * 抢购详细信息
  **/
 public function groupbuy_detailOp()
 {
     $group_id = intval($_GET['group_id']);
     $model_groupbuy = Model('groupbuy');
     $model_store = Model('store');
     //获取抢购详细信息
     $groupbuy_info = $model_groupbuy->getGroupbuyInfoByID($group_id);
     if (empty($groupbuy_info)) {
         showMessage(Language::get('param_error'), urlShop('show_groupbuy', 'index'), '', 'error');
     }
     Tpl::output('groupbuy_info', $groupbuy_info);
     Tpl::output('groupbuyMenuIsVr', (bool) $groupbuy_info['is_vr']);
     if ($groupbuy_info['is_vr']) {
         $goods_info = Model('goods')->getGoodsInfoByID($groupbuy_info['goods_id']);
         $buy_limit = max(0, (int) $goods_info['virtual_limit']);
         $upper_limit = max(0, (int) $groupbuy_info['upper_limit']);
         if ($buy_limit < 1 || $buy_limit > 0 && $upper_limit > 0 && $buy_limit > $upper_limit) {
             $buy_limit = $upper_limit;
         }
         Tpl::output('goods_info', $goods_info);
         Tpl::output('buy_limit', $buy_limit);
     } else {
         Tpl::output('buy_limit', $groupbuy_info['upper_limit']);
     }
     // 输出店铺信息
     $store_info = $model_store->getStoreInfoByID($groupbuy_info['store_id']);
     Tpl::output('store_info', $store_info);
     // 浏览数加1
     $update_array = array();
     $update_array['views'] = array('exp', 'views+1');
     $model_groupbuy->editGroupbuy($update_array, array('groupbuy_id' => $group_id));
     //获取店铺推荐商品
     $commended_groupbuy_list = $model_groupbuy->getGroupbuyCommendedList(8);
     Tpl::output('commended_groupbuy_list', $commended_groupbuy_list);
     // 好评率
     $model_evaluate = Model('evaluate_goods');
     $evaluate_info = $model_evaluate->getEvaluateGoodsInfoByCommonidID($groupbuy_info['goods_commonid']);
     Tpl::output('evaluate_info', $evaluate_info);
     Model('seo')->type('group_content')->param(array('name' => $groupbuy_info['groupbuy_name']))->show();
     loadfunc('search');
     Tpl::showpage('groupbuy_detail');
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:45,代码来源:show_groupbuy.php

示例4: goods_allOp

 /**
  * 全部商品
  */
 public function goods_allOp()
 {
     $condition = array();
     $condition['store_id'] = $this->store_info['store_id'];
     if (trim($_GET['keyword']) != '') {
         $condition['goods_name'] = array('like', '%' . trim($_GET['keyword']) . '%');
     }
     // 排序
     $order = $_GET['order'] == 1 ? 'asc' : 'desc';
     switch (trim($_GET['key'])) {
         case '1':
             $order = 'goods_id ' . $order;
             break;
         case '2':
             $order = 'goods_price ' . $order;
             break;
         case '3':
             $order = 'goods_salenum ' . $order;
             break;
         case '4':
             $order = 'goods_collect ' . $order;
             break;
         case '5':
             $order = 'goods_click ' . $order;
             break;
         default:
             $order = 'goods_id desc';
             break;
     }
     //查询分类下的子分类
     if (intval($_GET['stc_id']) > 0) {
         $condition['goods_stcids'] = array('like', '%,' . intval($_GET['stc_id']) . ',%');
     }
     $model_goods = Model('goods');
     $fieldstr = "goods_id,goods_commonid,goods_name,goods_jingle,store_id,store_name,goods_price,goods_marketprice,goods_storage,goods_image,goods_freight,goods_salenum,color_id,evaluation_good_star,evaluation_count";
     $recommended_goods_list = $model_goods->getGoodsListByColorDistinct($condition, $fieldstr, $order, 24);
     loadfunc('search');
     //输出分页
     Tpl::output('show_page', $model_goods->showpage('5'));
     $stc_class = Model('store_goods_class');
     $stc_info = $stc_class->getOneById(intval($_GET['stc_id']));
     Tpl::output('stc_name', $stc_info['stc_name']);
     Tpl::output('page', 'index');
     Tpl::output('recommended_goods_list', $recommended_goods_list);
     Tpl::showpage('goods_list');
 }
开发者ID:bubargaininc,项目名称:oak_oak,代码行数:49,代码来源:show_store.php

示例5: indexOp


//.........这里部分代码省略.........
         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++;
                     $goods_list[$key]['image'][] = $v;
                     if ($n >= 5) {
                         break;
                     }
                 }
             }
             // 店铺的开店会员编号
             $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 ($search_keyword) {
                 $goods_list[$key]['goods_name_highlight'] = str_replace($search_keyword, '<font style="color:#f00;">' . $search_keyword . '</font>', $value['goods_name']);
             } else {
                 $goods_list[$key]['goods_name_highlight'] = $value['goods_name'];
             }
         }
     }
     Tpl::output('goods_list', $goods_list);
     if ($_GET['keyword'] != '') {
         Tpl::output('show_keyword', $_GET['keyword']);
     } else {
         Tpl::output('show_keyword', $goods_param['class']['gc_name']);
     }
     $model_goods_class = Model('goods_class');
     // SEO
     if ($_GET['keyword'] == '') {
         $seo_class_name = $goods_param['class']['gc_name'];
         if (is_numeric($_GET['cate_id']) && empty($_GET['keyword'])) {
             $seo_info = $model_goods_class->getKeyWords(intval($_GET['cate_id']));
             if (empty($seo_info[1])) {
                 $seo_info[1] = C('site_name') . ' - ' . $seo_class_name;
             }
             Model('seo')->type($seo_info)->param(array('name' => $seo_class_name))->show();
         }
     } elseif ($_GET['keyword'] != '') {
         Tpl::output('html_title', (empty($_GET['keyword']) ? '' : $_GET['keyword'] . ' - ') . C('site_name') . L('nc_common_search'));
     }
     // 当前位置导航
     $nav_link_list = $model_goods_class->getGoodsClassNav(intval($_GET['cate_id']));
     Tpl::output('nav_link_list', $nav_link_list);
     // 得到自定义导航信息
     $nav_id = intval($_GET['nav_id']) ? intval($_GET['nav_id']) : 0;
     Tpl::output('index_sign', $nav_id);
     // 地区
     $province_array = Model('area')->getTopLevelAreas();
     Tpl::output('province_array', $province_array);
     loadfunc('search');
     // 浏览过的商品
     $viewed_goods = Model('goods_browse')->getViewedGoodsList($_SESSION['member_id'], 20);
     Tpl::output('viewed_goods', $viewed_goods);
     Tpl::showpage('search');
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:101,代码来源:search.php

示例6: indexOp


//.........这里部分代码省略.........
             $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']) {
                     $goods_list[$key]['goods_price'] = $xianshi_list[$value['goods_id']]['xianshi_price'];
                     $goods_list[$key]['xianshi_flag'] = true;
                 }
             }
         }
         Tpl::output('goods_list', $goods_list);
     }
     Tpl::output('class_name', @$data_attr['gc_name']);
     //显示左侧分类
     if (intval($_GET['cate_id']) > 0) {
         $goods_class_array = $this->_model_search->getLeftCategory(array($_GET['cate_id']));
     } elseif ($_GET['keyword'] != '') {
         $goods_class_array = $this->_model_search->getTagCategory($_GET['keyword']);
     }
     Tpl::output('goods_class_array', $goods_class_array);
     if ($_GET['keyword'] == '') {
         //不显示无商品的搜索项
         if (C('fullindexer.open')) {
             $data_attr['brand_array'] = $this->_model_search->delInvalidBrand($data_attr['brand_array']);
             $data_attr['attr_array'] = $this->_model_search->delInvalidAttr($data_attr['attr_array']);
         }
     }
     //抛出搜索属性
     Tpl::output('brand_array', $data_attr['brand_array']);
     Tpl::output('attr_array', $data_attr['attr_array']);
     //         Tpl::output('cate_array',$data_attr['cate_array']);
     Tpl::output('checked_brand', $data_attr['checked_brand']);
     Tpl::output('checked_attr', $data_attr['checked_attr']);
     $model_goods_class = Model('goods_class');
     // SEO
     if ($_GET['keyword'] == '') {
         $seo_class_name = @$data_attr['gc_name'];
         if (is_numeric($_GET['cate_id']) && empty($_GET['keyword'])) {
             $seo_info = $model_goods_class->getKeyWords(intval($_GET['cate_id']));
             if (empty($seo_info[1])) {
                 $seo_info[1] = C('site_name') . ' - ' . $seo_class_name;
             }
             Model('seo')->type($seo_info)->param(array('name' => $seo_class_name))->show();
         } elseif ($_GET['keyword'] != '') {
             Tpl::output('html_title', (empty($_GET['keyword']) ? '' : $_GET['keyword'] . ' - ') . C('site_name') . L('nc_common_search'));
         }
     }
     // 当前位置导航
     $nav_link_list = $model_goods_class->getGoodsClassNav(intval($_GET['cate_id']));
     Tpl::output('nav_link_list', $nav_link_list);
     // 得到自定义导航信息
     $nav_id = intval($_GET['nav_id']) ? intval($_GET['nav_id']) : 0;
     Tpl::output('index_sign', $nav_id);
     // 地区
     require BASE_DATA_PATH . '/area/area.php';
     Tpl::output('area_array', $area_array);
     loadfunc('search');
     // 浏览过的商品
     $viewed_goods = $model_goods->getViewedGoodsList();
     Tpl::output('viewed_goods', $viewed_goods);
     Tpl::showpage('search');
 }
开发者ID:norain2050,项目名称:xingkang,代码行数:101,代码来源:search.php

示例7: groupbuy_detailOp

 /**
  * 团购详细信息
  **/
 public function groupbuy_detailOp()
 {
     $group_id = intval($_GET['group_id']);
     $model_groupbuy = Model('groupbuy');
     $model_store = Model('store');
     $g_cache = ($cache = H('groupbuy')) ? $cache : H('groupbuy', true);
     Tpl::output('area_list', $g_cache['area']);
     //获取团购详细信息
     $groupbuy_info = $model_groupbuy->getGroupbuyInfoByID($group_id);
     if (empty($groupbuy_info)) {
         showMessage(Language::get('param_error'), 'index.php?act=show_groupbuy', '', 'error');
     }
     Tpl::output('groupbuy_info', $groupbuy_info);
     // 输出店铺信息
     $store_info = $model_store->getStoreInfoByID($groupbuy_info['store_id']);
     Tpl::output('store_info', $store_info);
     // 浏览数加1
     $update_array = array();
     $update_array['views'] = array('exp', 'views+1');
     $model_groupbuy->editGroupbuy($update_array, array('groupbuy_id' => $group_id));
     //获取店铺推荐商品
     $commended_groupbuy_list = $model_groupbuy->getGroupbuyCommendedList(8);
     Tpl::output('commended_groupbuy_list', $commended_groupbuy_list);
     Tpl::output('index_sign', 'groupbuy');
     Model('seo')->type('group_content')->param(array('name' => $groupbuy_info['groupbuy_name']))->show();
     loadfunc('search');
     Tpl::showpage('groupbuy_detail');
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:31,代码来源:show_groupbuy.php

示例8: listOp


//.........这里部分代码省略.........
                 break;
             case '2':
                 // 浏览量
                 $order = 'goods_click' . ' ' . $sequence;
                 break;
             case '3':
                 // 价格
                 $order = 'goods_price' . ' ' . $sequence;
                 break;
         }
     }
     // 字段
     $fieldstr = "goods_id,goods_commonid,goods_name,goods_jingle,store_id,store_name,goods_price,goods_marketprice,goods_storage,goods_image,goods_freight,goods_salenum,color_id,evaluation_good_star,evaluation_count";
     // 条件
     $where = array();
     $where['brand_id'] = $brand_id;
     if (intval($_GET['area_id']) > 0) {
         $where['areaid_1'] = intval($_GET['area_id']);
     }
     if (in_array($_GET['type'], array(1, 2))) {
         if ($_GET['type'] == 1) {
             $where['store_id'] = DEFAULT_PLATFORM_STORE_ID;
         } else {
             if ($_GET['type'] == 2) {
                 $where['store_id'] = array('neq', DEFAULT_PLATFORM_STORE_ID);
             }
         }
     }
     $model_goods = Model('goods');
     $goods_list = $model_goods->getGoodsListByColorDistinct($where, $fieldstr, $order, 24);
     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);
         // 团购
         $groupbuy_list = Model('groupbuy')->getGroupbuyListByGoodsCommonIDString(implode(',', $commonid_array));
         // 限时折扣
         $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']) {
                 $goods_list[$key]['goods_price'] = $xianshi_list[$value['goods_id']]['xianshi_price'];
                 $goods_list[$key]['xianshi_flag'] = true;
             }
         }
     }
     Tpl::output('goods_list', $goods_list);
     // 地区
     require BASE_DATA_PATH . '/area/area.php';
     Tpl::output('area_array', $area_array);
     loadfunc('search');
     /**
      * 取浏览过产品的cookie(最大四组)
      */
     $viewed_goods = $model_goods->getViewedGoodsList();
     Tpl::output('viewed_goods', $viewed_goods);
     /**
      * 分类导航
      */
     $nav_link = array(0 => array('title' => $lang['homepage'], 'link' => 'index.php'), 1 => array('title' => $lang['brand_index_all_brand'], 'link' => 'index.php?act=brand'), 2 => array('title' => $brand_lise['brand_name']));
     Tpl::output('nav_link_list', $nav_link);
     /**
      * 页面输出
      */
     Tpl::output('index_sign', 'brand');
     Model('seo')->type('brand_list')->param(array('name' => $brand_lise['brand_name']))->show();
     Tpl::showpage('brand_goods');
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:101,代码来源:brand.php

示例9: daigousdOp


//.........这里部分代码省略.........
             }
             $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'];
                 // 团购
                 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']) {
                     $goods_list[$key]['goods_price'] = $xianshi_list[$value['goods_id']]['xianshi_price'];
                     $goods_list[$key]['xianshi_flag'] = true;
                 }
             }
         }
         Tpl::output('goods_list', $goods_list);
     }
     Tpl::output('class_name', @$data_attr['gc_name']);
     //显示左侧分类
     if (intval($_GET['cate_id']) > 0) {
         $goods_class_array = $this->_model_search->getLeftCategory(array($_GET['cate_id']));
     } elseif ($_GET['keyword'] != '') {
         $goods_class_array = $this->_model_search->getTagCategory($_GET['keyword']);
     }
     Tpl::output('goods_class_array', $goods_class_array);
     if ($_GET['keyword'] == '') {
         //不显示无商品的搜索项
         if (C('fullindexer.open')) {
             $data_attr['brand_array'] = $this->_model_search->delInvalidBrand($data_attr['brand_array']);
             $data_attr['attr_array'] = $this->_model_search->delInvalidAttr($data_attr['attr_array']);
         }
     }
     //抛出搜索属性
     Tpl::output('brand_array', $data_attr['brand_array']);
     Tpl::output('attr_array', $data_attr['attr_array']);
     //         Tpl::output('cate_array',$data_attr['cate_array']);
     Tpl::output('checked_brand', $data_attr['checked_brand']);
     Tpl::output('checked_attr', $data_attr['checked_attr']);
     $model_goods_class = Model('goods_class');
     loadfunc('search');
     //商品类型
     $goods_class = Model('goods_class');
     $goods_type = $model_goods_class->table('goods_class')->where(array('gc_parent_id' => '959'))->order('gc_sort asc')->select();
     Tpl::output('goods_type', $goods_type);
     //当前商品类型
     $cate_id = $_GET['cate_id'];
     if ($cate_id !== '0') {
         $scate_id = $model_goods_class->where(array('gc_id' => $cate_id))->find();
         $scate_data = $scate_id['gc_name'];
     } else {
         $scate_data = '产品';
     }
     Tpl::output('scate_data', $scate_data);
     //获取国家
     $count = Model()->table('count')->where()->order('count_id asc')->select();
     Tpl::output('count', $count);
     //品牌
     $model = Model('brand');
     $brand = $model->table('brand')->where(array('brand_apply' => '1', 'class_id' => '959'))->order('brand_sort asc')->select();
     // print_r($brand);
     Tpl::output('brand', $brand);
     Tpl::output('index_sign', 'daigou');
     Tpl::showpage('daigou2');
 }
开发者ID:bubargaininc,项目名称:oak_oak,代码行数:101,代码来源:category.php


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