Пример #1
0
 public static function loadlang($action, $package = null)
 {
     global $_lang;
     $lang = self::load_lang_file($action, $package);
     if ($lang) {
         self::$_init_lang_set = array_merge(self::$_init_lang_set, $lang);
         $_lang = self::$_init_lang_set;
     }
 }
Пример #2
0
<?php

keke_lang_class::load_lang_class('keke_auth_fac_class');
class keke_auth_fac_class
{
    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;
    }
    public static function get_submit_auth_record($uid, $auth_status = '1')
    {
        $auth_item = keke_auth_base_class::get_auth_item();
        $auth_code = array_keys($auth_item);
        return self::auth_check($auth_code, $uid, $auth_status);
    }
    public static function get_auth_imghtm($auth_code, $uid)
    {
        global $_lang;
        $auth_list = self::user_auth_info($uid);
        $config_list = keke_auth_bank_class::get_auth_item($auth_code, 'auth_code,auth_title,auth_small_ico,auth_small_n_ico,auth_open', 1);
        $img_list = '';
        foreach ($config_list as $c) {
            if (!$c['auth_open']) {
                continue;
            }
            $str = '';
            $str .= '<img src="';
            $str .= $auth_list[$c['auth_code']]['auth_status'] ? $c['auth_small_ico'] : $c['auth_small_n_ico'];
            $str .= '" align="absmiddle" title="' . $c['auth_title'];
            $str .= $auth_list[$c['auth_code']]['auth_status'] ? $_lang['has_pass'] : $_lang['not_pass'];
Пример #3
0
<?php

keke_lang_class::load_lang_class('sreward_task_class');
class sreward_task_class extends keke_task_class
{
    public $_task_status_arr;
    public $_work_status_arr;
    public $_delay_rule;
    public $_agree_id;
    protected $_inited = false;
    public static function get_instance($task_info)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new sreward_task_class($task_info);
        }
        return $obj;
    }
    public function __construct($task_info)
    {
        parent::__construct($task_info);
        $this->_task_status == '6' || $this->_task_status == '8' and $this->_agree_id = db_factory::get_count(sprintf(" select agree_id from %switkey_agreement where task_id='%d'", TABLEPRE, $this->_task_id));
        $this->init();
    }
    public function init()
    {
        if (!$this->_inited) {
            $this->status_init();
            $this->delay_rule_init();
            $this->wiki_priv_init();
            $this->mark_init();
Пример #4
0
<?php

keke_lang_class::load_lang_class('service_pay_return_class');
final class service_pay_return_class extends pay_return_base_class
{
    function __construct($charge_type, $model_id = '', $uid = '', $obj_id = '', $order_id = '', $total_fee = '')
    {
        parent::__construct($charge_type, $model_id, $uid, $obj_id, $order_id, $total_fee);
    }
    function order_charge()
    {
        global $_K;
        $order_id = $this->_order_id;
        $sid = $this->_obj_id;
        $uid = $this->_uid;
        $user_info = $this->_userinfo;
        $order_info = db_factory::get_one(sprintf(" select order_status,order_uid,order_username,seller_uid,seller_username from %switkey_order where order_id='%d'", TABLEPRE, $order_id));
        $url = $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id;
        $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=1&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
        $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
        if ($order_info['order_status'] == 'wait') {
            $service_info = keke_shop_class::get_service_info($sid);
            if ($service_info[service_status] == '2') {
                $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
                keke_finance_class::init_mem('buy_service', $data);
                $this->_total_fee > 0 and $res = keke_finance_class::cash_out($uid, $this->_total_fee, 'buy_service', '0', 'service', $order_id);
                if ($res) {
                    db_factory::execute(sprintf(" update %switkey_order set order_status='ok' where order_id='%d'", TABLEPRE, $order_id));
                    $v_arr = array($_lang['user_msg'] => $_lang['you'], $_lang['action'] => $_lang['haved_confirm_pay'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link);
                    keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
                    $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['haved_confirm_pay'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
Пример #5
0
<?php

keke_lang_class::load_lang_class('keke_auth_base_class');
abstract class keke_auth_base_class
{
    public $_auth_item;
    public $_auth_code;
    public $_auth_name;
    public $_auth_obj;
    public $_auth_table_name;
    public $_tab_obj;
    public $_primary_key;
    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);
    }
    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];
Пример #6
0
<?php

keke_lang_class::load_lang_class('keke_prom_class');
class keke_prom_class
{
    public $_prom_open;
    public $_prom_period;
    public $_auth;
    public static function get_instance()
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new keke_prom_class();
        }
        return $obj;
    }
    public function __construct()
    {
        global $kekezu;
        $this->_prom_open = intval($kekezu->_sys_config['prom_open']);
        $this->_prom_period = intval($kekezu->_sys_config['prom_period']);
        $this->auth_init();
    }
    public function auth_init()
    {
        $reg_config = $this->get_prom_rule("reg");
        $this->_auth = $reg_config['auth'];
    }
    public static function get_prom_rule($prom_code)
    {
        $p_config = db_factory::get_one(sprintf(" select * from %switkey_prom_rule where prom_code='%s'", TABLEPRE, $prom_code));
Пример #7
0
<?php

keke_lang_class::load_lang_class('keke_glob_class');
class keke_glob_class
{
    public static function get_finance_action()
    {
        global $_lang;
        return array("buy_service" => $_lang['buy_service'], "buy_gy" => '雇佣服务', "pub_task" => $_lang['pub_task'], "hosted_reward" => $_lang['hosted_reward'], "withdraw" => $_lang['withdraw'], "task_delay" => $_lang['task_delay'], "ext_cash" => $_lang['ext_cash'], "offline_charge" => $_lang['offline_recharge'], "task_bid" => $_lang['task_bid'], "task_fail" => $_lang['task_fail'], "task_prom_fail" => $_lang['task_prom_fail'], "sale_service" => $_lang['sale_service'], "sale_gy" => '出售雇佣服务', "admin_recharge" => $_lang['admin_recharge'], "withdraw_fail" => $_lang['withdraw_fail'], "report" => $_lang['report_processs'], "payitem" => $_lang['payitem'], "prom_reg" => $_lang['prom_reg'], "task_fj" => $_lang['task_fj'], 'rights_return' => $_lang['rights_return'], "task_auto_return" => $_lang['task_auto_return'], 'order_cancel' => $_lang['order_cancel'], "online_charge" => $_lang['online_charge'], "order_charge" => $_lang['order_charge'], 'prom_pub_task' => $_lang['prom_pub_task'], 'user_charge' => $_lang['user_charge'], 'prom_bid_task' => $_lang['prom_bid_task'], 'prom_service' => $_lang['prom_service'], 'prom_bank_auth' => $_lang['prom_bank_auth'], 'prom_realname_auth' => $_lang['prom_realname_auth'], 'prom_email_auth' => $_lang['prom_email_auth'], 'prom_mobile_auth' => $_lang['prom_mobile_auth'], 'prom_enterprise_auth' => $_lang['prom_mobile_auth'], 'enterprise_auth' => $_lang['enterprise_auth'], 'task_remain_return' => $_lang['task_remain_return'], 'task_hosted_return' => $_lang['task_hosted_return'], 'admin_charge' => $_lang['admin_charge'], 'host_deposit' => $_lang['host_deposit'], 'deposit_return' => $_lang['deposit_return'], 'host_return' => $_lang['host_return'], 'cancel_bid' => '撤销中标', 'host_split' => $_lang['host_split'], "workhide" => $_lang['workhide'] . '退款', "seohide" => $_lang['seohide'] . '退款', "tasktop" => $_lang['task_top'] . '退款', "goodstop" => $_lang['goods_top'] . '退款', "urgent" => $_lang['task_urgent'] . '退款', "finish_task" => '完成福袋任务', "task_xg" => '任务返还金额');
    }
    public static function get_value_add_type()
    {
        global $_lang;
        return array("workhide" => $_lang['workhide'], "seohide" => $_lang['seohide'], "tasktop" => $_lang['task_top'], "goodstop" => $_lang['goods_top'], "urgent" => $_lang['task_urgent']);
    }
    public static function get_payitem_type()
    {
        global $_lang;
        return array("task" => $_lang['task_pub'], "work" => $_lang['witkey_submit'], "task_service" => kekezu::lang(task_pub_goods_pub));
    }
    public static function withdraw_status()
    {
        global $_lang;
        return array("1" => $_lang['wait_audit'], "2" => $_lang['has_success'], "3" => $_lang['has_fail']);
    }
    public static function get_message_send_type()
    {
        global $_lang;
        return array(array("1" => "send_sms", "2" => "send_email", "3" => "send_mobile_sms"), array("send_sms" => $_lang['site_msg'], "send_email" => $_lang['send_email'], "send_mobile_sms" => $_lang['send_mobile_sms']));
    }
    public static function get_message_send_obj()
Пример #8
0
<?php

keke_lang_class::load_lang_class('keke_shop_class');
class keke_shop_class
{
    public static function get_service_info($sid)
    {
        return db_factory::get_one(sprintf(" select * from %switkey_service where service_id=%d", TABLEPRE, $sid));
    }
    public static function notify_user($uid, $username, $action, $title, $v_arr = array(), $msg_type = '1')
    {
        $msg_obj = new keke_msg_class();
        $contact = self::get_contact($uid);
        $msg_obj->send_message($uid, $username, $action, $title, $v_arr, $contact['email'], $contact['mobile'], 1);
    }
    public static function get_contact($uid)
    {
        return db_factory::get_one(sprintf(" select mobile,email from %switkey_space where uid = '%d'", TABLEPRE, $uid));
    }
    public static function access_check($sid, $s_uid, $model_id)
    {
        global $uid, $kekezu, $_lang;
        $order_info = self::check_has_buy($sid, $uid);
        $order_status = $order_info['order_status'];
        $order_id = intval($order_info['order_id']);
        $model_code = $kekezu->_model_list[$model_id]['model_code'];
        if ($uid == $s_uid || $uid == $order_info['order_uid']) {
            return true;
        } else {
            kekezu::keke_show_msg("index.php?do=user&view=transaction&op=sold&intModelId=" . $model_id, '您没有权限进入此页面', 'error');
        }
Пример #9
0
<?php

keke_lang_class::load_lang_class('sreward_report_class');
class sreward_report_class extends keke_report_class
{
    public static function get_instance($report_id, $report_info = null, $obj_info = null, $user_info = null, $to_userinfo = null)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new sreward_report_class($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
        }
        return $obj;
    }
    public function __construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo)
    {
        parent::__construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
        $this->_task_info = $this->get_task_info($this->_report_info['origin_id']);
        $this->_task_obj = new sreward_task_class($this->_task_info);
    }
    public function process_rights($op_result, $type)
    {
        global $kekezu;
        global $_lang;
        $prom_obj = $objProm = keke_prom_class::get_instance();
        $trans_name = $this->get_transrights_name($this->_report_type);
        $op_result = $this->op_result_format($op_result);
        $g_info = $this->user_role('gz');
        $w_info = $this->user_role('wk');
        switch ($op_result['action']) {
            case "pass":
                if ($this->_process_can['sharing']) {
Пример #10
0
 function init_curr()
 {
     if ($_SESSION['currency']) {
         $this->_currency = $_SESSION['currency'];
     } else {
         $this->_currency = $this->_sys_config['currency'];
         $_SESSION['currency'] = $this->_sys_config['currency'];
     }
     $this->_curr_list = keke_lang_class::get_curr_list();
 }
Пример #11
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(220);
$lang_arr = keke_lang_class::lang_type();
$url = 'index.php?do=config&view=enclosure';
$objBasicConfigT = new Keke_witkey_basic_config_class();
$config_basic_arr = $objBasicConfigT->query_keke_witkey_basic_config();
foreach ($config_basic_arr as $k => $v) {
    $arrBasicConfig[$v['k']] = $v['v'];
}
if (isset($_POST) && !empty($_POST)) {
    if ($_POST['upload_type'] == '1') {
        unset($_POST['access_key']);
        unset($_POST['secret_key']);
        unset($_POST['qn_bucket']);
        unset($_POST['qn_domain']);
    } else {
        $res = kekezu::check_upload_access($_POST['access_key'], $_POST['secret_key'], $_POST['qn_bucket']);
        !$res and kekezu::admin_show_msg('请核对AccessKey、SecretKey和bucket是否准确!', $url, 3, '', 'warning');
    }
    foreach ($_POST as $k => $v) {
        $objBasicConfigT->setWhere("k = '{$k}'");
        $objBasicConfigT->setV(kekezu::k_input($v));
        $res += $objBasicConfigT->edit_keke_witkey_basic_config();
    }
    kekezu::admin_show_msg('提交成功', $url, 3, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
Пример #12
0
<?php

define("IN_KEKE", TRUE);
include 'app_comm.php';
$task_open = $kekezu->_task_open;
$shop_open = $kekezu->_shop_open;
$dos = $kekezu->_route;
!empty($do) && in_array($do, $dos) and $do or (!$_GET && !$_POST and $do = $kekezu->_sys_config['set_index'] or $do = 'index');
if (stristr($_SERVER["REQUEST_URI"], "index.html")) {
    $do = index;
}
isset($m) && $m == "user" and $do = "avatar";
keke_lang_class::package_init("index");
keke_lang_class::loadlang($do);
$kekezu->init_lang();
$strPageKeyword = $kekezu->_sys_config['seo_keyword'];
$strPageDescription = $kekezu->_sys_config['seo_desc'];
$strWebLogo = $kekezu->_sys_config['web_logo'];
$gUid = $uid = intval($kekezu->_uid);
$gUsername = $username = $kekezu->_username;
$user_type = $kekezu->_user_type;
//增加需方供方身份
$messagecount = kekezu::getmessagecount($uid);
$gUserInfo = $user_info = $kekezu->_userinfo;
$indus_p_arr = $kekezu->_indus_p_arr;
$indus_c_arr = $kekezu->_indus_c_arr;
$indus_arr = $kekezu->_indus_arr;
$indus_task_arr = $kekezu->_indus_task_arr;
$indus_goods_arr = $kekezu->_indus_goods_arr;
$arrModelList = $model_list = $kekezu->_model_list;
$nav_arr = kekezu::nav_list($kekezu->_nav_list);
Пример #13
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
keke_lang_class::package_init("shop");
keke_lang_class::loadlang("goods_process");
$views = array('config', 'list', 'order', 'process', 'edit', 'order_detail');
$view = in_array($view, $views) ? $view : "list";
require "goods_{$view}.php";
Пример #14
0
<?php

keke_lang_class::load_lang_class('keke_auth_mobile_class');
class keke_auth_mobile_class extends keke_auth_base_class
{
    public static function get_instance($code = 'mobile')
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new keke_auth_mobile_class($code);
        }
        return $obj;
    }
    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);
    }
    public static function get_auth_step($step = null, $auth_info = array())
    {
        if ($step) {
            $step = $step;
        } elseif ($auth_info) {
            $auth_info['auth_status'] and $step = "step3" or $step = "step2";
        } else {
            $step = 'step1';
        }
        return $step;
    }
    public function add_auth($data, $file_name = '')
Пример #15
0
<?php

keke_lang_class::load_lang_class('goods_report_class');
class goods_report_class extends keke_report_class
{
    public static function get_instance($report_id, $report_info = null, $obj_info = null, $user_info = null, $to_userinfo = null)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new goods_report_class($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
        }
        return $obj;
    }
    public function __construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo)
    {
        parent::__construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
    }
    public function process_rights($op_result, $type)
    {
        global $_lang;
        $trans_name = $this->get_transrights_name($this->_report_type);
        $op_result = $this->op_result_format($op_result);
        $g_info = $this->user_role('gz');
        $w_info = $this->user_role('wk');
        switch ($op_result['action']) {
            case "pass":
                if ($this->_process_can['sharing']) {
                    $total_cash = floatval($this->_obj_info['cash']);
                    $gz_get = floatval($op_result['gz_get']);
                    $wk_get = floatval($op_result['wk_get']);
                    if ($total_cash != $gz_get + $wk_get) {
Пример #16
0
<?php

keke_lang_class::load_lang_class('keke_payitem_class');
class keke_payitem_class
{
    public static function get_table_obj($table = 'witkey_payitem')
    {
        return keke_table_class::get_instance($table);
    }
    public static function get_payitem_config($user_type = null, $model_code = null, $item_code = null, $pk = null, $is_open = 1)
    {
        global $kekezu;
        $is_open == 1 and $where = " and is_open={$is_open}";
        $pk or $pk = "item_code";
        $payitem_list = kekezu::get_table_data("*", "witkey_payitem", "1=1 {$where} ", "", "", "", $pk, 3600);
        if ($user_type) {
            foreach ($payitem_list as $k => $v) {
                if ($v['user_type'] != $user_type) {
                    unset($payitem_list[$k]);
                }
            }
        }
        if ($model_code) {
            foreach ($payitem_list as $k => $v) {
                if (strpos($v['model_code'], $model_code) === FALSE) {
                    unset($payitem_list[$k]);
                }
            }
        }
        if ($item_code) {
            $payitem_list[$item_code];
Пример #17
0
<?php

keke_lang_class::load_lang_class('goods_pay_return_class');
final class goods_pay_return_class extends pay_return_base_class
{
    function __construct($charge_type, $model_id = '', $uid = '', $obj_id = '', $order_id = '', $total_fee = '')
    {
        parent::__construct($charge_type, $model_id, $uid, $obj_id, $order_id, $total_fee);
    }
    function order_charge()
    {
        global $_K;
        $order_id = $this->_order_id;
        $sid = $this->_obj_id;
        $uid = $this->_uid;
        $user_info = $this->_userinfo;
        $order_info = db_factory::get_one(sprintf(" select order_status,order_uid,order_username,seller_uid,seller_username from %switkey_order where order_id='%d'", TABLEPRE, $order_id));
        $url = $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id;
        $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=1&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
        $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
        if ($order_info['order_status'] == 'wait') {
            $service_info = keke_shop_class::get_service_info($sid);
            $service_status = db_factory::get_count(sprintf(" select service_status from %switkey_service where service_id='%d'", TABLEPRE, $sid));
            if ($service_status == '2') {
                $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
                keke_finance_class::init_mem('buy_service', $data);
                $this->_total_fee > 0 and $res = keke_finance_class::cash_out($uid, $this->_total_fee, 'buy_service', '0', 'service', $order_id);
                if ($res) {
                    db_factory::execute(sprintf(" update %switkey_order set order_status='ok' where order_id='%d'", TABLEPRE, $order_id));
                    $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $_lang['you'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $b_order_link);
                    keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
Пример #18
0
<?php

keke_lang_class::load_lang_class('service_report_class');
class service_report_class extends keke_report_class
{
    public static function get_instance($report_id, $report_info = null, $obj_info = null, $user_info = null, $to_userinfo = null)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new service_report_class($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
        }
        return $obj;
    }
    public function __construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo)
    {
        parent::__construct($report_id, $report_info, $obj_info, $user_info, $to_userinfo);
    }
    public function process_rights($op_result, $type)
    {
        $trans_name = $this->get_transrights_name($this->_report_type);
        $op_result = $this->op_result_format($op_result);
        $g_info = $this->user_role('gz');
        $w_info = $this->user_role('wk');
        switch ($op_result['action']) {
            case "pass":
                if ($this->_process_can['sharing']) {
                    $total_cash = floatval($this->_obj_info['cash']);
                    $gz_get = floatval($op_result['gz_get']);
                    $wk_get = floatval($op_result['wk_get']);
                    if ($total_cash != $gz_get + $wk_get) {
                        kekezu::admin_show_msg($_lang['wain_you_give_cash_error_notice'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", "", "error");
Пример #19
0
<?php

keke_lang_class::load_lang_class('keke_register_class');
class keke_register_class
{
    protected $_space_obj;
    protected $_member_obj;
    protected $_sys_config;
    protected $_reg_username;
    protected $_reg_type;
    public $_reg_pwd;
    protected $_reg_email;
    protected $_reg_ip;
    protected $_message_obj;
    protected $_check_code;
    protected $_oltime_obj;
    protected $_shop_obj;
    function __construct($reg_type = 1)
    {
        global $kekezu;
        $this->_space_obj = new Keke_witkey_space_class();
        $this->_member_obj = new Keke_witkey_member_class();
        $this->_sys_config = $kekezu->_sys_config;
        $this->_message_obj = new keke_msg_class();
        $this->_oltime_obj = new Keke_witkey_member_oltime_class();
        $this->_shop_obj = new Keke_witkey_shop_class();
        $this->_reg_ip = kekezu::get_ip();
        $this->_reg_type = intval($reg_type);
    }
    //增加$user_type参数
    function user_register($reg_username, $reg_pwd, $reg_email, $reg_code, $check_code = true, $old_pwd = null, $reg_user_type, $reg_user_type_xf, $is_oauth = null)
Пример #20
0
<?php

keke_lang_class::load_lang_class('tender_task_class');
class tender_task_class extends keke_task_class
{
    public $_task_status_arr;
    public $_work_status_arr;
    public $_delay_rule;
    public $_cove_obj;
    public $_cash_cove_obj;
    public $_task_bid_obj;
    public $_cash_arr;
    protected $_inited = false;
    public static function get_instance($task_info)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new tender_task_class($task_info);
        }
        return $obj;
    }
    public function __construct($task_info)
    {
        parent::__construct($task_info);
        $this->init();
    }
    public function init()
    {
        if (!$this->_inited) {
            $this->status_init();
            $this->delay_rule_init();
Пример #21
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$ops = array('basic', 'order', 'comm', 'mark');
in_array($op, $ops) or $op = 'basic';
if ($ajax == 'delfile') {
    keke_shop_class::delServiceFiles($serviceid, $filename, $type);
    $data = array();
    $data['type'] = $type;
    $data['dataid'] = $dataid;
    kekezu::echojson('删除成功', 1, $data);
    die;
}
keke_lang_class::loadlang('public', 'shop');
keke_lang_class::loadlang('task_edit', 'task');
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);
Пример #22
0
 static function file_down($file_name, $file_path)
 {
     keke_lang_class::load_lang_class('keke_file_class');
     global $_lang, $kekezu;
     if ($file_name && $file_path) {
         if (strpos($file_path, 'data/uploads/') !== false && strpos($file_path, '../') === false) {
             $filename = S_ROOT . $file_path;
             $ext = explode(".", $filename);
             $ext = $ext[count($ext) - 1];
             $ext = strtolower($ext);
             $sys_config = $kekezu->_sys_config;
             $file_ext = explode('|', $sys_config['file_type']);
             if (!in_array($ext, $file_ext) || !file_exists($filename)) {
                 kekezu::show_msg($_lang['file_not_exist'], $_SERVER['HTTP_REFERER'], "3");
             }
             $downfilename = str_replace(' ', '%20', $file_name);
             Header("Content-type: application/octet-stream");
             Header("Accept-Ranges: bytes");
             Header("Accept-Length: " . filesize($filename));
             Header("Content-Disposition: attachment; filename=" . $downfilename);
             $file = fopen($filename, "r");
             echo fread($file, filesize($filename));
             fclose($file);
             die;
         } else {
             kekezu::show_msg($_lang['file_not_exist'], $_SERVER['HTTP_REFERER'], "3");
         }
     } else {
         kekezu::show_msg($_lang['file_not_exist'], $_SERVER['HTTP_REFERER'], "3");
     }
 }
Пример #23
0
<?php

keke_lang_class::load_lang_class('keke_order_class');
class keke_order_class
{
    public static function get_order_info($order_id)
    {
        $sql = "select a.*,b.obj_type,b.obj_id from %switkey_order a left join\n\t\t%switkey_order_detail b on a.order_id=b.order_id where a.order_id='%d'";
        return db_factory::get_one(sprintf($sql, TABLEPRE, TABLEPRE, $order_id));
    }
    public static function get_order_id($obj_type, $obj_id)
    {
        $sql = "select order_id from %switkey_order_detail where obj_type='%s' and obj_id='%d'";
        return db_factory::get_count(sprintf($sql, TABLEPRE, $obj_type, $obj_id));
    }
    public static function get_order_detail($order_id)
    {
        $sql = "select * from %switkey_order_detail where order_id = '%d'";
        return db_factory::query(sprintf($sql, TABLEPRE, $order_id));
    }
    public static function create_order($model_id, $seller_uid, $seller_username, $order_name, $order_amount, $order_body, $order_status = 'ok', $to_seller_message = null)
    {
        global $uid, $username;
        $order_obj = new Keke_witkey_order_class();
        $order_obj->_order_id = null;
        $order_obj->setModel_id($model_id);
        $order_obj->setOrder_name($order_name);
        $order_obj->setOrder_uid($uid);
        $order_obj->setOrder_username($username);
        $order_obj->setSeller_uid($seller_uid);
        $order_obj->setSeller_username($seller_username);
Пример #24
0
<?php

keke_lang_class::load_lang_class('match_task_class');
class match_task_class extends keke_task_class
{
    public $_task_status_arr;
    public $_work_status_arr;
    public $_cash_cove;
    public $_task_url;
    public $_notice_url;
    public $_host_amount;
    protected $_inited = false;
    public static function get_instance($task_info)
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new match_task_class($task_info);
        }
        return $obj;
    }
    public function __construct($task_info)
    {
        global $_K;
        parent::__construct($task_info);
        $siteurl = preg_replace("/localhost/i", "127.0.0.1", $_K['siteurl'], 1);
        $this->_task_url = $siteurl . '/index.php?do=task&id=' . $this->_task_id;
        $this->_notice_url = "<a href=\"{$this->_task_url}\">{$this->_task_title}</a>";
        $this->init();
    }
    public function init()
    {
Пример #25
0
<?php

keke_lang_class::load_lang_class('mreward_release_class');
class mreward_release_class extends keke_task_release_class
{
    public static function get_instance($model_id, $pub_mode = 'professional')
    {
        static $obj = null;
        if ($obj == null) {
            $obj = new mreward_release_class($model_id, $pub_mode);
        }
        return $obj;
    }
    function __construct($model_id, $pub_mode = 'professional')
    {
        parent::__construct($model_id, $pub_mode);
        $this->get_task_config();
        $this->_std_obj->_release_info['txt_task_cash'] and $cash = $this->_std_obj->_release_info['txt_task_cash'] or $cash = $this->_task_config['min_cash'];
        $this->_default_max_day = keke_task_release_class::get_default_max_day($cash, $model_id, $this->_task_config['min_day']);
        $this->priv_init();
    }
    public function priv_init()
    {
        $priv_arr = mreward_priv_class::get_priv('', $this->_model_id, $this->_user_info, '2');
        $this->_priv = $priv_arr['pub'];
    }
    public function get_task_config()
    {
        global $model_list;
        $model_list[$this->_model_id]['config'] and $this->_task_config = unserialize($model_list[$this->_model_id]['config']) or $this->_task_config = array();
    }
Пример #26
0
<?php

keke_lang_class::load_lang_class('keke_report_class');
abstract class keke_report_class
{
    public $_report_info;
    public $_obj_info;
    public $_user_info;
    public $_to_user_info;
    public $_report_id;
    public $_report_type;
    public $_report_status;
    public $_obj;
    public $_credit_info;
    public $_process_can;
    public $_msg_obj;
    public $_task_obj;
    public $_task_info;
    public $_model_info;
    public function __construct($report_id, $report_info = null, $obj_info = null, $user_info = null, $to_userinfo = null)
    {
        $report_info or $report_info = $this->get_report_info($report_id);
        $this->_msg_obj = new keke_msg_class();
        $this->_report_info = $report_info;
        $this->_report_id = $report_id;
        $this->_report_status = $report_info['report_status'];
        $this->_report_type = $report_info['report_type'];
        $this->_obj = $report_info['obj'];
        $user_info and $this->_user_info = $user_info or $this->_user_info = kekezu::get_user_info($report_info['uid']);
        $to_userinfo and $this->_to_user_info = $to_userinfo or $this->_to_user_info = kekezu::get_user_info($report_info['to_uid']);
        $obj_info and $this->_obj_info = $obj_info or $this->_obj_info = $this->obj_info_init($report_info, $user_info);
Пример #27
0
<?php

keke_lang_class::load_lang_class('keke_user_login_class');
class keke_user_login_class
{
    protected $_space_obj;
    protected $_login_uid;
    protected $_username;
    protected $_password;
    protected $_account;
    protected $_space_info;
    protected $_auth_record_obj;
    protected $_auth_email_obj;
    protected $_sys_config;
    protected $_accout_type;
    protected $_login_type;
    protected $_login_times;
    function __construct()
    {
        global $kekezu;
        $this->_space_obj = new Keke_witkey_space_class();
        $this->_auth_record_obj = new Keke_witkey_auth_record_class();
        $this->_auth_email_obj = new Keke_witkey_auth_email_class();
        $this->_sys_config = $kekezu->_sys_config;
    }
    function account_init($account)
    {
        $this->_account = $account;
        $uu = $this->valid_username();
        $this->_login_uid = $uu['uid'];
        $this->_login_times = intval($_SESSION['login_times']);
Пример #28
0
<?php

keke_lang_class::load_lang_class('keke_shop_release_class');
abstract class keke_shop_release_class
{
    public $_uid;
    public $_username;
    public $_user_info;
    public $_kf_info;
    public $_priv;
    public $_model_id;
    public $_model_info;
    public $_service_config;
    public $_inited = false;
    public $_service_obj;
    public $_std_obj;
    function __construct($model_id)
    {
        global $kekezu;
        $this->_service_obj = new Keke_witkey_service_class();
        $this->_model_id = $model_id;
        $this->_model_info = $kekezu->_model_list[$model_id];
        $this->_std_obj = new stdClass();
        $this->_std_obj->_release_info = array();
        $this->init();
    }
    function init()
    {
        if (!$this->_inited) {
            $this->user_info_init();
            $this->get_rand_kf();
Пример #29
0
<?php

keke_lang_class::load_lang_class('keke_loaddata_class');
class keke_loaddata_class
{
    static function readfeed($loadcount, $type = '', $uid = '', $objid = '', $templatename = "", $cachename = "", $cachetime = 300)
    {
        global $kekezu, $_lang;
        $tag_arr = $kekezu->_tag;
        $tag_info = $tag_arr[$templatename];
        $feed_arr = $cachename ? $kekezu->_cache_obj->get("feed_" . $cachename . "_cache") : null;
        if (!$feed_arr) {
            $feed_obj = new Keke_witkey_feed_class();
            $limit = $loadcount ? "limit 0,{$loadcount}" : "";
            $where = "1=1 ";
            $where .= $type ? "and feedtype='{$type}' " : "";
            $where .= $uid ? "and uid='{$uid}' " : "";
            $where .= $objid ? "and obj_id='{$objid}' " : "";
            $where .= " order by feed_time desc ";
            $feed_obj->setWhere($where . $limit);
            $feed_arr = $feed_obj->query_keke_witkey_feed();
            $temp_arr = array();
            if (is_array($feed_arr)) {
                foreach ($feed_arr as $v) {
                    $v['on_time'] = kekezu::get_gmdate($v['feed_time']);
                    $temp_arr[] = $v;
                }
            }
            $feed_arr = $temp_arr;
            $cachename ? $kekezu->_cache_obj->set("feed_" . $cachename . "_cache", $feed_arr, $cachetime) : null;
        }
Пример #30
0
<?php

keke_lang_class::load_lang_class('keke_user_avatar_class');
defined("IN_KEKE") || defined("ADMIN_KEKE") or die("Access Denied");
define('_DATADIR', S_ROOT . "data/");
global $_K;
define('_DATAURL', $_K['siteurl'] . "/data");
class keke_user_avatar_class extends keke_user_class
{
    static function uploadavatar($uid)
    {
        @header("Expires: 0");
        @header("Cache-Control: private, post-check=0, pre-check=0, max-age=0", FALSE);
        @header("Pragma: no-cache");
        if (empty($uid)) {
            return -1;
        }
        if (empty($_FILES['Filedata'])) {
            return -3;
        }
        list($width, $height, $type, $attr) = getimagesize($_FILES['Filedata']['tmp_name']);
        $imgtype = array(1 => '.gif', 2 => '.jpg', 3 => '.png');
        $filetype = $imgtype[$type];
        if (!$filetype) {
            $filetype = '.jpg';
        }
        $tmpavatar = _DATADIR . './tmp/upload' . $uid . $filetype;
        file_exists($tmpavatar) && @unlink($tmpavatar);
        if (@copy($_FILES['Filedata']['tmp_name'], $tmpavatar) || @move_uploaded_file($_FILES['Filedata']['tmp_name'], $tmpavatar)) {
            @unlink($_FILES['Filedata']['tmp_name']);
            list($width, $height, $type, $attr) = getimagesize($tmpavatar);