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);
 }
Exemple #2
0
 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);
                 }
             }
         }
     }
 }
 public static function get_table_obj($table = 'witkey_payitem')
 {
     return keke_table_class::get_instance($table);
 }
<?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);
 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');
     }
 }
 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);
<?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');
}
Exemple #9
0
$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;
}
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(32);
$tag_obj = new Keke_witkey_tag_class();
$ad_obj = new Keke_witkey_ad_class();
$table_obj = new keke_table_class('witkey_tag');
$url = "index.php?do={$do}&view={$view}&order_type={$order_type}&w[tpl_type]={$w['tpl_type']}&w[page_size]={$page_size}&w[ord]={$w['ord']}&page={$page}";
if ($sbt_action == $_lang['mulit_delete'] || $ac == 'del') {
    if (!empty($delid)) {
        $ad_name = db_factory::get_count("select tagname from " . TABLEPRE . "witkey_tag where tag_id = '{$delid}'");
        $ad_obj->setWhere("ad_name='{$ad_name}'");
        $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');
        }
    }
    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);
Exemple #12
0
<?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');
Exemple #13
0
<?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();
<?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');
 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');
$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);
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(2);
$url = "index.php?do={$do}&view={$view}";
$default_currency = $kekezu->_sys_config['currency'];
if (!empty($cid)) {
    $sql = sprintf("select * from %switkey_currencies where currencies_id ='%d' limit 0,1", TABLEPRE, $cid);
    $currency_config = db_factory::get_one($sql);
}
if ($conf and $sbt_edit) {
    if (preg_match('/([a-z])+/i', $conf['code'])) {
        $currencies_obj = new keke_table_class('witkey_currencies');
        $conf['last_updated'] = time();
        if ($default_cur) {
            $default_currency_conf = db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='currency'", TABLEPRE, $default_cur));
            $_SESSION['currency'] = $default_cur;
        }
        $res = $currencies_obj->save($conf, $pk);
        kekezu::admin_show_msg($_lang['operate_success'], $url, 2, $_lang['edit_success'], "success");
    } else {
        kekezu::admin_show_msg($_lang['operate_fail'], $url, 2, $_lang['currency_code_fill_error'], "error");
    }
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_' . $op);
<?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');
}
Exemple #19
0
 function get_service_comment($sid, $w = array(), $p = array(), $order = null)
 {
     global $kekezu;
     $comm_obj = new Keke_witkey_comment_class();
     $where = " select * from " . TABLEPRE . "witkey_comment where obj_id = '{$sid}' and obj_type = 'service' ";
     $arr = keke_table_class::format_condit_data($where, $order, $w, $p);
     $comm_info = db_factory::query($arr['where']);
     $comm_arr['comm_info'] = $comm_info;
     $comm_arr['pages'] = $arr['pages'];
     return $comm_arr;
 }
<?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');
Exemple #21
0
<?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) {
Exemple #22
0
    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);
     $arrUpdateParts['old_unit_time'] = $arrServiceInfo['unit_time'];
 }
 if ($arrServiceInfo['unite_price'] != $unite_price && $unite_price) {
     $arrUpdateParts['unite_price'] = $unite_price;
     $arrUpdateParts['old_unite_price'] = $arrServiceInfo['unite_price'];
 }
 if (!intval($pk['service_id'])) {
     $arrData['profit_rate'] = $arrGoodsConfig['service_profit'];
     $arrData['on_time'] = time();
     $arrData['service_status'] = 2;
     $objServiceT = new keke_table_class('witkey_service');
     $objServiceT->save($arrData);
     unset($objServiceT);
 } else {
     if ($arrServiceInfo['service_status'] == '1') {
         $objServiceT = new keke_table_class('witkey_service');
         $objServiceT->save($arrData, $pk);
     } else {
         if (!empty($arrUpdateParts)) {
             CommonClass::createEditLog($pk['service_id'], $arrServiceInfo['model_id'], serialize($arrUpdateParts));
             keke_shop_release_class::updateEditStatusBySid($pk['service_id'], 1);
         } else {
             kekezu::show_msg($strServiceName . '信息没有更改', $strJumpUrl, NULL, NULL, 'ok');
         }
     }
 }
 if ($objId && $intTaskId) {
     $strBidSql = ' UPDATE `' . TABLEPRE . 'witkey_task_bid`  SET `hasdel`=1 WHERE (`bid_id` =' . $objId . ')  and task_id = ' . $intTaskId;
     $strWorkSql = ' UPDATE `' . TABLEPRE . 'witkey_task_work` SET `hasdel`=1 WHERE (`work_id`=' . $objId . ')  and task_id = ' . $intTaskId;
     db_factory::execute($strBidSql);
     db_factory::execute($strWorkSql);
Exemple #24
0
            $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;
}
Exemple #25
0
<?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));
                }
<?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;
Exemple #27
0
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);
Exemple #28
0
<?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');
}
Exemple #29
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(11);
$basic_config = $kekezu->_sys_config;
$reg_obj = new keke_register_class();
$member_class = new keke_table_class('witkey_member');
$space_class = new keke_table_class('witkey_space');
$arrTopIndustrys = $kekezu->_indus_p_arr;
$arrAllIndustrys = $kekezu->_indus_arr;
if ($edituid) {
    $member_arr = kekezu::get_user_info($edituid);
    $shop_open = db_factory::get_count('select shop_id from ' . TABLEPRE . 'witkey_shop where uid=' . $edituid);
}
$member_group_arr = db_factory::query(sprintf("select group_id,groupname from %switkey_member_group", TABLEPRE));
if ($op == 'getzfpwd') {
    $userInfo = keke_user_class::get_user_info(intval($userid));
    $email = $userInfo['email'];
    $strNewCode = kekezu::randomkeys(8);
    $strNewMd5Pwd = keke_user_class::get_password($strNewCode, $userInfo['rand_code']);
    $intRes = db_factory::updatetable(TABLEPRE . 'witkey_space', array('sec_code' => $strNewMd5Pwd), array('uid' => intval($userid)));
    if ($intRes) {
        $message_obj = new keke_msg_class();
        $message_obj->send_message($userInfo['uid'], $userInfo['username'], 'update_sec_code', '找回支付密码', array('支付密码' => $strNewCode), $userInfo['email'], $userInfo['mobile'], 2);
        $system_log_obj = new Keke_witkey_system_log_class();
        $system_log_obj->setLog_content('admin于' . date("Y-m-d H:i:s") . '重置了' . $userInfo['username'] . '的支付密码');
        $system_log_obj->setLog_ip(kekezu::get_ip());
        $system_log_obj->setLog_time(time());
        $system_log_obj->setUser_type($userInfo['group_id']);
        $system_log_obj->setUid($userInfo['uid']);
        $system_log_obj->setUsername($userInfo['username']);
Exemple #30
0
<?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;