<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(220); $lang_arr = keke_lang_class::lang_type(); $url = 'index.php?do=config&view=enclosure'; $objBasicConfigT = new Keke_witkey_basic_config_class(); $config_basic_arr = $objBasicConfigT->query_keke_witkey_basic_config(); foreach ($config_basic_arr as $k => $v) { $arrBasicConfig[$v['k']] = $v['v']; } if (isset($_POST) && !empty($_POST)) { if ($_POST['upload_type'] == '1') { unset($_POST['access_key']); unset($_POST['secret_key']); unset($_POST['qn_bucket']); unset($_POST['qn_domain']); } else { $res = kekezu::check_upload_access($_POST['access_key'], $_POST['secret_key'], $_POST['qn_bucket']); !$res and kekezu::admin_show_msg('请核对AccessKey、SecretKey和bucket是否准确!', $url, 3, '', 'warning'); } foreach ($_POST as $k => $v) { $objBasicConfigT->setWhere("k = '{$k}'"); $objBasicConfigT->setV(kekezu::k_input($v)); $res += $objBasicConfigT->edit_keke_witkey_basic_config(); } kekezu::admin_show_msg('提交成功', $url, 3, '', 'success'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
<?php defined('ADMIN_KEKE') or die('Access Denied'); kekezu::admin_check_role(208); $sqlHw = "select v from " . TABLEPRE . "witkey_basic_config where k = 'hot_words_status'"; $arrHw = db_factory::query($sqlHw); $sqlUpdate = "select v from " . TABLEPRE . "witkey_basic_config where k = 'update_status'"; $arrUpdate = db_factory::query($sqlUpdate); $obj_HotWords = new Keke_witkey_hotwords_class(); $pageSize and $pageSize = intval($pageSize) or $pageSize = 10; $page and $page = intval($page) or $page = 1; $url = "index.php?do={$do}&view={$view}&id={$id}&title={$title}&pageSize={$pageSize}&page={$page}&ord={$ord}"; if ($op == 'del') { $delid = $delid ? $delid : kekezu::admin_show_msg($_lang['wrong_parameters'], $url, 3, '', 'warning'); $obj_HotWords->setWhere("id='{$delid}'"); $obj_HotWords->del_keke_witkey_hotwords(); $kekezu->_cache_obj->del('tag_list_cache'); kekezu::admin_system_log($_lang['delete_tag'] . "{$delid}"); kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success'); } elseif (isset($sbt_action)) { if (is_array($ckb)) { $ids = implode(',', array_filter($ckb)); } if (count($ids)) { $obj_HotWords->setWhere(' id in (' . $ids . ') '); $obj_HotWords->del_keke_witkey_hotwords(); $kekezu->_cache_obj->del('tag_list_cache'); kekezu::admin_system_log($_lang['delete_tag'] . "{$ids}"); kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success'); } else { kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning');
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m23'); $ops = array("config", "control", "priv"); in_array($op, $ops) or $op = 'config'; $ac_url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}"; $config = $kekezu->_sys_config; kekezu::empty_cache(); switch ($op) { case "config": if ($sbt_edit) { $model_obj = keke_table_class::get_instance("witkey_model"); !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = ''; $fds['on_time'] = time(); $fds = kekezu::escape($fds); $res = $model_obj->save($fds, $pk); kekezu::admin_show_msg($_lang['update_success'], $ac_url, 3, '', 'success'); } else { $indus_arr = $kekezu->_indus_arr; $indus_index = kekezu::get_indus_by_index(); } break; case "control": if ($ac) { switch ($ac) { case "del_time_rule": $rule_id and keke_task_config::del_time_rule($rule_id); break; case "del_delay_rule": $rule_id and keke_task_config::del_delay_rule($rule_id);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(40); $table_obj = keke_table_class::get_instance('witkey_comment'); $wh = " obj_type = 6"; $w['comment_id'] and $wh .= " and comment_id = " . $w['comment_id']; $w['username'] and $wh .= " and username = '******'username']}'"; $ord['0'] and $wh .= " order by {$ord['0']} {$ord['1']}" or $wh .= " order by comment_id desc"; $url_str = "index.php?do=task&view=custom&w[comment_id]={$w['comment_id']}&w[username]={$w['username']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}"; $page = $page ? intval($page) : 1; $page_size = $slt_page_size ? intval($slt_page_size) : 10; $table_info = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom'); $comment_arr = $table_info['data']; $pages = $table_info['pages']; if ($ac == 'del') { $res = $table_obj->del('comment_id', $comment_id, $url_str); $res and kekezu::admin_show_msg($_lang['delete_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['delete_faile'], "index.php?do={$do}&view={$view}", 3, '', 'warning'); } if ($sbt_action) { $res = $table_obj->del('comment_id', $ckb, $url_str); $res and kekezu::admin_show_msg($_lang['mulit_operate_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['mulit_operate_fail'], "index.php?do={$do}&view={$view}", 3, '', 'warning'); } if ($by) { $t_userinfo = kekezu::get_user_info($to_uid); $to_username = $t_userinfo['username']; if (CHARSET == 'gbk') { $fds = kekezu::utftogbk($fds); } if ($ac) { kekezu::notify_user($fds['msg_title'], $fds['msg_content'], $to_uid, $to_username);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(34); $add_service_type = keke_glob_class::get_value_add_type(); $payitem_record_obj = new Keke_witkey_payitem_record_class(); $url = "index.php?do={$do}&view={$view}&w[record_id]={$w['record_id']}&w[username]={$w['username']}&w[item_code]={$w['item_code']}&w[ord]={$w['ord']}&page={$page}&w[page_size]={$page_size}"; $where = ' 1 = 1 '; $w[record_id] and $where .= " and record_id = " . $w[record_id]; $w[username] and $where .= " and username like '%{$w['username']}%'"; $w[item_code] and $where .= " and item_code like '%{$w['item_code']}%'"; $order_where = " order by on_time desc "; is_array($w['ord']) and $order_where = ' order by ' . $w['ord'][0] . ' ' . $w['ord'][1]; $where = $where . $order_where; $all_buy_sql = "select sum(use_cash) as cash from " . TABLEPRE . "witkey_payitem_record "; $all_buy_pro = db_factory::query($all_buy_sql); $all_buy_pro = $all_buy_pro[0] ? $all_buy_pro[0] : 0; $page_obj = $kekezu->_page_obj; $page = intval($page); $page or $page = 1; $w[page_size] and $page_size = intval($w[page_size]) or $page_size = 10; $payitem_record_obj->setWhere($where); $count = $payitem_record_obj->count_keke_witkey_payitem_record(); $page_obj->setAjax(1); $page_obj->setAjaxDom("ajax_dom"); $pages = $page_obj->getPages($count, $page_size, $page, $url); $where .= $pages[where]; $payitem_record_obj->setWhere($where); $payitem_record_arr = $payitem_record_obj->query_keke_witkey_payitem_record(); require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_payitem_' . $view);
<?php defined("ADMIN_KEKE") or exit("Access Denied"); kekezu::admin_check_role(147); $enterprise_obj = new Keke_witkey_auth_enterprise_class(); $url = "index.php?do=" . $do . "&view=" . $view . "&code=" . $code . "&w[page_size]=" . $w[page_size] . "&w[enterprise_auth_id]=" . $w[enterprise_auth_id] . "&w[username]=" . $w[username] . "&w[auth_status]=" . $w[auth_status]; if (isset($ac)) { switch ($ac) { case "pass": kekezu::admin_system_log($obj . $_lang['enterprise_auth_pass']); $auth_obj->review_auth($enterprise_auth_id, 'pass', $url); break; case "not_pass": if ($is_submit == "1") { $v_arr = array($_lang['username'] => $name, '网站名称' => $kekezu->_sys_config['website_name'], "审核原因" => $reason); keke_shop_class::notify_user($_GET['uid'], $name, 'auth_auth_fail', "企业认证失败", $v_arr, 2); kekezu::admin_system_log($obj . $_lang['enterprise_auth_nopass']); $auth_obj->review_auth($enterprise_auth_id, 'not_pass', $url); } else { $uid = $_GET['uid']; $strSql = "select * from " . TABLEPRE . "witkey_space where uid=" . $uid; $arrResult = db_factory::get_one($strSql); require keke_tpl_class::template('auth/enterprise/admin/tpl/auth_tp'); die; } break; case 'del': kekezu::admin_system_log($obj . $_lang['enterprise_auth_delete']); $auth_obj->del_auth($enterprise_auth_id, $url); break; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m47'); $ops = array("config", "control", "priv", "cash_rule"); in_array($op, $ops) or $op = 'config'; $ac_url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}"; kekezu::empty_cache(); $config = $kekezu->_sys_config; switch ($op) { case "config": if ($sbt_edit) { $model_obj = keke_table_class::get_instance("witkey_model"); !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = ''; $fds['on_time'] = time(); $fds = kekezu::escape($fds); $res = $model_obj->save($fds, $pk); kekezu::admin_show_msg($_lang['update_success'], $ac_url, 3, '', 'success'); } else { $indus_arr = $kekezu->_indus_arr; $indus_index = kekezu::get_indus_by_index(); } break; case "control": if ($sbt_edit) { is_array($conf) and $res .= keke_task_config::set_task_ext_config($model_id, $conf); kekezu::admin_show_msg($_lang['update_success'], $ac_url, 3, '', 'success'); } else { $confs = unserialize($model_info['config']); is_array($confs) && extract($confs); $cash_cove = kekezu::get_cash_cove();
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(21); $file_type_arr = keke_glob_class::get_file_type(); $file_obj = new Keke_witkey_file_class(); $backup_patch = S_ROOT; intval($page) or $page = 1; intval($wh['page_size']) or $wh['page_size'] = 10; $url = "index.php?do={$do}&view={$view}&page={$page}&wh[page_size]={$wh['page_size']}&txt_file_id={$txt_file_id}&txt_file_name={$txt_file_name}&ord[]={$ord['0']}&ord[]={$ord['1']}"; if ($ac == 'del') { if ($file_id) { $file_obj->setWhere('file_id=' . $file_id); $file_info = $file_obj->query_keke_witkey_file(); foreach ($file_info as $v) { @unlink($backup_patch . $v['save_name']) and kekezu::admin_system_log($_lang['delete_attachment'] . $v['file_name']); } $file_obj->setWhere('file_id=' . $file_id); $res = $file_obj->del_keke_witkey_file(); kekezu::admin_system_log($_lang['delete_attachment'] . $file_id); $res and kekezu::admin_show_msg($_lang['atachment_delete_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['attchment_not_exist_delete_fail'], $url, 3, '', 'warning'); } } elseif (isset($sbt_action)) { is_array($ckb) and $ids = implode(',', array_filter($ckb)); if (sizeof($ids)) { $where = "file_id in ({$ids})"; $file_obj->setWhere($where); $file_info = $file_obj->query_keke_witkey_file(); foreach ($file_info as $v) { @unlink($backup_patch . $v['save_name']); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $table_obj = keke_table_class::get_instance('witkey_service'); kekezu::admin_check_role('m714'); $service_obj = new service_shop_class(); $status_arr = array("1" => "待审核", "2" => "出售中", "3" => "已下架", "4" => "审核失败"); $wh = "1=1"; $w[service_id] and $wh .= " and service_id= " . $w[service_id]; $w[title] and $wh .= " and title like '%{$w['title']}%'"; $w[username] and $wh .= " and username like '%{$w['username']}%' "; if ($w['service_status'] == 'a1') { $wh .= " and edit_status= 1 "; } else { $w['service_status'] and $wh .= " and service_status={$w['service_status']}"; } $wh .= " and model_id = 7"; intval($page) or $page = 1; intval($page_size) and $page_size = intval($page_size) or $page_size = '10'; $w[order_status] and $wh .= " and order_status like '%{$w['order_status']}%' "; switch ($ord) { case 'id-desc': $wh .= " order by service_id desc"; break; case 'id-asc': $wh .= " order by service_id asc"; break; case 'default': default: $wh .= " ORDER BY ( CASE service_status WHEN 1 THEN 0 ELSE 1 END ), ( CASE edit_status WHEN 1 THEN 0 ELSE 1 END ), on_time DESC "; break;
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(18); $db_factory = new db_factory(); $file_obj = new keke_file_class(); $backup_patch = S_ROOT . './data/backup/'; $file_arr = $file_obj->get_dir_file_info($backup_patch); switch ($ac) { case 'restore': set_time_limit(0); ini_set('memory_limit', '1024M'); $file_sql = file_get_contents($backup_patch . $file_arr[$restore_name][name]); $file_sql = htmlspecialchars_decode($file_sql); $sql = str_replace("\r\n", "\n", $file_sql); $ret = array(); $num = 0; foreach (explode(";\n", trim($sql)) as $query) { $ret[$num] = ''; $queries = explode("\n", trim($query)); foreach ($queries as $query) { $ret[$num] .= isset($query[0]) && $query[0] == '#' || isset($query[1]) && isset($query[1]) && $query[0] . $query[1] == '--' ? '' : $query; } $num++; } foreach ($ret as $vvv) { empty($vvv) or $res *= db_factory::execute($vvv); } kekezu::admin_system_log($_lang['restore_database_operate_success'] . $file_arr[$restore_name][name]); kekezu::echojson($_lang['database_restore_success'], 1); break;
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m35'); $ops = array("config", "control", "priv"); in_array($op, $ops) or $op = 'config'; $ac_url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}"; $config = $kekezu->_sys_config; kekezu::empty_cache(); switch ($op) { case "config": if ($sbt_edit) { $model_obj = keke_table_class::get_instance("witkey_model"); !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = ''; $fds['on_time'] = time(); $fds = kekezu::escape($fds); $res = $model_obj->save($fds, $pk); kekezu::admin_show_msg($_lang['update_success'], $ac_url, 3, '', 'success'); } else { $indus_arr = $kekezu->_indus_arr; $indus_index = kekezu::get_indus_by_index(); } break; case "control": if ($ac) { switch ($ac) { case "del_time_rule": $rule_id and keke_task_config::del_time_rule($rule_id); break; case "del_delay_rule": $rule_id and keke_task_config::del_delay_rule($rule_id);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m11'); $ops = array("config", "control", "priv"); in_array($op, $ops) or $op = 'config'; $ac_url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}"; kekezu::empty_cache(); $config = $kekezu->_sys_config; switch ($op) { case "config": if ($sbt_edit) { $model_obj = keke_table_class::get_instance("witkey_model"); !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = ''; $fds['on_time'] = time(); $fds = kekezu::escape($fds); $res = $model_obj->save($fds, $pk); kekezu::admin_show_msg($_lang['edit_successfully'], $ac_url, 3, '', 'success'); } else { $indus_arr = $kekezu->_indus_arr; $indus_index = kekezu::get_indus_by_index(); } break; case "control": if ($ac) { switch ($ac) { case "del_time_rule": $rule_id and keke_task_config::del_time_rule($rule_id); break; case "del_delay_rule": $rule_id and keke_task_config::del_delay_rule($rule_id);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m1222'); $task_config = unserialize($model_info['config']); $cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "", "", '', '', "cash_rule_id"); $model_list = $kekezu->_model_list; $task_status = match_task_class::get_task_status(); $table_obj = keke_table_class::get_instance('witkey_task'); $page and $page = intval($page) or $page = 1; $page_size and $page_size = intval($page_size) or $page_size = 10; $wh = "model_id={$model_info['model_id']}"; if ($w['task_id']) { $wh .= " and task_id = " . intval($w['task_id']); } if ($w['task_title']) { $wh .= ' and task_title like ' . '"%' . $w['task_title'] . '%" '; } if ($w['task_status']) { $wh .= " and task_status = " . $w['task_status']; } $w['task_status'] === '0' and $wh .= " and task_status = 0"; $ord[0] && $ord[1] and $wh .= " order by {$ord['0']} {$ord['1']}" or $wh .= " order by task_id desc "; $url_str = "index.php?do=model&model_id=12&view=list&w[task_id]={$w['task_id']}&w[task_title]={$w['task_title']}&w[task_status]={$w['task_status']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}&page={$page}&page_size={$page_size}"; $table_arr = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom'); $task_arr = $table_arr['data']; $pages = $table_arr['pages']; if ($task_id) { $task_audit_arr = get_task_info($task_id); $start_time = date("Y-m-d H:i:s", $task_audit_arr['start_time']); $end_time = date("Y-m-d H:i:s", $task_audit_arr['end_time']);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(154); $case_obj = new Keke_witkey_case_class(); $task_obj = new Keke_witkey_task_class(); $case_id and $case_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_case where case_id ='{$case_id}'"); $txt_task_id and $case_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_task where task_id = '{$txt_task_id}'"); $url = "index.php?do=case&view=list"; if ($ac == 'ajax' && $id && $obj) { case_obj_exists($id, $obj) and kekezu::echojson($_lang['echojson_msg'], 1) or kekezu::echojson($_lang['echojosn_erreor_msg'], 0); } if (isset($sbt_edit)) { if ($hdn_case_id) { $case_obj->setCase_id($hdn_case_id); } else { if (case_obj_exists($fds['obj_id'], $case_type)) { $case_obj->setObj_id($fds['obj_id']); } } $case_obj->setObj_type($case_type); $case_obj->setCase_auther($fds['case_auther']); $case_obj->setCase_price($fds['case_price']); $case_obj->setCase_desc(kekezu::escape($fds['case_desc'])); $case_obj->setCase_title(kekezu::escape($fds['case_title'])); $case_obj->setOn_time(time()); $case_img = $hdn_case_img or $case_img = keke_file_class::upload_file("fle_case_img"); $case_obj->setCase_img($case_img); if ($hdn_case_id) { $res = $case_obj->edit_keke_witkey_case(); kekezu::admin_system_log($_lang['edit_case'] . ':' . $hdn_case_id);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(139); $add_service_type = keke_glob_class::get_value_add_type(); $payitem_record_obj = new Keke_witkey_payitem_record_class(); $url = "index.php?do={$do}&view={$view}&w[record_id]={$w['record_id']}&w[username]={$w['username']}&w[item_code]={$w['item_code']}&w[ord]={$w['ord']}&page={$page}&w[page_size]={$page_size}"; $where = ' 1 = 1 '; $w[record_id] and $where .= " and record_id = " . $w[record_id]; $w[username] and $where .= " and username like '%{$w['username']}%'"; $w[item_code] and $where .= " and item_code like '%{$w['item_code']}%'"; $order_where = " order by on_time desc "; is_array($w['ord']) and $order_where = ' order by ' . $w['ord'][0] . ' ' . $w['ord'][1]; $where = $where . $order_where; $all_buy_sql = "select sum(use_cash) as cash from " . TABLEPRE . "witkey_payitem_record "; $all_buy_pro = db_factory::query($all_buy_sql); $all_buy_pro = $all_buy_pro[0] ? $all_buy_pro[0] : 0; $page_obj = $kekezu->_page_obj; $page = intval($page); $page or $page = 1; $w[page_size] and $page_size = intval($w[page_size]) or $page_size = 10; $payitem_record_obj->setWhere($where); $count = $payitem_record_obj->count_keke_witkey_payitem_record(); $page_obj->setAjax(1); $page_obj->setAjaxDom("ajax_dom"); $pages = $page_obj->getPages($count, $page_size, $page, $url); $where .= $pages[where]; $payitem_record_obj->setWhere($where); $payitem_record_arr = $payitem_record_obj->query_keke_witkey_payitem_record(); require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_payitem_' . $view);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(6); $indus_table_obj = new Keke_witkey_industry_class(); $indus_obj = keke_table_class::get_instance("witkey_industry"); $file_obj = new keke_file_class(); $indus_arr = kekezu::get_industry(0); isset($indus_id) and intval($indus_id) > 0 and $indus_info = $indus_obj->get_table_info('indus_id', $indus_id); empty($art_info) or extract($art_info); if (isset($indus_id) && intval($indus_id) > o) { $indus_info = $indus_obj->get_table_info('indus_id', $indus_id); $indus_pid = $indus_info['indus_pid']; } if ($sbt_edit) { $indus_table_obj->setWhere("indus_name = '" . $fs['indus_name'] . "'"); $res = $indus_table_obj->count_keke_witkey_industry(); !$pk && $res and kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, $_lang['indus_has']); $fs['on_time'] = time(); isset($fs['is_recommend']) or $fs['is_recommend'] = 0; isset($fs['totask']) or $fs['totask'] = 0; isset($fs['togoods']) or $fs['togoods'] = 0; $fs = kekezu::escape($fs); $res = $indus_obj->save($fs, $pk); $indus_info = $indus_obj->get_table_info('indus_id', $pk['indus_id']); $url = "index.php?do=task&view=industry"; !$pk and kekezu::admin_system_log($_lang['add_industry']) or kekezu::admin_system_log($_lang['edit_industry'] . ':' . $indus_info['indus_name']); $file_obj->delete_files(S_ROOT . "./data/data_cache/"); $file_obj->delete_files(S_ROOT . './data/tpl_c/'); $res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning'); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(171); $keyword_obj = new Keke_witkey_article_keyword_class(); $table_obj = new keke_table_class("witkey_article_keyword"); $url = "index.php?do={$do}&view={$view}&w[word]={$w['word']}&w[keyword_id]={$w['keyword_id']}&page_size={$page_size}&page={$page}&ord[0]={$ord['0']}&ord[1]={$ord['1']}"; if (isset($ac)) { switch ($ac) { case "del": $res = $table_obj->del('keyword_id', $keyword_id, $url); break; case "open": $keyword_obj->setWhere("keyword_id=" . $keyword_id); $keyword_obj->setKeyword_status(1); $res = $keyword_obj->edit_keke_witkey_article_keyword(); break; case "disable": $keyword_obj->setWhere("keyword_id=" . $keyword_id); $keyword_obj->setKeyword_status(0); $res = $keyword_obj->edit_keke_witkey_article_keyword(); break; } $res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning'); } elseif (isset($sbt_action)) { sizeof($ckb) or kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning'); is_array($ckb) and $ids = implode(',', array_filter($ckb)); $keyword_obj->setWhere("keyword_id in ({$ids})"); if ($sbt_action) { $res = $keyword_obj->del_keke_witkey_article_keyword(); kekezu::admin_system_log($_lang['mulit_recovery_articles']);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(73); $msg_obj = new Keke_witkey_msg_tpl_class(); $config_msg_arr = $kekezu->get_table_data("*", "witkey_msg_config", " 1 = 1 ", "config_id desc ", '', '', 'config_id'); $now_msg_arr = db_factory::get_one(" select * from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'"); $now_v = unserialize($now_msg_arr['v']); if (isset($tpl_code)) { $msg_tpl = db_factory::query(" select * from " . TABLEPRE . "witkey_msg_tpl where tpl_code='{$tpl_code}'"); if ($msg_tpl) { kekezu::echojson('', 1, $msg_tpl); } else { echo json_encode(array("status" => 0)); } } $objMsgC = new Keke_witkey_msg_config_class(); if (isset($sbt_edit)) { if ($slt_tpl_code) { $objMsgC->setWhere("k='{$slt_tpl_code}'"); $objMsgC->setContent($tar_msg_temp_content); $res = $objMsgC->edit_keke_witkey_msg_config(); } if ($res) { kekezu::admin_system_log($_lang['edit_sms_tpl']); kekezu::admin_show_msg($_lang['edit_sms_tpl_success'], 'index.php?do=msg&view=intertpl&slt_tpl_code=' . $slt_tpl_code, 3, '', 'success'); } } $msg_tpl = db_factory::get_one("select content from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'"); $msg_tpl = $msg_tpl['content']; require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . '/tpl/admin_msg_' . $view);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m612'); $goods_config = kekezu::get_task_config($model_id); is_array($goods_config) and extract($goods_config) or $goods_config = array(); $model_obj = keke_table_class::get_instance('witkey_model'); $ops = array('config', 'control', 'rule'); in_array($op, $ops) or $op = 'config'; $url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}"; kekezu::empty_cache(); $indus_arr = $kekezu->_indus_arr; $indus_index = kekezu::get_indus_by_index(); if (isset($sbt_edit)) { $log_op_arr = array("config" => $_lang['goods_basic_config'], "control" => $_lang['goods_flow_config'], "rule" => $_lang['goods_permissions_config']); $log_msg = $_lang['has_update'] . $log_op_arr[$op]; kekezu::admin_system_log($log_msg); switch ($op) { case 'config': !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = ''; $fds['on_time'] = time(); $fds = kekezu::escape($fds); $res = $model_obj->save($fds, $pk); kekezu::admin_show_msg($_lang['goods_basic_config_update_success'], $url, 3, '', 'success'); break; case 'control': if ($filepath) { copy("../" . $filepath, "../tpl/default/img/shop/shop_default_big.png"); } is_array($cont) and $res = keke_task_config::set_task_ext_config($model_id, $cont); kekezu::admin_show_msg($_lang['goods_flow_config_update_success'], $url, 3, '', 'success');
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(82); $suggest_obj = new keke_table_class('witkey_proposal'); $proposal_obj = new Keke_witkey_proposal_class(); $suggest_type_arr = array('1' => '我的建议', '2' => '我的问题'); $suggest_status_arr = array('1' => '待回复', '2' => '已回复'); $url = "index.php?do={$do}&view={$view}&suggest_id={$suggest_id}"; if ($suggest_id) { $suggest_info = db_factory::get_one(sprintf("select * from %switkey_proposal where p_id = '%d'", TABLEPRE, $suggest_id)); $user_info = kekezu::get_user_info($suggest_info['uid']); if ($sbt_op) { $proposal_obj->setWhere('p_id = ' . $suggestid); $proposal_obj->setOp_content(kekezu::escape($op_result['process_result'])); $proposal_obj->setOp_time(time()); $proposal_obj->setPro_status(2); $proposal_obj->setOp_uid($_SESSION['uid']); $proposal_obj->setOp_username($_SESSION['username']); $res_id = $proposal_obj->edit_keke_witkey_proposal(); $v_arr = array('用户名' => $suggest_username, '用户标题' => $suggest_title, '建议内容' => kekezu::escape($pro_desc), '回复内容' => kekezu::escape($op_result['process_result']), $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($suggest_uid, $suggest_username, 'suggest_reply', '建议答复', $v_arr, 2); $res_id and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复成功', 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复失败', 'warning'); } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_suggest_reply');
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('152'); $model_list = $kekezu->_model_list; $today = date('Y-m-d', time()); $st or $st = $today; $ed or $ed = $today; $f_sql = sprintf(' and fina_time between %s and %s', strtotime($st), strtotime($ed) + 24 * 3600); $w_sql = sprintf(' and applic_time between %s and %s', strtotime($st), strtotime($ed) + 24 * 3600); if ($st == $ed && $st == $today) { $desc = $_lang['today']; } elseif ($st == $ed && $ed != $today) { $desc = $st; } else { $desc = $st . '~' . $ed; } $desc = '<font color="red">' . $desc . '</font>'; $ops = array('in', 'profit', 'withdraw', 'charge'); in_array($op, $ops) or $op = 'in'; switch ($op) { case 'in': $sql = ' select sum(fina_cash) cash,sum(fina_credit) credit,count(fina_id) count '; $t_sql = sprintf(' ,model_id from %switkey_finance a left join %switkey_task b on a.obj_id=b.task_id where fina_action="pub_task" and model_id>0 ', TABLEPRE, TABLEPRE); $task = db_factory::query($sql . $t_sql . $f_sql . ' group by model_id', 1, 3600); $s_sql = sprintf(' ,model_id from %switkey_finance a left join %switkey_service b on a.obj_id=b.service_id where obj_type="service" and fina_type = "out" and model_id>0 ', TABLEPRE, TABLEPRE); $service = db_factory::query($sql . $s_sql . $f_sql . ' group by model_id', 1, 3600);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(57); $feed_type = keke_glob_class::get_feed_type(); $feed_obj = new Keke_witkey_feed_class(); $tag_obj = new Keke_witkey_tag_class(); $type or $type = 'manage'; $url = "index.php?do={$do}&view={$view}&type={$type}&tag_id={$tag_id}"; if ($type === 'manage') { $tag_id and $feed_info = db_factory::get_one(" select tagname,tag_id,cache_time,tag_code,tpl_type,code from " . TABLEPRE . "witkey_tag where tag_type=8 and tag_id='{$tag_id}'"); $code = unserialize($feed_info['code']); } if ($sbt_edit) { if ($type === 'manage') { $slt_feed_type == 1 and kekezu::admin_show_msg($_lang['add_fail_select_type'], $url, 3, '', 'warning'); $cbk_group and $tpl_type = implode(",", $cbk_group) or $tpl_type = $_K['template']; $tag_obj->setTagname($txt_tag_name); $tag_obj->setTag_code($tag_code); $tag_obj->setCache_time($txt_cache_time); $tag_obj->setTpl_type($tpl_type); $tag_obj->setTag_type(8); $code['feed_type'] = $slt_feed_type; $code['load_num'] = intval($txt_load_num) ? intval($txt_load_num) : 9; $code['user_id'] = 0; $code['obj_id'] = 0; $code['cache_name'] = $txt_cache_name ? $txt_cache_name : $txt_tag_name; $code = serialize($code); $tag_obj->setCode($code); if ($hdn_tag_id) { $tag_obj->setTag_id($hdn_tag_id);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m58'); $task_config = unserialize($model_info['config']); $cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "", "", '', '', "cash_rule_id"); $model_list = $kekezu->_model_list; $task_status = dtender_task_class::get_task_status(); $table_obj = keke_table_class::get_instance('witkey_task'); $page and $page = intval($page) or $page = 1; $page_size and $page_size = intval($page_size) or $page_size = 10; $wh = "model_id={$model_info['model_id']}"; $url_str = "index.php?do=model&model_id=5&view=list&w[task_id]={$w['task_id']}&w[task_title]={$w['task_title']}&w[task_status]={$w['task_status']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}&page={$page}&page_size={$page_size}"; $w[task_id] and $wh .= " and task_id =" . intval($w['task_id']); $w[task_title] and $wh .= " and task_title like '%{$w['task_title']}%' "; $w[task_status] and $wh .= " and task_status = " . intval($w['task_status']); $ord[0] && $ord[1] and $wh .= " order by {$ord['0']} {$ord['1']} " or $wh .= " order by task_id desc "; $table_arr = $table_obj->get_grid($wh, $url_str, $page, 10, null, 1, 'ajax_dom'); $task_arr = $table_arr['data']; $pages = $table_arr['pages']; if ($task_id) { $task_audit_arr = get_task_info($task_id); $start_time = date("Y-m-d H:i:s", $task_audit_arr['start_time']); $end_time = date("Y-m-d H:i:s", $task_audit_arr['end_time']); $url = "<a href =\"{$_K['siteurl']}/index.php?do=task&id={$task_audit_arr['task_id']}\" target=\"_blank\" >" . $task_audit_arr['task_title'] . "</a>"; } switch ($ac) { case "del": $res = keke_task_config::task_del($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success'); break;