$ad_result = $ad_obj->del_keke_witkey_ad(); $tag_obj->setWhere('tag_id=' . $delid); $result = $tag_obj->del_keke_witkey_tag(); kekezu::admin_system_log($_lang['delete_ads_tags_id'] . $delid . 'name:' . $ad_name . $_lang['corresponding_ads_data'] . $ad_result . $_lang['tiao']); kekezu::admin_show_msg($result ? $_lang['delete_ads_tags_success'] : $_lang['delete_fail'], $url, 3, '', $result ? 'success' : 'warning'); } else { if (!empty($ckb)) { $ids = is_array($ckb) && count($ckb) > 0 ? implode(',', $ckb) : kekezu::admin_show_msg($_lang['delete_fail_select_operation'], $url, 3, '', 'warning'); $tag_name_arr = db_factory::query(' select tagname from ' . TABLEPRE . "witkey_tag where tag_id in({$ids}) "); while (list($key, $value) = each($tag_name_arr)) { $ad_obj->setWhere('ad_name = "' . $value['tagname'] . '"'); $ad_result .= $ad_obj->del_keke_witkey_ad(); } $tag_obj->setWhere('tag_id in(' . $ids . ')'); $result = $tag_obj->del_keke_witkey_tag(); kekezu::admin_system_log($_lang['mulit_delete_ads_tags'] . $ids . $_lang['is_corresponding_ads_data'] . $ad_result . $_lang['tiao']); kekezu::admin_show_msg($result ? $_lang['mulit_delete_ads_tags_success'] : $_lang['delete_fail'], $url, 3, '', $res ? 'success' : 'warning'); } } } $where = '1=1 and tag_type=9'; $w['tag_id'] && ($where .= ' and tag_id="' . $w['tag_id'] . '"'); $w['tagname'] && ($where .= " and INSTR(tagname,'{$w['tagname']}')>0 "); is_array($w['ord']) && ($w['ord'] = $w['ord'][0] . ' ' . $w['ord'][1]); $w['ord'] && ($where .= ' order by ' . $w['ord']) or $sql .= ' order by tag_id desc '; $w['page_size'] and $page_size = intval($w['page_size']) or $page_size = 10; $page and $page = intval($page) or $page = '1'; $tag_arr = $table_obj->get_grid($where, $url, $page, $page_size); $pages = $tag_arr['pages']; $tag_arr = $tag_arr['data']; require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
$url = "index.php?do={$do}&view={$view}&page_size={$page_size}&page={$page}"; $page_size and $page_size = intval($page_size) or $page_size = 10; $page and $page = intval($page) or $page = 1; if ($ac == 'freshen') { kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=task&view=tasktemplet&page_size={$page_size}&page={$page}", 3, '', 'success'); } if ($ac == 'edit') { $tasktemInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_template where id=" . intval($tasktemid)); require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . "/tpl/admin_task_tasktemplet_edit"); die; } elseif ($ac == 'add') { require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . "/tpl/admin_task_tasktemplet_edit"); die; } elseif ($ac == 'del') { db_factory::execute("delete from " . TABLEPRE . "witkey_task_template where id=" . intval($tasktemid)); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=task&view=tasktemplet&page_size={$page_size}&page={$page}", 3, '', 'success'); } elseif ($ckb) { $strtem = implode(",", $ckb); db_factory::execute("delete from " . TABLEPRE . "witkey_task_template where id in ({$strtem})"); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=task&view=tasktemplet&page_size={$page_size}&page={$page}", 3, '', 'success'); } $where = " 1=1"; $w[art_id] and $where .= " and art_id = " . intval($w[art_id]); strval($w[art_title]) and $where .= " and art_title like '%{$w['art_title']}%'"; $w[art_cat_id] and $w[art_cat_id] = intval($w[art_cat_id]) and $where .= " and art_cat_id in (select art_cat_id from " . TABLEPRE . "witkey_article_category where art_index like '%{{$w[art_cat_id]}}%')"; strval($w[username]) and $where .= " and username like '%{$w['username']}%' "; $where .= " order by id desc"; $r = $tasktem_obj->get_grid($where, $url, $page, $page_size, null, 1, 'ajax_dom'); $tasktem_arr = $r[data]; $pages = $r[pages]; require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . "/tpl/admin_task_{$view}");
$url = "index.php?do={$do}&view={$view}"; $default_currency = $kekezu->_sys_config['currency']; $currencies_obj = new keke_table_class('witkey_currencies'); $page and $page = intval($page) or $page = 1; $slt_page_size and $slt_page_size = intval($slt_page_size) or $slt_page_size = 20; $cur = new keke_curren_class(); if ($ac == 'del') { if ($cid && $cid != keke_curren_class::$_default['currencies_id']) { $res = $currencies_obj->del("currencies_id", $cid, $url); kekezu::admin_system_log($_lang['links_delete'] . $del_id); kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success'); die; } else { kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, $_lang['del_default'], 'warning'); die; } } else { $where = ' 1 = 1 '; $d = $currencies_obj->get_grid($where, $url, $page, $slt_page_size, null, 1, 'ajax_dom'); $currencies_config = $d[data]; $pages = $d[pages]; } if ($ac == 'update') { if (isset($code)) { $res = $cur->update(false, $code); } else { $res = $cur->update(true); } $res and kekezu::admin_show_msg($_lang['update_mi_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['update_mi_fail'], $url, 3, '', 'warning'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
$sql = sprintf("update %switkey_space set status=1 where uid in (%s)", TABLEPRE, $ids); db_factory::execute($sql); foreach ($space_arr as $v) { $v_arr = array($_lang['username'] => $v['username'], $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_msg_class::notify_user($v['uid'], $v['username'], 'unfreeze', $_lang['user_unfreeze'], $v_arr, 2); } kekezu::admin_show_msg($_lang['operate_success'], 'index.php?do=user&view=list', 3, $_lang['mulit_open_operate_success'], 'success'); break; } } else { $where_str = " 1=1 "; $page or $page = 1; $slt_page_size = intval($slt_page_size) ? intval($slt_page_size) : 10; $space['uid'] and $where_str .= "and uid='{$space['uid']}' "; $space['username'] and $where_str .= "and username like '%{$space['username']}%' "; $space['email'] and $where_str .= "and email='{$space['email']}' "; $space['mobile'] and $where_str .= "and mobile='{$space['mobile']}' "; $slt_static == 1 and $where_str .= "and status=1 "; $slt_static == 2 and $where_str .= "and status=2 "; $slt_static == 3 and $where_str .= "and status=3 "; $ord[0] && $ord[1] and $where_str .= " order by {$ord['0']} {$ord['1']}" or $where_str .= " order by uid desc"; $res = $table_class->get_grid($where_str, $url_str, $page, $slt_page_size, null, 1, 'ajax_dom'); $userlist_arr = $res['data']; $pages = $res['pages']; $uids = array(); foreach ((array) $userlist_arr as $v) { $uids[] = $v['uid']; } $uids and $shop_open = kekezu::get_table_data('shop_id,uid', 'witkey_shop', 'uid in (' . implode(',', $uids) . ')', '', '', '', 'uid'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_list');
defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(32); $target_position_arr = array('top' => $_lang['top'], 'bottom' => $_lang['bottom'], 'left' => $_lang['left'], 'right' => $_lang['right'], 'center' => $_lang['center'], 'global' => $_lang['global']); $ad_obj = new Keke_witkey_ad_class(); $table_obj = new keke_table_class('witkey_ad'); $page = isset($page) ? intval($page) : '1'; $url = "index.php?do={$do}&view={$view}&ad_id={$ad_id}&ad_type={$target_id}&ad_name={$ad_name}&target_id={$target_id}&ord={$ord}&page={$page}"; if ($action && $action == 'u_order') { !$u_id && exit; !$u_value && exit; $ad_obj->setListorder(intval($u_value)); $ad_obj->setWhere('ad_id=' . intval($u_id)); $ad_obj->edit_keke_witkey_ad(); exit; } if ($ac == 'del' && $ad_id && $target_id) { $result = AdClass::delAdByAdId($ad_id); kekezu::admin_system_log($_lang['delete_ads'] . $ad_id); kekezu::admin_show_msg($result ? $_lang['ads_delete_success'] : $_lang['no_operation'], "index.php?do={$do}&view={$view}&target_id={$target_id}&ord={$ord}&page={$page}", 3, '', $result ? 'success' : 'warning'); } $targets_arr = kekezu::get_table_data('*', 'witkey_ad_target', '', '', '', '', 'target_id'); $pagesize = isset($page_size) ? intval($page_size) : '10'; $where = '1=1'; $where .= $ad_id ? ' and ad_id="' . intval($ad_id) . '"' : ''; $where .= $target_id && !$ad_id ? ' and target_id="' . intval($target_id) . '"' : ''; $where .= $ad_name && !$ad_id ? ' and ad_name like "%' . $ad_name . '%"' : ''; is_array($w['ord']) and $where .= ' order by ' . $ord[0] . ' ' . $ord[1]; $ad_arr = $table_obj->get_grid($where, $url, $page, $pagesize, null, 1, 'ajax_dom'); $pages = $ad_arr['pages']; $ad_arr = $ad_arr['data']; require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);