예제 #1
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = "index.php?do=user&view=finance&op=basic&page={$page}&pageSize={$pageSize}&ord={$ord}&type={$type}";
$arrSort = array('1' => '编号升序', '2' => '编号降序', '3' => '时间升序', '4' => '时间降序');
$w = " username  = '******'";
$page and $page = intval($page);
$pageSize and $pageSize = intval($pageSize) or $pageSize = 10;
$bank_arr = keke_glob_class::get_bank();
$onlinePay = keke_glob_class::get_online_pay();
if ($type == 'charge') {
    $charge_type_arr = keke_glob_class::get_charge_type();
    $status_arr = keke_order_class::get_order_status();
    $intFinaId and $w .= " and order_id ='" . intval($intFinaId) . "'";
    switch ($ord) {
        case 1:
            $w .= ' order by order_id asc';
            break;
        case 2:
            $w .= ' order by order_id desc';
            break;
        case 3:
            $w .= ' order by pay_time asc';
            break;
        case 4:
            $w .= ' order by pay_time desc';
            break;
    }
    $strSql = "select * from " . TABLEPRE . "witkey_order_charge where ";
    if (!$ord) {
        $w .= ' order by order_id desc';
예제 #2
0
                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;
}
예제 #3
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(76);
$recharge_obj = new Keke_witkey_order_charge_class();
$page_obj = $kekezu->_page_obj;
$charge_type_arr = keke_glob_class::get_charge_type();
$charge_online_pay = keke_glob_class::get_online_pay();
$status_arr = keke_order_class::get_order_status();
$offline_pay = kekezu::get_table_data("*", "witkey_pay_api", " type='offline'", '', '', '', 'payment');
$w[page_size] and $page_size = intval($w[page_size]) or $page_size = 10;
intval($page) or $page = '1';
$url = "index.php?do={$do}&view={$view}&w[order_status]={$w['order_status']}&w[order_id]={$w['order_id']}&w[order_type]={$w['order_type']}&w[username]={$w['username']}&w[page_size]={$page_size}&w[ord]={$w['ord']}&page={$page}";
$bank_arr = keke_glob_class::get_bank();
if (isset($ac)) {
    $order_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_order_charge where order_id = " . intval($order_id));
    $message_obj = new keke_msg_class();
    $order_info or kekezu::admin_show_msg($_lang['charge_num_not_exist'], $url, 3, '', 'warning');
    switch ($ac) {
        case 'pass':
            if ($order_info[order_status] == 'ok') {
                kekezu::admin_show_msg($_lang['payment_has_been_success_no_need_repeat'], $url, 3, '', 'warning');
            }
            $recharge_obj->setWhere('order_id =' . $order_id);
            $recharge_obj->setOrder_status('ok');
            $res = $recharge_obj->edit_keke_witkey_order_charge();
            $user_info = kekezu::get_user_info($order_info[uid]);
            $v_arr = array('充值金额' => $order_info['pay_money'], '用户名' => $user_info[username], '网站名称' => $kekezu->_sys_config['website_name']);
            keke_shop_class::notify_user($user_info[uid], $user_info[username], "pay_success", $_lang['line_recharge_success'], $v_arr, 2);
            keke_finance_class::cash_in($user_info['uid'], $order_info['pay_money'], 'offline_charge', '', 'offline_charge');
            kekezu::admin_system_log($_lang['confirm_payment_recharge'] . $order_id);
예제 #4
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = "index.php?do=user&view=finance&op=withdrawlog";
$intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize);
$intWithdrawId and $strUrl .= "&intWithdrawId=" . intval($intWithdrawId);
$obWithdrawT = keke_table_class::get_instance('witkey_withdraw');
$arrStatus = keke_glob_class::withdraw_status();
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 10;
$arrBank = keke_glob_class::get_bank();
$arrOnline = keke_glob_class::get_online_pay();
$arrBank = array_merge($arrOnline, $arrBank);
$strWhere = ' 1 = 1  and uid = ' . intval($gUid);
$intWithdrawId && $intWithdrawId != '' and $strWhere .= " and withdraw_id = '{$intWithdrawId}' ";
$floatCountCashs = kekezu::get_table_data(" sum(withdraw_cash) as cash,withdraw_status ", "witkey_withdraw", " {$strWhere} ", "", " withdraw_status", "", "withdraw_status");
$strWhere .= " order by withdraw_id desc ";
$arrDatas = $obWithdrawT->get_grid($strWhere, $strUrl, $intPage, $intPagesize, null, null, null);
$arrWithdrawLists = $arrDatas['data'];
$strPages = $arrDatas['pages'];