本文整理汇总了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;
}
示例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);
}
}
示例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("申请失败,请重试");
}
}
示例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("处理失败");
}
}
}
示例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;
}
示例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;
}
示例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'], '');
}
}
示例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('领取失败,请刷新后重试');
}
}
示例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']."【友情提醒】");
}
}
示例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;
}
示例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']) {
示例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("处理失败");
}
}
}
示例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";
//取现成功发送短信
//.........这里部分代码省略.........
示例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("操作失败");
}
}
示例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;
}