當前位置: 首頁>>代碼示例>>PHP>>正文


PHP memberMoneyLog函數代碼示例

本文整理匯總了PHP中memberMoneyLog函數的典型用法代碼示例。如果您正苦於以下問題:PHP memberMoneyLog函數的具體用法?PHP memberMoneyLog怎麽用?PHP memberMoneyLog使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了memberMoneyLog函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index()
 {
     $key = $_GET['key'];
     $arg = file_get_contents($this->updir . "config.txt");
     $arga = explode("|", $arg);
     $rate = intval($arga[1]);
     if ($key != $arga[2]) {
         exit("fail|密鑰錯誤");
     }
     $total = 0;
     if ($rate > 0) {
         $list = M("member_money")->field("uid,account_money")->where("account_money>0")->select();
         $i = 0;
         foreach ($list as $v) {
             $amoney = getFloatValue($v['account_money'] * $rate / 10000, 2);
             $re = memberMoneyLog($v['uid'], 32, $amoney, date("Y年m月d日") . "利息");
             if ($re) {
                 $i++;
                 $total += $amoney;
             }
         }
         $all = count($list);
         $str = "共{$all}人需要發布利息,共成功對{$i}人發放共計{$total}元利息";
         echo "success|{$str}";
     } else {
         echo "success|利率為0,不返利";
     }
     echo "\r\n" . date("Y-m-d H:i:s", time());
     exit;
 }
開發者ID:hutao1004,項目名稱:yintt,代碼行數:30,代碼來源:AutoAction.class.php

示例2: actupleve

 public function actupleve()
 {
     $money = intval($_POST['upmoney']);
     $vo = M('members')->field('user_leve,account_money,time_limit,recommend_id')->find($this->uid);
     $levemoney = $vo['account_money'] - $money;
     if ($levemoney < 0) {
         ajaxmsg("帳戶餘額不足", 0);
     }
     $vo['time_limit'] > time() ? $oldtime = $vo['time_limit'] : ($oldtime = time());
     if ($money == 25) {
         $time_limit = strtotime(date("Y-m-d", strtotime("+1 months", $oldtime)) . " 23:59:59");
     } elseif ($money == 100) {
         $time_limit = strtotime(date("Y-m-d", strtotime("+6 months", $oldtime)) . " 23:59:59");
     } elseif ($money == 150) {
         $time_limit = strtotime(date("Y-m-d", strtotime("+12 months", $oldtime)) . " 23:59:59");
     }
     $res = memberMoneyLog($this->uid, 2, $money, "會員特權延長至" . date("Y-m-d", $time_limit) . "到期");
     if ($res) {
         $xmoney = M('members')->getFieldById($vo['recommend_id'], 'reward_money');
         memberMoneyLog($vo['recommend_id'], 13, 5, session('u_user_name') . "升級特權會員獎勵");
         $sdata['id'] = $this->uid;
         $sdata['time_limit'] = $time_limit;
         $sdata['user_leve'] = 1;
         $newid = M('members')->save($sdata);
         if ($newid) {
             ajaxmsg();
         } else {
             ajaxmsg("升級出錯,請重試", 0);
         }
     } else {
         ajaxmsg("帳戶餘額處理出錯,請重試", 0);
     }
 }
開發者ID:kinglong366,項目名稱:p2p,代碼行數:33,代碼來源:ServerController.class.php

示例3: face

 public function face()
 {
     if (!$this->uid) {
         ajaxmsg("請先登陸", 0);
     }
     $vs = M('members_status')->getFieldByUid($this->uid, 'face_status');
     if ($vs == 1) {
         ajaxmsg("您已通過現場認證,無需再次認證", 0);
     }
     $vxs = M('face_apply')->where("uid={$this->uid} AND apply_status=0")->count('id');
     if ($vxs >= 1) {
         ajaxmsg("您已經提交申請,請等待客服人員處理", 0);
     }
     $newid = memberMoneyLog($this->uid, 26, -$this->glo['fee_face'], $info = "申請現場認證");
     if ($newid) {
         $save['uid'] = $this->uid;
         $save['add_time'] = time();
         $save['add_ip'] = get_client_ip();
         $save['apply_status'] = 0;
         $newidx = M('face_apply')->add($save);
         if ($newidx) {
             ajaxmsg("申請成功,請等待客服與您聯係");
         } else {
             ajaxmsg("申請失敗,請重試");
         }
     } else {
         ajaxmsg("申請失敗,請重試");
     }
 }
開發者ID:kinglong366,項目名稱:p2p,代碼行數:29,代碼來源:CommonController.class.php

示例4: doEdit

 public function doEdit()
 {
     $id = intval($_POST['id']);
     $status = intval($_POST['status']);
     $tran_id = text($_POST['tran_id']);
     $statusx = M('member_payonline')->getFieldById($id, "status");
     if ($statusx != 0) {
         $this->error("請不要重複提交表單");
     }
     if ($status == 1) {
         if (empty($tran_id)) {
             $this->error("如充值成功,請輸入相應支付平台的對賬訂單號!");
             return;
         }
         $tran_counts = M('member_payonline')->where(array("tran_id" => $tran_id))->count("1");
         if ($tran_counts > 0) {
             $this->error("該對賬訂單號已經存在!");
             return;
         }
         $vo = M('member_payonline')->field('money,fee,uid,way')->find($id);
         $newid = memberMoneyLog($vo['uid'], 27, $vo['money'] - $vo['fee'], "管理員手動審核充值");
         if ($newid) {
             $save['deal_user'] = session('adminname');
             $save['deal_uid'] = $this->admin_id;
             $save['status'] = 1;
             $save['tran_id'] = $tran_id;
             M('member_payonline')->where("id={$id}")->save($save);
             $vx = M('members')->field("user_name,user_phone")->find($vo['uid']);
             if ($vo['way'] == "off") {
                 SMStip("payoffline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money']), null, array($vo['uid']));
             } else {
                 SMStip("payonline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money']), null, array($vo['uid']));
             }
             $this->success("處理成功");
         } else {
             $this->error("處理失敗");
         }
     } else {
         $save['deal_user'] = session('adminname');
         $save['deal_uid'] = $this->admin_id;
         $save['status'] = 3;
         $newid = M('member_payonline')->where("id={$id}")->save($save);
         if ($newid) {
             $this->success("處理成功");
         } else {
             $this->error("處理失敗");
         }
     }
 }
開發者ID:hutao1004,項目名稱:yintt,代碼行數:49,代碼來源:PaylogAction.class.php

示例5: payDone

 protected function payDone()
 {
     if ($this->locked) {
         return false;
     }
     $this->locked = true;
     $newid = memberMoneyLog($this->orderInfo['uid'], 3, $this->orderInfo['money'], "充值訂單號:" . $this->orderInfo['pay_no'], 0, '@網站管理員@');
     //更新成功才充值,避免重複充值
     $this->locked = false;
     $this->okLog($newid, $this->orderInfo['pay_no'] . '金額發放', __METHOD__, $this->orderInfo['uid']);
     M('member_payonline')->where(array('pay_no' => $this->orderInfo['pay_no']))->save(array('payres' => $newid));
     if ($newid) {
         $vx = M('members')->find($this->orderInfo['uid']);
         SMStip("payonline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $this->orderInfo['money']));
     }
     return $newid;
 }
開發者ID:caotieshuan,項目名稱:ishoutou,代碼行數:17,代碼來源:MpayAction.class.php

示例6: _doEditFilter

 public function _doEditFilter($m)
 {
     $m->deal_time = time();
     $m->deal_user = session('adminname');
     $vox = M("member_withdraw")->field(true)->find($m->id);
     if ($vox['withdraw_status'] != 3 && $m->withdraw_status == 3) {
         $lm = M('members')->getFieldById($vox['uid'], 'account_money');
         addInnerMsg($uid, "您的提現申請審核未通過", "您的提現申請審核未通過");
         memberMoneyLog($vox['uid'], 12, $vox['withdraw_money'], "提現未通過,返還");
     } elseif ($vox['withdraw_status'] != 2 && $m->withdraw_status == 2) {
         $um = M('members')->field("user_name,user_phone")->find($vox['uid']);
         addInnerMsg($uid, "您的提現已完成", "您的提現已完成");
         memberMoneyLog($vox['uid'], 29, -$vox['withdraw_money'], "提現成功,減去凍結資金,到帳金額" . ($vox['withdraw_money'] - intval($_POST['withdraw_fee'])));
         SMStip("withdraw", $um['user_phone'], array("#USERANEM#", "#MONEY#"), array($um['user_name'], $vox['withdraw_money'] - intval($_POST['withdraw_fee'])), null, array($vox['uid']));
     } elseif ($vox['withdraw_status'] != 1 && $m->withdraw_status == 1) {
         addInnerMsg($uid, "您的提現申請已通過", "您的提現申請已通過,正在處理中");
     }
     return $m;
 }
開發者ID:hutao1004,項目名稱:yintt,代碼行數:19,代碼來源:WithdrawlogAction.class.php

示例7: withdraw

 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'], '');
     }
 }
開發者ID:GStepOne,項目名稱:CI,代碼行數:41,代碼來源:NoticeAction.class.php

示例8: ajaxredbag

 public function ajaxredbag()
 {
     if (!$this->uid) {
         ajaxmsg('未登錄不能領取', 0);
     } else {
         //認證 後才能投標
         $pre = C('DB_PREFIX');
         $memberstatus = M("members m")->field("m.id,m.user_leve,m.time_limit,m.pin_pass,s.id_status,s.phone_status,s.email_status,s.video_status,s.face_status,m.user_phone")->join("{$pre}members_status s ON s.uid=m.id")->where("m.id={$this->uid}")->find();
         $rooturl = __ROOT__;
         if ($memberstatus['id_status'] != 1 && empty($memberstatus['user_phone'])) {
             ajaxmsg('進行手機、實名認證後才能領取!', 2);
             exit;
         } else {
             if (empty($memberstatus['user_phone'])) {
                 ajaxmsg('進行手機認證後才能領取!', 2);
                 exit;
             } else {
                 if ($memberstatus['id_status'] != 1) {
                     ajaxmsg('進行實名認證後才能領取!', 3);
                     exit;
                 }
             }
         }
         //$vphone = M('members')->field('user_phone')->find($this->uid);
         //if(empty($vphone['user_phone'])){
         //	ajaxmsg('進行手機認證後才能領取!',2);
         //}
     }
     $redbag = M('redbag')->order('id desc')->where('status=1')->find();
     //判斷活動是否存在
     $id = $redbag['id'];
     if (!$id) {
         ajaxmsg('活動不存在', 0);
     }
     $usered = M('redbag_list')->where('uid=' . $this->uid . ' and pid=' . $id)->count();
     //判斷是否領過紅包
     //已經領取過了
     if ($usered) {
         ajaxmsg('您已經領過了', 0);
     }
     $redinfo = M('redbag_list')->order('id asc')->where('uid=0 and pid=' . $id . ' and status=1')->find();
     //判斷是否還有剩餘紅包
     if ($redbag['prize_num']) {
         $num = M('redbag_list')->where(' pid=' . $id . ' and redtype=1')->count();
         if ($redbag['prize_num'] > $num) {
             if (rand(1, $redbag['bonus_count']) <= $redbag['prize_num']) {
                 $newid = memberMoneyLog($this->uid, 49, $redbag['prize_max'], '領取wap注冊紅包' . $redbag['prize_max'] . '元');
                 if ($newid) {
                     M('redbag_list')->add(array('money' => $redbag['prize_max'], 'pid' => $id, 'status' => 2, 'redtype' => 1, 'addtime' => time(), 'usetime' => time(), 'uid' => $this->uid));
                     ajaxmsg($redbag['prize_max']);
                 }
             }
         }
     }
     if (!$redinfo) {
         M('redbag')->where('id=' . $id)->save(array('status' => 2));
         ajaxmsg('紅包已被搶光', 0);
     }
     $prize = floatval($redinfo['money']);
     $newid = memberMoneyLog($this->uid, 49, $prize, '領取wap注冊紅包' . $prize . '元');
     if ($newid) {
         M('redbag_list')->where('id=' . $redinfo['id'])->save(array('uid' => $this->uid, 'usetime' => time(), 'status' => 2));
         if (!M('redbag_list')->where('uid=0')->count()) {
             M('redbag')->where('id=' . $id)->save(array('status' => 2));
         }
         ajaxmsg($redinfo['money']);
     } else {
         ajaxmsg('領取失敗,請刷新後重試');
     }
 }
開發者ID:caotieshuan,項目名稱:ishoutou,代碼行數:70,代碼來源:CommonAction.class.php

示例9: doEdit

 public function doEdit()
 {
     $model = D("member_withdraw");
     $status = intval($_POST['withdraw_status']);
     $id = intval($_POST['id']);
     $deal_info = $_POST['deal_info'];
     $secondfee = floatval($_POST['withdraw_fee']);
     $info = $model->field('add_time')->where("id={$id} and (withdraw_status!=0)")->find();
     if ($info['add_time']) {
         $this->error("此提現初審已處理過,請不要重複處理!");
     }
     if (false === $model->create()) {
         $this->error($model->getError());
     }
     //保存當前數據對象
     $model->withdraw_status = $status;
     $model->deal_info = $deal_info;
     $model->deal_time = time();
     $model->deal_user = session('adminname');
     ////////////////////////
     $field = 'w.*,w.id,w.uid,(mm.account_money+mm.back_money) all_money';
     $vo = M("member_withdraw w")->field($field)->join("lzh_member_money mm on w.uid = mm.uid")->find($id);
     $um = M('members')->field("user_name,user_phone")->find($vo['uid']);
     if ($vo['withdraw_status'] != 3 && $status == 3) {
         addInnerMsg($vo['uid'], "您的提現申請審核未通過", "您的提現申請審核未通過,處理說明:" . $deal_info);
         SMStip("nowithdraw", $um['user_phone'], array("#USERANEM#", "#MONEY#"), array($um['user_name'], $vo['withdraw_money']));
         //memberMoneyLog($vo['uid'],12,$vo['withdraw_money'],"提現未通過,返還",'0','@網站管理員@');
         memberMoneyLog($vo['uid'], 12, $vo['withdraw_money'], "提現未通過,返還", '0', '@網站管理員@', 0, $vo['withdraw_back_money']);
         $model->success_money = 0;
     } else {
         if ($vo['withdraw_status'] != 2 && $status == 2) {
             addInnerMsg($vo['uid'], "您的提現已完成", "您的提現已完成");
             // 統一為;都從當筆提現中扣減手續費
             /*if( ($vo['all_money'] - $vo['second_fee'])<0 ){
             			memberMoneyLog($vo['uid'],29,-($vo['withdraw_money']-$vo['second_fee']),"提現成功,扣除實際手續費".$vo['second_fee']."元,減去凍結資金,到帳金額".($vo['withdraw_money']-$vo['second_fee'])."元",'0','@網站管理員@',0,-$vo['second_fee']);
             			$model->success_money = $vo['withdraw_money'];
             			//SMStip("withdraw",$um['user_phone'],array("#USERANEM#","#MONEY#"),array($um['user_name'],($vo['withdraw_money']-$vo['second_fee'])));
             		}else{
             			memberMoneyLog($vo['uid'],29,-($vo['withdraw_money']),"提現成功,扣除實際手續費".$vo['second_fee']."元,減去凍結資金,到帳金額".($vo['withdraw_money'])."走下",'0','@網站管理員@');
             			$model->success_money = $vo['withdraw_money'];
             			//SMStip("withdraw",$um['user_phone'],array("#USERANEM#","#MONEY#"),array($um['user_name'],$vo['withdraw_money']));
             		}*/
             memberMoneyLog($vo['uid'], 29, -($vo['withdraw_money'] - $vo['second_fee']), "提現成功,扣除手續費" . $vo['second_fee'] . "元,實到帳金額" . ($vo['withdraw_money'] - $vo['second_fee']) . "元", '0', '@網站管理員@', 0, -$vo['second_fee']);
             $model->success_money = $vo['withdraw_money'];
         } elseif ($vo['withdraw_status'] != 1 && $status == 1) {
             addInnerMsg($vo['uid'], "您的提現申請已通過", "您的提現申請已通過,正在處理中");
             // 統一為;都從當筆提現中扣減手續費
             /*if($vo['all_money']  <=$secondfee ){
             			memberMoneyLog($vo['uid'],36,-($vo['withdraw_money']),"提現申請已通過,扣除實際手續費".$secondfee."元,到帳金額".($vo['withdraw_money']-$secondfee)."元",'0','@網站管理員@',-$secondfee);
             			$model->success_money = $vo['withdraw_money']-$secondfee;
             		}else{
             			memberMoneyLog($vo['uid'],36,-$vo['withdraw_money'],"提現申請已通過,扣除實際手續費".$secondfee."元,到帳金額".($vo['withdraw_money'])."元",'0','@網站管理員@',-$secondfee);
             			$model->success_money = $vo['withdraw_money'];
             		}*/
             memberMoneyLog($vo['uid'], 36, -$secondfee, "提現申請已通過,扣除手續費" . $secondfee . "元,到帳金額" . ($vo['withdraw_money'] - $secondfee) . "元", '0', '@網站管理員@', -$secondfee);
             $model->success_money = $vo['withdraw_money'] - $secondfee;
             $model->withdraw_fee = $vo['withdraw_fee'];
             $model->second_fee = $secondfee;
         }
     }
     //////////////////////////
     $result = $model->save();
     if ($result) {
         //保存成功
         alogs("withdraw", $id, $status, $deal_info);
         //管理員操作日誌
         //成功提示
         $this->assign('jumpUrl', __URL__);
         $this->success(L('修改成功'));
     } else {
         alogs("withdraw", $id, $status, '提現處理操作失敗!');
         //管理員操作日誌
         //$this->assign("waitSecond",10000);
         //失敗提示
         $this->error(L('修改失敗'));
     }
     $vm = M("member_moneylog")->field("info")->where("uid = {$vo['uid']} and type=36")->limit(1)->order('id desc')->select();
     if (!empty($um['user_phone'])) {
         //	sendsms($um['user_phone'],$vm[0]['info']."【友情提醒】");
     }
 }
開發者ID:caotieshuan,項目名稱:ishoutou,代碼行數:81,代碼來源:WithdrawlogwaitAction.class.php

示例10: lotteryLog

 protected function lotteryLog($good)
 {
     $log = array();
     $log['uid'] = $this->uid;
     $log['type'] = 2;
     $log['gid'] = $good['id'];
     $log['name'] = $good['title'];
     $log['price'] = $good['value'];
     $log['cost'] = $this->glo['lottery_cost'];
     $log['num'] = 1;
     $log['info'] = "積分抽獎抽中";
     $log['add_ip'] = get_client_ip();
     $log['add_time'] = time();
     $log['status'] = 2;
     //已領取
     $log['way'] = 0;
     //直接領取
     if ($good['category'] == '1') {
         //抽中的是禮金
         memberMoneyLog($this->uid, 45, $good['value'], "積分抽獎抽中‘{$good['title']}’一份");
         //抽中投資禮金
     } else {
         if ($good['category'] == '2') {
             memberIntegralLog($this->uid, 4, $good['value'], "積分抽獎抽中‘{$good['title']}’一份");
             //抽中積分
         } else {
             $log['status'] = 0;
             //未領取
             $log['way'] = 2;
             //快遞
         }
     }
     addInnerMsg($this->uid, "積分抽獎抽中‘{$good['title']}’一份", "積分抽獎抽中‘{$good['title']}’一份");
     M("market_log")->add($log);
     //更新獎品列表
     $data = array();
     if ($good['last_num'] - 1 >= 0) {
         $data['last_num'] = $good['last_num'] - 1;
         $data['hits'] = $good['hits'] + 1;
     } else {
         $data['last_num'] = 0;
         $data['hits'] = $good['num'];
         $data['is_sys'] = 0;
     }
     M("market_jifenlist")->where("id={$good['id']}")->save($data);
     return true;
 }
開發者ID:caotieshuan,項目名稱:ishoutou,代碼行數:47,代碼來源:MarketAction.class.php

示例11: investMoney


//.........這裏部分代碼省略.........
            $investdetail['capital'] = $repay_list['capital'];
            $investdetail['interest'] = $repay_list['interest'];
            $investdetail['interest_fee'] = getFloatValue($fee_rate * $repay_list['interest'] * (1 - $rate), 4);
            $investdetail['interest_fee_yh'] = getFloatValue($fee_rate * $repay_list['interest'], 4);
            $investdetail['status'] = 0;
            $investdetail['sort_order'] = 1;
            $investdetail['total'] = 1;
            $savedetail[] = $investdetail;
            break;
    }
    foreach ($savedetail as $key => $val) {
        //			$invest_defail_id = M('investor_detail')->add($val);//保存還款詳情
        $vol = ' (' . implode(',', array_keys($val)) . ')';
        $vlaue = ' (' . implode(',', $val) . ')';
        $invest_defail_id = mysql_query("INSERT INTO {$pre}investor_detail {$vol} VALUES {$vlaue}");
    }
    //		$last_have_money = M("borrow_info")->getFieldById($borrow_id,"has_borrow");
    $result = mysql_query("SELECT has_borrow FROM {$pre}borrow_info WHERE id = {$borrow_id}  LIMIT 1");
    while ($row = mysql_fetch_assoc($result)) {
        $last_have_money = $row['has_borrow'];
    }
    //                $last_have_money = $last_have_money['has_borrow'];
    $lasthavemoney = $last_have_money + $money;
    $sql = "update {$pre}borrow_info set `has_borrow`= {$lasthavemoney},borrow_times=borrow_times+1 WHERE `id`={$borrow_id}";
    $upborrow_res = mysql_query($sql);
    //更新投標進度
    if ($invest_defail_id && $rtype && $upborrow_res) {
        //還款概要和詳情投標進度都保存成功
        $bdb->commit();
        mysql_query("COMMIT");
        //執行事務
        //		$investMoney->commit();
        file_put_contents('/tmp/4.txt', date('m-d H:i:s') . " comminvest::" . print_r($reqext, true) . "\n", FILE_APPEND);
        $res = memberMoneyLog($uid, 6, -($money - $reqext), "對{$borrow_id}號標進行投標", $binfo['borrow_uid']);
        //($uid,$type,$amoney,$info="",$target_uid="",$target_uname="",$fee=0,$reqext=0){
        $today_reward = explode("|", $datag['today_reward']);
        if ($binfo['repayment_type'] == '1') {
            //如果是天標,則執行1個月的續投獎勵利率
            $reward_rate = floatval($today_reward[0]);
        } else {
            if ($binfo['borrow_duration'] == 1) {
                $reward_rate = floatval($today_reward[0]);
            } else {
                if ($binfo['borrow_duration'] == 2) {
                    $reward_rate = floatval($today_reward[1]);
                } else {
                    $reward_rate = floatval($today_reward[2]);
                }
            }
        }
        ////////////////////////////////////////回款續投獎勵規則 fan 2013-07-20////////////////////////////
        //$reward_rate = floatval($datag['today_reward']);//floatval($datag['today_reward']);//當日回款續投獎勵利率
        if ($binfo['borrow_type'] != 3) {
            //如果是秒標(borrow_type==3),則沒有續投獎勵這一說
            $vd['add_time'] = array("lt", time());
            $vd['investor_uid'] = $uid;
            //$borrow_invest_count = M("borrow_investor")->where($vd)->count('id');//檢測是否投過標且大於一次
            $sqlbic = sprintf("SELECT count(id) AS total FROM %s WHERE investor_uid=%s AND add_time<%s", "{$pre}borrow_investor", $uid, time());
            //                        $borrow_invest_count = mysql_query("SELECT count(id) FROM {$pre}borrow_investor WHERE investor_uid")
            $resultbic = mysql_query($sqlbic);
            while ($rowbic = mysql_fetch_assoc($resultbic)) {
                $borrow_invest_count = $rowbic['total'];
            }
            if ($reward_rate > 0 && $vminfo['back_money'] > 0 && $borrow_invest_count > 0) {
                //首次投標不給續投獎勵
                if ($money > $vminfo['back_money']) {
開發者ID:GStepOne,項目名稱:CI,代碼行數:67,代碼來源:function.comm.php

示例12: doEdit

 public function doEdit()
 {
     $id = intval($_POST['id']);
     $status = intval($_POST['status']);
     $statusx = M('member_payonline')->getFieldById($id, "status");
     if ($statusx != 0) {
         $this->error("請不要重複提交表單");
     }
     if ($status == 1) {
         $vo = M('member_payonline')->field('money,fee,uid,way')->find($id);
         $newid = memberMoneyLog($vo['uid'], 27, $vo['money'] - $vo['fee'], "管理員手動審核充值");
         if ($newid) {
             ////////////////////////////
             if ($vo['way'] == "off") {
                 $tqfee = explode("|", $this->glo['offline_reward']);
                 $fee[0] = explode("-", $tqfee[0]);
                 $fee[2] = explode("-", $tqfee[2]);
                 $fee[1] = floatval($tqfee[1]);
                 $fee[3] = floatval($tqfee[3]);
                 $fee[4] = floatval($tqfee[4]);
                 $fee[5] = floatval($tqfee[5]);
                 if ($vo['money'] >= $fee[0][0] && $vo['money'] <= $fee[0][1]) {
                     $fee_rate = 0 < $fee[1] ? $fee[1] / 1000 : 0;
                 } else {
                     if ($vo['money'] >= $fee[2][0] && $vo['money'] <= $fee[2][1]) {
                         $fee_rate = 0 < $fee[3] ? $fee[3] / 1000 : 0;
                     } else {
                         if ($vo['money'] >= $fee[4]) {
                             $fee_rate = 0 < $fee[5] ? $fee[5] / 1000 : 0;
                         } else {
                             $fee_rate = 0;
                         }
                     }
                 }
                 $newidx = memberMoneyLog($vo['uid'], 32, $vo['money'] * $fee_rate, "線下充值獎勵");
             }
             /////////////////////////////
             /*
             				$offline_reward = explode("|",$this->glo['offline_reward']);
             				if($vo['money']>$offline_reward[0]){
             					$fee_rate = 0<$offline_reward[1]?($offline_reward[1]/1000):0;
             					$newidx = memberMoneyLog($vo['uid'],32,$vo['money']*$fee_rate,"線下充值獎勵");
             				}*/
             $save['deal_user'] = session('adminname');
             $save['deal_uid'] = $this->admin_id;
             $save['status'] = 1;
             M('member_payonline')->where("id={$id}")->save($save);
             $vx = M('members')->field("user_name,user_phone")->find($vo['uid']);
             if ($vo['way'] == "off") {
                 SMStip("payoffline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money']));
             } else {
                 SMStip("payonline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money']));
             }
             alogs("Paylog", 0, 1, '執行了管理員手動審核充值操作!');
             //管理員操作日誌
             $this->success("處理成功");
         } else {
             alogs("Paylog", 0, 1, '執行管理員手動審核充值操作失敗!');
             //管理員操作日誌
             $this->error("處理失敗");
         }
     } else {
         $save['deal_user'] = session('adminname');
         $save['deal_uid'] = $this->admin_id;
         $save['status'] = 3;
         $newid = M('member_payonline')->where("id={$id}")->save($save);
         if ($newid) {
             $this->success("處理成功");
         } else {
             $this->error("處理失敗");
         }
     }
 }
開發者ID:kinglong366,項目名稱:p2p,代碼行數:73,代碼來源:PaylogController.class.php

示例13: net_save

 /**
  * 充值
  * @param unknown_type $post
  */
 public function net_save($post)
 {
     $usrid = $post['UsrCustId'];
     $db = core::Singleton('comm.db.activeRecord');
     $db->connect('CAILAI');
     $info = $db->get_one(array('usrid' => $usrid), '', 'lzh_huifulog');
     $nowtime = time();
     $data = array();
     $data['uid'] = $info['uid'];
     //用戶UID
     $data['username'] = $info['username'];
     //用戶名
     $data['rescode'] = $post['RespCode'];
     //返回碼
     $data['cmdid'] = $post['CmdId'];
     //消息類型
     $data['usrid'] = $post['UsrCustId'];
     //用戶客戶號
     $data['ordid'] = $post['OrdId'];
     //訂單號
     $data['orddate'] = $post['OrdDate'];
     //訂單日期
     $data['trxid'] = $post['TrxId'];
     //交易流水號
     $data['addtime'] = $nowtime;
     //記錄時間
     $condition['uid'] = $data['uid'];
     $condition['ordid'] = $data['ordid'];
     $num = $db->count_all($condition, 'lzh_huifulog');
     if ($num === 0) {
         $db->insert($data, 'lzh_huifulog');
     }
     if (strcmp($post['RespCode'], "000") == 0) {
         //member_paylog表記錄充值日誌
         $paylog = array();
         $paylog['uid'] = $info['uid'];
         //用戶UID
         $paylog['usrid'] = $post['UsrCustId'];
         //用戶客戶號
         $paylog['ordid'] = $post['OrdId'];
         //訂單號
         $paylog['orddate'] = $post['OrdDate'];
         //訂單日期
         $paylog['transamt'] = $post['TransAmt'];
         //充值金額
         $paylog['trxid'] = $post['TrxId'];
         //交易流水號
         $paylog['feeamt'] = $post['FeeAmt'];
         //充值手續費
         $paylog['feecustid'] = $post['FeeCustId'];
         //手續費扣款客戶號
         $paylog['feeacctid'] = $post['FeeAcctId'];
         //手續費扣款子賬戶號
         $paylog['addtime'] = $nowtime;
         //記錄時間
         $condition['uid'] = $paylog['uid'];
         $condition['ordid'] = $paylog['ordid'];
         $num = $db->count_all($condition, 'lzh_member_paylog');
         //$num = M("member_paylog")->where($condition)->count();
         //----------------如果用戶通過快捷支付的方式,那麽相當於綁卡了, by whh 2015-03-05-------------
         if (trim($post['GateBusiId']) == 'QP') {
             $bankdata['uid'] = $info['uid'];
             $bankdata['bank_num'] = $post['CardId'];
             //開戶銀行帳號
             $bankdata['bank_name'] = $post['GateBankId'];
             //開戶銀行代號
             $bankdata['add_ip'] = '';
             $bankdata['add_time'] = time();
             //M('member_banks')->add($bankdata);
             $db->insert($bankdata, 'lzh_member_banks');
             unset($bankdata);
         }
         //--------------------------------------------------------------------------------------------
         if ($num == 0) {
             //M("member_paylog")->add($paylog);
             $db->insert($paylog, 'lzh_member_paylog');
             //file_put_contents('/tmp/deal',date('m-d H:i:s')." uid : ".print_r($paylog['uid'],true)."\n",FILE_APPEND);
             //file_put_contents('/tmp/deal',date('m-d H:i:s')." TransAmt : ".print_r(str2val_money($post['TransAmt']),true)."\n",FILE_APPEND);
             //file_put_contents('/tmp/deal',date('m-d H:i:s')." ordid : ".print_r("充值訂單號:".$paylog['ordid'],true)."\n",FILE_APPEND);
             //require_once('function/function.comm.php');
             memberMoneyLog($paylog['uid'], 3, str2val_money($post['TransAmt']), "充值訂單號:" . $paylog['ordid'], 0, '');
             //                                $info = $db->get_one(array('uid' => $info['uid']), '', 'lzh_member_info');
             //
             $bdb = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PWD);
             $sql = "SELECT real_name FROM lzh_member_info WHERE uid = ? limit 1 ";
             $stmt1 = $bdb->prepare($sql);
             $stmt1->bindParam(1, $info['uid']);
             //綁定第一個參數值
             $stmt1->execute();
             while ($memberd = $stmt1->fetch(PDO::FETCH_ASSOC)) {
                 $memberInfo = $memberd;
             }
             $bdb = null;
             $timeT = date('Y-m-d H:i');
             $sendms = "尊敬的財來網投資人{$memberInfo['real_name']},您於{$timeT}分,在財來網匯付寶充值{$post['TransAmt']}元已到賬。請關注投資標的信息。詳情請谘詢客戶經理,或致電400-079-8558";
             //取現成功發送短信
//.........這裏部分代碼省略.........
開發者ID:GStepOne,項目名稱:CI,代碼行數:101,代碼來源:class.deal.php

示例14: doMoneyEdit

 public function doMoneyEdit()
 {
     $id = intval($_POST['id']);
     $uid = $id;
     $info = text($_POST['info']);
     $done = false;
     if (floatval($_POST['account_money']) != 0) {
         $done = memberMoneyLog($uid, 71, floatval($_POST['account_money']), $info);
     }
     if (floatval($_POST['money_freeze']) != 0) {
         $done = false;
         $done = memberMoneyLog($uid, 72, floatval($_POST['money_freeze']), $info);
     }
     if (floatval($_POST['money_collect']) != 0) {
         $done = false;
         $done = memberMoneyLog($uid, 73, floatval($_POST['money_collect']), $info);
     }
     //記錄
     $this->assign('jumpUrl', __URL__ . "/index" . session('listaction'));
     if ($done) {
         alogs("Members", 0, 1, '成功執行了會員餘額調整的操作!');
         //管理員操作日誌
         $this->success("操作成功");
     } else {
         alogs("Members", 0, 0, '執行會員餘額調整的操作失敗!');
         //管理員操作日誌
         $this->error("操作失敗");
     }
 }
開發者ID:kinglong366,項目名稱:p2p,代碼行數:29,代碼來源:MembersController.class.php

示例15: payDone

 private function payDone($status, $nid, $oid)
 {
     $done = false;
     $Moneylog = D('member_payonline');
     if ($this->locked) {
         return false;
     }
     $this->locked = true;
     switch ($status) {
         case 1:
             $updata['status'] = $status;
             $updata['tran_id'] = text($oid);
             $vo = M('member_payonline')->field('uid,money,fee,status')->where("nid='{$nid}'")->find();
             //if($vo['status']!=0 || !is_array($vo)) return;
             if (!is_array($vo)) {
                 return false;
             } else {
                 if ($vo['status'] == 1) {
                     return true;
                 }
             }
             $xid = $Moneylog->where("uid={$vo['uid']} AND nid='{$nid}'")->save($updata);
             $tmoney = floatval($vo['money'] - $vo['fee']);
             if ($xid) {
                 $newid = memberMoneyLog($vo['uid'], 3, $tmoney, "充值訂單號:" . $oid, 0, '@網站管理員@');
             }
             //更新成功才充值,避免重複充值
             //if(!$newid){
             //	$updata['status'] = 0;
             //	$Moneylog->where("uid={$vo['uid']} AND nid='{$nid}'")->save($updata);
             //	return false;
             //}
             $vx = M("members")->field("user_phone,user_name")->find($vo['uid']);
             SMStip("payonline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money']));
             break;
         case 2:
             $updata['status'] = $status;
             $updata['tran_id'] = text($oid);
             $xid = $Moneylog->where("uid={$vo['uid']} AND nid='{$nid}'")->save($updata);
             break;
         case 3:
             $updata['status'] = $status;
             $xid = $Moneylog->where("uid={$vo['uid']} AND nid='{$nid}'")->save($updata);
             break;
     }
     if ($status > 0) {
         if ($xid) {
             $done = true;
         }
     }
     $this->locked = false;
     return $done;
 }
開發者ID:caotieshuan,項目名稱:ishoutou,代碼行數:53,代碼來源:PayAction.class.php


注:本文中的memberMoneyLog函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。