public static function cash_in($uid, $cash, $action, $source = null, $obj_type = null, $obj_id = null, $profit = 0, $charge = null) { $user_info = self::init($uid); $sys_config = self::$_basic_config; $fo = new Keke_witkey_finance_class(); $fo->setFina_action($action); $fo->setFina_type("in"); $fo->setObj_type($obj_type); $fo->setObj_id($obj_id); $fo->setFina_cash($cash); if (empty(self::$_mem)) { $action_arr = keke_glob_class::get_finance_action($action); self::$_mem = $action_arr[$action]; } $fo->setFina_mem(self::$_mem); $fo->setUser_balance($user_info['balance'] + $cash); $fo->setUid($user_info['uid']); $fo->setUsername($user_info['username']); $fo->setFina_source($source); $fo->setSite_profit($profit); $fo->setFina_mem(self::$_mem); $fo->setRecharge_cash($charge !== null ? floatval($charge) : null); $sql = "update " . TABLEPRE . "witkey_space set balance = ifnull(balance,0)+" . $cash . " where uid ='{$user_info['uid']}'"; $res = db_factory::execute($sql); if ($res) { $fo->setFina_time(time()); $row = $fo->create_keke_witkey_finance(); return $row; } else { return false; } }
static function task_time_desc($status, $end_time) { global $_lang; $end_time_arr = keke_glob_class::get_taskstatus_desc(); $now_time = time(); $desc_time = $end_time - $now_time; $desc_time > 0 and $sy_time = kekezu::timeMaxUnits($desc_time); if ($status == 8) { return '已结束'; } if ($sy_time) { return $sy_time . '后' . $end_time_arr[$status]['desc']; } return $end_time_arr[$status]['desc']; }
public static function resize($image, $size) { self::init_img_info($image); $arg_length = func_num_args(); if ($arg_length == 1) { return false; } $arguments = func_get_args(); $cut = false; $last_arg = $arguments[$arg_length - 1]; $length = $arg_length - 1; if (is_bool($last_arg)) { if ($arg_length <= 2) { return false; } $length = $arg_length - 2; $cut = $last_arg; } $orig_width = self::$_img_width; $orig_height = self::$_img_height; $success = (int) 0; for ($i = 1; $i <= $length; $i++) { if (!is_array($arguments[$i])) { return false; } if ($orig_width <= $orig_height) { $according = $arguments[$i][0] / $orig_width; } else { $according = $arguments[$i][1] / $orig_height; } $width = $orig_width * $according; $height = $orig_height * $according; $target = isset($arguments[$i][2]) ? $arguments[$i][2] : ''; $result = self::resize_pic($image, $width, $height, $target); if ($cut == true && file_exists($target)) { $img_size_arr = getimagesize($target); $target_width = $arguments[$i][0]; $target_height = $arguments[$i][1]; $cut_x = $img_size_arr[0] < $target_width ? '0' : ($img_size_arr[0] - $target_width) / 2; $cut_y = $img_size_arr[1] < $target_height ? '0' : ($img_size_arr[1] - $target_height) / 2; self::cut_pic($target, $target_width, $target_height, $cut_x, $cut_y); } keke_glob_class::waterMark($target); $result == true && $success++; } return $success > 0 ? true : false; }
break; } require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_ext'); die; } else { $page or $page = 1; $page_size or $page_size = 10; $page_obj = $kekezu->_page_obj; $page_obj->setAjax(1); $page_obj->setAjaxDom('ajax_dom'); $sql = sprintf("select w_basic.*, w_match.`wiki_deposit`,w_match.`deposit_cash`,w_match.`witkey_contact`,w_match.`deposit_credit` from %switkey_task_work w_basic left join %switkey_task_match_work w_match on w_basic.`task_id`=w_match.`work_id` where w_basic.task_id=%d", TABLEPRE, TABLEPRE, $task_id); $tmp = db_factory::query($sql); $pages = $page_obj->page_by_arr($tmp, $page_size, $page, $url); $list = $pages['data']; $satus_arr = match_task_class::get_work_status(); $platform_arr = keke_glob_class::get_oauth_type(); } break; case 'comm': if ($ac && $comm_id) { $id = intval($comm_id); switch ($ac) { case 'del': $sql = ' delete from %switkey_comment where comment_id=%d'; $type == 1 and $sql .= ' or p_id=%d'; $res = db_factory::execute(sprintf($sql, TABLEPRE, $id, $id)); $res and kekezu::echojson('', 1) or kekezu::echojson('', 0); die; break; case 'load': $list = db_factory::query(sprintf(' select * from %switkey_comment where p_id=%d', TABLEPRE, $id));
?> </td> <td><a href="index.php?do=task&id=<?php echo $v['task_id']; ?> " title="<?php echo $v['task_title']; ?> "><?php echo $v['task_title']; ?> </a></td> <td> <span class="money"> <?php echo keke_glob_class::showTaskCash($v['task_id']); ?> </span> </td> <td><?php echo date('Y-m-d', $v['start_time']); ?> </td> <td><?php echo $arrTaskSta[$v['task_status']]; ?> </td> <td> <?php if ($v[model_id] == 4 || $v[model_id] == 5 || $v[model_id] == 12) { $opera = master_opera($v['model_id'], $v['task_id'], $strUrl, $v['real_cash']);
static function loaddata($tag_info) { global $_K; $tag_type = keke_glob_class::get_tag_type(); if ($tag_info[tag_type] != 5) { $func_name = "load_" . $tag_type[$tag_info['tag_type']][2] . "_data"; $temp_arr = self::$func_name($tag_info); return $temp_arr; } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(63); $oauth_type_list = keke_glob_class::get_open_api(); $config_basic_obj = new Keke_witkey_basic_config_class(); $config_arr = $kekezu->_weibo_list; $api_open = $kekezu->_api_open; $url = 'index.php?do=msg&view=weibo'; if (isset($submit)) { foreach ($conf as $k => $v) { $config_basic_obj->setWhere("k = '{$k}'"); $config_basic_obj->setV($v); $res .= $config_basic_obj->edit_keke_witkey_basic_config(); } !empty($api) and $oauth_api = $api or $oauth_api = array(); $config_basic_obj->setWhere("k = 'oauth_api_open'"); $config_basic_obj->setV(serialize($oauth_api)); $config_basic_obj->edit_keke_witkey_basic_config(); kekezu::admin_system_log($_lang['config_interface_log']); if ($res) { $kekezu->_cache_obj->del("keke_b3c58336"); kekezu::admin_show_msg($_lang['oauth_api_config_success'], $url, 3, '', 'success'); } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
public function review_auth($auth_ids, $type = 'pass', $url = null) { global $_lang; global $kekezu; if ($url === null) { $url = $_SERVER['HTTP_REFERER']; } $prom_obj = keke_prom_class::get_instance(); is_array($auth_ids) and $auth_ids = implode(",", $auth_ids); $auth_info = $this->get_auth_info($auth_ids); $size = sizeof($auth_info); $size > 0 && $type == 'pass' and $status = '1' or $status = '2'; $size == 0 and kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_not_exist_audit_fail'], $_SERVER['HTTP_REFERER']); if ($size == 1 && $auth_info[0]['auth_status'] != '1') { $this->set_auth_status($auth_info[0][$this->_primary_key], $status); $this->set_auth_record_status($auth_info[0]['uid'], $status); $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($auth_info[0]['uid'], $auth_info[0]['id_card']); } elseif ($size > 1) { foreach ($auth_info as $v) { if ($v['auth_status'] != '1') { $this->set_auth_record_status($v['uid'], $status); $this->set_auth_status($v[$this->_primary_key], $status); $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($v['uid'], $v['id_card']); } } } switch ($type) { case "pass": kekezu::admin_system_log($this->auth_lang() . $_lang['apply_pass'] . "{$auth_ids}"); foreach ($auth_info as $v) { if ($this->_auth_code == 'enterprise') { $this->set_user_role($auth_info[0][uid], $type); } elseif ($this->_auth_code == 'realname') { $this->set_user_role($auth_info[0][uid], $type); } $feed_arr = array("feed_username" => array("content" => $v[username], "url" => "index.php?do=seller&id={$v['uid']}"), "action" => array("content" => $_lang['has_pass'], "url" => ""), "event" => array("content" => $this->auth_lang(), "url" => "")); kekezu::save_feed($feed_arr, $v['uid'], $v['username'], $this->_auth_name); $prom_obj->dispose_prom_event('reg', $v['uid'], $v['uid']); $auth_arr = keke_glob_class::get_finance_action(); $arr[$_lang['auth_code']] = $auth_arr[$this->_auth_name]; $arr[$_lang['auth_url']] = "index.php?do=user&view=payitem&op=auth&auth_code={$this->_auth_code}"; keke_msg_class::notify_user($v['uid'], $v['username'], 'auth_success', $auth_arr[$this->_auth_name] . $_lang['through'], $arr, 2); } $url = 'HTTP://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?do=auth&view=list&code={$this->_auth_code}"; kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_success'], $url, 3, '', 'success'); break; case "not_pass": kekezu::admin_system_log($this->auth_lang() . $_lang['apply_not_pass'] . "{$auth_ids}"); kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_not_pass'], $url, 3, '', 'success'); break; } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(34); $add_service_type = keke_glob_class::get_value_add_type(); $payitem_record_obj = new Keke_witkey_payitem_record_class(); $url = "index.php?do={$do}&view={$view}&w[record_id]={$w['record_id']}&w[username]={$w['username']}&w[item_code]={$w['item_code']}&w[ord]={$w['ord']}&page={$page}&w[page_size]={$page_size}"; $where = ' 1 = 1 '; $w[record_id] and $where .= " and record_id = " . $w[record_id]; $w[username] and $where .= " and username like '%{$w['username']}%'"; $w[item_code] and $where .= " and item_code like '%{$w['item_code']}%'"; $order_where = " order by on_time desc "; is_array($w['ord']) and $order_where = ' order by ' . $w['ord'][0] . ' ' . $w['ord'][1]; $where = $where . $order_where; $all_buy_sql = "select sum(use_cash) as cash from " . TABLEPRE . "witkey_payitem_record "; $all_buy_pro = db_factory::query($all_buy_sql); $all_buy_pro = $all_buy_pro[0] ? $all_buy_pro[0] : 0; $page_obj = $kekezu->_page_obj; $page = intval($page); $page or $page = 1; $w[page_size] and $page_size = intval($w[page_size]) or $page_size = 10; $payitem_record_obj->setWhere($where); $count = $payitem_record_obj->count_keke_witkey_payitem_record(); $page_obj->setAjax(1); $page_obj->setAjaxDom("ajax_dom"); $pages = $page_obj->getPages($count, $page_size, $page, $url); $where .= $pages[where]; $payitem_record_obj->setWhere($where); $payitem_record_arr = $payitem_record_obj->query_keke_witkey_payitem_record(); require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_payitem_' . $view);
<?php $uid && !isset($_SESSION['auid']) and header("location:index.php"); $strPageTitle = '注册-' . $_K['html_title']; $strPageKeyword = '注册,' . $_K['html_title']; $strPageDescription = $kekezu->_sys_config['index_seo_desc']; $objReg = new keke_register_class(); $arrApiNames = keke_glob_class::get_open_api(); if (isset($formhash) && kekezu::submitcheck($formhash)) { //检测身份 if (intval($reg_user_type) != 1 && intval($reg_user_type) != 2) { $tips['errors']['reg_user_type'] = '请选择需方或供方身份注册'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } //检测需方身份 if (intval($reg_user_type) == '1') { if (intval($reg_user_type_xf) != 1 && intval($reg_user_type_xf) != 2) { $tips['errors']['reg_user_type_xf'] = '请选择个人用户或者企业用户'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } elseif (intval($reg_user_type) == '2') { $reg_user_type_xf = 2; //供方都是企业认证 } if (keke_user_class::user_checkemail($email) != 1) { $tips['errors']['email'] = '该email非法或已经被注册'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $account = kekezu::utftogbk($account); }
function check_ip() { global $_lang; $check_time = time() - $this->_sys_config['reg_limit'] * 60; if (keke_glob_class::checkipaddres($this->_reg_ip)) { $this->_space_obj->setWhere("reg_ip = '{$this->_reg_ip}' and {$check_time}< reg_time"); } else { $this->_space_obj->setWhere(" {$check_time}< reg_time"); } $res = $this->_space_obj->query_keke_witkey_space(); if ($res) { return $_lang['this_IP_has_registered_notice']; } else { return true; } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(73); $msg_obj = new Keke_witkey_msg_config_class(); $message_send_type = keke_glob_class::get_message_send_type(); $message_send_obj = keke_glob_class::get_message_send_obj(); if (isset($sbt_edit)) { if (is_array($fds)) { foreach ($fds as $k => $v) { $send_type = array(); switch ($v['send_open']) { case 0: foreach ($message_send_type['0'] as $v2) { $send_type[$v2] = intval(0); } break; case 1: switch (!empty($ckb[$k])) { case 1: foreach ($ckb[$k] as $k3 => $v3) { $send_type[$k3] = intval($v3); } break; case 0: foreach ($message_send_type['0'] as $v2) { $send_type[$v2] = intval(0); } break; } break;
public static function check_if_favor($uid, $obj_uid, $pk, $keep_type, $model_code, $obj_id, $url = '', $output = 'normal') { global $_lang; $favor_type = keke_glob_class::get_favor_type(); $favor_tab = TABLEPRE . "witkey_" . $keep_type; if ($obj_uid == $uid) { kekezu::keke_show_msg($url, $_lang['you_can_not_collection_self'] . $favor_type[$keep_type] . "!", "error", $output); } else { $if_favor = db_factory::get_count(sprintf(" select f_id from %switkey_favorite where keep_type='%s' and obj_type='%s' and obj_id='%d' and uid='%d'", TABLEPRE, $keep_type, $model_code, $obj_id, $uid)); if (!$if_favor) { return TRUE; } else { kekezu::keke_show_msg($url, $_lang['you_has_collection_this'] . $favor_type[$keep_type] . "," . $_lang['no_need_continue_collection'], "error", $output); return false; } } }
<?php defined('IN_KEKE') or exit('Access Denied'); $intBankId = intval($intBankId); $intBankAid = intval($intBankAid); $step and $step = $step or $step = 'step1'; $strUrl = "index.php?do=user&view=account&op=auth&code=" . $code; $strBankSql = sprintf("select a.*,b.bank_a_id,b.auth_status from %switkey_member_bank a left join %switkey_auth_bank b on a.bank_id = b.bank_id where a.uid=%d", TABLEPRE, TABLEPRE, $gUid); $arrBankAuthLists = db_factory::query($strBankSql); foreach ($arrBankAuthLists as $k => $v) { $arrAccountLists[$v['bank_id']] = $v; } $bank_arr = keke_glob_class::get_bank(); switch ($step) { case "step1": switch ($action) { case 'subAuth': if (!$intBankId) { kekezu::show_msg('警告,非法进入,您还未选择关联账户', null, null, null, null); } $arrUserBankInfo = $arrAccountLists[$intBankId]; if (empty($arrUserBankInfo) && !is_array($arrUserBankInfo)) { kekezu::show_msg('不存在的关联银行账号', null, null, null, null); } $arrData['bank_name'] = $arrUserBankInfo['bank_name']; $arrData['bank_account'] = $arrUserBankInfo['card_num']; $arrData['deposit_area'] = $arrUserBankInfo['bank_address']; $arrData['deposit_name'] = $arrUserBankInfo['bank_sub_name']; $arrData['bank_id'] = $arrUserBankInfo['bank_id']; if ($arrData['bank_name'] && $arrData['bank_account']) { $intResId = $objAuth->add_auth($arrData);
$intFinaId and $w .= " and fina_id = '" . intval($intFinaId) . "' "; if ($type == 'in') { $w .= " and fina_type = 'in'"; } elseif ($type == 'out') { $w .= "and fina_type = 'out'"; } switch ($ord) { case 1: $w .= ' order by fina_id asc '; break; case 2: $w .= ' order by fina_id desc '; break; case 3: $w .= ' order by fina_time asc '; break; case 4: $w .= ' order by fina_time desc '; break; } $fina_action_arr = keke_glob_class::get_finance_action(); $strSql = "select fina_action,fina_id,fina_type,fina_cash,user_balance,fina_time from " . TABLEPRE . "witkey_finance where "; if (!$ord) { $w .= ' order by fina_time desc'; } $strSql .= $w; } $arrData = db_factory::query($strSql); $arrPageArr = $kekezu->_page_obj->page_by_arr($arrData, $pageSize, $page, $strUrl); $arrData = $arrPageArr['data']; $strPages = $arrPageArr['page'];
/** * 上传文件的主处理方法 * @return mixed */ private function upFile() { $file = $this->file = $_FILES[$this->fileField]; if (!$file) { $this->stateInfo = $this->getStateInfo("ERROR_FILE_NOT_FOUND"); return; } if ($this->file['error']) { $this->stateInfo = $this->getStateInfo($file['error']); return; } else { if (!file_exists($file['tmp_name'])) { $this->stateInfo = $this->getStateInfo("ERROR_TMP_FILE_NOT_FOUND"); return; } else { if (!is_uploaded_file($file['tmp_name'])) { $this->stateInfo = $this->getStateInfo("ERROR_TMPFILE"); return; } } } $this->oriName = $file['name']; $this->fileSize = $file['size']; $this->fileType = $this->getFileExt(); $this->fullName = $this->getFullName(); $this->filePath = $this->getFilePath(); $this->fileName = $this->getFileName(); $dirname = dirname($this->filePath); //检查文件大小是否超出限制 if (!$this->checkSize()) { $this->stateInfo = $this->getStateInfo("ERROR_SIZE_EXCEED"); return; } //检查是否不允许的文件格式 if (!$this->checkType()) { $this->stateInfo = $this->getStateInfo("ERROR_TYPE_NOT_ALLOWED"); return; } //创建目录失败 if (!file_exists($dirname) && !mkdir($dirname, 0777, true)) { $this->stateInfo = $this->getStateInfo("ERROR_CREATE_DIR"); return; } else { if (!is_writeable($dirname)) { $this->stateInfo = $this->getStateInfo("ERROR_DIR_NOT_WRITEABLE"); return; } } //移动文件 if (!(move_uploaded_file($file["tmp_name"], $this->filePath) && file_exists($this->filePath))) { //移动失败 $this->stateInfo = $this->getStateInfo("ERROR_FILE_MOVE"); } else { //移动成功 $this->stateInfo = $this->stateMap[0]; } //水印 keke_glob_class::waterMark($this->filePath); }
<?php defined("ADMIN_KEKE") or exit("Access Denied"); kekezu::admin_check_role(79); $status = array(0 => $_lang['to_be_evaluated'], 1 => $_lang['good_value'], 2 => $_lang['middle_value'], 3 => $_lang['bad_value']); $form = array(1 => $_lang['witkey'], 2 => $_lang['employer']); $obj_arr = array('task' => $_lang['task'], 'work' => $_lang['workl'], 'shop' => $_lang['goods']); $model_type_arr = keke_glob_class::get_model_type(); $model_list = kekezu::get_table_data('*', 'witkey_model', '', 'model_id asc ', '', '', 'model_code'); $mark_obj = keke_table_class::get_instance('witkey_mark'); $page and $page = intval($page) or $page = 1; $w['page_size'] and $w['page_size'] = intval($w['page_size']) or $w['page_size'] = 10; if (is_numeric($ord['0']) || is_numeric($ord['1'])) { kekezu::admin_show_msg($_lang['operate_notice'], 'index.php?do=$do&view=$view&op=$op', 3, $_lang['operate_fail'], 'warning'); } $url = "index.php?do={$do}&view={$view}&op={$op}&w[by_username]=" . $w['by_username'] . "&w[mark_id]=" . $w['mark_id'] . "&w[page_size]=" . $w['page_size'] . "&page={$page}&ord[]=" . $ord['0'] . "&ord[]=" . $ord['1']; if ($ac == 'del' && $mark_id) { $mark_obj->del('mark_id', $mark_id) and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_faile'], 'warning'); } elseif ($sbt_action == $_lang['mulit_delete']) { $mark_obj->del('mark_id', array_filter($ckb)) and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_fail'], 'warning'); } else { $where = "1=1"; intval($w['mark_id']) and $where .= " and mark_id = " . $w['mark_id']; strval($w['by_username']) and $where .= " and by_username like '%" . $w['by_username'] . "%'"; $ord['0'] && $ord['1'] and $where .= " order by " . $ord['0'] . " " . $ord['1'] or $where .= " order by mark_id desc "; $data = $mark_obj->get_grid($where, $url, $page, $w['page_size'], null, 1, 'ajax_dom'); $mark_data = $data['data']; $pages = $data['pages']; } require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . "/tpl/admin_" . $do . "_" . $view . "_" . $op);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(29); $indus_arr = kekezu::get_industry(); $art_cat_arr = kekezu::get_table_data("*", "witkey_article_category", "", "", "", "", "art_cat_id", null); $url = "index.php?do=tpl&view=edit_tag&tagid={$tagid}"; $tag_type_arr = keke_glob_class::get_tag_type(); $tag_obj = new Keke_witkey_tag_class(); if ($tagid) { $tag_obj->setWhere("tag_id='{$tagid}'"); $taginfo = $tag_obj->query_keke_witkey_tag(); $taginfo = $taginfo['0']; } if ($submit) { $txt_tagname or kekezu::admin_show_msg($_lang['enter_tag_name'], $url, 3, '', 'warning'); $tag_obj2 = new Keke_witkey_tag_class(); $tag_obj2->setWhere("tagname = '{$txt_tagname}' and tag_id!='{$tagid}'"); if ($tag_obj2->query_keke_witkey_tag()) { kekezu::admin_show_msg($_lang['tag_name_inuse_please_replace'], $url, 3, '', 'warning'); } $tag_obj->setTagname($txt_tagname); $tag_obj->setTag_type($tag_type); if ($tag_type == 6) { $code = $model_id; } else { $code = $tar_custom_code; } $tag_obj->setCode($code); $tag_obj->setTag_code($tag_code); if ($tagid) {
<?php defined('IN_KEKE') or exit('Access Denied'); $intUserRole = intval($gUserInfo['user_type']); if ($intUserRole === 2) { $strAccountName = '企业机构名称'; $strInputName = 'company'; } else { $strAccountName = '真实姓名'; $strInputName = 'real_name'; } $strUrl = 'index.php?do=user&view=account&op=addbankinfo'; $objMemBankT = keke_table_class::get_instance("witkey_member_bank"); $arrBankList = keke_glob_class::get_bank(); $arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name'); $strBankZone = $_SESSION['bank_zone']; $strBankDetail = $_SESSION['bank_zone_detail']; switch ($step) { case "step1": if (isset($formhash) && kekezu::submitcheck($formhash)) { $strTxtName = strval(trim($txt_name)); $strBankName = strval(trim($bank_name)); $strBankFullName = strval(trim($bank_full_name)); $strCardNum = strval(trim($card_num)); if (!$strTxtName) { $tips['errors']['txt_name'] = '请输入' . $strAccountName; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($province === '选择省份' || !$province) { $tips['errors']['province'] = '请选择省份'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
kekezu::show_msg($resText, 'index.php?do=task&id=' . $taskId, 3, NULL, 'fail'); } } else { require keke_tpl_class::template('task/delay'); } die; break; case "workchoose": $workId = intval($workId); $workStatus = intval($status); $arrWorkInfo = $objTask->get_task_work($workId, ''); if ($workId && $workStatus && $arrWorkInfo) { $resText = $objTask->work_choose($workId, $workStatus); if ($resText === true) { if ($workStatus == '4' && $arrTaskInfo['teamwork'] == '1') { keke_glob_class::createProjectToKEE($arrTaskInfo['task_id'], $arrTaskInfo['task_title'], $workId); } kekezu::show_msg('操作成功', 'index.php?do=task&id=' . $taskId . '&view=work&page=' . intval($page), 3, NULL, 'ok'); } else { kekezu::show_msg($resText, 'index.php?do=task&id=' . $taskId . '&view=work&page=' . intval($page), 3, NULL, 'fail'); } } kekezu::show_msg('服务器繁忙,请重试...', 'index.php?do=task&id=' . $taskId, 3, NULL, 'fail'); die; break; case 'workinfo': $workId = intval($workId); $arrWorkInfo = $objTask->get_task_work($workId); $arrWorkFiles = $objTask->get_work_file($arrWorkInfo['work_file']); $intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "work"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrWorkInfo['work_id']))); require keke_tpl_class::template('task/workinfo');
} } } $page and $intPage = intval($page); $strUrl = "index.php?do=tasklist"; $m and $strUrl .= "&m=" . $m; $s and $strUrl .= "&s=" . $s; $r and $strUrl .= "&r=" . $r; $i and $strUrl .= "&i=" . $i; $pd and $strUrl .= "&pd=" . $pd; $o and $strUrl .= "&o=" . $o; $p and $strUrl .= "&p=" . intval($p); $ky and $strUrl .= "&ky=" . $ky; $intPage and $strUrl .= "&intPage=" . $intPage; $intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize); $arrTaskTimeDesc = keke_glob_class::get_taskstatus_desc(); $arrPayitemConfig = PayitemClass::getPayitemConfig(null, null, null, 'item_id'); $pd and $arrIndusPInfo = kekezu::get_indus_info($pd); $i and $arrIndusInfo = kekezu::get_indus_info($i); $arrTaskNavs = TaskClass::getEnabledTaskModelList(); if ($m) { $arrTaskStatus = call_user_func(array($arrTaskNavs[$m]['model_code'] . "_task_class", "get_task_status")); } $arrCashCoves = TaskClass::getTaskCashCove(); $arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务'); $arrCityInfo = CommonClass::getDistrictById($p); $arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name'); $objTaskT = keke_table_class::get_instance('witkey_task'); $strWhere = " 1=1 "; $intPage = intval($intPage) ? $intPage : 1; $intPagesize = intval($intPagesize) ? $intPagesize : 20;
public function getPrizeDesc() { $arrPrize = $this->get_prize_date(); $arrCount = $arrPrize['count']; $arrCach = $arrPrize['cash']; $strDesc = ''; $i = 0; if (is_array($arrCount)) { foreach ($arrCount as $k => $v) { $i++; $strNum = keke_glob_class::num2ch($i); if ($this->_task_config['task_rate'] > 0) { $floatCash = $arrCach[$k] * (1 - $this->_task_config['task_rate'] / 100); } else { $floatCash = $arrCach[$k]; } $strDesc .= $strNum . '等奖' . $v . '名,中标奖励¥' . $floatCash . ' '; } } return $strDesc; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(21); $file_type_arr = keke_glob_class::get_file_type(); $file_obj = new Keke_witkey_file_class(); $backup_patch = S_ROOT; intval($page) or $page = 1; intval($wh['page_size']) or $wh['page_size'] = 10; $url = "index.php?do={$do}&view={$view}&page={$page}&wh[page_size]={$wh['page_size']}&txt_file_id={$txt_file_id}&txt_file_name={$txt_file_name}&ord[]={$ord['0']}&ord[]={$ord['1']}"; if ($ac == 'del') { if ($file_id) { $file_obj->setWhere('file_id=' . $file_id); $file_info = $file_obj->query_keke_witkey_file(); foreach ($file_info as $v) { @unlink($backup_patch . $v['save_name']) and kekezu::admin_system_log($_lang['delete_attachment'] . $v['file_name']); } $file_obj->setWhere('file_id=' . $file_id); $res = $file_obj->del_keke_witkey_file(); kekezu::admin_system_log($_lang['delete_attachment'] . $file_id); $res and kekezu::admin_show_msg($_lang['atachment_delete_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['attchment_not_exist_delete_fail'], $url, 3, '', 'warning'); } } elseif (isset($sbt_action)) { is_array($ckb) and $ids = implode(',', array_filter($ckb)); if (sizeof($ids)) { $where = "file_id in ({$ids})"; $file_obj->setWhere($where); $file_info = $file_obj->query_keke_witkey_file(); foreach ($file_info as $v) { @unlink($backup_patch . $v['save_name']); }
<?php defined('IN_KEKE') or exit('Access Denied'); $strUrl = "index.php?do=user&view=finance&op=details"; $intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize); $intFinaId and $strUrl .= " &intFinaId=" . intval($intFinaId); $strFinaType and $strUrl .= "&strFinaType=" . strval($strFinaType); $strOrder and $strUrl .= "&strOrder=" . strval($strOrder); $arrAction = keke_glob_class::get_finance_action(); $arrOrd = array('a.fina_id desc' => '财务编号降序', 'a.fina_id asc' => '财务编号升序', 'a.fina_time desc' => '支付时间降序', 'a.fina_time asc' => '支付时间升序'); $page and $intPage = intval($page); $intPage = intval($intPage) ? $intPage : 1; $intPagesize = intval($intPagesize) ? $intPagesize : 10; $strSql = ' select a.*,b.task_title,c.title from ' . TABLEPRE . 'witkey_finance a left join ' . TABLEPRE . 'witkey_task b on a.obj_id=b.task_id left join ' . TABLEPRE . 'witkey_service c on a.obj_id=c.service_id '; $strWhere = " where a.uid=" . intval($gUid) . " and a.fina_action not in ('withdraw','offline_recharge','offline_charge','online_charge','online_recharge','withdraw_fail')"; intval($intFinaId) and $strWhere .= " and a.fina_id = " . intval($intFinaId); $strFinaType and $strWhere .= " and a.fina_type = '{$strFinaType}' "; $strOrder && in_array($strOrder, array_keys($arrOrd)) and $strWhere .= " order by {$strOrder} " or $strWhere .= " order by a.fina_id desc "; $intCount = intval(db_factory::execute(sprintf($strSql . $strWhere, TABLEPRE))); $strPages = $page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl, '#userCenter'); $arrFinanceLists = db_factory::query($strSql . $strWhere . $strPages['where']);
<?php $regionCfg = keke_glob_class::getRegionConfig(); $strNavActive = 'goodslist'; $i = intval($i); $pd = intval($pd); $strUrl = "index.php?do=goodslist"; $m and $strUrl .= "&m=" . intval($m); $intPage and $strUrl .= "&intPage=" . intval($intPage); $i and $strUrl .= "&i=" . intval($i); $pd and $strUrl .= "&pd=" . intval($pd); $o and $strUrl .= "&o=" . strval($o); $p and $strUrl .= "&p=" . intval($p); $ky and $strUrl .= "&ky=" . $ky; $arrCashCoves = TaskClass::getTaskCashCove(); $pd and $arrIndusPInfo = kekezu::get_indus_info($pd); $i and $arrIndusInfo = kekezu::get_indus_info($i); $arrCityInfo = CommonClass::getDistrictById($p); $arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name'); $arrItemConfig = PayitemClass::getPayitemConfig(null, null, null, 'item_id'); $arrIndusP = $kekezu->_indus_goods_arr; $arrIndusC = $kekezu->get_classify_indus('shop', 'child'); if (is_array($arrIndusC)) { $arrNewIndusC = array(); foreach ($arrIndusC as $k => $v) { $arrNewIndusC[$v['indus_pid']][] = $v; } } if (isset($ky)) { $ky = htmlspecialchars($ky); $ky = kekezu::escape($ky);
$page = 1; } $region_config = keke_glob_class::getRegionConfig(); $objDq = keke_table_class::get_instance('witkey_basic_config'); if ($_R['op'] == 'del') { $intResult = $objDistrict->del('id', $_R[id]); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=config&view=dq&page=" . $page, 3, '', 'success'); } if ($_R['op'] == 'region_switch') { $result = keke_glob_class::updateRegionConfig('region_search_switch', $_R['val']); $result and kekezu::echojson('', $_R['val']) or kekezu::echojson('', $_R['val']); } if ($_R['op'] == 'region_checkbox') { if ($_R['dtype'] == 'shop') { keke_glob_class::updateRegionConfig('region_search_shop', $_R['val']); } else { keke_glob_class::updateRegionConfig('region_search_task', $_R['val']); } kekezu::echojson('', $_R['val']); } $one = $objDistrict->get_grid('upid=0', $url, $page, 10, ' order by id asc', '1', 'ajax_dom'); if ($_R['is_submit'] == 1) { foreach ($_R[id] as $key => $val) { $arrFields = array('name' => $_R[name][$key], 'displayorder' => $_R[displayorder][$key]); $arrWhere = array('id' => $_R[id][$key]); $intResult = $objDistrict->save($arrFields, $arrWhere); } kekezu::admin_show_msg("修改成功", "index.php?do=config&view=dq&page=" . $page, 2, '', 'success'); } else { require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $alipayjs_obj = new Keke_witkey_auth_alipayjs_class(); $pay_tool_arr = array(1 => $_lang['alipay'], 2 => $_lang['tenpay'], 3 => $_lang['payment_online']); $alipayjs_name_arr = keke_glob_class::get_bank(); if ($sbt_pay_to_user) { $alipayjs_obj->setWhere('alipayjs_a_id=' . $fds['alipayjs_a_id']); $alipayjs_obj->setPay_to_user_cash($fds['pay_to_user_cash']); $alipayjs_obj->setPay_time(time()); $res = $alipayjs_obj->edit_keke_witkey_auth_alipayjs(); $alipayjs_info = db_factory::get_one(sprintf(" select uid,username from %switkey_auth_alipayjs where alipayjs_a_id = '%d'", TABLEPRE, $fds[alipayjs_a_id])); $v_arr = array($_lang['username'] => $alipayjs_info['username']); keke_msg_class::notify_user($alipayjs_info['uid'], $alipayjs_info['username'], 'alipayjs_auth', "支付宝认证通知", $v_arr, 2); $res and kekezu::admin_show_msg($_lang['give_cach_success'], $_SERVER['HTTP_REFERER'], '3', '', 'success'); } else { $alipayjs_a_id and $alipayjs_info = db_factory::get_one(sprintf(" select * from %switkey_auth_alipayjs where alipayjs_a_id = '%d'", TABLEPRE, $alipayjs_a_id)); } require $template_obj->template('auth/' . $auth_dir . '/admin/tpl/auth_info');
$upload = new keke_upload_class(S_ROOT . $pathDir, $fileFormat, $maxSize); $savename = $upload->run($filename, 1); if (!is_array($savename)) { $err = $msg = $savename; echo json_encode(array('err' => $err, 'msg' => $msg)); die; } else { $name = $savename[0]['name']; $path = $pathDir . $savename[0]['saveName']; if ($fileType == 'service') { $size_a = array(100, 100); $size_b = array(210, 210); $result = keke_img_class::resize($path, $size_a, $size_b, true); } if ($fileType != 'sys') { keke_glob_class::waterMark($path); } $savefilename = $savename[0]['name']; } } if (strtoupper(CHARSET) == 'GBK') { $savefilename = kekezu::utftogbk($savefilename); } $data = array(); $data['file_name'] = $savefilename; $data['save_name'] = $path; $data['uid'] = $gUid; $data['username'] = $gUsername; $data['obj_type'] = $objType; $data['task_id'] = $taskId; $data['work_id'] = $workId;
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(57); $feed_type = keke_glob_class::get_feed_type(); $feed_obj = new Keke_witkey_feed_class(); $tag_obj = new Keke_witkey_tag_class(); $type or $type = 'manage'; $url = "index.php?do={$do}&view={$view}&type={$type}&tag_id={$tag_id}"; if ($type === 'manage') { $tag_id and $feed_info = db_factory::get_one(" select tagname,tag_id,cache_time,tag_code,tpl_type,code from " . TABLEPRE . "witkey_tag where tag_type=8 and tag_id='{$tag_id}'"); $code = unserialize($feed_info['code']); } if ($sbt_edit) { if ($type === 'manage') { $slt_feed_type == 1 and kekezu::admin_show_msg($_lang['add_fail_select_type'], $url, 3, '', 'warning'); $cbk_group and $tpl_type = implode(",", $cbk_group) or $tpl_type = $_K['template']; $tag_obj->setTagname($txt_tag_name); $tag_obj->setTag_code($tag_code); $tag_obj->setCache_time($txt_cache_time); $tag_obj->setTpl_type($tpl_type); $tag_obj->setTag_type(8); $code['feed_type'] = $slt_feed_type; $code['load_num'] = intval($txt_load_num) ? intval($txt_load_num) : 9; $code['user_id'] = 0; $code['obj_id'] = 0; $code['cache_name'] = $txt_cache_name ? $txt_cache_name : $txt_tag_name; $code = serialize($code); $tag_obj->setCode($code); if ($hdn_tag_id) { $tag_obj->setTag_id($hdn_tag_id);
$service = db_factory::query($sql . $s_sql . $f_sql . ' group by model_id', 1, 3600); $payitem = db_factory::get_one($sql . sprintf(' from %switkey_finance where fina_type="out" and fina_action="payitem" ', TABLEPRE) . $f_sql, 1, 3600); break; case 'profit': $sql = sprintf(' select sum(site_profit) c from %switkey_finance where site_profit>0 ', TABLEPRE); $task = db_factory::get_count($sql . ' and obj_type="task" ' . $f_sql, 0, 'c', 3600); $service = db_factory::get_count($sql . ' and obj_type="service" ' . $f_sql, 0, 'c', 3600); $payitem = db_factory::get_count($sql . ' and obj_type="payitem" ' . $f_sql, 0, 'c', 3600); $auth = db_factory::get_count($sql . ' and INSTR(obj_type,"_auth")>0 ' . $f_sql, 0, 'c', 3600); $withdraw = db_factory::get_count(sprintf(' select sum(fee) c from %switkey_withdraw where withdraw_status=2 ', TABLEPRE) . $w_sql, 0, 'c', 3600); $p_all = floatval($task + $service + $payitem + $auth + $withdraw); break; case 'withdraw': $list = db_factory::query(sprintf(' select sum(withdraw_cash) cash,sum(fee) fee, count(withdraw_id) count,pay_type from %switkey_withdraw where 1 = 1 ', TABLEPRE) . $w_sql . ' group by pay_type', 1, 3600); $list && ($list = kekezu::get_arr_by_key($list, 'pay_type')); $bank_arr = keke_glob_class::get_bank(); $pay_online = kekezu::get_payment_config('', 'online'); break; case 'charge': $sql = ' select sum(fina_cash) cash,sum(fina_credit) credit,count(fina_id) count '; $r_sql = sprintf(' ,obj_type from %switkey_finance where INSTR(obj_type,"_charge")>0 and fina_type = "in"', TABLEPRE); $charge = db_factory::query($sql . $r_sql . $f_sql . ' group by obj_type ', 1, 3600); $charge = kekezu::get_arr_by_key($charge, 'obj_type'); $fina_type = keke_glob_class::get_fina_charge_type(); break; } require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_finance_revenue');