• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getMemberBorrowScan函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getMemberBorrowScan函数的典型用法代码示例。如果您正苦于以下问题:PHP getMemberBorrowScan函数的具体用法?PHP getMemberBorrowScan怎么用?PHP getMemberBorrowScan使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getMemberBorrowScan函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: member

 public function member()
 {
     $utype = C('XMEMBER_TYPE');
     $area = get_Area_list();
     $uid = intval($_GET['id']);
     $vo = M('members m')->field("m.user_email,m.customer_name,m.user_phone,m.id,m.credits,m.is_ban,m.user_type,m.user_name,m.integral,m.active_integral,mi.*,mm.*,mb.*")->join("{$this->pre}member_info mi ON mi.uid=m.id")->join("{$this->pre}member_money mm ON mm.uid=m.id")->join("{$this->pre}member_banks mb ON mb.uid=m.id")->where("m.id={$uid}")->find();
     $vo['province'] = $area[$vo['province']];
     $vo['city'] = $area[$vo['city']];
     $vo['area'] = $area[$vo['area']];
     $vo['province_now'] = $area[$vo['province_now']];
     $vo['city_now'] = $area[$vo['city_now']];
     $vo['area_now'] = $area[$vo['area_now']];
     $vo['is_ban'] = $vo['is_ban'] == 0 ? "未冻结" : "<span style='color:red'>已冻结</span>";
     $vo['user_type'] = $utype[$vo['user_type']];
     //$vo['money_collect'] = M('investor_detail')->where(" investor_uid={$uid} AND status =7 ")->sum("capital+interest-interest_fee");
     //$vo['money_need'] = M('investor_detail')->where(" borrow_uid={$uid} AND status in(4,7) ")->sum("capital+interest");
     //$vo['money_all'] = $vo['account_money'] + $vo['money_freeze'] + $vo['money_collect'] - $vo['money_need'];
     $this->assign("capitalinfo", getMemberBorrowScan($uid));
     $this->assign("wc", getUserWC($uid));
     $this->assign("credit", getCredit($uid));
     $this->assign("vo", $vo);
     $this->assign("user", $vo['user_name']);
     //*******2013-11-23*************
     $minfo = getMinfo($uid, true);
     $this->assign("minfo", $minfo);
     $this->assign('benefit', get_personal_benefit($uid));
     //收益相关
     $this->assign('out', get_personal_out($uid));
     //支出相关
     $this->assign('pcount', get_personal_count($uid));
     $this->display();
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:32,代码来源:CommonAction.class.php


示例2: summary

 public function summary()
 {
     $pre = C('DB_PREFIX');
     $this->assign("mx", getMemberBorrowScan($this->uid));
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:7,代码来源:BorrowinAction.class.php


示例3: summary

 public function summary()
 {
     $uid = $this->uid;
     $pre = C('DB_PREFIX');
     $this->assign("dc", M('investor_detail')->where("investor_uid = {$this->uid}")->sum('substitute_money'));
     $this->assign("mx", getMemberBorrowScan($this->uid));
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:9,代码来源:DaystockAction.class.php


示例4: member

 /**
 +----------------------------------------------------------
 * 默认操作
 +----------------------------------------------------------
 */
 public function member()
 {
     $utype = C('XMEMBER_TYPE');
     $area = get_Area_list();
     $uid = intval($_GET['id']);
     $vo = M('members m')->field("m.user_email,m.customer_name,m.user_phone,m.id,m.credits,m.is_ban,m.user_type,m.user_name,mi.*,mm.*,mb.*,mci.address c_address, mci.tel c_tel")->join("left join {$this->pre}member_info mi ON mi.uid=m.id")->join("left join {$this->pre}member_money mm ON mm.uid=m.id")->join("left join {$this->pre}member_banks mb ON mb.uid=m.id")->join("left join {$this->pre}member_contact_info mci ON mci.uid=m.id")->where("m.id={$uid}")->find();
     $vo['province'] = $area[$vo['province']];
     $vo['city'] = $area[$vo['city']];
     $vo['area'] = $area[$vo['area']];
     $vo['province_now'] = $area[$vo['province_now']];
     $vo['city_now'] = $area[$vo['city_now']];
     $vo['area_now'] = $area[$vo['area_now']];
     $vo['is_ban'] = $vo['is_ban'] == 0 ? "未冻结" : "<span style='color:red'>已冻结</span>";
     $vo['user_type'] = $utype[$vo['user_type']];
     $vo['money_all'] = $vo['account_money'] + $vo['money_freeze'] + $vo['money_collect'];
     $this->assign("capitalinfo", getMemberBorrowScan($uid));
     $this->assign("wc", getUserWC($uid));
     $this->assign("vo", $vo);
     $this->assign("user", $vo['user_name']);
     $this->display();
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:26,代码来源:CommonAction.class.php


示例5: jiekuan

 public function jiekuan()
 {
     $pre = C('DB_PREFIX');
     $jsoncode = file_get_contents("php://input");
     //		alogsm("jiekuan",0,1,session("u_id").$jsoncode);
     $arr = array();
     $arr = json_decode($jsoncode, true);
     //		if (!is_array($arr)||empty($arr)) {
     //		   ajaxmsg("密码1!",0);
     //		}
     //		if (intval($arr['uid'])!=$this->uid){
     //			ajaxmsg($arr['uid'],0);
     //		}
     $mx = getMemberBorrowScan($this->uid);
     $list['fbjr'] = $mx['borrow']['2']['money'] != null ? $mx['borrow']['2']['money'] : "0.00";
     $list['chjr'] = $mx['borrow']['6']['money'] != null ? $mx['borrow']['6']['money'] : "0.00";
     $list['hqjr'] = $mx['borrow']['7']['money'] != null ? $mx['borrow']['7']['money'] : "0.00";
     $list['expiredMoney'] = $mx['tj']['expiredMoney'];
     $list['jkze'] = $mx['tj']['jkze'];
     echo ajaxmsg($list);
     //$this->assign("mx",getMemberBorrowScan($this->uid));
     //$data['html'] = $this->display();
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:23,代码来源:McenterController.class.php


示例6: save

 public function save()
 {
     if (!$this->uid) {
         $this->error("请先登陆", __APP__ . "/member/common/login");
     }
     $pre = C('DB_PREFIX');
     //相关的判断参数
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $fee_borrow_manage = explode("|", $this->glo['fee_borrow_manage']);
     $vminfo = M('members m')->join("{$pre}member_info mf ON m.id=mf.uid")->field("m.user_leve,m.time_limit,mf.province_now,mf.city_now,mf.area_now")->where("m.id={$this->uid}")->find();
     //相关的判断参数
     $borrow['borrow_type'] = intval(cookie(text($_POST['vkey'])));
     if ($borrow['borrow_type'] == 50) {
         $this->error("校验数据有误,请重新发布");
     }
     $borrow['borrow_money'] = intval($_POST['borrow_money']);
     $_minfo = getMinfo($this->uid, true);
     $_capitalinfo = getMemberBorrowScan($this->uid);
     switch ($borrow['borrow_type']) {
         case 1:
             //普通标
             if ($_minfo['credit_cuse'] < $borrow['borrow_money']) {
                 $this->error("您的可用信用额度为{$_minfo['credit_cuse']}元,小于您准备借款的金额,不能发标");
             }
             break;
         case 2:
             //担保标
             if ($_minfo['borrow_vouch_cuse'] < $borrow['borrow_money']) {
                 $this->error("您的可用信用担保借款额度为{$_minfo['borrow_vouch_cuse']}元,小于您准备借款的金额,不能发标");
             }
             break;
         case 3:
             //秒还标
             break;
         case 4:
             //净值标
             $_netMoney = getFloatValue($minfo['money_collect'], 2);
             //getNet($_minfo,$_capitalinfo);
             if ($_netMoney < $borrow['borrow_money']) {
                 $this->error("您的净资产为{$_netMoney}元,小于您准备借款的金额,不能发标");
             }
             break;
         case 5:
             //抵押标
             //$borrow_type=5;
             break;
     }
     if ($borrow['borrow_type'] == 2) {
         //担保标
         $borrow['reward_vouch_rate'] = floatval($_POST['vouch_rate']);
         $borrow['reward_vouch_money'] = getFloatValue($borrow['borrow_money'] * $borrow['reward_vouch_rate'] / 100, 2);
         $borrow['vouch_member'] = text($_POST['vouch_member']);
     }
     $borrow['borrow_uid'] = $this->uid;
     $borrow['borrow_name'] = text($_POST['borrow_name']);
     $borrow['borrow_duration'] = $borrow['borrow_type'] == 3 ? 1 : intval($_POST['borrow_duration']);
     //秒标固定为一月
     $borrow['borrow_interest_rate'] = floatval($_POST['borrow_interest_rate']);
     if (strtolower($_POST['is_day']) == 'yes') {
         $borrow['repayment_type'] = 1;
     } elseif ($borrow['borrow_type'] == 3) {
         $borrow['repayment_type'] = 2;
     } else {
         $borrow['repayment_type'] = intval($_POST['repayment_type']);
     }
     if ($_POST['show_tbzj'] == 1) {
         $borrow['is_show_invest'] = 1;
     }
     //共几期(分几次还)
     $borrow['total'] = $borrow['repayment_type'] == 1 ? 1 : $borrow['borrow_duration'];
     //共几期(分几次还)
     $borrow['borrow_status'] = 0;
     $borrow['borrow_use'] = intval($_POST['borrow_use']);
     $borrow['add_time'] = time();
     $borrow['collect_day'] = intval($_POST['borrow_time']);
     $borrow['add_ip'] = get_client_ip();
     $borrow['borrow_info'] = text($_POST['borrow_info']);
     $borrow['reward_type'] = intval($_POST['reward_type']);
     $borrow['reward_num'] = floatval($_POST["reward_type_{$borrow['reward_type']}_value"]);
     $borrow['borrow_min'] = intval($_POST['borrow_min']);
     $borrow['borrow_max'] = intval($_POST['borrow_max']);
     $borrow['province'] = $vminfo['province_now'];
     $borrow['city'] = $vminfo['city_now'];
     $borrow['area'] = $vminfo['area_now'];
     if ($_POST['is_pass'] && intval($_POST['is_pass']) == 1) {
         $borrow['password'] = md5($_POST['password']);
     }
     //借款费和利息
     $borrow['borrow_interest'] = getBorrowInterest($borrow['repayment_type'], $borrow['borrow_money'], $borrow['borrow_duration'], $borrow['borrow_interest_rate']);
     if ($borrow['repayment_type'] == 1) {
         //按天还
         $fee_rate = is_numeric($fee_borrow_manage[0]) ? $fee_borrow_manage[0] / 100 : 0.001;
         $borrow['borrow_fee'] = getFloatValue($fee_rate * $borrow['borrow_money'] * $borrow['borrow_duration'], 2);
     } else {
         $fee_rate_1 = is_numeric($fee_borrow_manage[1]) ? $fee_borrow_manage[1] / 100 : 0.02;
         $fee_rate_2 = is_numeric($fee_borrow_manage[2]) ? $fee_borrow_manage[2] / 100 : 0.002;
         if ($borrow['borrow_duration'] > $fee_borrow_manage[3] && is_numeric($fee_borrow_manage[3])) {
             $borrow['borrow_fee'] = getFloatValue($fee_rate_1 * $borrow['borrow_money'], 2);
//.........这里部分代码省略.........
开发者ID:hutao1004,项目名称:yintt,代码行数:101,代码来源:BorrowAction.class.php


示例7: invest_people_info

 public function invest_people_info()
 {
     if (!$this->uid) {
         $this->qingxian();
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $borrowinfo = M("borrow_info bi")->field('bi.*,ac.title,ac.id as aid')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $id)->find();
     if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) {
         $this->error("数据有误");
     }
     $borrowinfo['biao'] = $borrowinfo['borrow_times'];
     $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow'];
     $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
     $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2);
     $this->assign("vo", $borrowinfo);
     $memberinfo = M("members m")->field("m.id,m.user_phone,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     if (!$memberinfo) {
         $memberinfo['credits'] = 0;
     }
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $memberinfo['zcze'] = $memberinfo['account_money'] + $memberinfo['back_money'] + $memberinfo['money_collect'] + $memberinfo['money_freeze'];
     //var_dump($memberinfo);die;
     $reg_time = date('Y-m-d H:i:s', $memberinfo['reg_time']);
     $this->assign("reg_time", $reg_time);
     $this->assign("minfo", $memberinfo);
     //$this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     $this->assign("borrow_id", $id);
     $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     $this->display();
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:34,代码来源:InvestAction.class.php


示例8: getMemberMoneySummary

function getMemberMoneySummary($uid)
{
    $pre = C('DB_PREFIX');
    $umoney = M('member_money')->field(true)->find($uid);
    $withdraw = M('member_withdraw')->field('withdraw_status,sum(withdraw_money) as withdraw_money,sum(withdraw_fee) as withdraw_fee')->where("uid={$uid}")->group("withdraw_status")->select();
    $withdraw_row = array();
    foreach ($withdraw as $wkey => $wv) {
        $withdraw_row[$wv['withdraw_status']] = $wv;
    }
    $withdraw0 = $withdraw_row[0];
    $withdraw1 = $withdraw_row[1];
    $withdraw2 = $withdraw_row[2];
    $payonline = M('member_payonline')->where("uid={$uid} AND status=1")->sum('money');
    $commission1 = M('borrow_investor')->where("investor_uid={$uid}")->sum('paid_fee');
    $commission2 = M('borrow_info')->where("borrow_uid={$uid} AND borrow_status in(3,4)")->sum('borrow_fee');
    $uplevefee = M('member_moneylog')->where("uid={$uid} AND type=2")->sum('affect_money');
    $czfee = M('member_payonline')->where("uid={$uid} AND status=1")->sum('fee');
    $toubiaojl = M('borrow_investor')->where("investor_uid={$uid}")->sum('reward_money');
    //投标奖励
    $tuiguangjl = M('member_moneylog')->where("uid={$uid} and type=13")->sum('affect_money');
    //推广奖励
    $xianxiajl = M('member_moneylog')->where("uid={$uid} and type=33")->sum('affect_money');
    //线下充值奖励
    $capitalinfo = getMemberBorrowScan($uid);
    $money['zye'] = $umoney['account_money'] + $umoney['money_collect'] + $umoney['money_freeze'];
    //帐户总额
    $money['kyxjje'] = $umoney['account_money'];
    //可用金额
    $money['djje'] = $umoney['money_freeze'];
    //冻结金额
    $money['jjje'] = 0;
    //奖金金额
    $money['dsbx'] = $umoney['money_collect'];
    //待收本息
    $money['dfbx'] = round($capitalinfo['tj']['dhze'] - $capitalinfo['tj']['payInterest']);
    //待付本息
    $money['dxrtb'] = $capitalinfo['tj']['dqrtb'];
    //待确认投标
    $money['dshtx'] = $withdraw0['withdraw_money'];
    //待审核提现
    $money['clztx'] = $withdraw1['withdraw_money'];
    //处理中提现
    $money['total_1'] = round($money['kyxjje'] + $money['jjje'] + $money['dsbx'] - $money['dfbx'] + $money['dxrtb'] + $money['dshtx'] + $money['clztx'], 2);
    $money['jzlx'] = $capitalinfo['tj']['earnInterest'];
    //净赚利息
    $money['jflx'] = $capitalinfo['tj']['payInterest'];
    //净付利息
    $money['ljjj'] = $umoney['reward_money'];
    //累计收到奖金
    $money['ljhyf'] = $uplevefee;
    //累计支付会员费
    $money['ljtxsxf'] = $withdraw2['withdraw_fee'];
    //累计提现手续费
    $money['ljczsxf'] = $czfee;
    //累计充值手续费
    $money['ljtbjl'] = $toubiaojl;
    //累计投标奖励
    $money['ljtgjl'] = $tuiguangjl;
    //累计推广奖励
    $money['xxjl'] = $xianxiajl;
    //线下充值奖励
    $money['total_2'] = $money['jzlx'] - $money['jflx'] + $money['ljjj'] - $money['ljhyf'] - $money['ljtxsxf'] - $money['ljczsxf'] + $money['ljtbjl'] + $money['ljtgjl'] + $money['xxjl'];
    $money['ljtzje'] = $capitalinfo['tj']['borrowOut'];
    //累计投资金额
    $money['ljjrje'] = $capitalinfo['tj']['borrowIn'];
    //累计借入金额
    $money['ljczje'] = $payonline;
    //累计充值金额
    $money['ljtxje'] = $withdraw2['withdraw_money'];
    //累计提现金额
    $money['ljzfyj'] = $commission1 + $commission2;
    //累计支付佣金
    //
    $money['dslxze'] = $capitalinfo['tj']['willgetInterest'];
    //待收利息总额
    $money['dflxze'] = $capitalinfo['tj']['willpayInterest'];
    //待付利息总额
    return $money;
}
开发者ID:hutao1004,项目名称:yintt,代码行数:79,代码来源:Lib.php


示例9: loan

 public function loan()
 {
     $this->assign("mx", getMemberBorrowScan($this->uid));
     $this->display();
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:5,代码来源:UserController.class.php


示例10: tdetail

 public function tdetail()
 {
     if ($_GET['type'] == 'commentlist') {
         //评论
         $cmap['tid'] = intval($_GET['id']);
         $clist = getCommentList($cmap, 5);
         $this->assign("commentlist", $clist['list']);
         $this->assign("commentpagebar", $clist['page']);
         $this->assign("commentcount", $clist['count']);
         $data['html'] = $this->fetch('commentlist');
         exit(json_encode($data));
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     //合同ID
     if ($this->uid) {
         $invs = M('borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid})")->find();
         if ($invs['id'] > 0) {
             $invsx = $invs['id'];
         } elseif (!is_array($invs)) {
             $invsx = 'no';
         }
     } else {
         $invsx = 'login';
     }
     $this->assign("invid", $invsx);
     //合同ID
     //borrowinfo
     //$borrowinfo = M("borrow_info")->field(true)->find($id);
     $borrowinfo = M("borrow_info bi")->field('bi.*,ac.title,ac.id as aid')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $id)->find();
     if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) {
         $this->error("数据有误");
     }
     $borrowinfo['biao'] = $borrowinfo['borrow_times'];
     $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow'];
     $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
     $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2);
     $this->assign("vo", $borrowinfo);
     $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $memberinfo['zcze'] = $memberinfo['account_money'] + $memberinfo['back_money'] + $memberinfo['money_collect'] + $memberinfo['money_freeze'];
     $this->assign("minfo", $memberinfo);
     //data_list
     $data_list = M("member_data_info")->field('type,add_time,count(status) as num,sum(deal_credits) as credits')->where("uid={$borrowinfo['borrow_uid']} AND status=1")->group('type')->select();
     $this->assign("data_list", $data_list);
     //data_list
     // 投资记录
     $this->investRecord($id);
     $this->assign('borrow_id', $id);
     //近期还款的投标
     //$time1 = microtime(true)*1000;
     $history = getDurationCount($borrowinfo['borrow_uid']);
     $this->assign("history", $history);
     //$time2 = microtime(true)*1000;
     //echo $time2-$time1;
     //investinfo
     $fieldx = "bi.investor_capital,bi.add_time,m.user_name,bi.is_auto";
     $investinfo = M("borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->limit(10)->where("bi.borrow_id={$id}")->order("bi.id DESC")->select();
     $this->assign("investinfo", $investinfo);
     //investinfo
     //帐户资金情况
     $this->assign("investInfo", getMinfo($this->uid, true));
     $this->assign("mainfo", getMinfo($borrowinfo['borrow_uid'], true));
     $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     //帐户资金情况
     //展示资料
     $show_list = M("member_borrow_show")->where("uid={$borrowinfo['borrow_uid']}")->order('sort DESC')->select();
     $this->assign("show_list", $show_list);
     //展示资料
     //上传资料类型
     $upload_type = FilterUploadType(FS("Webconfig/integration"));
     $this->assign("upload_type", $upload_type);
     // 上传资料所有类型
     //评论
     $cmap['tid'] = $id;
     $clist = getCommentList($cmap, 5);
     $this->assign("Bconfig", $Bconfig);
     $this->assign("gloconf", $this->gloconf);
     $this->assign("commentlist", $clist['list']);
     $this->assign("commentpagebar", $clist['page']);
     $this->assign("commentcount", $clist['count']);
     $this->display();
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:86,代码来源:FundController.class.php


示例11: save

 public function save()
 {
     $jsoncode = file_get_contents("php://input");
     $arr = array();
     $arr = json_decode($jsoncode, true);
     if (!$this->uid || $arr['uid'] != $this->uid) {
         ajaxmsg("请先登录", 0);
         exit;
     }
     if (!is_array($arr) || empty($arr) || empty($arr['uid'])) {
         ajaxmsg("查询错误!", 0);
     }
     $pre = C('DB_PREFIX');
     $id = intval($arr['id']);
     //$id = 30;
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     //相关的判断参数
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $fee_borrow_manage = explode("|", $this->glo['fee_borrow_manage']);
     $vminfo = M('members m')->join("{$pre}member_info mf ON m.id=mf.uid")->field("m.user_leve,m.time_limit,mf.province_now,mf.city_now,mf.area_now,m.is_vip,m.is_borrow")->where("m.id={$this->uid}")->find();
     //var_dump($vminfo);die;
     if ($vminfo['is_vip'] == 0) {
         $_xoc = M('borrow_info')->where("borrow_uid={$this->uid} AND borrow_status in(0,2,4)")->count('id');
         if ($_xoc > 0) {
             ajaxmsg("您有一个借款中的标,请等待审核", 0);
         }
         if (!($vminfo['user_leve'] > 0 && $vminfo['time_limit'] > time())) {
             ajaxmsg("请先通过VIP审核再发标", 0);
         }
         if ($vminfo['is_borrow'] == 0) {
             ajaxmsg("您目前不允许发布借款,如需帮助,请与客服人员联系!", 0);
             //$this->assign("waitSecond",3);
         }
         $vo = getMemberDetail($this->uid);
         if ($vo['province'] == 0 && $vo['province_now '] == 0 && $vo['province_now '] == 0 && $vo['city'] == 0 && $vo['city_now'] == 0) {
             ajaxmsg("请先填写个人详细资料后再发标", 0);
         }
     }
     $borrow['borrow_type'] = $arr['vkey'];
     //intval(cookie(text($_POST['vkey'])));
     //dump($borrow['borrow_type']);die;
     if ($borrow['borrow_type'] == 0) {
         ajaxmsg("校验数据有误,请重新发布", 0);
     }
     if (floatval($arr['borrow_interest_rate']) > $rate_lixt[1] || floatval($arr['borrow_interest_rate']) < $rate_lixt[0]) {
         ajaxmsg("提交的借款利率不在允许范围,请重试", 0);
     }
     $borrow['borrow_money'] = intval($arr['borrow_money']);
     $_minfo = getMinfo($this->uid, "m.pin_pass,mm.account_money,mm.back_money,mm.credit_cuse,mm.money_collect");
     $_capitalinfo = getMemberBorrowScan($this->uid);
     ///////////////////////////////////////////////////////
     //$vo = M('members m')->field('mm.account_money,mm.back_money,(mm.account_money+mm.back_money) all_money,m.user_leve,m.time_limit')->join("{$pre}member_money mm on mm.uid = //m.id")->where("m.id={$this->uid} AND m.pin_pass='{$pwd}'")->find();
     $borrowNum = M('borrow_info')->field("borrow_type,count(id) as num,sum(borrow_money) as money,sum(repayment_money) as repayment_money")->where("borrow_uid = {$this->uid} AND borrow_status=6 ")->group("borrow_type")->select();
     $borrowDe = array();
     foreach ($borrowNum as $k => $v) {
         $borrowDe[$v['borrow_type']] = $v['money'] - $v['repayment_money'];
     }
     ///////////////////////////////////////////////////
     switch ($borrow['borrow_type']) {
         case 1:
             //普通标
             if ($_minfo['credit_cuse'] < $borrow['borrow_money']) {
                 ajaxmsg("您的可用信用额度为{$_minfo['credit_cuse']}元,小于您准备借款的金额,不能发标", 0);
             }
             break;
         case 2:
             //新担保标
             break;
         case 4:
             //净值标
             $_netMoney = getFloatValue(0.9 * $_minfo['money_collect'] - $borrowDe[4], 2);
             if ($_netMoney < $borrow['borrow_money']) {
                 ajaxmsg("您的净值额度{$_netMoney}元,小于您准备借款的金额,不能发标", 0);
             }
             break;
         case 5:
             //抵押标
             //$borrow_type=5;
             break;
     }
     $borrow['borrow_uid'] = $this->uid;
     $borrow['borrow_name'] = text($arr['borrow_name']);
     $borrow['borrow_duration'] = $borrow['borrow_type'] == 3 ? 1 : intval($arr['borrow_duration']);
     //秒标固定为一月
     $borrow['borrow_interest_rate'] = floatval($arr['borrow_interest_rate']);
     if (strtolower($arr['is_day']) == 'yes') {
         $borrow['repayment_type'] = 1;
     } elseif ($borrow['borrow_type'] == 3) {
         $borrow['repayment_type'] = 2;
     } else {
         $borrow['repayment_type'] = intval($arr['repayment_type']);
     }
     if ($borrow['repayment_type'] == '1' || $borrow['repayment_type'] == '5') {
         $borrow['total'] = 1;
     } else {
         $borrow['total'] = $borrow['borrow_duration'];
         //分几期还款
     }
//.........这里部分代码省略.........
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:101,代码来源:MainAction.class.php


示例12: save

 public function save()
 {
     if (!$this->uid) {
         $this->error("请先登陆", __APP__ . "/member/common/login");
     }
     $pre = C('DB_PREFIX');
     //相关的判断参数
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $fee_borrow_manage = explode("|", $this->glo['fee_borrow_manage']);
     $vminfo = M('members m')->join("{$pre}member_info mf ON m.id=mf.uid")->field("m.user_leve,m.time_limit,mf.province_now,mf.city_now,mf.area_now")->where("m.id={$this->uid}")->find();
     //相关的判断参数
     $borrow['borrow_type'] = intval(cookie(text($_POST['vkey'])));
     if ($borrow['borrow_type'] == 0) {
         $this->error("校验数据有误,请重新发布");
     }
     if (floatval($_POST['borrow_interest_rate']) > $rate_lixt[1] || floatval($_POST['borrow_interest_rate']) < $rate_lixt[0]) {
         $this->error("提交的借款利率超出允许范围,请重试", 0);
     }
     //if($_POST['borrow_btype']==0) $this->error("请选择标的类型");
     $borrow['borrow_money'] = intval($_POST['borrow_money']);
     $_minfo = getMinfo($this->uid, "m.pin_pass,mm.account_money,mm.back_money,mm.credit_cuse,mm.money_collect");
     $_capitalinfo = getMemberBorrowScan($this->uid);
     ///////////////////////////////////////////////////////
     $borrowNum = M('borrow_info')->field("borrow_type,count(id) as num,sum(borrow_money) as money,sum(repayment_money) as repayment_money")->where("borrow_uid = {$this->uid} AND borrow_status=6 ")->group("borrow_type")->select();
     $borrowDe = array();
     foreach ($borrowNum as $k => $v) {
         $borrowDe[$v['borrow_type']] = $v['money'] - $v['repayment_money'];
     }
     ///////////////////////////////////////////////////
     switch ($borrow['borrow_type']) {
         case 1:
             //普通标
             if ($_minfo['credit_cuse'] < $borrow['borrow_money']) {
                 $this->error("您的可用信用额度为{$_minfo['credit_cuse']}元,小于您准备借款的金额,不能发标");
             }
             break;
         case 2:
             //新担保标
         //新担保标
         case 3:
             //秒还标
             break;
         case 4:
             //净值标
             $_netMoney = getFloatValue(0.9 * $_minfo['money_collect'] - $borrowDe[4], 2);
             if ($_netMoney < $borrow['borrow_money']) {
                 $this->error("您的净值额度{$_netMoney}元,小于您准备借款的金额,不能发标");
             }
             break;
         case 5:
             //抵押标
             //$borrow_type=5;
             break;
     }
     $borrow['borrow_uid'] = $this->uid;
     $borrow['borrow_name'] = text($_POST['borrow_name']);
     $borrow['borrow_duration'] = $borrow['borrow_type'] == 3 ? 1 : intval($_POST['borrow_duration']);
     //秒标固定为一月
     $borrow['borrow_interest_rate'] = floatval($_POST['borrow_interest_rate']);
     if (strtolower($_POST['is_day']) == 'yes') {
         $borrow['repayment_type'] = 1;
     } elseif ($borrow['borrow_type'] == 3) {
         $borrow['repayment_type'] = 2;
     } else {
         $borrow['repayment_type'] = intval($_POST['repayment_type']);
     }
     if ($borrow['repayment_type'] == '1' || $borrow['repayment_type'] == '5') {
         $borrow['total'] = 1;
     } else {
         $borrow['total'] = $borrow['borrow_duration'];
         //分几期还款
     }
     $borrow['borrow_status'] = 0;
     $borrow['borrow_use'] = intval($_POST['borrow_use']);
     $borrow['add_time'] = time();
     $borrow['collect_day'] = intval($_POST['borrow_time']);
     $borrow['add_ip'] = get_client_ip();
     $borrow['borrow_info'] = text($_POST['borrow_info']);
     $borrow['reward_type'] = intval($_POST['reward_type']);
     $borrow['reward_num'] = floatval($_POST["reward_type_{$borrow['reward_type']}_value"]);
     $borrow['borrow_min'] = intval($_POST['borrow_min']);
     $borrow['borrow_max'] = intval($_POST['borrow_max']);
     $borrow['borrow_btype'] = intval($_POST['borrow_btype']);
     $borrow['ifdianzibiao'] = $_POST['ifdianzibiao'];
     $borrow['is_tuijian'] = $_POST['is_tuijian'];
     /*$borrow['province'] = $vminfo['province_now'];
     		$borrow['city'] = $vminfo['city_now'];
     		$borrow['area'] = $vminfo['area_now'];*/
     if ($_POST['is_pass'] && intval($_POST['is_pass']) == 1) {
         $borrow['password'] = md5($_POST['password']);
     }
     $borrow['money_collect'] = floatval($_POST['moneycollect']);
     //代收金额限制设置
     //借款费和利息
     $borrow['borrow_interest'] = getBorrowInterest($borrow['repayment_type'], $borrow['borrow_money'], $borrow['borrow_duration'], $borrow['borrow_interest_rate']);
     if ($borrow['repayment_type'] == 1) {
         //按天还
         $fee_rate = is_numeric($fee_borrow_manage[0]) ? $fee_borrow_manage[0] / 100 : 0.001;
//.........这里部分代码省略.........
开发者ID:kinglong366,项目名称:p2p,代码行数:101,代码来源:BorrowController.class.php


示例13: save

 public function save()
 {
     //if(!$this->uid) $this->error("请先登录",__APP__."/member/common/login");
     //if(empty($_FILES['topic']['name'])){
     //	$this->error('请上传标题图片');
     //}
     $borrow = array();
     //$this->savePathNew = C('HOME_UPLOAD_DIR').'Product/';
     //$this->thumbMaxWidth = C('PRODUCT_UPLOAD_W');
     //$this->thumbMaxHeight = C('PRODUCT_UPLOAD_H');
     //$this->saveRule = date("YmdHis",time()).rand(0,1000);
     //$info = $this->CUpload();
     //$borrow['topic'] = $info[0]['savepath'].$info[0]['savename'];
     if ($_POST['borrow_uid'] == '') {
         $this->error('选择借款人不能为空!');
     }
     if ($_POST['borrow_type'] == '') {
         $this->error('借款标类型不能为空!');
     }
     if ($_POST['reward_type'] && ($_POST['reward_type_1_value'] > 6 || $_POST['reward_type_1_value'] < 0)) {
         $this->error("投标奖励超出范围!");
     }
     if ($this->_post('stock_type') == '') {
         $this->error("选择配资类型不能为空!");
     }
     $capital_name = htmlspecialchars($this->_post('capital_name'));
     $capital_card = htmlspecialchars($this->_post('capital_card'));
     $pre = C('DB_PREFIX');
     //相关的判断参数
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $fee_borrow_manage = explode("|", $this->glo['fee_borrow_manage']);
     $vminfo = M('members m')->join("{$pre}member_info mf ON m.id=mf.uid")->field("m.user_leve,m.time_limit,mf.province_now,mf.city_now,mf.area_now")->where("m.id={$this->uid}")->find();
     //相关的判断参数
     $borrow['borrow_type'] = $this->_post('borrow_type');
     if ($borrow['borrow_type'] == 0) {
         $this->error("校验数据有误,请重新发布");
     }
     if (floatval($_POST['borrow_interest_rate']) > $rate_lixt[1] || floatval($_POST['borrow_interest_rate']) < $rate_lixt[0]) {
         $this->error("提交的借款利率超出允许范围,请重试", 0);
     }
     $borrow['borrow_money'] = intval($_POST['borrow_money']);
     $_minfo = getMinfo($this->uid, "m.pin_pass,mm.account_money,mm.back_money,mm.credit_cuse,mm.money_collect");
     $_capitalinfo = getMemberBorrowScan($this->uid);
     ///////////////////////////////////////////////////////
     $borrowNum = M('borrow_info')->field("borrow_type,count(id) as num,sum(borrow_money) as money,sum(repayment_money) as repayment_money")->where("borrow_uid = {$this->uid} AND borrow_status=6 ")->group("borrow_type")->select();
     $borrowDe = array();
     foreach ($borrowNum as $k => $v) {
         $borrowDe[$v['borrow_type']] = $v['money'] - $v['repayment_money'];
     }
     ///////////////////////////////////////////////////
     switch ($borrow['borrow_type']) {
         case 1:
             //普通标
             //if($_minfo['credit_cuse']<$borrow['borrow_money']) $this->error("您的可用信用额度为{$_minfo['credit_cuse']}元,小于您准备借款的金额,不能发标");
             break;
         case 2:
             //新担保标
         //新担保标
         case 3:
             //秒还标
             break;
         case 4:
             //净值标
             //$_netMoney = getFloatValue(0.9*$_minfo['money_collect']-$borrowDe[4],2);
             //if($_netMoney<$borrow['borrow_money']) $this->error("您的净值额度{$_netMoney}元,小于您准备借款的金额,不能发标");
             break;
         case 5:
             //抵押标
             //$borrow_type=5;
             break;
     }
     $borrow['borrow_uid'] = $this->_post("borrow_uid");
     $borrow['borrow_name'] = text($_POST['borrow_name']);
     $borrow['borrow_duration'] = $borrow['borrow_type'] == 3 ? 1 : intval($_POST['borrow_duration']);
     //秒标固定为一月
     $borrow['borrow_interest_rate'] = floatval($_POST['borrow_interest_rate']);
     if (strtolower($_POST['is_day']) == 'yes') {
         $borrow['repayment_type'] = 1;
     } elseif ($borrow['borrow_type'] == 3) {
         $borrow['repayment_type'] = 2;
     } else {
         $borrow['repayment_type'] = intval($_POST['repayment_type']);
     }
     if ($borrow['repayment_type'] == '1' || $borrow['repayment_type'] == '5') {
         $borrow['total'] = 1;
     } else {
         $borrow['total'] = $borrow['borrow_duration'];
         //分几期还款
     }
     $borrow['capital_name'] = $capital_name;
     $borrow['capital_card'] = $capital_card;
     $borrow['borrow_status'] = 0;
     $borrow['borrow_use'] = intval($_POST['borrow_use']);
     $borrow['add_time'] = time();
     $borrow['collect_day'] = intval($_POST['borrow_time']);
     $borrow['add_ip'] = get_client_ip();
     $borrow['borrow_info'] = text($_POST['borrow_info']);
     $borrow['reward_type'] = intval($_POST['reward_type']);
//.........这里部分代码省略.........
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:101,代码来源:BorrowAction.class.php


示例14: detail


//.........这里部分代码省略.........
         $invsx = 'login';
     }
     $this->assign("invid", $invsx);
     //合同ID
     //borrowinfo
     $borrowinfo = M("borrow_info")->field(true)->find($id);
     if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) {
         $this->error("数据有误");
     }
     $borrowinfo['biao'] = $borrowinfo['borrow_times'];
     $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow'];
     $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
     $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2);
     $borrowinfo['vouch_progress'] = getFloatValue($borrowinfo['has_vouch'] / $borrowinfo['borrow_money'] * 100, 2);
     $borrowinfo['vouch_need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_vouch'];
     $this->assign("vo", $borrowinfo);
     //borrowinfo
     //此标借款利息还款相关情况
     if ($borrowinfo['repayment_type'] == 2) {
         $money = 100;
         $rate = $borrowinfo['borrow_interest_rate'];
         $month = $borrowinfo['borrow_duration'];
         $monthData['money'] = $money;
         $monthData['year_apr'] = $rate;
         $monthData['duration'] = $month;
         $monthData['type'] = "all";
         $repay_detail = EqualMonth($monthData);
         $this->assign('repay_detail', $repay_detail);
     } elseif ($borrowinfo['repayment_type'] == 3) {
         $money = 100;
         $rate = $borrowinfo['borrow_interest_rate'];
         $month = $borrowinfo['borrow_duration'];
         $monthData['account'] = $money;
         $monthData['year_apr'] = $rate;
         $monthData['month_times'] = $month;
         $monthData['type'] = "all";
         $repay_detail = EqualSeason($monthData);
         $this->assign('repay_detail', $repay_detail);
     } elseif ($borrowinfo['repayment_type'] == 4) {
         $money = 100;
         $rate = $borrowinfo['borrow_interest_rate'];
         $month = $borrowinfo['borrow_duration'];
         $parm['month_times'] = $month;
         $parm['account'] = $money;
         $parm['year_apr'] = $rate;
         $parm['type'] = "all";
         $repay_detail = EqualEndMonth($parm);
         $repay_detail['repayment_money'] = $repay_detail['repayment_account'];
         $this->assign("repay_detail", $repay_detail);
     } elseif ($borrowinfo['repayment_type'] == 1) {
         $repay_detail['repayment_money'] = getFloatValue(100 + 100 * $borrowinfo['borrow_interest_rate'] * $borrowinfo['borrow_duration'] / 100, 2);
         $this->assign('repay_detail', $repay_detail);
     }
     //此标借款利息还款相关情况
     //memberinfo
     $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $this->assign("minfo", $memberinfo);
     //memberinfo
     //vouch_list
     $vouch_list = M("borrow_vouch")->field(true)->where("borrow_id={$id}")->select();
     $this->assign("vouch_list", $vouch_list);
     $this->assign("Vstatus", array(0 => '担保中', 1 => "担保完成"));
     //vouch_list
     //data_list
     $data_list = M("member_data_info")->field('type,add_time,count(status) as num,sum(deal_credits) as credits')->where("uid={$borrowinfo['borrow_uid']} AND status=1")->group('type')->select();
     $this->assign("data_list", $data_list);
     //data_list
     //paying_list
     $paying_list = getMemberBorrow($borrowinfo['borrow_uid']);
     $this->assign("paying_list", $paying_list);
     //paying_list
     //近期还款的投标
     //$time1 = microtime(true)*1000;
     $history = getDurationCount($borrowinfo['borrow_uid']);
     $this->assign("history", $history);
     //$time2 = microtime(true)*1000;
     //echo $time2-$time1;
     //investinfo
     $fieldx = "bi.investor_capital,bi.add_time,m.user_name,bi.is_auto";
     $investinfo = M("borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select();
     $this->assign("investinfo", $investinfo);
     //investinfo
     //帐户资金情况
     $this->assign("mainfo", getMinfo($borrowinfo['borrow_uid'], true));
     $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     //帐户资金情况
     //评论
     $cmap['tid'] = $id;
     $cmap['is_audit'] = 1;
     //审核通过的评论
     $clist = getCommentList($cmap, 5);
     $this->assign("Bconfig", $Bconfig);
     $this->assign("commentlist", $clist['list']);
     $this->assign("commentpagebar", $clist['page']);
     $this->assign("commentcount", $clist['count']);
     $this->display();
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:101,代码来源:InvestAction.class.php


示例15: index

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getMemberInfo函数代码示例发布时间:2022-05-15
下一篇:
PHP getMemberAvatarForID函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap