<?php defined('ADMIN_KEKE') or exit('Access Denied'); $art_cat_obj = new Keke_witkey_article_category_class(); $types = array('help', 'art'); $type = !empty($type) && in_array($type, $types) ? $type : 'art'; if ($type == 'art') { kekezu::admin_check_role(14); $art_cat_arr = kekezu::get_table_data('*', "witkey_article_category", "art_cat_pid =1 or art_cat_id = 1", " art_cat_id desc", '', '', 'art_cat_id', null); } elseif ($type == 'help') { kekezu::admin_check_role(44); $art_cat_arr = kekezu::get_table_data('*', "witkey_article_category", "art_index like '%{100}%'", " art_cat_id desc", '', '', 'art_cat_id', null); } if ($art_cat_id) { $art_cat_obj->setWhere('art_cat_id=' . intval($art_cat_id)); $art_cat_info = $art_cat_obj->query_keke_witkey_article_category(); $art_cat_info = $art_cat_info[0]; $art_cat_pid = $art_cat_info[art_cat_pid]; } if ($sbt_edit) { $flag = null; if ($hdn_art_cat_id) { $art_cat_obj->setWhere('art_cat_id=' . intval($hdn_art_cat_id)); $art_cat_info = $art_cat_obj->query_keke_witkey_article_category(); $art_cat_info = $art_cat_info[0]; if ($art_cat_info['art_cat_pid'] > 0) { $art_cat_obj->setArt_cat_pid($slt_cat_id); } } else { $art_cat_obj->setArt_cat_pid($slt_cat_id); }
$a['pic'] = $v['art_pic']; $a['time'] = $v['pub_time']; $temp_arr[] = $a; } } elseif ($tag_info['tag_type'] == 3) { $cat_obj = null; if ($tag_info['cat_type'] == 2) { $cat_obj = new Keke_witkey_article_category_class(); $where = "1=1 "; $where .= $tag_info['cat_cat_ids'] ? "and art_cat_id in ({$tag_info['cat_cat_ids']}) " : $tag_info['cat_cat_ids'] ? "and art_cat_id = '{$tag_info['cat_cat_id']}') " : ""; if ($tag_info['cat_loadsub']) { $where .= $tag_info['cat_cat_ids'] ? "and art_cat_pid in ({$tag_info['cat_cat_ids']}) " : $tag_info['cat_cat_ids'] ? "and art_cat_pid = '{$tag_info['cat_cat_id']}') " : ""; } $where .= $tag_info['cat_onlyrecommend'] ? "and is_show = 1 " : ""; $cat_obj->setWhere($where . " order by listorder"); $cat_arr = $cat_obj->query_keke_witkey_article_category(); $temp_arr = array(); foreach ($cat_arr as $v) { $a = array(); $a['id'] = $v['art_cat_id']; $a['name'] = $v['cat_name']; $temp_arr[] = $a; } } else { $cat_obj = new Keke_witkey_industry_class(); $where = "1=1 "; $where .= $tag_info['cat_cat_ids'] ? "and indus_id in ({$tag_info['cat_cat_ids']})" : $tag_info['cat_cat_ids'] ? "and indus_id = '{$tag_info['cat_cat_id']}')" : ""; if ($tag_info['cat_loadsub']) { $where .= $tag_info['cat_cat_ids'] ? "and indus_pid in ({$tag_info['cat_cat_ids']})" : $tag_info['cat_cat_ids'] ? "and indus_pid = '{$tag_info['cat_cat_id']}')" : ""; } $where .= $tag_info['cat_onlyrecommend'] ? "and is_recommend = 1 " : "";