public function get_task_indus($indus_pid = '', $ajax = '')
 {
     global $kekezu;
     global $_lang;
     if ($indus_pid > 0) {
         if ($this->_model_info['indus_bid']) {
             $indus_ids = kekezu::get_table_data('*', "witkey_industry", "indus_id in ({$this->_model_info['indus_bid']}) and indus_pid = {$indus_pid}", 'CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END', '', '', 'indus_id', null);
         } else {
             $indus_ids = kekezu::get_table_data('*', "witkey_industry", " indus_pid = {$indus_pid}", 'CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END', '', '', 'indus_id', null);
         }
         switch ($ajax == 'show_indus') {
             case "0":
                 return $indus_ids;
                 break;
             case "1":
                 $option .= '<option value=""> ' . $_lang['please_son_industry'] . ' </option>';
                 foreach ($indus_ids as $v) {
                     $option .= '<option value=' . $v[indus_id] . '>' . $v[indus_name] . '</option>';
                 }
                 echo $option;
                 die;
                 break;
         }
     } else {
         return false;
     }
 }
 public static function get_auth_item($auth_code = null, $find_str = null, $is_open = false, $w = null, $cache = true)
 {
     global $_cache_obj;
     $auth_code && is_array($auth_code) and $auth_code = implode(",", $auth_code);
     $auth_code and (is_array($auth_code) and $where = " auth_code in ('{$auth_code}') " or $where = " auth_code = '{$auth_code}'") or $where = " 1 = 1";
     $find_str and $fds = $find_str or $fds = '*';
     $is_open and $where .= " and auth_open=1 ";
     $w and $where .= " and " . $w;
     $cache == true and $c = null or $c = 0;
     $auth_item = kekezu::get_table_data($fds, "witkey_auth_item", $where, 'listorder asc', '', '', 'auth_code', $c);
     if ($auth_code && !is_array($auth_code)) {
         return $auth_item[$auth_code];
     } else {
         return $auth_item;
     }
 }
Esempio n. 3
0
 function run()
 {
     global $_K, $kekezu;
     $shop_time = new goods_time_class();
     $shop_time->validtaskstatus();
     $this->validautoMail();
     $model_list = $model_list ? $model_list : kekezu::get_table_data('*', 'witkey_model', 'model_status=1', '', null, '', 'model_id');
     $this->task_finish_auto_mark();
     foreach ($model_list as $model_info) {
         $model_dir = $model_info['model_dir'];
         if (file_exists(S_ROOT . "./task/{$model_dir}")) {
             $m = strtolower($model_dir) . "_time_class";
         }
         if (class_exists($m)) {
             $time_obj = new $m();
             $time_obj->validtaskstatus();
         }
     }
     keke_task_class::hp_timeout(7);
 }
Esempio n. 4
0
 public function wap_list()
 {
     global $_K;
     $_D = $_REQUEST;
     $ls = intval($_D['ls']);
     $le = intval($_D['le']);
     $s = isset($_D['work_status']) ? $_D['work_status'] : "all";
     $s !== "all" and $w = ' and work_status = ' . $s;
     $info = db_factory::query(sprintf('select * from %switkey_task_work where task_id=%d %s limit %d,%d', TABLEPRE, $this->_task_id, $w, $ls, $le), 1, 3600);
     $count = db_factory::get_count('select count(work_id) from ' . TABLEPRE . 'witkey_task_work where task_id=' . $this->_task_id . $w);
     if ($info) {
         $ids = implode(',', array_keys($info));
         $f_tmp = kekezu::get_table_data("obj_id,CONCAT('" . $_K['siteurl'] . "/',`save_name`) file", 'witkey_file', " obj_id in ('" . ids . "') and obj_type='work'", '', '', '', 'obj_id', 3600);
         foreach ($f_tmp as $k => $v) {
             $info[$k]['work_file'] = $v['file'];
         }
         $info = array_values($info);
     }
     kekezu::echojson(intval($count), 1, $info);
     die;
 }
Esempio n. 5
0
 public function alipayjs_success_notify($detail_arr, $status = true)
 {
     global $_lang, $_K;
     $ids = implode(",", array_keys($detail_arr));
     $info = kekezu::get_table_data("withdraw_id,uid,username,withdraw_status,withdraw_cash,pay_username,pay_account", "witkey_withdraw", " withdraw_id in ({$ids})", "", "", "", "withdraw_id");
     foreach ($detail_arr as $k => $v) {
         if ($info[$k]['withdraw_status'] == 1) {
             switch ($v['status']) {
                 case "S":
                     $fee = $info[$k]['withdraw_cash'] - keke_finance_class::get_to_cash($info[$k]['withdraw_cash']);
                     $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='2',fee=%.2f where withdraw_id ='%d'", TABLEPRE, $fee, $k));
                     $arr = array($_lang['sitename'] => $_K['sitename'], $_lang['tx_cash'] => $v['fee']);
                     keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'draw_success', $_lang['tx_success'], $arr, 2);
                     break;
                 case "F":
                     $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='3' where withdraw_id ='%d'", TABLEPRE, $k));
                     $v_arr = array('网站名称' => $_K['sitename'], '提现方式' => $pay_way[$withdraw_info[0]['pay_type']], '失败原因' => '未注明原因', '帐户' => $withdraw_info[0]['pay_account'], '提现金额' => $v['withdraw_cash']);
                     keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'withdraw_fail', $_lang['tx_fail'], $v_arr, 2);
                     break;
             }
         }
     }
 }
Esempio n. 6
0
 public static function get_payitem_info($user_type, $model_code)
 {
     $where = sprintf(" user_type='%s' and is_open = 1 and find_in_set('%s',model_code)", $user_type, $model_code);
     $payitem_arr = kekezu::get_table_data("*", "witkey_payitem", "{$where}", "", "", "", "item_id");
     return $payitem_arr;
 }
Esempio n. 7
0
 function init_industry()
 {
     $this->_indus_p_arr = kekezu::get_table_data('*', "witkey_industry", "indus_type=1 and indus_pid = 0 ", " CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END ", '', '', 'indus_id', NULL);
     $tmpArrIndus = kekezu::get_table_data('*', 'witkey_industry', 'indus_type=1 and indus_pid >0', ' CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END ', '', '', 'indus_id', NULL);
     if (is_array($tmpArrIndus) && !empty($tmpArrIndus)) {
         $this->_indus_c_arr = array();
         foreach ($this->_indus_p_arr as $k1 => $v1) {
             foreach ($tmpArrIndus as $k => $v) {
                 if ($v1['indus_id'] == $v['indus_pid']) {
                     $this->_indus_c_arr[$v['indus_id']] = $v;
                 }
             }
         }
     }
     $this->_indus_arr = kekezu::get_table_data('*', 'witkey_industry', '', ' CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END ', '', '', 'indus_id', NULL);
     $arrtotask = db_factory::query("show COLUMNS FROM " . TABLEPRE . 'witkey_industry' . " WHERE Field='totask' ");
     if ($arrtotask[0]) {
         $this->_indus_task_arr = kekezu::get_table_data('*', "witkey_industry", "indus_type=1 and indus_pid = 0 and totask=1 ", " CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END ", '', '', 'indus_id', NULL);
     }
     $arrtogoods = db_factory::query("show COLUMNS FROM " . TABLEPRE . 'witkey_industry' . " WHERE Field='togoods' ");
     if ($arrtogoods[0]) {
         $this->_indus_goods_arr = kekezu::get_table_data('*', "witkey_industry", "indus_type=1 and indus_pid = 0 and togoods=1 ", " CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END ", '', '', 'indus_id', NULL);
     }
 }
Esempio n. 8
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=basic';
$arrTopIndustrys = $indus_p_arr;
$arrAllIndustrys = $indus_arr;
$objSpaceT = keke_table_class::get_instance('witkey_space');
$intUserRole = intval($gUserInfo['user_type']);
$arrMemberExts = kekezu::get_table_data("*", "witkey_member_ext", " type='sect' and uid= " . $gUid, "", "", "", "k");
$boolEmailAuth = keke_auth_fac_class::auth_check('email', $gUid);
$boolMobileAuth = keke_auth_fac_class::auth_check('mobile', $gUid);
$arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name');
if ($gUserInfo['province']) {
    $arrCity = CommonClass::getDistrictByPid($gUserInfo['province'], 'id,upid,name');
}
if ($gUserInfo['city']) {
    $arrArea = CommonClass::getDistrictByPid($gUserInfo['city'], 'id,upid,name');
}
if ($intUserRole === 2) {
    $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid);
    $arrEnterPriseInfo = db_factory::get_one(sprintf("select * from %switkey_auth_enterprise where uid='%d'", TABLEPRE, $gUid));
    if (isset($formhash) && kekezu::submitcheck($formhash)) {
        if ($gUserInfo['uid'] != $pk['uid']) {
            kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
            return false;
        }
        if (strtoupper(CHARSET) == 'GBK') {
            $company = kekezu::utftogbk($company);
            $legal = kekezu::utftogbk($legal);
            $address = kekezu::utftogbk($address);
            $summary = kekezu::utftogbk($summary);
Esempio n. 9
0
<?php

defined('ADMIN_KEKE') or die('Access Denied');
kekezu::admin_check_role(32);
$table_name = 'witkey_ad_target';
$target_arr = kekezu::get_table_data('*', $table_name, '', '', '', '', 'target_id', null);
$target_ad_num = kekezu::get_table_data('target_id, count(*) as num', 'witkey_ad', 'target_id is not null', '', 'target_id', '', 'target_id', null);
while (list($key, $value) = each($target_arr)) {
    $target_ad_arr[$key] = $target_ad_num[$key]['num'] ? $target_ad_num[$key]['num'] : '0';
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
Esempio n. 10
0
 public static function get_prom_type()
 {
     return kekezu::get_table_data("prom_code,prom_item,type", "witkey_prom_rule", "", "", "", "", "prom_code", 3600);
 }
Esempio n. 11
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$intUserRole = intval($gUserInfo['user_type']);
$footer_load = 1;
$identy_auth_info = kekezu::get_table_data('auth_code,auth_status', 'witkey_auth_record', "uid=" . $gUid, '', '', '', 'auth_code');
if ($intUserRole === 2) {
    $strCodeWh = " auth_code!='realname' ";
    $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
} else {
    $strCodeWh = " auth_code!='enterprise' ";
    $intAuthStatus = keke_auth_fac_class::auth_check('realname', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
}
$arrAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, $strCodeWh);
$arrAllAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, null);
$keys = array_keys($arrAuthItems);
$arrAllowAuth = array('realname', 'enterprise', 'bank', 'mobile', 'email', 'alipayjs');
if ($code && in_array($code, $arrAllowAuth)) {
    $code or $code = $keys['0'];
    $code or kekezu::show_msg($_lang['param_error'], "index.php?do=auth", 3, '', 'warning');
    $auth_class = "keke_auth_" . $code . "_class";
    $objAuth = new $auth_class($code);
    $auth_item = $arrAllAuthItems[$code];
    $auth_dir = $auth_item['auth_dir'];
    $arrAuthInfo = $objAuth->get_user_auth_info($gUid, 0, $intBankAid);
Esempio n. 12
0
if ($arrNerLists) {
    foreach ($arrNerLists as $k => $v) {
        $arrNerLists[$k]['pro_city'] = keke_shop_class::getUserAddress($v['uid'], 2, 1, 1, 0);
    }
}
$arrShopIndusC = $kekezu->_indus_c_arr;
$arrShopIndusP = $kekezu->_indus_p_arr;
if (is_array($arrShopIndusC)) {
    $arrNewShopIndusC = array();
    foreach ($arrShopIndusC as $k => $v) {
        $arrNewShopIndusC[$v['indus_pid']][] = $v;
    }
}
$arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name');
$arrSellerType = array('1' => '个人用户', '2' => '企业用户');
$data = array('地区' => $arrCityone['name'] . $arrCitytwo['name'] . $arrCitythree['name'], '店铺类型' => $arrSellerType[$t], '行业' => $arrIndusPInfo['indus_name'], '子行业' => $arrIndusInfo['indus_name']);
list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO($pd, $i, $data, 'seller', true);
$floatCashLists = kekezu::get_table_data(' uid,sum(fina_cash) as threeCash', 'witkey_finance', "(fina_action='sale_service' or fina_action='task_bid') and DATE_SUB(CURDATE(),INTERVAL 90 day) <= date(from_unixtime(fina_time))", '', 'uid', '', 'uid');
function thisurl($keys = '')
{
    $pars = parse_url($_SERVER["QUERY_STRING"]);
    $pars = explode("&", $pars['path']);
    foreach ($pars as $ps) {
        $uri = explode("=", $ps);
        $url .= !strstr($keys, $uri[0]) ? "&" . $ps : '';
    }
    return $_SERVER['PHP_SELF'] . '?' . trim($url, "&");
}
$arrFeedPubs = kekezu::get_feed("(feedtype='pub_task' or feedtype='pub_service')", "feed_time desc", 8);
$arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc limit 0,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
$_SESSION['spread'] = 'index.php?do=sellerlist';
Esempio n. 13
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=binding';
$arrApiNames = keke_glob_class::get_open_api();
$strOauthUrl = $kekezu->_sys_config['website_url'] . "/index.php?do={$do}&view={$view}&op={$op}&ac={$ac}&type={$type}";
$res = kekezu::get_table_data('*', 'witkey_member_oauth', 'uid=' . $gUid, "", "source", 6, "source");
if (is_array($api_open)) {
    foreach ($api_open as $key => $value) {
        $value = array("open" => $value);
        if ($res[$key]) {
            $t[$key] = array_merge($value, $res[$key]);
        } else {
            $t[$key] = $value;
        }
    }
}
switch ($ac) {
    case 'bind':
        if ($type) {
            switch ($type == "alipay_trust") {
                case true:
                    $interface = "sns_bind";
                    require S_ROOT . "/payment/alipay_trust/order.php";
                    header("Location:" . $request);
                    break;
                case false:
                    if (in_array($type, array('sina', 'qq', 'taobao', 'renren', 'douban', 'baidu'))) {
                        $oauth_obj = OAuthClass::factory($type);
                        $oauth_obj->requestAuthorize();
                    } else {
Esempio n. 14
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=banklist';
$objMemBankT = keke_table_class::get_instance("witkey_member_bank");
$arrBankList = keke_glob_class::get_bank();
if ($action == 'removeBind') {
    if ($intBankId) {
        if ($intBankAid) {
            db_factory::execute(sprintf(" delete from %switkey_auth_bank where bank_a_id='%d'", TABLEPRE, $intBankAid));
            db_factory::execute(sprintf(" delete from %switkey_auth_record where ext_data='%d'", TABLEPRE, $intBankAid));
        }
        $res = db_factory::execute(sprintf(" delete from %switkey_member_bank where bank_id='%d'", TABLEPRE, $intBankId));
        $res and kekezu::show_msg('解除关联成功', $strUrl, null, null, 'ok') or kekezu::show_msg('解除关联失败', $strUrl, null, null, 'error');
    } else {
        kekezu::show_msg('请选择关联账户', null, null, null, null);
    }
} else {
    $arrBankLists = db_factory::query(sprintf(" select * from %switkey_member_bank where uid = '%d' and bind_status='1'", TABLEPRE, $gUid));
    $arrAuthLists = kekezu::get_table_data('bank_a_id,bank_id', "witkey_auth_bank", " uid='.{$gUid}.' and auth_status!=2", '', '', '', 'bank_id', null);
}
Esempio n. 15
0
 public function get_task_prize()
 {
     $task_prize_arr = kekezu::get_table_data("*", "witkey_task_prize", "task_id={$this->_task_id}", "", "", "", "prize", 0);
     return $task_prize_arr;
 }
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$art_cat_obj = new Keke_witkey_article_category_class();
$types = array('help', 'art');
$type = !empty($type) && in_array($type, $types) ? $type : 'art';
if ($type == 'art') {
    kekezu::admin_check_role(14);
    $art_cat_arr = kekezu::get_table_data('*', "witkey_article_category", "art_cat_pid =1 or art_cat_id = 1", "  art_cat_id desc", '', '', 'art_cat_id', null);
} elseif ($type == 'help') {
    kekezu::admin_check_role(44);
    $art_cat_arr = kekezu::get_table_data('*', "witkey_article_category", "art_index like '%{100}%'", " art_cat_id desc", '', '', 'art_cat_id', null);
}
if ($art_cat_id) {
    $art_cat_obj->setWhere('art_cat_id=' . intval($art_cat_id));
    $art_cat_info = $art_cat_obj->query_keke_witkey_article_category();
    $art_cat_info = $art_cat_info[0];
    $art_cat_pid = $art_cat_info[art_cat_pid];
}
if ($sbt_edit) {
    $flag = null;
    if ($hdn_art_cat_id) {
        $art_cat_obj->setWhere('art_cat_id=' . intval($hdn_art_cat_id));
        $art_cat_info = $art_cat_obj->query_keke_witkey_article_category();
        $art_cat_info = $art_cat_info[0];
        if ($art_cat_info['art_cat_pid'] > 0) {
            $art_cat_obj->setArt_cat_pid($slt_cat_id);
        }
    } else {
        $art_cat_obj->setArt_cat_pid($slt_cat_id);
    }
Esempio n. 17
0
    } else {
        kekezu::admin_show_msg($_lang['del_fail_select_operate'], $url);
    }
} elseif (isset($sbt_action)) {
    $ckb_string = $ckb;
    is_array($ckb_string) and $ckb_string = implode(',', $ckb_string);
    if (count($ckb_string)) {
        $case_obj->setWhere('case_id in (' . $ckb_string . ')');
        $res = $case_obj->del_keke_witkey_case();
        kekezu::admin_system_log($_lang['mulit_delete_case'] . ':' . $ckb_string);
        $res and kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['mulit_operate_fail'], $url, 3, '', 'warning');
    } else {
        kekezu::admin_show_msg($_lang['mulit_del_fail_select_operate'], $url, 3, '', 'warning');
    }
} else {
    $model_list = kekezu::get_table_data('*', 'witkey_model', "model_status=1 and model_dir!='employtask'", 'listorder asc ', '', '', 'model_id', null);
    $count = $case_obj->count_keke_witkey_case();
    $sql = "select * from " . TABLEPRE . "witkey_case";
    $where = ' where 1 = 1';
    $w['case_id'] and $where .= " and case_id = '" . $w['case_id'] . "' ";
    $w['art_title'] and $where .= " and case_title like '%" . $w['art_title'] . "%' ";
    $w['case_auther'] and $where .= " and case_auther like '%" . $w['case_auther'] . "%' ";
    $w['obj_type'] and $where .= " and obj_type = '" . $w['obj_type'] . "' ";
    $w[ord][1] && $w[ord][0] and $where .= ' order by ' . $w['ord']['0'] . ' ' . $w['ord']['1'] or $where .= " order by on_time desc";
    $kekezu->_page_obj->setAjax(1);
    $kekezu->_page_obj->setAjaxDom("ajax_dom");
    $pages = $kekezu->_page_obj->getPages($count, $page_size, $page, $url);
    $sql .= $where . $pages['where'];
    $case_arr = db_factory::query($sql);
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
Esempio n. 18
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(140);
if (isset($submit)) {
    $basic_obj = new Keke_witkey_basic_config_class();
    foreach ($conf as $k => $v) {
        $basic_obj->setWhere("k = '{$k}'");
        $basic_obj->setV($v);
        $res .= $basic_obj->edit_keke_witkey_basic_config();
    }
    !empty($api) and $attent_api = $api or $attent_api = array();
    $basic_obj->setWhere("k = 'attent_api_open'");
    $basic_obj->setV(serialize($attent_api));
    $basic_obj->edit_keke_witkey_basic_config();
    kekezu::admin_system_log($_lang['weibo_config_view']);
    kekezu::admin_show_msg($_lang['weibo_view_config_success'], "index.php?do=msg&view=attention", 3, '', 'success');
} else {
    $attent_api = db_factory::get_count(sprintf(" select v from %switkey_basic_config where type='attent_api'", TABLEPRE));
    $attent_api = unserialize($attent_api);
    $attent_list = kekezu::get_table_data("k,v,desc", "witkey_basic_config", "type='attention'", 'listorder asc ', "", "", "k");
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
Esempio n. 19
0
 public static function get_task_info($indus_id)
 {
     return kekezu::get_table_data("task_id,task_title,task_cash", "witkey_task", " indus_id = '{$indus_id}' and task_status='2'", "", "", "14", "", 3600);
 }
Esempio n. 20
0
<?php

kekezu::check_login();
$strPageTitle = '发布任务-' . $_K['html_title'];
$strPageKeyword = '发布任务,' . $_K['html_title'];
$strPageDescription = $kekezu->_sys_config['index_seo_desc'];
$id = intval($id);
$step = strval(trim($step));
$strRandKf = kekezu::get_rand_kf();
$is_task_template = db_factory::query("select * from " . TABLEPRE . "witkey_task_template");
$arrPubProcess = array(1 => array('step' => 'step1', 'desc' => '选择交易模式'), 2 => array('step' => 'step2', 'desc' => '描述任务需求'), 3 => array('step' => 'step3', 'desc' => '核对交易清单'), 4 => array('step' => 'step4', 'desc' => '成功发布任务'));
$arrPayitemLists = PayitemClass::getPayitemListForPub();
$arrPayitemPriceLists = PayitemClass::getPayitemPriceList();
$arrDistribution = array(1 => '单人中标', 2 => '多人中标', 3 => '', 4 => '单人中标', 5 => '单人中标', 12 => '单人中标');
$arrTopIndustrys = $kekezu->_indus_task_arr;
$arrModelLists = kekezu::get_table_data('*', 'witkey_model', " model_type = 'task' and model_status='1'", 'listorder asc ', '', '', 'model_id', 3600);
if (0 === $id) {
    $arrModelIds = array_keys($arrModelLists);
    $id = $arrModelIds['0'];
}
$arrModelInfo = $arrModelLists[$id];
if (empty($arrModelInfo)) {
    kekezu::show_msg('不存在该任务模型,请重新选择', 'index.php?do=pubtask', 3, null, 'warning');
}
$arrStep = array('step1', 'step2', 'step3', 'step4');
if (!in_array($step, $arrStep)) {
    $step = 'step1';
}
$strUrl = "index.php?do=pubtask&id=" . $id;
$arrOutFinance = db_factory::query(sprintf("select * from %switkey_finance where fina_type='out' and obj_id='%d' and uid='%d'", TABLEPRE, $taskId, $gUid));
if ($arrOutFinance) {
Esempio n. 21
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';
$task_info = db_factory::get_one(sprintf(" select * from %switkey_task where task_id='%d'", TABLEPRE, $task_id));
$task_config = unserialize($model_info['config']);
keke_lang_class::loadlang('task_edit', 'task');
$task_sub_time = date('Y-m-d', $task_info['sub_time']);
$task_end_time = date('Y-m-d', $task_info['end_time']);
$task_start_time = date('Y-m-d', $task_info['start_time']);
if ($op == 'basic') {
    $cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "model_code='{$model_info['model_code']}'", "", '', '', "cash_rule_id");
    $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);
        }
        $task_obj = new Keke_witkey_task_class();
        $task_obj->setWhere(" task_id ='{$task_id}'");
        $task_obj->setTask_title(kekezu::escape($task_title));
        if ($txt_task_day) {
            $task_obj->setSub_time(strtotime($txt_task_day));
            $task_obj->setEnd_time(strtotime($txt_task_day) + $task_config['choose_time'] * 24 * 3600);
        }
        $task_obj->setIndus_id($slt_indus_id);
        $task_obj->setTask_cash($task_cash);
        $task_obj->setReal_cash($task_cash * (1 - $task_info['profit_rate'] / 100));
        $fds['task_cash_coverage'] and $task_obj->setTask_cash_coverage($fds['task_cash_coverage']);
        $fds['budget'] and $task_obj->setBudget($fds['budget']);
Esempio n. 22
0
 public static function get_delay_rule($model_id, $cache_time = null)
 {
     return kekezu::get_table_data("*", "witkey_task_delay_rule", "model_id='{$model_id}'", "defer_times", "", "", "", $cache_time);
 }
Esempio n. 23
0
 function get_reply_info($obj_id)
 {
     $reply_arr = kekezu::get_table_data("*", "witkey_comment", "obj_type='" . $this->_comment_type . "' and obj_id='{$obj_id}' and p_id>0", " on_time desc");
     return $reply_arr;
 }
Esempio n. 24
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strNavActive = 'articlelist';
$strUrl = $_K['siteurl'] . "/index.php?do=articlelist";
$catid and $strUrl .= "&catid=" . intval($catid);
$intPage and $strUrl .= "&intPage=" . $intPage;
$arrArtCats = kekezu::get_table_data("*", "witkey_article_category", "cat_type='article' and art_cat_pid=1", "listorder asc", "", "", "", null);
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 20;
intval($catid) and $intCatid = intval($catid) or $intCatid = intval($arrArtCats['0']['art_cat_id']);
$intCatid and $strWhere .= " and a.art_cat_id = " . intval($intCatid);
$strWhere .= " and a.is_show!=2";
$strWhere .= " order by is_recommend desc,a.listorder asc,pub_time desc";
$strSql = "select a.* ,b.cat_name from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article'  {$strWhere}";
$strCsql = "select count(a.art_id) as c  from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article'  {$strWhere}";
$intCount = intval(db_factory::get_count($strCsql, 0, NULL, 10 * 60));
$kekezu->_page_obj->setStatic($static);
$strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl);
$arrArticleLists = db_factory::query($strSql . $strPages['where'], 5 * 60);
foreach ($arrArtCats as $k => $v) {
    intval($v['art_cat_id']) == $intCatid and $articleType = $v['cat_name'];
}
list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO(0, 0, array('资讯分类' => $articleType), 'article', true);
$arrHotNews = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article'  order by views desc limit 10");
$arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by  good_rate desc limit 0,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
$_SESSION['spread'] = 'index.php?do=articlelist';
Esempio n. 25
0
    $strSql = ' select a.case_id,a.obj_id,a.obj_type,a.case_img,a.case_title,a.case_price ';
    $task_open and $strSql .= ',b.work_num,b.model_id,b.username,b.uid ';
    $shop_open and $strSql .= ' ,c.sale_num,c.model_id,c.username,b.uid ';
    $strSql .= ' from ' . TABLEPRE . 'witkey_case a ';
    $task_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_task b ON a.obj_id = b.task_id ';
    $shop_open or $strSql .= ' where a.obj_type="task" ';
    $shop_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_service c on  a.obj_id= c.service_id ';
    $task_open or $strSql .= ' where a.obj_type="service" ';
    $strSql .= " order by a.on_time desc limit 9 ";
    $arrCaseLists = db_factory::query($strSql, 1, $intIndexCacheTime);
    if (!$basic_config['css_auto_fit']) {
        $arrCaseLists = array_merge(array($arrCaseLists[0]), $arrCaseLists);
        if (count($arrCaseLists) > 9) {
            unset($arrCaseLists[9]);
        }
    }
    $arrDynamicPlays = kekezu::get_feed("feedtype='work_accept'", "feed_time desc", 10);
    $arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc limit 0,6", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
    $arrRecommShops1 = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by good_rate desc ", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
    $arrArticleTop = db_factory::get_one("select * from " . TABLEPRE . "witkey_article where cat_type='article' and  LENGTH(art_pic)>20 order by pub_time desc limit 1", 1, $intIndexCacheTime);
    $arrArticleLists = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article' and art_id !='" . $arrArticleTop['art_id'] . "' order by pub_time desc limit 6", 1, $intIndexCacheTime);
    $arrPubToday = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where date(from_unixtime(start_time)) = curdate() and task_status>=2", 1, $intIndexCacheTime);
    $arrAcceptTask = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept' and date(from_unixtime(feed_time)) = curdate() group by obj_id ; ", 1, $intIndexCacheTime);
    $arrAcceptToday = count($arrAcceptTask);
    $arrCashToday = db_factory::query("SELECT sum(fina_cash) as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service')  and date(from_unixtime(fina_time)) = curdate()  ;", 1, $intIndexCacheTime);
    $arrPubAll = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where task_status>=2", 1, $intIndexCacheTime);
    $arrAcceptTasks = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept'  group by obj_id  ;", 1, $intIndexCacheTime);
    $arrAcceptAll = count($arrAcceptTasks);
    $arrCashAll = db_factory::query("SELECT sum(fina_cash)  as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service')  ;", 1, $intIndexCacheTime);
    $arrFlink = kekezu::get_table_data("link_id,link_name,link_url,listorder", "witkey_link", "", " listorder asc", "", "", "", $intIndexCacheTime);
}
Esempio n. 26
0
                    $add_time = time() - $service_info['on_time'];
                    keke_payitem_class::update_service_payitem_time($service_info['payitem_time'], $add_time, $v);
                }
                $res = goods_shop_class::set_service_status($key_ids, 2);
                $action = $_lang['mulit_pass'];
                break;
            case $_lang['mulit_nopass']:
                $res = goods_shop_class::set_service_status($key_ids, 4);
                foreach ($key_ids as $v) {
                    PayitemClass::refundPayitem($v, 'goods');
                }
                $action = '批量审核不通过';
                break;
            case $_lang['batch_shelves']:
                foreach ($key_ids as $v) {
                    $service_info = kekezu::get_table_data("*", "witkey_service", "service_id = {$v}");
                    $service_info = $service_info['0'];
                    $add_time = time() - $service_info['on_time'];
                    keke_payitem_class::update_service_payitem_time($service_info['payitem_time'], $add_time, $v);
                }
                $res = goods_shop_class::set_service_status($key_ids, 2);
                $action = $_lang['shelves'];
                break;
            case $_lang['batch_off_the_shelf']:
                $res = goods_shop_class::set_service_status($key_ids, 3);
                $action = $_lang['off_the_shelf'];
                break;
        }
        $res and kekezu::admin_show_msg($_lang['mulit'] . $action . $_lang['success'], $url_str, 2, $_lang['mulit'] . $action . $_lang['success'], 'success') or kekezu::admin_show_msg($_lang['mulit'] . $action . $_lang['fail'], $url_str, 2, $_lang['mulit'] . $action . $_lang['fail'], "warning");
    }
}
Esempio n. 27
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(141);
if ($sbt_edit) {
    $api = array();
    foreach ($conf as $k => $v) {
        $res .= db_factory::execute(" update " . TABLEPRE . "witkey_basic_config set v='{$v}' where k='{$k}'");
        $open == $k and $api[$k] = 1 or $api[$k] = 0;
    }
    $api = serialize($api);
    db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='map_api_open'", TABLEPRE, $api));
    kekezu::admin_system_log($_lang['edit_map_api']);
    if ($res) {
        kekezu::admin_show_msg($_lang['map_api_edit_success'], "index.php?do={$do}&view={$view}", 2, '', 'success');
    }
} else {
    $map_apis = kekezu::get_table_data("k,v,type,desc", "witkey_basic_config", "type='map'", "", "", "", "k");
    $api_open = db_factory::get_one("select v from " . TABLEPRE . "witkey_basic_config where k='map_api_open'");
    $api_open = unserialize($api_open['v']);
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
Esempio n. 28
0
$sys_info['php_ver'] = PHP_VERSION;
$sys_info['mysql_ver'] = $mysql_ver;
$sys_info['safe_mode'] = (bool) ini_get('safe_mode') ? $_LANG['yes'] : $_LANG['no'];
$sys_info['safe_mode_gid'] = (bool) ini_get('safe_mode_gid') ? $_LANG['yes'] : $_LANG['no'];
$sys_info['timezone'] = function_exists('date_default_timezone_set') ? date_default_timezone_set('Asia/Shanghai') : date_default_timezone_set('Asia/Shanghai');
$sys_info['max_filesize'] = ini_get('upload_max_filesize');
$sys_info['file_uploads'] = ini_get('file_uploads');
$model_list = kekezu::get_table_data('*', 'witkey_model', " model_type = 'task' and model_status='1'", 'listorder asc ', '', '', 'model_id', 3600);
$shop_list = kekezu::get_table_data('*', 'witkey_model', " model_type = 'shop' and model_status='1'", 'listorder asc ', '', '', 'model_id', 3600);
$task_count = kekezu::get_table_data("model_id,count(task_id) as count", "witkey_task", " DATE(from_unixtime(start_time))=DATE('" . date('Y-m-d', time()) . "')", '', 'model_id', '', 'model_id');
$shop_all_count = intval(db_factory::get_count(sprintf(" select count(service_id) from %switkey_service where DATE(from_unixtime(on_time))=DATE('%s') ", TABLEPRE, date('Y-m-d', time()))));
$shop_all_count += db_factory::get_count("select count(*) from " . TABLEPRE . "witkey_service where edit_status =1 ");
$shop_all_count += db_factory::get_count("select count(*) from " . TABLEPRE . "witkey_service where service_status =1 ");
$shop_count = kekezu::get_table_data("model_id,count(service_id) as count", "witkey_service", " DATE(from_unixtime(on_time))=DATE('" . date('Y-m-d', time()) . "')", '', 'model_id', '', 'model_id');
$shop_count_dai = kekezu::get_table_data("model_id,count(service_id) as count", "witkey_service", " service_status = 1 ", '', 'model_id', '', 'model_id');
$shop_count_edit = kekezu::get_table_data("model_id,count(service_id) as count", "witkey_service", " edit_status = 1 ", '', 'model_id', '', 'model_id');
$news_count = intval(db_factory::get_count(sprintf(" select count(msg_id) from %switkey_msg where to_uid='%d' and  uid>0 ", TABLEPRE, $admin_info[uid])));
$task_all_count = intval(db_factory::get_count(sprintf(" select count(task_id) from %switkey_task where DATE(from_unixtime(start_time))=DATE('%s') ", TABLEPRE, date('Y-m-d', time()))));
$user_count = intval(db_factory::get_count(sprintf(" select count(uid) from %switkey_space where DATE(from_unixtime(reg_time))=DATE('%s')", TABLEPRE, date('Y-m-d', time()))));
$withdraw_count = intval(db_factory::get_count(sprintf(" select count(withdraw_id) from %switkey_withdraw where DATE(from_unixtime(applic_time))=DATE('%s')", TABLEPRE, date('Y-m-d', time()))));
$charge_count = intval(db_factory::get_count(sprintf(" select count(order_id) from %switkey_order_charge where DATE(from_unixtime(pay_time))=DATE('%s') ", TABLEPRE, date('Y-m-d', time()))));
$apply_shop_count = intval(db_factory::get_count(sprintf(" select count(shop_id) from %switkey_shop where DATE(from_unixtime(on_time))=DATE('%s') and shop_status is null ", TABLEPRE, date('Y-m-d', time()))));
$right_count = intval(db_factory::get_count(sprintf(" select count(report_id) from %switkey_report where DATE(from_unixtime(on_time))=DATE('%s') and report_type = 1", TABLEPRE, date('Y-m-d', time()))));
$proposal_count = intval(db_factory::get_count(sprintf(" select count(p_id) from %switkey_proposal where DATE(from_unixtime(pro_time))=DATE('%s')", TABLEPRE, date('Y-m-d', time()))));
$report_count = intval(db_factory::get_count(sprintf(" select count(report_id) from %switkey_report where DATE(from_unixtime(on_time))=DATE('%s') and report_type = 2", TABLEPRE, date('Y-m-d', time()))));
$pars = array('ac' => 'run', 'sitename' => urlencode($basic_config['website_name']), 'siteurl' => htmlentities($basic_config['website_url']), 'charset' => $_K['charset'], 'version' => KEKE_VERSION, 'release' => KEKE_RELEASE, 'os' => PHP_OS, 'php' => $_SERVER['SERVER_SOFTWARE'], 'mysql' => $mysql_ver, 'browser' => urlencode($_SERVER['HTTP_USER_AGENT']), 'username' => urlencode($_SESSION['username']), 'email' => $basic_config['email'] ? $basic_config['email'] : 'noemail', 'p_name' => P_NAME);
$data = http_build_query($pars);
$lic = $_K['ci'];
$str_lic = kekezu::set_star($lic, 5, 5, '3', '*');
$verify = md5($data . $lic);
$notice = "http://www.kekezu.com/update.php?" . $data . "&lic=" . urlencode($lic) . "&verify=" . $verify;
Esempio n. 29
0
 static function get_adgroup_by_target($target_id, $target_name, $ad_list_num)
 {
     global $kekezu, $_K;
     $arrTag = db_factory::get_one(sprintf('select * from %s where target_id = %d', TABLEPRE . 'witkey_ad_target', intval($target_id)));
     $datalist = kekezu::get_table_data('*', 'witkey_ad', '1=1 and is_allow=1 and target_id = ' . intval($target_id), 'listorder', '', $ad_list_num, '', 3600);
     require keke_tpl_class::parse_code(htmlspecialchars_decode($arrTag['content']), $arrTag['target_id']);
 }
Esempio n. 30
0
 public static function user_auth_info($uid)
 {
     $auth_list = kekezu::get_table_data("*,max(auth_status) auth_status", "witkey_auth_record", "uid='{$uid}'", '', 'auth_code', '', 'auth_code');
     return $auth_list;
 }