<?php keke_lang_class::load_lang_class('keke_auth_realname_class'); class keke_auth_realname_class extends keke_auth_base_class { public static function get_instance($code = 'realname') { static $obj = null; if ($obj == null) { $obj = new keke_auth_realname_class($code); } return $obj; } public function __construct($code = 'realname') { parent::__construct($code); $this->_primary_key = 'realname_a_id'; $this->_tab_obj = keke_table_class::get_instance($this->_auth_table_name); } public static function get_auth_step($step = null, $arrAuthInfo = array()) { if ($step) { $step = $step; } elseif ($arrAuthInfo) { $arrAuthInfo['auth_status'] and $step = "step3" or $step = "step2"; } else { $step = 'step1'; } return $step; } public function add_auth($data, $is_jump = true)
<?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);
<?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();
<?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));
<?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];
<?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];
<?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)
<?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) {
<?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 = '')
<?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);
<?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'];
<?php keke_lang_class::load_lang_class('keke_page_class'); class keke_page_class { public $_style = 'BootPagination'; public $_ajax = 0; public $_ajax_dom; public $_cove = 1; public $_param; public $_data_arr = array(); public $_static; function setStyle($value) { $this->_style = $value; } function setAjax($value) { $this->_ajax = $value; } function setAjaxCove($value) { $this->_cove = intval($value); } function setAjaxDom($value) { $this->_ajax_dom = $value; } function setParam($value) { $this->_param = $value;
public function pingbi_work($work_id, $type) { keke_lang_class::load_lang_class('preward_report_class'); global $_K, $kekezu; global $_lang; $this->_task_info['task_status'] == 8 and kekezu::admin_show_msg('操作提示', "index.php?do=trans&view=report&type={$type}", "3", "当前任务不能屏蔽稿件", "warning"); $work_info = $this->_task_obj->get_task_work($work_id); $work_info['work_status'] != 0 and kekezu::admin_show_msg('操作提示', "index.php?do=trans&view=report&type={$type}", "3", "当前稿件雇主已选择,不能屏蔽此稿件", "warning"); $this->_task_obj->set_work_status($work_id, 8); }
<?php keke_lang_class::load_lang_class('keke_task_config'); class keke_task_config { public static function get_time_rule($model_id, $cache_time = null) { return kekezu::get_table_data("*", "witkey_task_time_rule", "model_id='{$model_id}'", "rule_cash", "", "", "", "", $cache_time); } 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); } public static function set_time_rule($model_id, $timeOld = array(), $timeNew = array()) { if (is_array($timeOld)) { foreach ($timeOld as $k => $v) { $res = db_factory::execute(sprintf(" update %switkey_task_time_rule set rule_day='%d',rule_cash='%s' where day_rule_id='%d' and model_id='%d'", TABLEPRE, $v['rule_day'], $v['rule_cash'], $k, $model_id)); } } if (is_array($timeNew)) { foreach ($timeNew as $v2) { !empty($v2['rule_day']) && !empty($v2['rule_cash']) and $res = db_factory::execute(sprintf(" insert into %switkey_task_time_rule values('','%f','%d','%d')", TABLEPRE, floatval($v2['rule_cash']), intval($v2['rule_day']), $model_id)); } } return $res; } public static function set_delay_rule($model_id, $delayOld = array(), $delayNew = array()) { if (is_array($delayOld)) { foreach ($delayOld as $k => $v) {
<?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);
unset($nav_arr[$k]); } } } } $this->_nav_list = $nav_arr; } function init_session() { keke_session_class::get_instance(); if ($_REQUEST['PHPSESSID'] && ($session_id = $_REQUEST['PHPSESSID']) != session_id()) { session_destroy(); session_id($session_id); session_start(); } } function init_out_put() { $_SERVER['REQUEST_METHOD'] == 'GET' && !empty($_SERVER['REQUEST_URI']) and kekezu::filter_xss(); ob_start(); header("Content-Type:text/html; charset=" . CHARSET); } } $ipath = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "keke_kppw_install.lck"; file_exists($ipath) == true or header("Location: install/index.php"); kekezu::register_autoloader(); $kekezu =& kekezu::get_instance(); keke_lang_class::load_lang_class('keke_core_class'); $_cache_obj = $kekezu->_cache_obj; $page_obj = $kekezu->_page_obj; $template_obj = $kekezu->_tpl_obj;
<?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();
<?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']) {
<?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'); }
<?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);
<?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()
<?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");
<?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);
<?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();
<?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(); }
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"); } }
<?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']);
<?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() {
<?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; }
<?php keke_lang_class::load_lang_class('tender_time_class'); final class tender_time_class extends time_base_class { public $_task_obj; public $_task_bid_obj; function __construct() { parent::__construct(); } function validtaskstatus() { $this->_task_bid_obj = new Keke_witkey_task_bid_class(); $this->_task_obj = new Keke_witkey_task_class(); $this->task_tbtime_out(); $this->task_xbtime_out(); $this->task_top_end(); } function task_tbtime_out() { global $_lang; $sql = sprintf("select * from %switkey_task where model_id = 4 and task_status=2 and " . time() . ">sub_time", TABLEPRE); $task_arr = db_factory::query($sql); foreach ($task_arr as $k => $v) { $count = $this->get_task_work($v['task_id'], 0); if ($count) { $v_arr = array($_lang['username'] => $v['username'], $_lang['model_name'] => $_lang['ptzb'], $_lang['task_id'] => $v['task_id'], $_lang['task_title'] => $v['task_title'], $_lang['tb'] => $_lang['tb'], $_lang['time'] => date('Y-m-d H:i:s')); keke_msg_class::notify_user($v['uid'], $v['username'], 'timeout', $_lang['tender_notice'], $v_arr, 1); $this->set_task_status($v['task_id'], 3); } else {