<?php
/* 蹇嵎鍟嗗煄绯荤粺
 * 鐗堟湰鍙凤細2.0
 * 瀹樼綉锛歨ttp://www.kjcms.cn
 * 2015-02-16
 */

class ctl_mall_goods_category extends mod_mall_goods_category {
	//默认浏览页
	function act_default() {
		$this->this_pid = (int)fun_get::get("url_pid");
		$this->arr_path = $this->get_path( $this->this_pid );
		$this->arr_list = $this->sql_list($this->this_pid);
		return $this->get_view(); //显示页面
	}
	function act_delete() {
		$arr_return = $this->on_delete();
		return fun_format::json($arr_return);
	}
	function act_edit() {
		$this->editinfo = $this->get_edit(fun_get::get("id"));
		$arr = cls_config::get("goods_comments" , "mall");
		$this->arr_comments = array_keys($arr);
		$this->wap_shop = tab_mall_goods_category::get_perms("wap_show");
		return $this->get_view(); //显示页面
	}
	//保存操作,返回josn数据
	function act_save() {
		$arr_return = $this->on_save();
		return fun_format::json($arr_return);
	}
	//保存所有操作,返回josn数据
	function act_save_all() {
		$arr_return = $this->on_save_all();
		return fun_format::json($arr_return);
	}
	//移动,返回josn数据
	function act_move_save() {
		$arr_return = $this->on_move_save();
		return fun_format::json($arr_return);
	}
	//显示属性页
	function act_attribute() {
		$this->attribute_list = $this->get_attribute_list(fun_get::get("url_category_id"));
		return $this->get_view(); //显示页面
	}
	//显示品牌页
	function act_brand() {
		$this->brand_list = $this->get_brand_list(fun_get::get("category_id"));
		return $this->get_view(); //显示页面
	}
	//移除品牌
	function act_brand_del() {
		$brand_id = (int)fun_get::get("brand_id");
		$brand_category_id = (int)fun_get::get("category_id");
		$arr = tab_mall_goods_category_brand::on_delete('',"brand_id='" . $brand_id . "' and brand_category_id='" . $brand_category_id . "'");
		$arr['id'] = $brand_id;
		return fun_format::json($arr);
	}
	//保存品牌
	function act_brand_save() {
		$arr_return = $this->on_brand_save();
		return fun_format::json($arr_return);
	}
	//显示属性编辑页
	function act_attribute_edit() {
		$this->editinfo = $this->get_attribute_edit(fun_get::get("id"));
		return $this->get_view(); //显示页面
	}
	//显示属性编辑页
	function act_attribute_save() {
		$arr_return = $this->on_attribute_save();
		return fun_format::json($arr_return);
	}
	//删除属性,返回josn数据
	function act_attribute_delete() {
		$arr_return = $this->on_attribute_delete();
		return fun_format::json($arr_return);
	}

}