}
    $wh .= " order by process_time desc  ";
    $export_website_out_arr = db_factory::query(sprintf("select * from %switkey_withdraw where " . $wh, TABLEPRE));
    $bank_arr['alipayjs'] = "支付宝";
    $contents = "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" >\n           <caption height='25'> <b>" . $filename . "</b> </caption>\n          <tr>\n\t\t\t\t<th width=\"60\" align=\"left\">编号</th>\n\t\t\t\t<th width=\"60\" align=\"left\">ID</th>\n\t            <th width=\"60\" align=\"left\">提现类型</th>\n\t            <th width=\"100\" >金额 </th>\n\t\t\t\t<th witdh=\"\">申请提现时间</th>\n\t\t\t\t<th witdh=\"\">申请人 </th>\n\t\t\t\t<th witdh=\"\" >申请提现账号</th>\n\t\t\t\t<th witdh=\"\" >提现状态</th>\n          </tr>\n          ";
    $k = 1;
    foreach ($export_website_out_arr as $key => $value) {
        $contents .= "<tr>\n\t\t\t\t<td align=left>" . $k++ . "</td>\n\t\t    \t<td align=left>" . $value[withdraw_id] . "</td>\n\t\t    \t<td align=left>" . $bank_arr[$value[pay_type]] . "</td>\n\t\t    \t<td align=left>¥ " . $value[withdraw_cash] . "</td>\n\t\t    \t<td align=left>" . date("Y-m-d", $value[applic_time]) . "</td>\n\t\t    \t<td align=left>" . $value[username] . "</td>\n\t\t    \t<td align=left>'" . $value[pay_account] . "</td>\n    \t\t\t<td align=left>提现成功</td>\n    \t</tr>";
    }
    $contents .= "</table>";
    header('Content-type: application/vnd.ms-execl');
    header('Content-Disposition: attachment; filename=' . $filename);
    echo $contents;
    die;
}
$order_obj = new Keke_witkey_order_charge_class();
if (isset($ac) && $order_id) {
    //
    switch ($ac) {
        case "del":
            //删除
            $order_obj->setWhere('order_id=' . $order_id);
            $res = $order_obj->del_keke_witkey_order_charge();
            kekezu::admin_system_log(kekezu::lang(delete_financial_records) . "_{$order_id}");
            $res and kekezu::admin_show_msg('网站收支记录删除成功', $url, 3, '', 'success') or kekezu::admin_show_msg('网站收支记录删除失败', $url, 3, '', 'warning');
            break;
    }
} elseif (isset($ckb)) {
    //批量删除
    $ckb_string = implode(',', $ckb);
    $order_obj->setWhere('order_id in (' . $ckb_string . ')');
Example #2
0
 public static function createUserChargeOrder($order_type, $pay_type, $money, $pay_info = '', $order_status = 'wait', $uid = '', $username = '')
 {
     global $user_info;
     $uid or $uid = $user_info['uid'];
     $username or $username = $user_info['username'];
     $objChargeM = new Keke_witkey_order_charge_class();
     $objChargeM->_order_id = null;
     $objChargeM->setOrder_type($order_type);
     $objChargeM->setUid($uid);
     $objChargeM->setPay_info($pay_info);
     $objChargeM->setPay_type($pay_type);
     $objChargeM->setObj_id(0);
     $objChargeM->setUsername($username);
     $objChargeM->setPay_money($money);
     $objChargeM->setPay_time(time());
     $objChargeM->setOrder_status($order_status);
     $intOrderId = $objChargeM->create_keke_witkey_order_charge();
     return $intOrderId;
 }
<?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);