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


PHP obj::listClassDetail方法代码示例

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


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

示例1: height_serach

 /**
  * 高级搜索页面
  *
  */
 private function height_serach()
 {
     $ProductClassArray = $this->obj_goods_class->listClassDetail();
     /*商品分类下拉菜单*/
     $class_value = $input_param['sel_goods_class'] != '' ? $input_param['sel_goods_class'] : '';
     $this->output("sel_goods_class", Common::showForm_Select2("sel_goods_class", "", "", $ProductClassArray, $class_value, $this->_lang['search_choice_cateory']));
     /*下拉商品品牌*/
     $brand_selected = $input_param['sel_goods_brand'] != '' ? $input_param['sel_goods_brand'] : '';
     $obj_page = '';
     $conditon_array = array();
     $brand = $this->obj_goods_brand->getBrandList($conditon_array, $obj_page);
     $brand_array = array();
     foreach ($brand as $array) {
         $brand_array[$array['brand_id']] = $array['brand_name'];
     }
     $this->output('goods_brand', Common::Select('sel_goods_brand', $brand_array, $this->_lang['search_choice_brand'], $brand_selected));
     $this->showpage('search');
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:22,代码来源:search.php

示例2: delGoodsClass

 /**
  * 删除商品分类
  *
  */
 private function delGoodsClass()
 {
     /*权限检查*/
     $this->checkAdmin('goods_class_move');
     $class_id = intval($this->_input['id']);
     $select_value = intval($this->_input['select']);
     $productClassArray = $this->obj_goods_class->listClassDetail("");
     switch ($select_value) {
         case 1:
             // 删除当前分类包括当前分类的子分类和商品
             //查出所有子集分类
             $sub_class = $this->obj_goods_class->getArrayById($productClassArray, $result, $class_id);
             $sub_class[] = $class_id;
             $rs = $this->obj_goods_class->delGoodsClass($sub_class, "class_id");
             if ($rs) {
                 $rs = $this->obj_goods->delGoods($sub_class, "class_id");
                 if ($rs) {
                     $this->obj_goods_class->createGoodsClassArray();
                     /*日志保存*/
                     $log_array = array();
                     $log_array['log_info'] = $this->_lang['admin_goods_class_goods_del_ok'];
                     $this->obj_log->inLog($log_array);
                     $this->adminMessage($this->_lang['admin_goods_class_goods_del_ok'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
                 } else {
                     /*日志保存*/
                     $log_array = array();
                     $log_array['log_info'] = $this->_lang['admin_goods_class_goods_del_false'];
                     $this->obj_log->inLog($log_array);
                     $this->adminMessage($this->_lang['admin_goods_class_goods_del_false'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
                 }
             } else {
                 /*日志保存*/
                 $log_array = array();
                 $log_array['log_info'] = $this->_lang['admin_goods_class_goods_del_false'];
                 $this->obj_log->inLog($log_array);
                 $this->adminMessage($this->_lang['admin_goods_class_goods_del_false'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
             }
             break;
         case 2:
             //删除当前分类,移动子分类和商品
             $class_top_id = $this->_input['txt_class_top_id' . $class_id . "_2"];
             if ($class_top_id == 0) {
                 $this->adminMessage($this->_lang['admin_goods_class_list_select_error'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
             }
             $input_param['class_top_id'] = intval($class_top_id);
             $sub_one_class = $this->obj_goods_class->getArrayById($productClassArray, $result, $class_id);
             /* 检查修改的分类topid是否是当前分类的下级,如果是返回错误,不是的话,正常进行 */
             $sub_one_class[] = $class_id;
             if ($sub_one_class != null) {
                 if (in_array($class_top_id, $sub_one_class)) {
                     $this->adminMessage($this->_lang['admin_goods_class_list_del_error1'], $this->refer_url, 1, 3000);
                 }
             }
             /* 查出下一级分类 */
             $sub_one_class = array();
             $sub_one_class = $this->obj_goods_class->getOneArrayById($productClassArray, $result, $class_id);
             $sub_one_class_string = empty($sub_one_class) ? $class_id : @implode(",", $sub_one_class) . ',' . $class_id;
             /* 移动子类 */
             $update_class = $this->obj_goods_class->modifyMoreGoodsClass($input_param, array("more_id" => $sub_one_class_string));
             /* 移动当前类商品 */
             $update_goods = $this->obj_goods->modifyGoods($class_top_id, $class_id, "class_id", "class_id");
             /* 删除当前类 */
             $input['class_id'] = $class_id;
             $del_goods_class = $this->obj_goods_class->delGoodsClass($input, "class_id");
             if ($del_goods_class) {
                 $this->obj_goods_class->createGoodsClassArray();
                 $this->adminMessage($this->_lang['admin_goods_oper_succ'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
             }
             break;
         case 3:
             //删除当前分类和子分类,只移动商品
             $class_top_id = $this->_input['txt_class_top_id' . $class_id . "_2"];
             if ($class_top_id == 0) {
                 $this->adminMessage($this->_lang['admin_goods_class_list_select_error'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
             }
             //查出所有子集分类
             $sub_class = $this->obj_goods_class->getArrayById($productClassArray, $result, $class_id);
             $sub_class[] = $class_id;
             /* 检查修改的分类topid是否是当前分类的下级,如果是返回错误,不是的话,正常进行 */
             if ($sub_class != null) {
                 if (in_array($class_top_id, $sub_class)) {
                     $this->adminMessage($this->_lang['admin_goods_class_list_del_error'], $this->refer_url, 1, 3000);
                 }
             }
             $sub_class_string = @implode(",", $sub_class);
             $rs = $this->obj_goods_class->delGoodsClass($sub_class, "class_id");
             if ($rs) {
                 $input_param['class_id'] = $class_top_id;
                 $this->obj_goods->moveGoods($input_param, array("more_id" => $sub_class_string));
                 $this->obj_goods_class->createGoodsClassArray();
                 $this->adminMessage($this->_lang['admin_goods_oper_succ'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 1000);
             } else {
                 $this->adminMessage($this->_lang['admin_goods_oper_fill'], $this->_configinfo['websit']['site_url'] . "/admin/admin_goods_class.php?action=list", 1, 4000);
             }
             break;
     }
//.........这里部分代码省略.........
开发者ID:jn7163,项目名称:ShopNC,代码行数:101,代码来源:admin_goods_class.php


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