Ð3»f� ðQ ðQ _array() as $linkData){
if ($linkData['category_link_seq']){
$this->db->query("update fm_category_link set sort = ? where category_link_seq = ? ", array($sort, $linkData['category_link_seq']));
$sort++;
}
}
config_save('mig_sort_category',array($categoryCode=>'Y'));
}
/**
* app/javascript/plugin/jstree/_tree/_inc/class.tree.php 에도 동일 코드 사용
* 수정시 반드시 위 링크에서도 동일하게 수정할 것
**/
public function getSortValue($categoryCode, $type){
switch($type){
case 'min':
$query = "SELECT MIN(sort) sortVal FROM `fm_category_link` WHERE category_code = ?";
break;
case 'max':
$query = "SELECT MAX(sort) sortVal FROM `fm_category_link` WHERE category_code = ?";
break;
case 'mobile_min':
$query = "SELECT MIN(mobile_sort) sortVal FROM `fm_category_link` WHERE category_code = ?";
break;
case 'mobile_max':
$query = "SELECT MAX(mobile_sort) sortVal FROM `fm_category_link` WHERE category_code = ?";
break;
}
$query = $this->db->query($query, $categoryCode);
$sortData = $query->row_array();
return $sortData['sortVal'];
}
public function rangeUpdateSort($categoryCode, $sSort, $eSort, $addSort){
$addWhere = '';
if (!is_null($sSort))
$addWhere .= " and sort > ".$sSort." ";
if (!is_null($eSort))
$addWhere .= " and sort < ".$eSort." ";
$this->db->query("update fm_category_link set sort=IF((IFNULL(sort,0)".$addSort.")<0,0,IFNULL(sort,0)".$addSort.") where category_code = ? ".$addWhere, $categoryCode);
}
public function chgCategorySort($category_link_seq, $sort){
if ($category_link_seq){
$this->db->query("update fm_category_link set sort=? where category_link_seq = ? ", array($sort, $category_link_seq));
}
}
public function design_set($childCategoryData,$division='catalog'){
// 운영방식 추가 :: 2018-11-29 pjw
$operation_type = $this->config_system['operation_type'];
if($division=='searchForm') $division = 'catalog';
$division = $division ? '_'.$division.'_' : '_';
foreach($childCategoryData as $k=>$row){
$childCategoryData[$k]['title'] = htmlspecialchars($childCategoryData[$k]['title']);
$childCategoryData[$k]['ori_title'] = $childCategoryData[$k]['title'];
// 운영방식이 light 형이 아닌 경우에만 기존 스타일 적용 :: 2018-11-29 pjw
if($operation_type != 'light'){
if($childCategoryData[$k]['node'.$division.'type']=='text'){
if($childCategoryData[$k]['node'.$division.'text_normal']){
$attrStyle = font_decoration_attr($childCategoryData[$k]['node'.$division.'text_normal'],'css','style');
$attrOnmouseover = font_decoration_attr($childCategoryData[$k]['node'.$division.'text_over'],'script','onmouseover');
$attrOnmouseout = font_decoration_attr($childCategoryData[$k]['node'.$division.'text_normal'],'script','onmouseout');
$childCategoryData[$k]['title'] = "
{$childCategoryData[$k]['title']}";
}
}
if($childCategoryData[$k]['node'.$division.'type']=='image'){
$attrSrc ='';
$attrOnmouseover ='';
$attrOnmouseout ='';
if($childCategoryData[$k]['node'.$division.'image_normal']){
$attrSrc = 'src="'.$childCategoryData[$k]['node'.$division.'image_normal'].'"';
}
if($childCategoryData[$k]['node'.$division.'image_over']){
$attrOnmouseover = 'onmouseover="this.src=\''.$childCategoryData[$k]['node'.$division.'image_over'].'\'"';
$attrOnmouseout = 'onmouseout="this.src=\''.$childCategoryData[$k]['node'.$division.'image_normal'].'\'"';
}
$childCategoryData[$k]['title'] = "
![]()
";
}
}
$childCategoryData[$k]['name'] = $childCategoryData[$k]['title'];
}
return $childCategoryData;
}
public function get_represent_category_for_goods($goods_seq){
$query = "select c.* from fm_category as c, fm_category_link as cl where
c.category_code = cl.category_code and cl.link = 1 and cl.goods_seq = ?
limit 1 ";
$query = $this->db->query($query,$goods_seq);
$result = $query->result_array();
return $result[0];
}
public function getChildCategory($code,$exactly=false,$division='catalog'){
$arrWhere = array("`level` >= 2");
if($division=='catalog' || $division=='searchForm'){
$arrWhere[] = "(hide_in_navigation = '0' or hide_in_navigation is null)";
}elseif($division=='gnb'){
$arrWhere[] = "hide_in_gnb != '1'";
}else{
$arrWhere[] = "hide != '1'";
}
switch(uri_string()){
case "mshop":
case "mshop/index":
$arrWhere[] = "hide != '1'";
break;
}
$childCategoryData = $this->get_list($code,$arrWhere,$division);
if($division=='searchForm'){
if(!$childCategoryData && !$exactly /* && strlen($code)>4*/){
$childCategoryData = $this->get_list(substr($code,0,strlen($code)-4),$arrWhere,$division);
}
}else{
if(!$childCategoryData && !$exactly && strlen($code)>4){
$childCategoryData = $this->get_list(substr($code,0,strlen($code)-4),$arrWhere,$division);
}
}
$childCategoryData = $this->design_set($childCategoryData,$division);
return $childCategoryData;
}
public function getChildBrand($code,$division=null){
if($code){
$sql = "select br.* from fm_category_brand cabr inner join fm_brand br on cabr.brand_code=br.category_code where cabr.category_code=?";
$query = $this->db->query($sql,$code);
$goodsBrands = $query->result_array();
}else{
$this->load->model('brandmodel');
$goodsBrands = $this->brandmodel->getChildBrand('',false,$division);
}
return $goodsBrands;
}
public function get_default_category()
{
return $this->db->query("select category_code from fm_category where level>1 order by category_code asc limit 1");
}
public function get_goods_categories($goods_seq){
$this->db->select('category_code');
$this->db->from('fm_category_link');
if( is_array($goods_seq) ){
$this->db->where_in('goods_seq', $goods_seq);
}else{
$this->db->where('goods_seq', $goods_seq);
}
return $this->db->get();
}
public function getCategoryDepthForNavi($depth=1, $target_code=null){
$category_list = [];
$isWhere = [];
$params[] = $depth + 1;
if($target_code){
$isWhere[] = "category_code LIKE ?";
$params[] = $target_code.'%';
}
//#30963 2019-03-22 ycg 카테고리 미표시 설정 시 네비게이션에 안보이도록 처리
$isWhere[] = "hide != '1'";
$query = "SELECT category_code, title FROM fm_category WHERE level=? ";
$query .= " AND " . implode(" AND ", $isWhere);
$query .= " ORDER BY `position` ASC, `left` ASC ";
$query = $this->db->query($query, $params);
foreach ($query->result_array() as $row){
$category_list[$row['category_code']] = $row;
}
return $category_list;
}
public function getCodeInfo($category_code, $fields) {
$result = array();
if(empty($category_code)) return;
$fields = $fields == "" ? "*" : $fields;
$this->db->select($fields);
$this->db->where_in('category_code', $category_code);
$query = $this->db->get('fm_category');
foreach ($query->result_array() as $row){
$result[] = $row;
}
return $result;
}
public function category_plan_main()
{
return $this->db->select('*')->from('fm_category')->where(array('plan'=>'y', 'level'=>'3'))->order_by('category_code', 'asc')->get();
}
// 카테고리 타입
public function getCategoryType($category)
{
$types = [];
$query = $this->db->select('*')
->from("fm_category_group")
->where("group_seq", null)
->where("category_code", $category)
->where("user_type !=", '');
$query = $query->get();
$result = $query->result_array();
foreach($result as $row){
$types[] = $row;
}
return $result;
}
// 카테고리 하위포함 상품 수
public function getCategoryGoodsCnt($category)
{
$query = $this->db->select('l.goods_seq')
->distinct()
->from("fm_category_link as l")
->join('fm_goods as g', 'l.goods_seq = g.goods_seq', 'inner')
->like('l.category_code', $category, 'after');
$count = $query->count_all_results();
return $count;
}
// 카테고리 정보
public function getCategory($category)
{
$query = $this->db->select('*')
->from("fm_category")
->where("category_code",$category);
$query = $query->get();
$result = $query->result_array();
return $result;
}
/**
* 유효한(실제로 존재하는) 카테고리만 가져오는 함수
* fm_category_link 에 남아있더라도 fm_category 에 없으면 제외됨
*
* @param int|array $goods_seq
* @return CI_DB_result
*/
public function get_valid_goods_categories($goods_seq)
{
$this->db->select('cl.category_code');
$this->db->from('fm_category_link AS cl');
$this->db->join('fm_category AS c', 'cl.category_code = c.category_code', 'inner');
if (is_array($goods_seq)) {
$this->db->where_in('cl.goods_seq', $goods_seq);
} else {
$this->db->where('cl.goods_seq', $goods_seq);
}
return $this->db->get();
}
/**
* 숨김설정이 제외된 카테고리 데이터 가져오기
*
* @return array
*/
public function get_sitemap_categories()
{
$data = [];
$this->db->select('category_code as loc, update_date as lastmod');
$this->db->group_start()
->where('hide_in_navigation', '0')
->or_where('hide_in_navigation IS NULL', null, false)
->group_end()
->where('hide_in_gnb !=', '1')
->where('hide !=', '1')
->where('category_code !=', 0);
$this->db->from('fm_category');
$query = $this->db->get();
if ($query) $data = $query->result_array();
return $data;
}
}
/* End of file category.php */
/* Location: ./app/models/category */
efault/images/design/banner/maa À3»f� À3»f� 0x 0x rray("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_1/st1_sample3.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_1/st1_sample4.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_1/st1_sample5.jpg"),
)
),
'mobile_style_2' => array(
'name' => 'MOBILE STYLE 2 샘플',
'height' => "",
'background_color' => "#ffffff",
'background_image' => "",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "0",
'image_side_margin' => "0",
'image_width' => "",
'image_height' => "",
'navigation_btn_style' => "btn_style_3",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "paging_style_1",
'navigation_paging_align' => "right",
'navigation_paging_position' => "over",
'navigation_paging_margin' => "8",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_2/st2_sample1.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_2/st2_sample2.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_2/st2_sample3.jpg"),
)
),
'mobile_style_3' => array(
'name' => 'MOBILE STYLE 3 샘플',
'height' => "",
'background_color' => "#e5ebf8",
'background_image' => "",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "10",
'image_side_margin' => "10",
'image_width' => "",
'image_height' => "",
'navigation_btn_style' => "",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "paging_style_1",
'navigation_paging_align' => "center",
'navigation_paging_position' => "bottom",
'navigation_paging_margin' => "10",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_3/st3_sample1.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_3/st3_sample2.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/mobile_style_3/st3_sample3.jpg"),
)
),
'light_style_1' => array(
'name' => 'Light STYLE 1 샘플',
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_1/bnr_sample_01.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_1/bnr_sample_02.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_1/bnr_sample_03.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_1/bnr_sample_04.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_1/bnr_sample_05.jpg"),
)
),
'light_style_2' => array(
'name' => 'Light STYLE 2 샘플',
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_2/bg_sample_01.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_2/bg_sample_02.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_2/bg_sample_03.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_2/bg_sample_04.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/banner/light_style_2/bg_sample_05.jpg"),
),
'tag_ctrl' => array(
array("html_tag"=>
'
GET UP TO 60% OFF
SUMMER SALE
Limited items available at this price.
GOTO SHOP'),
array("html_tag"=>
'
over 200+
GRATE DEALS
While they last!
GOTO SHOP'),
array("html_tag"=>
'
UP TO 40% OFF
NEW ARRIVALS
Starting at 5,000₩
GOTO SHOP'),
array("html_tag"=>
'
GET UP TO 60% OFF
SUMMER SALE
Limited items available at this price.
GOTO SHOP'),
array("html_tag"=>
'
over 200+
GRATE DEALS
While they last!
GOTO SHOP'),
)
)
);
return $array[$style];
}
//팝업 슬라이드 배너 스타일
public function get_popup_banner_styles($platform=''){
$array = array(
'pc_style_2' => array(
'platform' => 'pc',
'name' => 'PC POPUP STYLE 6',
'use_image_size' => true,
'use_image_margin' => true,
'use_background' => true,
'use_navigation_paging' => true,
'use_navigation_paging_custom' => false,
'use_swipe' => false,
),
'pc_style_3' => array(
'platform' => 'pc',
'name' => 'PC POPUP STYLE 5',
'use_image_size' => true,
'use_image_margin' => true,
'use_background' => true,
'use_navigation_paging' => true,
'use_navigation_paging_custom' => false,
'use_swipe' => false,
),
'pc_style_4' => array(
'platform' => 'pc',
'name' => 'PC POPUP STYLE 4',
'use_image_size' => true,
'use_image_margin' => true,
'use_background' => true,
'use_navigation_paging' => true,
'use_navigation_paging_custom' => true,
'use_swipe' => false,
),
'pc_style_5' => array(
'platform' => 'pc',
'name' => 'PC POPUP STYLE 3',
'use_image_size' => true,
'use_image_margin' => true,
'use_background' => true,
'use_navigation_paging' => true,
'use_navigation_paging_custom' => true,
'use_swipe' => false,
),
'slider' => array(
'platform' => 'responsive',
'name' => 'LIGHT STYLE POPUP',
)
);
if($platform){
foreach($array as $k=>$v){
if($platform!=$v['platform']) unset($array[$k]);
}
}
return $array;
}
//팝업 슬라이드 배너 샘플
public function get_popup_banner_sample($style){
$array = array(
'pc_style_2' => array(
'name' => 'PC STYLE 6 샘플',
'height' => "290",
'background_color' => "#ffffff",
'background_image' => "",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "0",
'image_side_margin' => "0",
'image_width' => "480",
'image_height' => "290",
'navigation_btn_style' => "btn_style_3",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "paging_style_1",
'navigation_paging_align' => "right",
'navigation_paging_position' => "over",
'navigation_paging_margin' => "20",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_2/st2_sample1.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_2/st2_sample2.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_2/st2_sample3.jpg"),
)
),
'pc_style_3' => array(
'name' => 'PC STYLE 5 샘플',
'height' => "360",
'background_color' => "#dce3e8",
'background_image' => "",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "10",
'image_side_margin' => "10",
'image_width' => "480",
'image_height' => "290",
'navigation_btn_style' => "",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "paging_style_1",
'navigation_paging_align' => "center",
'navigation_paging_position' => "bottom",
'navigation_paging_margin' => "30",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_3/st3_sample1.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_3/st3_sample2.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_3/st3_sample3.jpg"),
)
),
'pc_style_4' => array(
'name' => 'PC STYLE 4 샘플',
'height' => "334",
'background_color' => "#ffffff",
'background_image' => "",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "0",
'image_side_margin' => "0",
'image_width' => "410",
'image_height' => "334",
'navigation_btn_style' => "btn_style_3",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "custom",
'navigation_paging_align' => "center",
'navigation_paging_position' => "over",
'navigation_paging_margin' => "10",
'navigation_paging_spacing' => "0",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_4/st4_sample1.jpg","tab_image_inactive"=>"tab1.jpg","tab_image_active"=>"tab1_on.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_4/st4_sample2.jpg","tab_image_inactive"=>"tab2.jpg","tab_image_active"=>"tab2_on.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_4/st4_sample3.jpg","tab_image_inactive"=>"tab3.jpg","tab_image_active"=>"tab3_on.jpg")
)
),
'pc_style_5' => array(
'name' => 'PC STYLE 3 샘플',
'height' => "376",
'background_color' => "#ffffff",
'background_repeat' => "no-repeat",
'background_position' => "left top",
'image_border_use' => "n",
'image_border_width' => "0",
'image_border_color' => "#ffffff",
'image_opacity_use' => "n",
'image_opacity_percent' => "0",
'image_top_margin' => "15",
'image_side_margin' => "15",
'image_width' => "255",
'image_height' => "255",
'navigation_btn_style' => "btn_style_3",
'navigation_btn_visible' => "fixed",
'navigation_paging_style' => "custom",
'navigation_paging_align' => "center",
'navigation_paging_position' => "bottom",
'navigation_paging_margin' => "10",
'navigation_paging_spacing' => "6",
'slide_event' => "auto",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_5/st5_sample1_b.jpg","tab_image_inactive"=>"tab1.jpg","tab_image_active"=>"tab1_on.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_5/st5_sample2_b.jpg","tab_image_inactive"=>"tab2.jpg","tab_image_active"=>"tab2_on.jpg"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/pc_style_5/st5_sample3_b.jpg","tab_image_inactive"=>"tab3.jpg","tab_image_active"=>"tab3_on.jpg"),
)
),
'slider' => array(
'name' => 'LIGHT STYLE POPUP',
'image_width' => "410",
'image_height' => "334",
'images' => array(
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/light_popup/pop_slider_01.jpg","tab_title"=>"회원가입 이벤트"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/light_popup/pop_slider_02.jpg","tab_title"=>"신상품 할인전"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/light_popup/pop_slider_03.jpg","tab_title"=>"포토후기 이벤트"),
array("target"=>"_blank","link"=>"/main/index","image"=>"/admin/skin/default/images/design/popup_banner/light_popup/pop_slider_04.jpg","tab_title"=>"브랜드 기획전"),
)
)
);
return $array[$style];
}
// 새로운 banner_seq 반환
public function get_new_banner_seq($skin){
$query = $this->db->query("select banner_seq from fm_design_banner where skin=? order by banner_seq desc limit 1",$skin);
$result = $query->row_array();
if($result){
return $result['banner_seq']+1;
}else{
return 1;
}
}
// 새로운 팝업 전용 banner_seq 반환 2015-10-05 jhr
public function get_new_popup_banner_seq(){
$query = $this->db->query("select banner_seq from fm_design_popup_banner order by banner_seq desc limit 1");
$result = $query->row_array();
if($result){
return $result['banner_seq']+1;
}else{
return 1;
}
}
// test아이디 list 불러오기
public function mall_t_id_list() {
/* member_seq = 회원고유코드
* user_id = 아이디
* user_name = 성함
* status = 승인상태
* B.business_seq = 기업 코드 (회원유형 확인)
* group_name = 등급
*/
$query = $this->db->query("SELECT A.member_seq, A.userid, A.user_name, A.status, B.business_seq, CASE WHEN A.status = 'done' THEN '승인' WHEN A.status = 'hold' THEN '미승인' WHEN A.status = 'withdrawal' THEN '탈퇴' WHEN A.status = 'dormancy' THEN '휴면' ELSE '' END AS status_nm, D.group_name FROM fm_member A LEFT JOIN fm_member_business B ON A.member_seq = B.member_seq LEFT JOIN fm_member_group D ON A.group_seq = D.group_seq WHERE A.mall_t_check = 'Y'");
$result = $query->result_array();
return $result;
}
public function favorite_decorations_save($params){
switch($params['favorite_act']) {
case 'insert':
$insert_params['favorite_type'] = $params['favorite_type'];
$insert_params['favorite_key'] = $params['key'];
$insert_params['platform'] = $params['platform'];
$insert_params['decoration'] = $params['decoration'];
$insert_params['text_align'] = $params['text_align'];
$insert_params['favorite_title'] = $params['favorite_title'];
$insert_params['favorite_desc'] = $params['favorite_desc'];
$insert_params['favorite_regist'] = $params['favorite_regist'];
$this->db->insert('fm_design_display_favorite', $insert_params);
break;
case 'update':
$update_params['favorite_title'] = $params['favorite_title'];
$update_params['favorite_desc'] = $params['fav