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; }
public function doEdit() { $model = D('video_apply'); if (false === $model->create()) { $this->error($model->getError()); } $model->deal_user = session('admin_id'); $model->deal_time = time(); //保存当前数据对象 if ($result = $model->save()) { //保存成功 $uid = M('video_apply')->getFieldById($_POST['id'], 'uid'); if ($_POST['apply_status'] == 1) { setMemberStatus($uid, 'video', $_POST['apply_status'], 7, '视频'); addInnerMsg($uid, "您的视频认证审核已通过", "您的视频认证审核已通过"); alogs("VerifyVideo", 0, 1, '视频认证审核通过!'); //管理员操作日志 } else { addInnerMsg($uid, "您的视频认证审核未通过", "您的视频认证审核未通过"); alogs("VerifyVideo", 0, 0, '视频认证审核未通过!'); //管理员操作日志 } //成功提示 $this->assign('jumpUrl', __URL__ . "/index" . session('listaction')); $this->success(L('审核成功')); } else { //失败提示 $this->error(L('审核失败')); } }
function active_award($newid, $awardType, $amount, $msg_title, $msg_body) { //账户金额增加奖励 $member_money = M('member_money')->where("uid = {$newid}")->find(); if ($member_money) { $member_money['account_money'] += $amount; M("member_money")->where("uid={$newid}")->save($member_money); } else { $member_money['uid'] = $newid; $member_money['account_money'] = $amount; M('member_money')->add($member_money); } //添加注册奖励记录 $award_log['amount'] = $amount; $award_log['uid'] = $newid; $award_log['awardType'] = $awardType; M('active_award_log')->add($award_log); //添加系统消息记录 addInnerMsg($newid, $msg_title, $msg_body); }
public function questionsave() { $data['question1'] = text($_POST['q1']); $data['question2'] = text($_POST['q2']); $data['answer1'] = text($_POST['a1']); $data['answer2'] = text($_POST['a2']); $data['add_time'] = time(); $c = M('member_safequestion')->where("uid = {$this->uid}")->count('uid'); if ($c == 1) { $newid = M("member_safequestion")->where("uid={$this->uid}")->save($data); } else { $data['uid'] = $this->uid; $newid = M('member_safequestion')->add($data); } if ($newid) { M('members_status')->where("uid = {$this->uid}")->setField('safequestion_status', 1); $newid = setMemberStatus($this->uid, 'safequestion', 1, 6, '安全问题'); if ($newid) { addInnerMsg($uid, "您的安全问题已设置", "您的安全问题已设置"); } ajaxmsg(); } else { ajaxmsg("", 0); } }
public function doEdit() { $uid = intval($_REQUEST['uid']); $newid = setMemberStatus($uid, 'phone', $_POST['status'], 10, '手机'); if ($newid) { addInnerMsg($uid, "您的手机验证审核已通过", "您的手机验证审核已通过"); $this->assign('jumpUrl', __URL__ . "/" . session('listaction')); $this->success(L('修改成功')); } else { addInnerMsg($uid, "您的手机验证审核未通过", "您的手机验证审核未通过"); //失败提示 $this->assign('jumpUrl', __URL__ . "/" . session('listaction')); $this->success(L('修改成功')); } }
public function doEdit() { // echo $_POST[deal_info]; // echo "<br/>"; $model = D(ucfirst($this->getActionName())); if (false === $model->create()) { $this->error($model->getError()); } //保存当前数据对象 if ($result = $model->save()) { //保存成功 if ($_POST['status'] == 1) { $vx = M('vip_apply')->field("uid,kfid,deal_info")->find(intval($_POST['id'])); $uid = $vx['uid']; $dealInfo = $vx['deal_info']; $datag = get_global_setting(); $aUser = get_admin_name(); $newx = memberMoneyLog($uid, 14, -$datag['fee_vip'], "升级VIP成功"); memberLimitLog($uid, 11, $this->glo['limit_vip'], "VIP审核通过"); memberCreditsLog($uid, 9, intval($this->glo["vip_exp"]), "VIP审核通过经验奖励"); memberScoresLog($uid, 9, intval($this->glo["vip_score"]), "VIP审核通过积分奖励"); addInnerMsg($uid, "您的VIP申请审核已通过", "您的VIP申请审核已通过."); $vo = M("members")->field("user_phone,user_name,account_money,recommend_id")->where("id = {$uid}")->find(); SMStip("vip", $vo['user_phone'], array("#USERANEM#"), array($vo['user_name']), null, array($uid)); if ($newx) { $xmoney = M('members')->getFieldById($vo['recommend_id'], 'reward_money'); memberMoneyLog($vo['recommend_id'], 13, $datag['reward_vip_money'], $vo['user_name'] . "获得被邀请会员VIP升级奖励"); $vmo = M('members')->field("user_leve,time_limit,delicated_customer")->find($vx['uid']); $savex['customer_id'] = $vx['kfid']; $savex['customer_name'] = $aUser[$vx['kfid']]; $savex['user_leve'] = 1; if (empty($vmo["delicated_customer"])) { $savex['delicated_customer'] = $vx['kfid']; } if ($vmo['time_limit'] > time()) { $savex['time_limit'] = strtotime("+1 year", $vmo['time_limit']); } else { $savex['time_limit'] = strtotime("+1 year"); } M('members')->where("id={$uid}")->save($savex); } } else { $vx = M('vip_apply')->field("uid,kfid,deal_info")->find(intval($_POST['id'])); $uid = $vx['uid']; $dealInfo = $vx['deal_info']; addInnerMsg($uid, "您的VIP申请审核未通过", "未通过原因:" . $dealInfo); } //成功提示 $this->assign('jumpUrl', __URL__ . "/" . session('listaction')); $this->success(L('修改成功')); } else { //失败提示 $this->error(L('修改失败')); } }
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']."【友情提醒】"); } }
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; }
public function doEdit() { $model = D(ucfirst($this->getActionName())); $info = $model->field('deal_time')->where('id=' . intval($_POST['id']))->find(); if ($info['deal_time']) { $this->error("此申请已处理过,请不要重复提交!"); } if (false === $model->create()) { $this->error($model->getError()); } $model->deal_time = time(); $model->deal_user = session('admin_id'); //保存当前数据对象 if ($result = $model->save()) { //保存成功 if ($_POST['status'] == 1) { $vx = M('vip_apply')->field("uid,kfid")->find(intval($_POST['id'])); $uid = $vx['uid']; $datag = get_global_setting(); $aUser = get_admin_name(); $result = memberMoneyLog($uid, 14, -$datag['fee_vip'], "升级VIP成功"); $newx = setMemberStatus($uid, 'vip', $_POST['status'], 13, 'vip'); memberLimitLog($uid, 11, $this->glo['limit_vip'], "VIP审核通过"); addInnerMsg($uid, "您的VIP申请审核已通过", "您的VIP申请审核已通过"); $vo = M("members")->field("user_phone,user_name,recommend_id")->where("id = {$uid}")->find(); SMStip("vip", $vo['user_phone'], array("#USERANEM#"), array($vo['user_name'])); if ($newx) { $vmo = M('members')->field("user_leve,time_limit")->find($vx['uid']); $savex['customer_id'] = $vx['kfid']; $savex['customer_name'] = $aUser[$vx['kfid']]; $savex['user_leve'] = 1; if ($vmo['time_limit'] > time()) { $savex['time_limit'] = strtotime("+1 year", $vmo['time_limit']); } else { $savex['time_limit'] = strtotime("+1 year"); } M('members')->where("id={$uid}")->save($savex); } alogs("Vipapply", 0, 1, 'VIP申请审核通过!'); //管理员操作日志 } else { addInnerMsg($uid, "您的VIP申请审核未通过", "您的VIP申请审核未通过"); alogs("Vipapply", 0, 0, 'VIP申请审核未通过!'); //管理员操作日志 } //成功提示 $this->assign('jumpUrl', __URL__); $this->success(L('修改成功')); } else { //失败提示 $this->error(L('修改失败')); } }
public function doEdit() { $status = intval($_POST['status']); $uid = intval($_POST['id']); $uif = $_POST['deal_info']; if ($status == 1) { memberCreditsLog($uid, 2, intval($this->glo["real_score"]), "实名认证通过经验奖励"); memberScoresLog($uid, 2, intval($this->glo["real_score"]), "实名认证通过积分奖励"); memberMoneyLog($uid, 25, -$this->glo['fee_idcard'], $info = "实名认证通过"); $newxid = M("members_status")->where("uid={$uid}")->setField('id_status', 1); $dealInfo = M("member_info")->where("uid={$uid}")->setField('deal_info', $uif); //deal_info字段存在member_info表 addInnerMsg($uid, "您的实名认证申请已经通过", "您的实名认证申请已经通过"); } else { $newxid = M("members_status")->where("uid={$uid}")->setField('id_status', 0); addInnerMsg($uid, "您的实名认证申请未能通过", "未通过原因:" . $uif); } if ($newxid) { $this->success("审核成功", __URL__ . "/index" . session('listaction')); } else { $this->error("审核失败"); } }
public function doEdit() { $model = D('video_apply'); if (false === $model->create()) { $this->error($model->getError()); } $model->credits = $this->glo["video_exp"]; $model->deal_user = session('admin_id'); $model->deal_time = time(); //保存当前数据对象 if ($result = $model->save()) { //保存成功 $vif = M('video_apply')->field("deal_info,uid")->getById($_POST['id']); $uid = $vif["uid"]; if (intval($_POST['credits']) > 0) { memberCreditsLog($uid, 7, intval($_POST['credits']), "视频认证审核"); } if ($_POST['apply_status'] == 1) { memberCreditsLog($uid, 7, intval($this->glo["video_exp"]), "视频认证审核经验奖励"); memberScoresLog($uid, 7, intval($this->glo["video_score"]), "视频认证审核积分奖励"); addInnerMsg($uid, "您的视频认证审核已通过", "您的视频认证审核已通过。" . $vif['deal_info']); $xcount = M('members_status')->where("uid={$uid}")->count("uid"); if ($xcount != 1) { M('members_status')->add(array("uid" => $uid, 'video_status' => 1)); } else { M('members_status')->where("uid={$uid}")->setField('video_status', 1); } } else { addInnerMsg($uid, "您的视频认证审核未通过", "未通过原因:" . $vif['deal_info']); } //成功提示 $this->assign('jumpUrl', __URL__ . "/index" . session('listaction')); $this->success(L('审核成功')); } else { //失败提示 $this->error(L('审核失败')); } }
public function sendgala() { set_time_limit(0); //设置脚本最大执行时间 $info = cnsubstr(text($_POST['info']), 500); $title = cnsubstr($info, 12); if ($info == "") { exit("发送内容不可为空"); } $smsLog['admin_id'] = $_SESSION['admin_id']; $smsLog['admin_real_name'] = $_SESSION['admin_user_name']; $smsLog['title'] = $title; $smsLog['content'] = $info; $smsLog['add_time'] = time(); $type = text($_POST['type']); $user_name = intval($_POST['user_name']); if ($user_name == 2) { //VIP会员 $map = " user_leve=1 AND time_limit>" . time(); $user = "******"; } elseif ($user_name == 3) { //非VIP会员 $map = " user_leve=0 OR time_limit<" . time(); $user = "******"; } else { //所有会员 $map = ""; $user = "******"; } if (stripos($type, "1")) { $smsLog['user_email'] = $user; } if (stripos($type, "2")) { $smsLog['user_phone'] = $user; } if (stripos($type, "4")) { $smsLog['user_name'] = $user; } M('smslog')->add($smsLog); $user = M('members m')->field(" m.id,m.user_email,m.user_phone,ms.email_status,ms.phone_status ")->join(" lzh_members_status ms ON m.id=ms.uid ")->where($map)->select(); if (stripos($type, "4")) { //站内信 foreach ($user as $k => $v) { addInnerMsg($v['id'], $title, $info); } } /*if (stripos( $type,"1")) {//邮件 $i= 1; foreach ($user as $k => $v) { if($v['email_status']==1){ $to[floor($i/160)] .=$v['user_email'].","; $i++; } } foreach ($to as $key => $val) { $val = substr($val, 0, strlen($val)-1 ); if($key<6) sendemail2($val,$title,$info); else sendemail($val,$title,$info); } }*/ if (stripos($type, "2")) { //短信 $i = 1; foreach ($user as $k => $v) { if ($v['phone_status'] == 1) { $phone[floor($i / 150)] .= $v['user_phone'] . ","; $i++; } } //var_dump($phone); foreach ($phone as $key2 => $val2) { $val2 = substr($val2, 0, strlen($val2) - 1); sendsms($val2, $info); // var_dump("$val2,$info"); } } alogs("Smslog", 0, 1, '对' . $user . '执行通讯通知操作成功!'); //管理员操作日志 exit("发送成功"); }
public function doEditWaitverify() { $result = 1; $m = D(ucfirst($this->getActionName())); if (false === $m->create()) { $this->error($m->getError()); } $borrow_info_id = $m->id; $vm = M('borrow_info as bi')->field('bi.borrow_name,bi.borrow_min,bi.borrow_uid,bi.borrow_status,bi.borrow_type,bi.first_verify_time,bi.password,bi.updata,bi.danbao,bi.vouch_money,bi.money_collect,bi.can_auto,bi.add_time,bi.toubiao_telephone,bd.house,bd.mortgage,bd.contract,bd.credit,bd.bank,bd.marriage,bd.identity,bd.source,bd.pledge,bd.risk')->JOIN("lzh_borrow_detail as bd on bi.id=bd.bid", "LEFT")->where("bi.id=" . $m->id)->find(); $rate_lixt = explode("|", $this->glo['rate_lixi']); $borrow_duration = explode("|", $this->glo['borrow_duration']); $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']); if (floatval($_POST['borrow_interest_rate']) > $rate_lixt[1] || floatval($_POST['borrow_interest_rate']) < $rate_lixt[0]) { $this->error("提交的借款利率超出允许范围,请重试", 0); exit; } if ($m->repayment_type == '1' && ($m->borrow_duration > $borrow_duration_day[1] || $m->borrow_duration < $borrow_duration_day[0])) { $this->error("提交的借款期限超出允许范围,请去网站设置处重新设置系统参数", 0); exit; } if ($m->repayment_type != '1' && ($m->borrow_duration > $borrow_duration[1] || $m->borrow_duration < $borrow_duration[0])) { $this->error("提交的借款期限超出允许范围,请去网站设置处重新设置系统参数", 0); exit; } ////////////////////图片编辑/////////////////////// if (!empty($_POST['swfimglist'])) { foreach ($_POST['swfimglist'] as $key => $v) { $row[$key]['img'] = substr($v, 1); $row[$key]['info'] = $_POST['picinfo'][$key]; } $m->updata = serialize($row); } ////////////////////图片编辑/////////////////////// if ($vm['borrow_status'] != 2 && $m->borrow_status == 2) { MTip('chk8', $vm['borrow_uid'], $m->id); //自动投标 if ($m->borrow_type == 1) { memberLimitLog($vm['borrow_uid'], 1, -$m->borrow_money, $info = "{$m->id}号标初审通过"); } elseif ($m->borrow_type == 2) { memberLimitLog($vm['borrow_uid'], 2, -$m->borrow_money, $info = "{$m->id}号标初审通过"); } $vss = M("members")->field("user_phone,user_name")->where("id = {$vm['borrow_uid']}")->find(); SMStip("firstV", $vss['user_phone'], array("#USERANEM#", "ID"), array($vss['user_name'], $m->id)); } if ($m->borrow_status == 2) { $m->collect_time = strtotime("+ {$m->collect_day} days"); //$m->is_tuijian = 1; } $m->borrow_interest = getBorrowInterest($m->repayment_type, $m->borrow_money, $m->borrow_duration, $m->borrow_interest_rate); //保存当前数据对象 $add_times = date("Y-m-d", $vm['add_time']); $sum = intval($_POST['borrow_duration']); $m->deadline = strtotime(date("Y-m-d", strtotime("{$add_times} +{$sum} month"))); if ($m->borrow_status == 2 || $m->borrow_status == 1) { $m->first_verify_time = time(); } else { unset($m->first_verify_time); } unset($m->borrow_uid); $bs = intval($_POST['borrow_status']); $m->toubiao_telephone = trim($_POST['toubiao_telephone']); $m->toubiao_telephone = trim($_POST['is_new']); //添加新的数据信息到borrow_detail表里面 20150727 $bd = M("borrow_detail"); $bd->bid = $_POST['bid']; $bd->house = $_POST['house']; $bd->mortgage = $_POST['mortgage']; $bd->contract = $_POST['contract']; $bd->credit = $_POST['credit']; $bd->bank = $_POST['bank']; $bd->marriage = $_POST['marriage']; $bd->identity = $_POST['identity']; $bd->description = $_POST['description']; $bd->source = $_POST['source']; $bd->pledge = $_POST['pledge']; $bd->risk = $_POST['risk']; $has_bid = $bd->getFieldByBid($m->id, "bdid"); unset($bd->id); if ($has_bid) { $res = $bd->data($bd->create())->where("bdid=" . $has_bid)->save(); } else { $res = $bd->add(); } if ($result = $m->save() && $res) { //保存成功 if ($bs == 2 || $bs == 1) { $verify_info['borrow_id'] = intval($_POST['id']); $verify_info['deal_info'] = text($_POST['deal_info']); $verify_info['deal_user'] = $this->admin_id; $verify_info['deal_time'] = time(); $verify_info['deal_status'] = $bs; if ($vm['first_verify_time'] > 0) { M('borrow_verify')->save($verify_info); } else { M('borrow_verify')->add($verify_info); } } //初审未通过 if ($bs == 1) { addInnerMsg($vm['borrow_uid'], "初审未通过", $_POST['deal_info']); } else { if ($bs == 2) { if ($vm['borrow_min'] < 5000) { $db_push = M('cailaipush.information', 'push_'); $db_push->member_id = $vm['borrow_uid']; $db_push->title = '新标上线'; $db_push->content = $vm['borrow_name']; $db_push->borrow_id = $borrow_info_id; $db_push->range_type = 1; $db_push->flag = 0; $db_push->insert_time = time(); $db_push->add(); } } } //自动投标 if ($vm['borrow_status'] != 2 && $_POST['borrow_status'] == 2 && $vm['can_auto'] == 1 && empty($vm['password']) == true && strlen($vm['toubiao_telephone']) < 11) { autoInvest(intval($_POST['id'])); } alogs("doEditWait", $result, 1, '初审操作成功!'); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__ . "/" . session('listaction')); $this->success(L('修改成功')); } else { alogs("doEditWait", $result, 0, '初审操作失败!'); //管理员操作日志 //失败提示 $this->error(L('修改失败')); } }