<?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');
$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');
<?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');
if ($gUserInfo['balance'] < floatval($intWithdrawCash)) { $tips['errors']['intWithdrawCash'] = '您的金额不足以提现'; kekezu::show_msg($tips, $strUrl . "&strStep=1&intReset=1", NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $pay_username = kekezu::utftogbk($pay_username); $pay_account = kekezu::utftogbk($pay_account); } $objWithdrawM->setWithdraw_cash(floatval($intWithdrawCash)); $objWithdrawM->setUid($uid); $objWithdrawM->setUsername($username); $objWithdrawM->setPay_username($pay_username); $objWithdrawM->setWithdraw_status(1); $objWithdrawM->setApplic_time(time()); $objWithdrawM->setPay_type($pay_type); $objWithdrawM->setPay_account($pay_account); $intWithdrawId = $objWithdrawM->create_keke_witkey_withdraw(); if ($intWithdrawId) { unset($_SESSION['withdraw_cash']); $arrPayway = array_merge(keke_glob_class::get_bank(), keke_glob_class::get_online_pay()); $data = array(':pay_way' => $arrPayway[$pay_type], ':pay_account' => $pay_account, ':pay_name' => $pay_username); keke_finance_class::init_mem('withdraw', $data); keke_finance_class::cash_out($uid, abs(floatval($intWithdrawCash)), 'withdraw', 0, 'withdraw', $intWithdrawId); kekezu::show_msg('提交成功等待审核', $strUrl . "&strStep=4&intWithdrawCash={$intWithdrawCash}&intWithdrawId={$intWithdrawId}&ver=1#userCenter", NULL, NULL, 'ok'); } else { kekezu::show_msg('提交失败', $strUrl . "&strStep=4&intWithdrawCash={$intWithdrawCash}#userCenter", NULL, NULL, 'error'); } } } break; }