public static function get_tag($mode = '') { $tag_obj = new Keke_witkey_tag_class(); $taginfo = $tag_obj->query_keke_witkey_tag(1, null); $temp_arr = array(); if (!$mode) { foreach ($taginfo as $tag) { $temp_arr[$tag['tagname']] = $tag; } $taginfo = $temp_arr; } else { if ($mode == 1) { foreach ($taginfo as $tag) { $temp_arr[$tag['tag_id']] = $tag; } $taginfo = $temp_arr; } } return $taginfo; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(52); $tagid = $tagid ? $tagid : kekezu::admin_show_msg($_lang['error_param'], "index.php?do=tpl&view=taglist", 3, '', 'warning'); $tag_obj = new Keke_witkey_tag_class(); $tag_obj->setWhere("tag_id='{$tagid}'"); $tag_info = $tag_obj->query_keke_witkey_tag(); $tag_info = $tag_info[0]; if ($tag_info['tag_type'] == 1) { $task_obj = new Keke_witkey_task_class(); $where = "1=1 "; if ($tag_info['task_ids']) { $where .= "adn task_id in ({$tag_info['task_ids']})"; } else { if ($tag_info['model_id']) { $where .= "and model_id = '{$tag_info['model_id']}' "; } if ($tag_info['task_indus_ids']) { $where .= "and indus_id in ({$tag_info['task_indus_ids']}) "; } else { if ($tag_info['task_indus_id']) { $where .= "and indus_id = '{$tag_info['task_indus_id']}' "; } } if ($tag_info['task_status']) { $where .= "and task_status = '{$tag_info['task_status']}' "; } else { $where .= "and task_status in (2,3,4,7) "; } if ($tag_info['start_time1']) {
kekezu::admin_check_role(29); $indus_arr = kekezu::get_industry(); $art_cat_arr = kekezu::get_table_data("*", "witkey_article_category", "", "", "", "", "art_cat_id", null); $url = "index.php?do=tpl&view=edit_tag&tagid={$tagid}"; $tag_type_arr = keke_glob_class::get_tag_type(); $tag_obj = new Keke_witkey_tag_class(); if ($tagid) { $tag_obj->setWhere("tag_id='{$tagid}'"); $taginfo = $tag_obj->query_keke_witkey_tag(); $taginfo = $taginfo['0']; } if ($submit) { $txt_tagname or kekezu::admin_show_msg($_lang['enter_tag_name'], $url, 3, '', 'warning'); $tag_obj2 = new Keke_witkey_tag_class(); $tag_obj2->setWhere("tagname = '{$txt_tagname}' and tag_id!='{$tagid}'"); if ($tag_obj2->query_keke_witkey_tag()) { kekezu::admin_show_msg($_lang['tag_name_inuse_please_replace'], $url, 3, '', 'warning'); } $tag_obj->setTagname($txt_tagname); $tag_obj->setTag_type($tag_type); if ($tag_type == 6) { $code = $model_id; } else { $code = $tar_custom_code; } $tag_obj->setCode($code); $tag_obj->setTag_code($tag_code); if ($tagid) { $tag_obj->setWhere("tag_id='{$tagid}'"); $res = $tag_obj->edit_keke_witkey_tag(); $kekezu->_cache_obj->del("tag_list_cache");
if ($type === 'manage') { $url = "index.php?do={$do}&view={$view}&slt_page_size={$slt_page_size}&page={$page}&feedtype={$feedtype}&tpl_type={$tpl_type}&txt_title={$txt_title}&txt_tag_id={$txt_tag_id}&type={$type}&ord[]={$ord['0']}&ord[]={$ord['1']}"; } else { $url = "index.php?do={$do}&view={$view}&slt_page_size={$slt_page_size}&page={$page}&feedtype={$feedtype}&tpl_type={$tpl_type}&txt_title={$txt_title}&txt_feed_id={$txt_feed_id}&type={$type}&ord[]={$ord['0']}&ord[]={$ord['1']}"; } $limit = $slt_page_size; $kekezu->_page_obj->setAjax(1); $kekezu->_page_obj->setAjaxDom("ajax_dom"); $pages = $kekezu->_page_obj->getPages($count, $limit, $page, $url); if ($type == 'data' || !isset($type) || $type == '') { $feed_obj->setWhere($where . $pages[where]); $feed_arr = $feed_obj->query_keke_witkey_feed(); } if ($type == 'manage') { $tag_obj->setWhere($where . $pages[where]); $feed_arr = $tag_obj->query_keke_witkey_tag(); } foreach ($feed_arr as $k => $v) { $title_arr = unserialize($v[title]); $title_str = ' <a href="../' . $title_arr[feed_username][url] . '" target="_blank">' . $title_arr[feed_username][content] . '</a>' . $title_arr[action][content] . ' <a href="../' . $title_arr[event][url] . '" target="_blank">' . $title_arr[event][content] . '</a>'; $v[title] = $title_str; $new_feed_arr[] = $v; } $feed_arr = $new_feed_arr; if ($ac == 'del') { $delid or kekezu::admin_show_msg($_lang['err_parameter'], $url, 3, '', 'warning'); if ($type == 'data' || !isset($type) || $type == '') { $feed_obj->setWhere("feed_id='{$delid}'"); $res = $feed_obj->del_keke_witkey_feed(); } else {