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


PHP obj::getSpecificClass方法代码示例

本文整理汇总了PHP中obj::getSpecificClass方法的典型用法代码示例。如果您正苦于以下问题:PHP obj::getSpecificClass方法的具体用法?PHP obj::getSpecificClass怎么用?PHP obj::getSpecificClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在obj的用法示例。


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

示例1: nc_header

 private function nc_header()
 {
     /*在导航的商品分类*/
     $header_product_class = $this->obj_product_class->getSpecificClass(array('show_type' => 'header'));
     $this->output('header_product_class', $header_product_class);
     /*在导航的文章分类*/
     $header_article_class = $this->obj_article_class->getArticleClass(array('article_class_menu' => 1));
     $this->output('header_article_class', $header_article_class);
     /*语言包选择*/
     require_once "moduleLanguage.class.php";
     $module_language = new ModuleLanguageClass();
     $conditon_array = array();
     $language_array = $module_language->getLanguageList($conditon_array);
     $this->output('language_array', $language_array);
     /*判断选中的语言包类型*/
     if ($_SESSION['language'] != '') {
         $language_ver = $_SESSION['language'];
     } else {
         $language_ver = $this->_configinfo['websit']['versionarea'];
     }
     $this->output('language_ver', $language_ver);
     /*购物车*/
     require_once "shopCart.class.php";
     $shop_cart = new ShopCartClass();
     $this->output('cart_count', $shop_cart->GoodsCount());
     /*导航菜单选中*/
     $show_menu = '';
     $show_product_menu = '';
     $show_article_menu = '';
     $menu_name = basename($_SERVER['PHP_SELF']);
     if ($menu_name == 'index.php') {
         $show_menu = 'index';
     } elseif ($menu_name == 'product_subject.php') {
         $show_menu = 'subject';
     } elseif ($menu_name == 'product_brand.php') {
         $show_menu = 'brand';
     } elseif ($menu_name == 'article_class.php') {
         $show_article_menu = $this->_input['id'];
         if ($show_article_menu == '') {
             $show_article_menu = 'article';
         }
     } elseif ($menu_name == 'product_class.php') {
         $show_product_menu = $this->_input['classid'];
     }
     $this->output('show_menu', $show_menu);
     $this->output('show_product_menu', $show_product_menu);
     $this->output('show_article_menu', $show_article_menu);
     $this->showpage('header');
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:49,代码来源:header.php

示例2: showClass

 /**
  * 显示商品分类页面
  *
  */
 private function showClass()
 {
     if (intval($this->_input['classid']) == 0) {
         header("Location:index.php");
         exit;
     }
     include BasePath . "/share/" . NC_SHOP_DIR . "goods_class_show.php";
     $array = array();
     foreach ($node_cache as $k => $v) {
         if ($v[0] == intval($this->_input['classid'])) {
             $array['class_id'] = $v[0];
             $array['class_top_id'] = $v[1];
             $array['class_name'] = $v[2];
             $array['class_keywords'] = $v[6];
             $array['class_description'] = $v[7];
             $array['key_id'] = $k;
             break;
         }
     }
     /*当前分类信息*/
     $this->output('class_info', $array);
     /*分类导航*/
     $class_menu = $this->obj_product_class->prductClassMenu($array);
     $this->output('class_menu', $class_menu);
     /*下一级分类*/
     $sub_array = $this->obj_product_class->getSpecificClass(array('sub_class_id' => $array['class_id']));
     $this->output('sub_class', $sub_array);
     $this->output('sub_class_num', count($sub_array));
     /*创建分页对象*/
     $view_list_num = $this->_viewinfo['websit']['other_goods_class'] == '1' ? (int) $this->_viewinfo['websit']['other_goods_class_num'] : 0;
     if (intval($this->_input['goods_nums']) != 0) {
         $view_list_num = intval($this->_input['goods_nums']);
     }
     require_once "commonpage.class.php";
     $obj_page = new CommonPage();
     $obj_page->pagebarnum($view_list_num);
     //每页显示商品数
     $product_array = $this->obj_product_class->productClassList($array, $obj_page, '*', $this->_input['goods_show']);
     $product_class_page = $obj_page->show(6);
     $this->output('product_class_page', $product_class_page);
     $this->output('product_array', $product_array);
     /*商品品牌*/
     $brand_array = $this->obj_brand->getBrandList(array('show_type' => 'class_show'));
     $this->output('brand_array', $brand_array);
     /*当前类热卖商品*/
     $hot_array = $this->obj_product_class->productClassList($array, '', 'goods.goods_name,goods.goods_id,goods.shop_goods_id', '', ' order by goods.goods_click desc', 8);
     $this->output('hot_array', $hot_array);
     /*浏览过的商品*/
     if ($this->getCookies('c_product_viewed') != '') {
         $view_goods_array = $this->obj_product_class->productClassList(array('c_product_viewed' => $this->getCookies('c_product_viewed')), '', 'goods.goods_name,goods.goods_id,goods.goods_small_image,shop_goods_id');
         $this->output('view_goods_array', $view_goods_array);
     }
     $this->showpage('product_class');
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:58,代码来源:product_class.php


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