public function __construct($auth_code) { $this->_auth_code = $auth_code; $this->_auth_name = $auth_code . "_auth"; $this->_auth_table_name = "witkey_auth_" . $auth_code; $this->_tab_obj = keke_table_class::get_instance($this->_auth_table_name); }
static function createExtData($objid, $model_id, $data) { if (!self::checkCustom($model_id)) { return false; } $extCode = CustomClass::getExtCodeByModelId($model_id); if ($data) { foreach ($data as $k => $v) { if (in_array($k, $extCode)) { $fieldInfo = self::getFieldName($k); $extData = array(); $extData[$k]['fieldname'] = $fieldInfo['f_name']; $extData[$k]['content'] = kekezu::escape($v); if ($extData) { $jsondata = serialize($extData); $tabObj = keke_table_class::get_instance("witkey_custom_fields_ext"); $fields = array(); $fields['c_id'] = $fieldInfo['id']; $fields['model_id'] = $model_id; $fields['extdata'] = $jsondata; $fields['objid'] = $objid; $tabObj->save($fields); } } } } }
if (is_array($ckb)) { $ids = implode(',', array_filter($ckb)); } if (count($ids)) { $tag_obj->setWhere(' tag_id in (' . $ids . ') '); $tag_obj->del_keke_witkey_tag(); $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'); } } else { $where = " tag_type=5 "; $type or $type = 2; if ($type == 1) { $where .= " and tagname like '%活动%' "; } elseif ($type == 2) { $where .= " and tagname like '%协议%' "; } else { $where .= " and tagname like '%任务%' "; } strval($txt_title) and $where .= " and tagname like '%{$txt_title}%' "; $ord['1'] and $where .= " order by" . $ord['0'] . $ord['1']; $t_obj = keke_table_class::get_instance("witkey_tag"); $tag_type = 5; $d = $t_obj->get_grid($where, $url, $page, $slt_page_size); $tag_arr = $d['data']; $pages = $d['pages']; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_tpl_' . $view);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $objTable = keke_table_class::get_instance("witkey_custom_fields"); intval($page) or $page = 1; $url = "index.php?do=custom&view=fields&model_id={$model_id}&page={$page}"; $id = intval($id); $model_id = intval($model_id); if ($opajax == 'setorder') { db_factory::execute("UPDATE `" . TABLEPRE . "witkey_custom_fields` SET `listorder`='" . intval($ordernum) . "' WHERE (`id`='" . $id . "')"); die; } if ($opajax == 'setopen') { db_factory::execute("UPDATE `" . TABLEPRE . "witkey_model` SET `open_custom`='" . intval($opennum) . "' WHERE (`model_id`='" . $model_id . "')"); die; } if ($ac == 'del') { CustomClass::delExtData($id); $res = $objTable->del('id', $id); $res and kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, '', 'warning'); } else { $where = " 1 = 1 and model_id = " . $model_id; $where .= " order by listorder asc "; $d = $objTable->get_grid($where, $url, $page, 10, null, 1, 'ajax_dom'); $dataList = $d['data']; $pages = $d['pages']; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(213); $objDistrict = keke_table_class::get_instance('witkey_district'); $url = 'index.php?do=config&view=dq'; if ($page) { $page = $_R['page']; $url .= '&page=' . $page; } else { $page = 1; } $region_config = keke_glob_class::getRegionConfig(); $objDq = keke_table_class::get_instance('witkey_basic_config'); if ($_R['op'] == 'del') { $intResult = $objDistrict->del('id', $_R[id]); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=config&view=dq&page=" . $page, 3, '', 'success'); } if ($_R['op'] == 'region_switch') { $result = keke_glob_class::updateRegionConfig('region_search_switch', $_R['val']); $result and kekezu::echojson('', $_R['val']) or kekezu::echojson('', $_R['val']); } if ($_R['op'] == 'region_checkbox') { if ($_R['dtype'] == 'shop') { keke_glob_class::updateRegionConfig('region_search_shop', $_R['val']); } else { keke_glob_class::updateRegionConfig('region_search_task', $_R['val']); } kekezu::echojson('', $_R['val']); } $one = $objDistrict->get_grid('upid=0', $url, $page, 10, ' order by id asc', '1', 'ajax_dom');
function __construct($comment_type) { global $kekezu; $this->_comment_obj = keke_table_class::get_instance("witkey_comment"); $this->_comment_type = $comment_type; }
$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']); } $file_obj->setWhere($where); $res = $file_obj->del_keke_witkey_file(); if ($res) { kekezu::admin_system_log($_lang['delete_attachment'] . "{$ids}"); kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success'); } } else { kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning'); } } else { $where = ' 1 = 1 '; intval($txt_file_id) and $where .= " and file_id = {$txt_file_id}"; strval($txt_file_name) and $where .= " and file_name like '%{$txt_file_name}%' "; $ord['1'] and $where .= " order by {$ord['0']} {$ord['1']} " or $where .= " order by file_id desc"; $table_obj = keke_table_class::get_instance("witkey_file"); $d = $table_obj->get_grid($where, $url, $page, $wh['page_size'], null, 1, 'ajax_dom'); $file_arr = $d['data']; $pages = $d['pages']; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
public static function get_table_obj($table = 'witkey_payitem') { return keke_table_class::get_instance($table); }
<?php $strUrl = 'index.php?do=user&view=gz&op=mark'; $page and $strUrl .= "&page={$page}"; $type and $strUrl .= "&type={$type}"; $obj and $strUrl .= "&obj={$obj}"; $page and $page = intval($page) or $page = 1; $mark_obj = keke_table_class::get_instance('witkey_mark'); $arrObj = array('goods' => '商品', 'gy' => '雇佣', 'sreward' => '任务', 'mreward' => '任务', 'preward' => '任务', 'tender' => '任务', 'dtender' => '任务'); $arrMarkStatus = array('0' => '尚未评价', '1' => '好评', '2' => '中评', '3' => '差评'); $w1 = ' 1 = 1 '; if ($type) { switch ($type) { case 1: $w1 .= " and a.mark_status='0' and ((a.by_uid='{$gUid}' and a.mark_type = '2' )) "; $w2 .= " and a.mark_status='0' and ((a.by_uid='{$gUid}' and a.mark_type = '2' )) "; break; case 2: $w1 .= " and a.by_uid='{$gUid}' and a.mark_type = '2' "; $w2 .= " and a.by_uid='{$gUid}' and a.mark_type = '2' "; break; case 3: $w1 .= " and a.uid = '{$gUid}' and a.mark_type = '1' "; $w2 .= " and a.uid='{$gUid}' and a.mark_type = '1' "; break; } } else { $w1 .= " and ((a.uid = '{$gUid}' and a.mark_type = '1') or (a.by_uid='{$gUid}' and a.mark_type = '2' )) "; $w2 .= " and ((a.uid = '{$gUid}' and a.mark_type = '1') or (a.by_uid='{$gUid}' and a.mark_type = '2' )) "; } if ($obj) {
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $tab_obj = keke_table_class::get_instance("witkey_prom_item"); $upload_obj = new keke_upload_class(UPLOAD_ROOT, array("gif", 'jpeg', 'jpg', 'png'), UPLOAD_MAXSIZE); if ($sbt_edit) { $fds['prom_type'] == 'site' and $fds['item_type'] = 'img'; $fds['on_time'] = time(); $files = $upload_obj->run('item_pic', 1); $files != 'The uploaded file is Unallowable!' and $item_pic = $files['0']['saveName']; $item_pic and $fds['item_pic'] = $item_pic; if ($item_id) { $edit = $tab_obj->save($fds, $pk); kekezu::admin_system_log($_lang['edit_prom_material'] . $item_id); $edit && kekezu::admin_show_msg($_lang['prom_material_edit_success'], '', 3, '', 'success'); } $add = $tab_obj->save($fds); kekezu::admin_system_log($_lang['add_prom_material']); $add && kekezu::admin_show_msg($_lang['prom_material_add_success'], '', 3, '', 'success'); } else { $item_id and $item_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_prom_item where item_id = '{$item_id}'"); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
public function __construct($code = 'mobile') { parent::__construct($code); $this->_primary_key = 'mobile_a_id'; $this->_tab_obj = keke_table_class::get_instance($this->_auth_table_name); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); intval($task_id) or kekezu::admin_show_msg($_lang['param_error'], 'index.php?do=model&model_id=' . $model_id . '&view=list', 3, '', 'warning'); $ops = array('basic', 'work', 'comm'); in_array($op, $ops) or $op = 'basic'; keke_lang_class::loadlang('task_edit', 'task'); if ($op == 'basic') { $model_list = $kekezu->_model_list; $task_status = dtender_task_class::get_task_status(); $task_id = $task_id ? $task_id : kekezu::admin_show_msg($_lang['param_error'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'warning'); $task_obj = keke_table_class::get_instance("witkey_task"); $task_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_task where task_id = '{$task_id}'"); $task_sub_time = date('Y-m-d', $task_info['sub_time']); $task_start_time = date('Y-m-d', $task_info['start_time']); $task_config = unserialize($model_info['config']); $file_list = db_factory::query(sprintf(" select * from %switkey_file where task_id='%d' and obj_type='task' ", TABLEPRE, $task_id)); $cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "model_code='{$model_info['model_code']}'", "", '', '', "cash_rule_id"); $operate = keke_task_config::can_operate($task_info['task_status'], $task_info['is_top']); $task_info['ext_fields'] = CustomClass::getExtDataList($task_id, $task_info['model_id']); if ($sbt_edit) { if ($ext_fds) { CustomClass::editExtData($task_id, $model_id, $ext_fds); } if (!$fds[indus_id]) { kekezu::admin_show_msg($_lang['must_select_a_industry'], $_SERVER['HTTP_REFERER'], 3, '', 'warning'); } if ($_FILES['fle_task_pic']['name']) { $task_pic = keke_file_class::upload_file("fle_task_pic"); } else { $task_pic = $task_pic_path;
public static function edit_item($auth_code, $data, $pk = null, $big_ico_name = null, $small_ico_name = null, $small_n_ico_name = null, $conf = array()) { global $kekezu; global $_lang; $auth_item = keke_auth_base_class::get_auth_item($auth_code); $auth_item or kekezu::admin_show_msg($_lang['auth_item_edit_fail_notice'], "index.php?do=auth&view=item_list", '3', '', 'error'); $tab_obj = keke_table_class::get_instance("witkey_auth_item"); $big_ico_name and $data['auth_big_ico'] = $big_ico_name == 'delete' ? '' : $big_ico_name; $small_ico_name and $data['auth_small_ico'] = $small_ico_name == 'delete' ? '' : $small_ico_name; $small_n_ico_name and $data['auth_small_n_ico'] = $small_n_ico_name == 'delete' ? '' : $small_n_ico_name; $data['update_time'] = time(); $res = $tab_obj->save($data, $pk); if ($res) { $kekezu->_cache_obj->del('auth_item_cache_list'); kekezu::admin_system_log($_lang['edit_auth_item'] . $auth_item['auth_title']); kekezu::admin_show_msg($_lang['auth_item_edit_success'], $_SERVER['HTTP_REFERER'], 3, '', 'success'); } else { kekezu::admin_show_msg($_lang['auth_item_edit_fail'], $_SERVER['HTTP_REFERER'], 3, '', 'warning'); } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(2); $pay_api_obj = keke_table_class::get_instance("witkey_pay_api"); $payment_config = kekezu::get_payment_config($payname, $type); $pay_config = unserialize($payment_config['config']); $payment_exist = db_factory::get_count(" select payment from " . TABLEPRE . "witkey_pay_api where payment='{$payname}' and type='{$type}'"); $payment_config or kekezu::admin_show_msg($_lang['wrong_model_directory'], "index.php?do=config&view=pay", 3, '', 'warning'); $temp = array(); foreach (explode(";", $payment_config['initparam']) as $item) { $it = explode(":", $item); $temp[] = array('k' => $it['0'], 'name' => $it['1'], 'v' => $payment_config[$it['0']]); } $items = $temp; if (isset($sbt_edit)) { $pay_config = array(); $pay_config['pay_status'] = $fds['pay_status']; switch ($payname) { case 'alipayjs': $pay_config['account'] = $fds['account']; $pay_config['seller_id'] = $fds['seller_id']; $pay_config['safekey'] = $fds['safekey']; $pay_config['account_name'] = $fds['account_name']; break; case 'alipaydual': $pay_config['account'] = $fds['account']; $pay_config['seller_id'] = $fds['seller_id']; $pay_config['safekey'] = $fds['safekey']; $pay_config['account_name'] = $fds['account_name']; break;
<?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');
function saveToFiles($data) { $objFileT = keke_table_class::get_instance('witkey_file'); return $objFileT->save($data); }
$satus_arr = tender_task_class::get_work_status(); } break; case 'comm': if ($ac && $comm_id) { $id = intval($comm_id); switch ($ac) { case 'del': $sql = ' delete from %switkey_comment where comment_id=%d'; $type == 1 and $sql .= ' or p_id=%d'; $res = db_factory::execute(sprintf($sql, TABLEPRE, $id, $id)); $res and kekezu::echojson('', 1) or kekezu::echojson('', 0); die; break; case 'load': $list = db_factory::query(sprintf(' select * from %switkey_comment where p_id=%d', TABLEPRE, $id)); require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_ext'); die; break; } } else { $o = keke_table_class::get_instance('witkey_comment'); $tmp = $o->get_grid('obj_id=' . $task_id . ' and p_id=0', $url, $page, $limit, ' order by on_time desc ', 1, 'ajax_dom'); $list = $tmp['data']; $pages = $tmp['pages']; } break; case 'mark': $list = db_factory::query(sprintf(" select * from %switkey_mark where origin_id=%d and `mark_status`!=0 and model_code='%s'", TABLEPRE, $task_id, $model_info['model_code'])); break; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(33); $kf_obj = keke_table_class::get_instance("witkey_space"); $member_obj = new Keke_witkey_member_class(); $space_obj = new Keke_witkey_space_class(); $url = 'index.php?do=user&view=custom_list&uid=' . $w[uid] . '&username='******'&w[page_size]=' . $w[page_size] . '&status=' . $w[status] . '&ord[uid]=' . $ord[uid]; switch ($op) { case "add": if ($is_submit) { die('1'); $m_info = db_factory::get_one(" select uid,username,group_id from " . TABLEPRE . "witkey_space where uid = '{$fds['uid']}'"); !$m_info and kekezu::admin_show_msg($_lang['user_no_exit'], $url, 3, '', 'warning'); if ($m_info) { if ($m_info[group_id] == 7) { kekezu::admin_show_msg($_lang['no_operate_again_for_user_is_kf_'], $url, 3, '', 'warning'); } else { $space_obj->setUid($fds[uid]); $space_obj->setGroup_id(7); $res = $space_obj->edit_keke_witkey_space(); if ($res) { kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]); $v_arr = array('管理员名' => $admin_info['username'], '用户名' => $spaceinfo['username']); keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', '客服设置', $v_arr, 2); kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success'); } } } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');
<?php $strUrl = 'index.php?do=user&view=shop&op=caseadd'; $shopInfo = db_factory::get_one(sprintf(" select * from %switkey_shop where uid='%d' ", TABLEPRE, $gUid)); keke_shop_release_class::checkShopStatus($uid, 'index.php?do=user&view=shop&op=setting'); $objCaseT = keke_table_class::get_instance('witkey_shop_case'); if ($objId) { $caseInfo = db_factory::get_one(sprintf(" select * from %switkey_shop_case where case_id='%d' ", TABLEPRE, intval($objId))); } if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $case_name = kekezu::utftogbk($case_name); $case_desc = kekezu::utftogbk($case_desc); } $arrData = array('shop_id' => $shopInfo['shop_id'], 'case_name' => $case_name, 'case_url' => $case_url, 'case_pic' => $case_pic, 'case_desc' => $case_desc, 'on_time' => time()); if ($objId) { $intRes = $objCaseT->save($arrData, array('case_id' => intval($objId))); } else { $intRes = $objCaseT->save($arrData); } unset($objCaseT); kekezu::show_msg('已保存', 'index.php?do=user&view=shop&op=caselist', NULL, NULL, 'ok'); }
<?php $arrSidesPrimary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help" and art_cat_pid = 100', 'listorder asc ', '', '', 'art_cat_id', 3600); $arrSecondary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help"', ' listorder asc ', '', '', 'art_cat_id', 3600); $arrLastsHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY art_id desc LIMIT 0,5'); $arrCommonHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY views desc LIMIT 0,5'); $arrHotSearch = array('发布任务', '认证', '提现', '充值', '发布商品'); $id and $id = intval($id); $Keyword = strval(trim($word)); $strUrl = "index.php?do=help"; $id and $strUrl .= "&id=" . intval($id); $intPage and $strUrl .= "&intPage=" . intval($intPage); $intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize); $objArticleT = keke_table_class::get_instance('witkey_article'); $strWhere .= " cat_type = 'help' "; $page and $intPage = intval($page); $intPage = intval($intPage) ? $intPage : 1; $intPagesize = intval($intPagesize) ? $intPagesize : 15; $id && $id != '' and $strWhere .= " and art_cat_id=" . intval($id); $Keyword and $strWhere .= " and ( art_title like '%" . trim($Keyword) . "%' or content like '%" . trim($Keyword) . "%' )"; $strWhere .= " order by art_id desc"; $arrDatas = $objArticleT->get_grid($strWhere, $strUrl, $intPage, $intPagesize, null, null, null); $arrLists = $arrDatas['data']; $intCount = $arrDatas['count']; $strPages = $arrDatas['pages']; unset($objArticleT); if ($id) { $arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($id)); $arrHelpKerword = db_factory::get_one("select seo_title, seo_keyword,seo_desc from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($arrHelpKerword['art_cat_pid'])); } else { $arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = 100');
<?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 $regionCfg = keke_glob_class::getRegionConfig(); $arrDistrictInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($id)); $province = CommonClass::getDistrictById($arrDistrictInfo['province']); $city = CommonClass::getDistrictById($arrDistrictInfo['city']); $area = CommonClass::getDistrictById($arrDistrictInfo['area']); $intSellerGoodsNum = db_factory::get_count(sprintf("select count(service_id) from %switkey_service where model_id=6 and uid=%d and service_status=2", TABLEPRE, $arrOwnerInfo['uid'])); $intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "service"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrServiceInfo['service_id']))); if ($type == "get") { $arrResult1 = keke_user_class::get_user_info($uid); $objFavorite = keke_table_class::get_instance('witkey_favorite'); $arrFields = array('keep_type' => $obj_type, 'obj_type' => $do, 'origin_id' => $service_id, 'obj_id' => $service_id, 'obj_name' => $arrServiceInfo['title'], 'uid' => $uid, 'username' => $gUsername, 'on_date' => time()); $intResult = $objFavorite->save($arrFields); die; } if ($type == "getno") { $sql1 = "DELETE FROM " . TABLEPRE . "witkey_favorite WHERE obj_id =" . $service_id . ' and uid=' . $uid; $sql1 .= " and obj_type='" . $do . "'"; db_factory::query($sql1); die; } $intFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($arrServiceInfo['uid']))); if ($gUid && $gUid !== $arrServiceInfo['uid']) { $myOrderInfo = db_factory::get_one("select a.order_status from " . TABLEPRE . "witkey_order a left join " . TABLEPRE . "witkey_order_detail b on a.order_id=b.order_id where b.obj_type='service' and b.obj_id={$id} and a.order_uid={$gUid}"); } $page and $intPage = intval($page); intval($intPage) and $p['page'] = intval($intPage) or $p['page'] = '1'; intval($intPagesize) and $p['page_size'] = intval($intPagesize) or $p['page_size'] = 10; $objTime = new goods_time_class(); $objTime->validtaskstatus();
$ky and $strUrl .= "&ky=" . $ky; $intPage and $strUrl .= "&intPage=" . $intPage; $intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize); $arrTaskTimeDesc = keke_glob_class::get_taskstatus_desc(); $arrPayitemConfig = PayitemClass::getPayitemConfig(null, null, null, 'item_id'); $pd and $arrIndusPInfo = kekezu::get_indus_info($pd); $i and $arrIndusInfo = kekezu::get_indus_info($i); $arrTaskNavs = TaskClass::getEnabledTaskModelList(); if ($m) { $arrTaskStatus = call_user_func(array($arrTaskNavs[$m]['model_code'] . "_task_class", "get_task_status")); } $arrCashCoves = TaskClass::getTaskCashCove(); $arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务'); $arrCityInfo = CommonClass::getDistrictById($p); $arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name'); $objTaskT = keke_table_class::get_instance('witkey_task'); $strWhere = " 1=1 "; $intPage = intval($intPage) ? $intPage : 1; $intPagesize = intval($intPagesize) ? $intPagesize : 20; $arrTaskModelIds = array_keys($arrTaskNavs); in_array($m, $arrTaskModelIds) and $strWhere .= " and a.model_id = " . $m or $strWhere .= " and a.model_id in(" . implode(',', $arrTaskModelIds) . ") "; $i and $strWhere .= " and a.indus_id = " . $i; $pd and $strWhere .= " and a.indus_pid = " . $pd; switch ($r) { case 1: $strWhere .= " and a.model_id = 4 "; break; case 2: $strWhere .= " and a.model_id != 4 "; break; }
db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'hot_words_status')); } elseif ($ac == 'handle') { db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'update_status')); } else { $w = " 1 = 1 "; $id and $w .= " and id = '{$id}'"; $title and $w .= " and words like '%{$title}%'"; if ($ord) { switch ($ord) { case 1: $w .= " order by id asc"; break; case 2: $w .= " order by id desc"; break; case 3: $w .= " order by count asc"; break; case 4: $w .= " order by count desc"; break; } } else { $w .= 'order by id desc'; } $obj_Hw = keke_table_class::get_instance("witkey_hotwords"); $d = $obj_Hw->get_grid($w, $url, $page, $pageSize); $arrHotWords = $d['data']; $pages = $d['pages']; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
<?php defined('IN_KEKE') or exit('Access Denied'); $objMsgT = keke_table_class::get_instance('witkey_msg'); $strUrl = 'index.php?do=user&view=message&op=outbox'; $intPage and $strUrl .= '&intPage=' . $intPage; $intPagesize and $strUrl .= '&intPagesize=' . $intPagesize; if (isset($action)) { switch ($action) { case 'mulitDel': if (is_array($ckb)) { foreach ($ckb as $v) { list($intMsgId, $intStatus) = explode(',', $v); if ($intStatus == 0) { db_factory::execute("update " . TABLEPRE . "witkey_msg set msg_status=1 where msg_id = " . intval($intMsgId)); } else { $objMsgT->del('msg_id', intval($intMsgId)); } } kekezu::show_msg('删除成功', $strUrl, NULL, NULL, 'ok'); } else { kekezu::show_msg('删除失败', NULL, NULL, NULL, 'error'); } break; case 'delSingle': if ($objId) { if ($msgStatus == 0) { db_factory::execute("update " . TABLEPRE . "witkey_msg set msg_status=1 where msg_id = " . intval($objId)); } else { $objMsgT->del('msg_id', intval($objId)); }
$status = '1'; keke_shop_release_class::updateShopStatus($uid, $status); } else { keke_shop_release_class::closeShop($uid, $status); } die; } $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); if ($shopInfo['city']) { $arrCity = CommonClass::getDistrictById($shopInfo['city'], 'id,upid,name'); } if ($shopInfo['area']) { $arrArea = CommonClass::getDistrictById($shopInfo['area'], 'id,upid,name'); } $arrBackgroudStyle = unserialize($shopInfo['shop_backstyle']); $objShopT = keke_table_class::get_instance('witkey_shop'); if (isset($formhash) && kekezu::submitcheck($formhash)) { if (strtoupper(CHARSET) == 'GBK') { $shop_name = kekezu::utftogbk($shop_name); $shop_slogans = kekezu::utftogbk($shop_slogans); $seo_title = kekezu::utftogbk($seo_title); $seo_keyword = kekezu::utftogbk($seo_keyword); $seo_desc = kekezu::utftogbk($seo_desc); $address = kekezu::utftogbk($address); } $arrData = array('shop_name' => $shop_name, 'shop_slogans' => $shop_slogans, 'province' => $province, 'city' => $city, 'area' => $area, 'address' => $address, 'coordinate' => $coordinate); $banner and $arrData['banner'] = $banner; $background and $arrData['shop_background'] = $background; $repeat and $arrBackgroudStyle['repeat'] = $repeat; $position and $arrBackgroudStyle['position'] = $position; is_array($arrBackgroudStyle) and $arrData['shop_backstyle'] = serialize($arrBackgroudStyle);
if ($op == 'basic') { $service_obj = new service_shop_class(); $service_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id='%d'", TABLEPRE, $service_id)); if ($service_info['pic']) { $servicePics = explode(',', $service_info['pic']); } if ($service_info['file_path']) { $serviceFiles = explode(',', $service_info['file_path']); } $ac_url = "index.php?do=model&model_id=7&view=edit&service_id=" . $service_id; $status_arr = $service_obj->get_service_status(); unset($status_arr[1]); $service_info['ext_fields'] = CustomClass::getExtDataList($service_info['service_id'], $service_info['model_id']); if ($sbt_edit) { if ($ext_fds) { CustomClass::editExtData($service_id, $model_id, $ext_fds); } kekezu::admin_system_log($_lang['to_witkey_service_name_is'] . $service_info[title] . $_lang['in_edit_operate']); service_shop_class::set_on_sale_num($pk['service_id'], $fds['service_status']); $service_obj = keke_table_class::get_instance('witkey_service'); $c = $service['content']; $fds = kekezu::escape($service); $service['content'] = $c; isset($service['is_top']) or $service['is_top'] = 0; $service_obj->save($service, array("service_id" => $service_id)); kekezu::admin_show_msg($_lang['service_edit_success'], 'index.php?do=model&model_id=7&view=list', 2, $_lang['service_edit_success'], 'success'); } } else { require S_ROOT . '/shop/' . $model_info['model_dir'] . '/admin/shop_misc.php'; } require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/service_edit_' . $op);
<?php defined('IN_KEKE') or exit('Access Denied'); $intUserRole = intval($gUserInfo['user_type']); if ($intUserRole === 2) { $strAccountName = '企业机构名称'; $strInputName = 'company'; } else { $strAccountName = '真实姓名'; $strInputName = 'real_name'; } $strUrl = 'index.php?do=user&view=account&op=addbankinfo'; $objMemBankT = keke_table_class::get_instance("witkey_member_bank"); $arrBankList = keke_glob_class::get_bank(); $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); $strBankZone = $_SESSION['bank_zone']; $strBankDetail = $_SESSION['bank_zone_detail']; switch ($step) { case "step1": if (isset($formhash) && kekezu::submitcheck($formhash)) { $strTxtName = strval(trim($txt_name)); $strBankName = strval(trim($bank_name)); $strBankFullName = strval(trim($bank_full_name)); $strCardNum = strval(trim($card_num)); if (!$strTxtName) { $tips['errors']['txt_name'] = '请输入' . $strAccountName; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($province === '选择省份' || !$province) { $tips['errors']['province'] = '请选择省份'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $region_config = keke_glob_class::getRegionConfig(); $objDistrict = keke_table_class::get_instance('witkey_district'); $url = 'index.php?do=config&view=dqtwo'; if ($page) { $page = $_R['page']; $url .= '&page=' . $page; } else { $page = 1; } if ($_R['id']) { $id = intval($_R[id]); $url .= '&id=' . $id; } $two = $objDistrict->get_grid('upid=' . $id, $url, $page, 10, ' order by id desc'); if ($_R['is_submit'] == 1) { foreach ($_R[id] as $key => $val) { $arrFields = array('name' => $_R[nametwo][$key]); $arrWhere = array('id' => $_R[id][$key]); $intResult = $objDistrict->save($arrFields, $arrWhere); } kekezu::admin_show_msg("修改成功", "index.php?do=config&view=dqtwo&page=" . $page . '&id=' . $_R['upid1'], 2, '', 'success'); } else { require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view); } if ($_R[op] == 'del') { $intResult = $objDistrict->del('id', $_R[id2]); kekezu::admin_show_msg("删除成功", "index.php?do=config&view=dqtwo&page=" . $page . '&id=' . $_R['id'], 2, '', 'success'); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(82); $suggest_obj = keke_table_class::get_instance("witkey_proposal"); $page and $page = intval($page) or $page = 1; $slt_page_size and $slt_page_size = intval($slt_page_size) or $slt_page_size = 10; $url = "index.php?do={$do}&view={$view}&page={$page}&slt_page_size={$slt_page_size}&txt_p_id={$txt_p_id}&txt_pro_title={$txt_pro_title}&ord[]={$ord['0']}&ord[]={$ord['1']}"; $suggest_type_arr = array('1' => '我的建议', '2' => '我的问题'); $suggest_status_arr = array('1' => '待回复', '2' => '已回复'); if ($ac == 'del') { if ($p_id) { $res = $suggest_obj->del("p_id", $p_id, $url); kekezu::admin_system_log('删除建议' . $p_id); kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success'); } else { kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, '', 'warning'); } } else { $where = ' 1 = 1 '; $txt_p_id and $where .= " and p_id = " . intval($txt_p_id); $txt_pro_title and $where .= " and pro_title like '%" . $txt_pro_title . "%'"; $slt_static and $where .= " and pro_status = " . intval($slt_static); if ($ord[1]) { $where .= " order by {$ord['0']} {$ord['1']} "; } else { $where .= " order by p_id desc"; } $d = $suggest_obj->get_grid($where, $url, $page, $slt_page_size, null, 1, 'ajax_dom'); $suggestlist_arr = $d[data]; $pages = $d[pages];