Example #1
0
 public function withdraw()
 {
     import("ORG.Loan.Escrow");
     $loan = new Escrow();
     if ($loan->withdrawVerify($_POST)) {
         $orders = $_POST['OrderNo'];
         $id = substr($orders, 12);
         $vo = M('member_withdraw')->field('uid,withdraw_money,withdraw_fee,withdraw_status, loanno')->where("id={$id}")->find();
         $uid = $vo['uid'];
         if ($_POST['ResultCode'] == '88' && !$vo['withdraw_status']) {
             // 成功
             $FreeLimit = $_POST['FreeLimit'];
             $FeeWithdraws = $_POST['FeeWithdraws'];
             $Amount = $_POST['Amount'];
             $updata['withdraw_status'] = 1;
             $updata['second_fee'] = $_POST['FeeWithdraws'];
             $updata['withdraw_fee'] = $FeeWithdraws;
             $updata['loanno'] = $_POST['LoanNo'];
             $xid = M('member_withdraw')->where("uid={$vo['uid']} AND id={$id}")->save($updata);
             if ($xid) {
                 $amoney = $_POST['Amount'] - $_POST['FeeWithdraws'];
                 memberMoneyLog($uid, 29, $_POST['Amount'], "提现成功,扣除实际手续费" . $FeeWithdraws . "元,到帐金额" . $amoney . "元", '0', '@网站管理员@', 0);
                 MTip('chk6', $uid);
                 echo "SUCCESS";
                 notifyMsg('提现', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                 exit;
             }
         } elseif ($_POST['ResultCode'] == '89' && $vo['withdraw_status'] == 1) {
             //退回资金
             $updata['withdraw_status'] = 2;
             $xid = M('member_withdraw')->where("uid={$uid} AND id={$id}")->save($updata);
             if ($xid) {
                 memberMoneyLog($uid, 5, $_POST['Amount'], "提现退回资金{$_POST['Amount']}元", '0', '@网站管理员@', 0);
                 notifyMsg('提现退回', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                 echo "SUCCESS";
                 exit;
             }
         }
         notifyMsg('提现', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '');
     }
 }
<?php

require_once "admin_conn.php";
require_once "../inc/pinyin.php";
require_once "./score/DouBanParseScore.php";
require_once "./parse/NotificationsManager.php";
$parse_appid_restkey = (require dirname(__FILE__) . '/parse/test_app_config.php');
$parse_appid_restkey_baidu = (require dirname(__FILE__) . '/parse/test_baidu_app_config.php');
chkLogin();
$action = be("all", "action");
$_SESSION["upfolder"] = "../upload/vod";
switch ($action) {
    case "notifyMsg":
        notifyMsg();
        break;
    default:
        headAdmin("实时推送管理");
        main();
        break;
}
dispseObj();
function main()
{
    global $db, $template, $cache;
    $loginname = getCookie("adminname");
    $keyword = be("all", "keyword");
    $stype = be("all", "stype");
    $area = be("all", "area");
    $topic = be("all", "topic");
    $level = be("all", "level");
    $from = be("all", "from");
Example #3
0
 /**
  **	 转账
  **
  **/
 public function transfer()
 {
     import("ORG.Loan.Escrow");
     $loan = new Escrow();
     if ($loan->loanVerify($_POST) && $_POST['ResultCode'] == 88) {
         if (empty($_POST['Action'])) {
             //空为冻结 暂不处理
             notifyMsg('转账冻结', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
             echo "SUCCESS";
             exit;
         } elseif (intval($_POST['Action']) == 1) {
             $loan_list = json_decode(urldecode($_POST['LoanJsonList']), true);
             isset($loan_list[0]) ? $transfer_info = $loan_list[0] : ($transfer_info = $loan_list);
             $orders = $transfer_info['OrderNo'];
             $transfer = M('transfer')->field('status, loanno, uid')->where("orders='{$orders}'")->find();
             if ($transfer['status'] != 1) {
                 $arr['status'] = 1;
                 $arr['loanno'] = $transfer_info['LoanNo'];
                 if (M('transfer')->where("orders='{$orders}'")->save($arr)) {
                     if (membermoneylog($transfer['uid'], 7, $transfer_info['Amount'], $transfer_info['Remark'], 0, "@网站管理员@")) {
                         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                         echo "SUCCESS";
                         exit;
                     } else {
                         $arr['status'] = 0;
                         //$arr['loanno'] = $transfer['LoanNo'];
                         M('transfer')->where("orders='{$orders}'")->save($arr);
                         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'ERROR');
                     }
                 }
             }
         }
         notifyMsg('转账', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '');
     }
 }
Example #4
0
 /**
  * 企业直投还款
  * 
  */
 public function edetail()
 {
     if ($_POST['ResultCode'] == '88') {
         import("ORG.Loan.Escrow");
         $loan = new Escrow();
         if ($loan->loanVerify($_POST)) {
             if (intval($_POST['Action']) == 1) {
                 $info = explode("_", $_POST['Remark1']);
                 if (repaymentEnterprise($info[0], $info[1]) == 'TRUE') {
                     notifyMsg('直投还款', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                     echo 'SUCCESS';
                     exit;
                 }
             } else {
                 notifyMsg('直投还款冻结', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS');
                 echo 'SUCCESS';
                 exit;
             }
             notifyMsg('直投还款', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '');
         }
     }
 }