コード例 #1
0
 public function zjxx2()
 {
     $jsoncode = file_get_contents("php://input");
     //alogsm("zjxx",0,1,session("u_id").$jsoncode);
     $minfo = getMinfo($this->uid, true);
     $this->assign("minfo", $minfo);
     $this->assign("unread", $read = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'));
     $minfo = getMinfo($this->uid, true);
     $this->assign("minfo", $minfo);
     $this->assign("MinfoDone", getMemberInfoDone($this->uid));
     $this->assign("mstatus", M('members_status')->field(true)->find($this->uid));
     $this->assign("capitalinfo", getMemberBorrowScan($this->uid));
     $this->assign("memberinfo", M('members')->find($this->uid));
     $this->assign("memberdetail", M('member_info')->find($this->uid));
     $_SX = M('investor_detail')->field('deadline,interest,capital')->where("investor_uid = {$this->uid} AND status=7")->order("deadline ASC")->find();
     $toubiaojl = M('borrow_investor')->where("borrow_uid={$this->uid}")->sum('reward_money');
     //支付投标奖励
     $this->assign("toubiaojl", $toubiaojl);
     //支付投标奖励
     //////////////////////////////////
     $moneylog = M("member_moneylog")->field("type,sum(affect_money) as money")->where("uid={$this->uid}")->group("type")->select();
     $row1 = array();
     foreach ($moneylog as $vs) {
         $row1[$vs['type']]['money'] = $vs['money'] > 0 ? $vs['money'] : $vs['money'] * -1;
     }
     $map = array();
     $map['withdraw_status'] = 2;
     $tx = M('member_withdraw')->field("uid,sum(withdraw_money) as withdraw_money,sum(withdraw_fee) as withdraw_fee")->where("uid={$this->uid} and withdraw_status=2")->group("uid")->select();
     foreach ($tx as $vt) {
         $row1['tx']['withdraw_money'] = $vt['withdraw_money'];
         //成功提现金额
         $row1['tx']['withdraw_fee'] = $vt['withdraw_fee'];
         //提现手续费
     }
     $this->assign("list", $row1);
     $this->assign("bank", M('member_banks')->field('bank_num')->find($this->uid));
     $czfee = M('member_payonline')->where("uid={$uid} AND status=1")->sum('fee');
     //在线充值手续费总金额
     $capitalinfo = getMemberBorrowScan($this->uid);
     $intotal = $capitalinfo['tj']['earnInterest'] + $row1['20']['money'] + $row1['34']['money'] + $row1['13']['money'] + $row1['32']['money'];
     //收入总和
     //$outtotal = $capitalinfo['tj']['payInterest']+$toubiaojl+$row1['tx']['withdraw_money']+$row1['14']['money']+$row1['22']['money']+$row1['25']['money']+$row1['26']['money']+$row1['18']['money']+$row1['30']['money']+$row1['31']['money']-$czfee;//支出总和
     $outtotal = $capitalinfo['tj']['payInterest'] + $toubiaojl + $row1['tx']['withdraw_fee'] + $row1['14']['money'] + $row1['22']['money'] + $row1['25']['money'] + $row1['26']['money'] + $row1['18']['money'] + $row1['30']['money'] + $row1['31']['money'] + $czfee;
     //支出总和
     $dsbx = $capitalinfo['tj']['dsze'] + $capitalinfo['tj']['willgetInterest'];
     //待收本息
     $this->assign("dsbx", $dsbx);
     $this->assign("intotal", $intotal);
     $this->assign("outtotal", $outtotal);
     /////////////////////////////////
     $lastInvest['gettime'] = $_SX['deadline'];
     $lastInvest['interest'] = $_SX['interest'];
     $lastInvest['capital'] = $_SX['capital'];
     $this->assign("lastInvest", $lastInvest);
     $_SX = "";
     $_SX = M('investor_detail')->field('deadline,sum(interest) as interest,sum(capital) as capital')->where("borrow_uid = {$this->uid} AND status=7")->group("borrow_id,sort_order")->order("deadline ASC")->find();
     $lastBorrow['gettime'] = $_SX['deadline'];
     $lastBorrow['interest'] = $_SX['interest'];
     $lastBorrow['capital'] = $_SX['capital'];
     $this->assign("lastBorrow", $lastBorrow);
     //新加开始
     $_list['zichanzonge'] = $minfo['account_money'] + $minfo['back_money'] + $minfo['money_collect'] + $minfo['money_freeze'];
     $_list['keyongyue'] = $minfo['account_money'] + $minfo['back_money'];
     $_list['money_freeze'] = $minfo['money_freeze'] != null ? $minfo['money_freeze'] : "0.00";
     $_list['dsbx'] = $dsbx;
     $_list['willgetInterest'] = $capitalinfo['tj']['willgetInterest'];
     $_list['withdraw_money'] = $list['tx']['withdraw_money'] != null ? $list['tx']['withdraw_money'] : "0.00";
     $_list['chongzhizonge'] = $list['27']['money'] + $list['3']['money'];
     $_list['zuijindaihuanjine'] = getFloatvalue($lastBorrow['interest'] + $lastBorrow['capital'], 2);
     if ($lastBorrow['gettime'] > 0) {
         $_list['zuijindaihuantime'] = date("Y-m-d", $lastBorrow['gettime']);
     } else {
         $_list['zuijindaihuantime'] = "无待还";
     }
     $_list['zuijindaishoujine'] = getFloatvalue($lastInvest['capital'] + $lastInvest['interest'], 2);
     if ($lastInvest['gettime'] > 0) {
         $_list['zuijindaishoutime'] = date("Y-m-d", $lastInvest['gettime']);
     } else {
         $_list['zuijindaishoutime'] = "无待还";
     }
     echo ajaxmsg($_list);
     //$this->display();
 }
コード例 #2
0
 public function index()
 {
     $row['borrow_1'] = M('borrow_info')->where('borrow_status=0')->count('id');
     //初审
     $row['borrow_2'] = M('borrow_info')->where('borrow_status=4')->count('id');
     //复审
     $row['limit_a'] = M('member_apply')->where('apply_status=0')->count('id');
     //额度
     $row['data_up'] = M('member_data_info')->where('status=0')->count('id');
     //上传资料
     $row['vip_a'] = M('vip_apply')->where('status=0')->count('id');
     //VIP审核
     $row['video_a'] = M('video_apply')->where('apply_status=0')->count('id');
     //视频认证
     $row['face_a'] = M('face_apply')->where('apply_status=0')->count('id');
     //现场认证
     $row['real_a'] = M('members_status')->where('id_status=3')->count('uid');
     //现场认证
     $row['withdraw'] = M('member_withdraw')->where('withdraw_status=0')->count('id');
     //待审核提现
     $row['payonline'] = M('member_payonline')->where("way = 'off' and status = 0")->count('id');
     //待审核ATM转账
     $row['alipay'] = M('member_alipay')->where("status = 1")->count('id');
     //待审核支付宝充值
     //天天盈审核统计
     $row['daystock'] = M('shares_apply')->where("type_id = 1 and status = 1")->count('id');
     //配资初审待审核
     $row['additional'] = M("shares_additional s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 1")->count('s.id');
     //追加待审核
     $row['reduce'] = M("shares_additional d")->field("d.*,l.principal as aprincipal,l.shares_money as ashares_money")->join("lzh_shares_apply l ON l.id = d.shares_id")->where("d.status = 1 and d.type_id = 1 and d.is_additional = 2 and l.status <> 3")->count('d.id');
     //减少待审核
     $row['extraction'] = M("shares_apply")->where("type_id = 1 and status = 6")->count('id');
     //提取盈利审核
     $row['supply'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 1")->count('s.id');
     //资金补充待审核
     $row['opens'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("type_id = 1 and status in(2,6) and is_want_open =  1")->count('s.id');
     //停止操盘审核
     //月月盈审核统计
     $row['mstock'] = M('shares_apply')->where("type_id = 2 and status = 1")->count('id');
     //配资初审待审核
     $row['madditional'] = M("shares_additional s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 2")->count('s.id');
     //追加待审核
     $row['mextraction'] = M("shares_apply")->where("type_id = 2 and status = 6")->count('id');
     //提取盈利审核
     $row['msupply'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 2")->count('s.id');
     //资金补充待审核
     $row['mopens'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("type_id = 2 and status in(2,6) and is_want_open =  1")->count('s.id');
     //停止操盘审核
     //我是操盘手
     $row['istock'] = M('shares_apply')->where("type_id = 3 and status = 1")->count('id');
     //配资初审待审核
     $row['iadditional'] = M("shares_additional s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 3")->count('s.id');
     //追加待审核
     $row['ireduce'] = M("shares_additional d")->field("d.*,l.principal as aprincipal,l.shares_money as ashares_money")->join("lzh_shares_apply l ON l.id = d.shares_id")->where("d.status = 1 and d.type_id = 3 and d.is_additional = 2 and l.status <> 3")->count('d.id');
     //减少待审核
     $row['isupply'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("s.status = 1 and l.status <> 3 and s.type_id = 3")->count('s.id');
     //资金补充待审核
     $row['iopens'] = M("shares_supply s")->join("lzh_shares_apply l ON l.id = s.shares_id")->where("type_id = 3 and status in(2,6) and is_want_open =  1")->count('s.id');
     //停止操盘审核
     //免费体验
     $row['fstock'] = M('shares_apply')->where("type_id = 4 and status = 1")->count('id');
     //配资初审待审核
     $this->assign("row", $row);
     /////////////////////////////////////////////////////////////
     $sql_chart_1 = "select count(x.t) as e  from (select count(*) as t from lzh_borrow_info group by borrow_uid) as x";
     $chart1_borrow = M()->query($sql_chart_1);
     $memberCount = M("members")->count("*");
     $sql_chart_3 = "select count(x.t) as e  from (select count(*) as t from lzh_borrow_investor group by investor_uid) as x";
     $chart1_invest = M()->query($sql_chart_3);
     $chart_1_total = intval($memberCount) + intval($chart1_invest[0]['e']) + intval($chart1_borrow[0]['e']);
     $chart_1 = array("register" => intval($memberCount), "invest" => intval($chart1_invest[0]['e']), "borrow" => intval($chart1_borrow[0]['e']), "register_rate" => getfloatvalue(intval($memberCount) / $chart_1_total * 100, 2), "invest_rate" => getfloatvalue(intval($chart1_invest[0]['e']) / $chart_1_total * 100, 2));
     $this->assign("chart_one", $chart_1);
     $start = strtotime(date("Y-m-01", time()) . " 00:00:00");
     $end = strtotime(date("Y-m-t", time()) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month = array();
     $moneyMonth = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month['money_repayment'] = getFloatvalue($moneyMonth_r / 10000, 2);
     $month['money_normal'] = getFloatvalue($moneyMonth / 10000, 2);
     $month['money_transfer'] = getFloatvalue($moneyMonth_t / 10000, 2);
     $month['month'] = date("Y-m", $end);
     $start = strtotime("-1 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-1 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month1 = array();
     $moneyMonth1 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth1_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth1_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month1['money_repayment'] = getFloatvalue($moneyMonth1_r / 10000, 2);
     $month1['money_normal'] = getFloatvalue($moneyMonth1 / 10000, 2);
     $month1['money_transfer'] = getFloatvalue($moneyMonth1_t / 10000, 2);
     $month1['month'] = date("Y-m", $end);
     $start = strtotime("-2 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-2 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month2 = array();
     $moneyMonth2 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth2_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth2_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month2['money_repayment'] = getfloatvalue($moneyMonth2_r / 10000, 2);
     $month2['money_normal'] = getfloatvalue($moneyMonth2 / 10000, 2);
     $month2['money_transfer'] = getfloatvalue($moneyMonth2_t / 10000, 2);
     $month2['month'] = date("Y-m", $end);
     $start = strtotime("-3 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-3 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month3 = array();
     $moneyMonth3 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth3_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth3_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month3['money_repayment'] = getFloatvalue($moneyMonth3_r / 10000, 2);
     $month3['money_normal'] = getFloatvalue($moneyMonth3 / 10000, 2);
     $month3['money_transfer'] = getFloatvalue($moneyMonth3_t / 10000, 2);
     $month3['month'] = date("Y-m", $end);
     $start = strtotime("-4 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-4 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month4 = array();
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth4_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month4['money_repayment'] = getfloatvalue($moneyMonth4_r / 10000, 2);
     $moneyMonth4 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth4_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $month4['money_normal'] = getfloatvalue($moneyMonth4 / 10000, 2);
     $month4['money_transfer'] = getfloatvalue($moneyMonth4_t / 10000, 2);
     $month4['month'] = date("Y-m", $end);
     $start = strtotime("-5 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-5 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month5 = array();
     $moneyMonth5 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth5_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth5_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month5['money_repayment'] = getFloatvalue($moneyMonth5_r / 10000, 2);
     $month5['money_normal'] = getFloatvalue($moneyMonth5 / 10000, 2);
     $month5['money_transfer'] = getFloatvalue($moneyMonth5_t / 10000, 2);
     $month5['month'] = date("Y-m", $end);
     $start = strtotime("-6 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-6 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month6 = array();
     $moneyMonth6 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth6_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth6_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month6['money_repayment'] = getFloatvalue($moneyMonth6_r / 10000, 2);
     $month6['money_normal'] = getFloatvalue($moneyMonth6 / 10000, 2);
     $month6['money_transfer'] = getFloatvalue($moneyMonth6_t / 10000, 2);
     $month6['month'] = date("Y-m", $end);
     $this->assign("month6", $month6);
     $this->assign("month5", $month5);
     $this->assign("month4", $month4);
     $this->assign("month3", $month3);
     $this->assign("month2", $month2);
     $this->assign("month1", $month1);
     $this->assign("month", $month);
     //dump($month2);exit;
     ////////////////////////////////////////////////////////////
     /*
     	股票配资统计 @Dong
     */
     //当天共配资统计
     $time = time();
     $day = date("Y-m-d 23:59:59", $time);
     $totimeday = strtotime($day);
     $qday = date("Y-m-d 00:00:00", strtotime("{$day} -1 day"));
     $totimeqday = strtotime($qday);
     $dayarr = M('shares_apply')->where("add_time > {$totimeday} and add_time < {$totimeqday} and type_id = 1")->select();
     $daycount = count($dayarr);
     //天天盈当天配资统计
     $marr = M('shares_apply')->where("add_time > {$totimeday} and add_time < {$totimeqday} and type_id = 2")->select();
     $mcount = count($marr);
     //月月盈当天配资统计
     $carr = M('shares_apply')->where("add_time > {$totimeday} and add_time < {$totimeqday} and type_id = 3")->select();
     $ccount = count($carr);
     //我是操盘手当天配资统计
     $count = M('shares_apply')->where("add_time > {$totimeday} and add_time < {$totimeqday}")->select();
     $count = count($count);
     //当天总配资统计
     //当月配资统计
     $oneday = date("Y-m-01 00:00:00", time());
     $totime_oneday = strtotime($oneday);
     $endday = date("Y-m-d 23:59:59", strtotime("{$oneday} +1 month -1 day"));
     $totime_endday = strtotime($endday);
     $mdayarr = M('shares_apply')->where("add_time > {$totime_oneday} and add_time < {$totime_endday} and type_id = 1")->select();
     $mdaycount = count($mdayarr);
     //天天盈当月配资统计
     $mmarr = M('shares_apply')->where("add_time > {$totime_oneday} and add_time < {$totime_endday} and type_id = 2")->select();
     $mmcount = count($mmarr);
     //月月盈当月配资统计
     $mcarr = M('shares_apply')->where("add_time > {$totime_oneday} and add_time < {$totime_endday} and type_id = 3")->select();
     $mccount = count($mcarr);
     //我是操盘手当月配资统计
     $mcount_sum = M('shares_apply')->where("add_time > {$totime_oneday} and add_time < {$totime_endday}")->select();
     $mcount_sum = count($mcount_sum);
     //当月总配资统计
     $this->assign("mdaycount", $mdaycount);
     //天天盈当月配资统计渲染
     $this->assign("mmcount", $mmcount);
     //月月盈当月配资统计渲染
     $this->assign("mccount", $mccount);
     //我是操盘手当月配资统计渲染
     $this->assign("mcount_sum", $mcount_sum);
     //当月总配资统计渲染
     $this->assign("daycount", $daycount);
     //天天盈当天配资统计渲染
     $this->assign("mcount", $mcount);
     //月月盈当天配资统计渲染
     $this->assign("ccount", $ccount);
     //我是操盘手当天配资统计渲染
     $this->assign("count", $count);
     //当天总配资统计渲染
     $this->getServiceInfo();
     $this->getAdminInfo();
     $this->display();
 }
コード例 #3
0
      </div>
      <div class="us_rb2_lower">
       <p>可用余额<font class="xtitle" title="可以直接使用的金额">[?]</font>:<span><?php echo (fmoney($minfo["account_money"])); ?></span></p>
       <p>冻结总额<font class="xtitle" title="冻结总额是您当前暂时不能使用的金额,冻结总额包括投标冻结、提现冻结">[?]</font>:<span><?php echo (fmoney($minfo["money_freeze"])); ?></span></p>
       <p>已赚利息:<span><?php echo (fmoney($capitalinfo["tj"]["earnInterest"])); ?></span></p>
       <p>投资总额:<span><?php echo (fmoney($capitalinfo["tj"]["jcze"])); ?></span></p>
       <p>已收总额:<span><?php echo (fmoney($capitalinfo["tj"]["ysze"])); ?></span></p>
       <p>待收总额<font class="xtitle" title="是您借款给别人但还没收回的本息总额,待收总额=待收本金总额+待收利息">[?]</font>:<span><?php echo (fmoney($minfo["money_collect"])); ?></span></p>
       <p>待收利息:<span><?php echo (fmoney($capitalinfo["tj"]["willgetInterest"])); ?></span></p>
       <p>投标奖励:<span><?php echo (fmoney($toubiaojl)); ?></span></p>
       <p>推广奖励:<span><?php echo (fmoney($tuiguangjl)); ?></span></p>
       <p>最近待收金额:<span><?php echo Fmoney(getFloatvalue($lastInvest['capital']+$lastInvest['interest'],2));?></span></p>
       <p>最近待收时间:<?php echo (mydate("Y-m-d",$lastInvest["gettime"],'<span>无待收</span>')); ?><a href="__APP__/member/tendout#fragment-3">[明细]</a></p>
       <p>已还总额:<span><?php echo (fmoney($capitalinfo["tj"]["yhze"])); ?></span></p>
       <p>待还总额:<span><?php echo (fmoney($capitalinfo["tj"]["dhze"])); ?></span></p>
       <p>最近待还金额:<span><?php echo Fmoney(getFloatvalue($lastBorrow['borrow_money']+$lastBorrow['borrow_interest'],2));?></span></p>
       <p>最近待还时间:<?php echo (mydate("Y-m-d",$lastBorrow["gettime"],'<span>无待收</span>')); ?><a href="__APP__/member/borrowin#fragment-3">[明细]</a></p>
       <p>借款信用额度:<span><?php echo (fmoney($minfo["credit_limit"])); ?></span></p>
       <p>可用信用额度:<span><?php echo (fmoney($minfo["credit_cuse"])); ?></span></p>
       <p>借款担保总额:<span><?php echo (fmoney($minfo["borrow_vouch_limit"])); ?></span></p>
       <p>可用借款担保额度:<span><?php echo (fmoney($minfo["borrow_vouch_cuse"])); ?></span></p>
       <p>投资担保总额:<span><?php echo (fmoney($minfo["invest_vouch_limit"])); ?></span></p>
       <p>可用投资担保额度:<span><?php echo (fmoney($minfo["invest_vouch_cuse"])); ?></span></p>
      </div>
     </div>
     
    <!-- Right // -->
   </div>
  </div>
<script type="text/javascript">
<!--
コード例 #4
0
 public function index()
 {
     $row['borrow_1'] = M('borrow_info')->where('borrow_status=0')->count('id');
     //初审
     $row['borrow_2'] = M('borrow_info')->where('borrow_status=4')->count('id');
     //复审
     $row['limit_a'] = M('member_apply')->where('apply_status=0')->count('id');
     //额度
     $row['data_up'] = M('member_data_info')->where('status=0')->count('id');
     //上传资料
     $row['vip_a'] = M('vip_apply')->where('status=0')->count('id');
     //VIP审核
     $row['video_a'] = M('video_apply')->where('apply_status=0')->count('id');
     //视频认证
     $row['face_a'] = M('face_apply')->where('apply_status=0')->count('id');
     //现场认证
     $row['real_a'] = M('members_status')->where('id_status=3')->count('uid');
     //现场认证
     $row['withdraw'] = M('member_withdraw')->where('withdraw_status=0')->count('id');
     //待审核提现
     $this->assign("row", $row);
     /////////////////////////////////////////////////////////////
     $sql_chart_1 = "select count(x.t) as e  from (select count(*) as t from lzh_borrow_info group by borrow_uid) as x";
     $chart1_borrow = M()->query($sql_chart_1);
     $memberCount = M("members")->count("*");
     $sql_chart_3 = "select count(x.t) as e  from (select count(*) as t from lzh_borrow_investor group by investor_uid) as x";
     $chart1_invest = M()->query($sql_chart_3);
     $chart_1_total = intval($memberCount) + intval($chart1_invest[0]['e']) + intval($chart1_borrow[0]['e']);
     $chart_1 = array("register" => intval($memberCount), "invest" => intval($chart1_invest[0]['e']), "borrow" => intval($chart1_borrow[0]['e']), "register_rate" => getfloatvalue(intval($memberCount) / $chart_1_total * 100, 2), "invest_rate" => getfloatvalue(intval($chart1_invest[0]['e']) / $chart_1_total * 100, 2));
     $this->assign("chart_one", $chart_1);
     $start = strtotime(date("Y-m-01", time()) . " 00:00:00");
     $end = strtotime(date("Y-m-t", time()) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month = array();
     $moneyMonth = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month['money_repayment'] = getFloatvalue($moneyMonth_r / 10000, 2);
     $month['money_normal'] = getFloatvalue($moneyMonth / 10000, 2);
     $month['money_transfer'] = getFloatvalue($moneyMonth_t / 10000, 2);
     $month['month'] = date("Y-m", $end);
     $start = strtotime("-1 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-1 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month1 = array();
     $moneyMonth1 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth1_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth1_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month1['money_repayment'] = getFloatvalue($moneyMonth1_r / 10000, 2);
     $month1['money_normal'] = getFloatvalue($moneyMonth1 / 10000, 2);
     $month1['money_transfer'] = getFloatvalue($moneyMonth1_t / 10000, 2);
     $month1['month'] = date("Y-m", $end);
     $start = strtotime("-2 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-2 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month2 = array();
     $moneyMonth2 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth2_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth2_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month2['money_repayment'] = getfloatvalue($moneyMonth2_r / 10000, 2);
     $month2['money_normal'] = getfloatvalue($moneyMonth2 / 10000, 2);
     $month2['money_transfer'] = getfloatvalue($moneyMonth2_t / 10000, 2);
     $month2['month'] = date("Y-m", $end);
     $start = strtotime("-3 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-3 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month3 = array();
     $moneyMonth3 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth3_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth3_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month3['money_repayment'] = getFloatvalue($moneyMonth3_r / 10000, 2);
     $month3['money_normal'] = getFloatvalue($moneyMonth3 / 10000, 2);
     $month3['money_transfer'] = getFloatvalue($moneyMonth3_t / 10000, 2);
     $month3['month'] = date("Y-m", $end);
     $start = strtotime("-4 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-4 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month4 = array();
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth4_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month4['money_repayment'] = getfloatvalue($moneyMonth4_r / 10000, 2);
     $moneyMonth4 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth4_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $month4['money_normal'] = getfloatvalue($moneyMonth4 / 10000, 2);
     $month4['money_transfer'] = getfloatvalue($moneyMonth4_t / 10000, 2);
     $month4['month'] = date("Y-m", $end);
     $start = strtotime("-5 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-5 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month5 = array();
     $moneyMonth5 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth5_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth5_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month5['money_repayment'] = getFloatvalue($moneyMonth5_r / 10000, 2);
     $month5['money_normal'] = getFloatvalue($moneyMonth5 / 10000, 2);
     $month5['money_transfer'] = getFloatvalue($moneyMonth5_t / 10000, 2);
     $month5['month'] = date("Y-m", $end);
     $start = strtotime("-6 months", strtotime(date("Y-m-01", time()) . " 00:00:00"));
     $end = strtotime(date("Y-m-t", strtotime("-6 months", time())) . " 23:59:59");
     $mapChart2 = array();
     $mapChart2['full_time'] = array("between", "{$start},{$end}");
     $mapChart2['borrow_status'] = array("in", "6,7,8,9");
     $mapTChart2 = array();
     $mapTChart2['add_time'] = array("between", "{$start},{$end}");
     $month6 = array();
     $moneyMonth6 = M("borrow_info")->where($mapChart2)->sum("borrow_money");
     $moneyMonth6_t = M("transfer_borrow_info")->where($mapTChart2)->sum("borrow_money");
     $mapRChart2 = array();
     $mapRChart2['repayment_time'] = array("between", "{$start},{$end}");
     $moneyMonth6_r = M("investor_detail")->where($mapRChart2)->sum("receive_capital");
     $month6['money_repayment'] = getFloatvalue($moneyMonth6_r / 10000, 2);
     $month6['money_normal'] = getFloatvalue($moneyMonth6 / 10000, 2);
     $month6['money_transfer'] = getFloatvalue($moneyMonth6_t / 10000, 2);
     $month6['month'] = date("Y-m", $end);
     $this->assign("month6", $month6);
     $this->assign("month5", $month5);
     $this->assign("month4", $month4);
     $this->assign("month3", $month3);
     $this->assign("month2", $month2);
     $this->assign("month1", $month1);
     $this->assign("month", $month);
     //dump($month2);exit;
     ////////////////////////////////////////////////////////////
     $this->getServiceInfo();
     $this->getAdminInfo();
     $this->display();
 }
コード例 #5
0
 <div class="lb1_h"><h4><span>信用</span>借款</h4><p>信用标说明:信用标是一种以信任额度为借款依据的标的类型</p></div>
 <div class="lb1">
  <div class="lb1_upper"><p>申请条件:<span>1.注册用户</span><span>2.通过实名认证</span><span>3.资料认证</span></p></div>
  <div class="lb1_lower">
   <div class="lb1_ll">
    <table width="358" border="0" cellspacing="0" cellpadding="0">
     <tr>
      <th>可使用额度</th>
      <th>总额度</th>
      <th>已使用额度</th>
      <th>额度状态</th>
     </tr>
     <tr>
      <td><?php echo (fmoney($minfo["credit_limit"])); ?></td>
      <td><?php echo (fmoney($minfo["credit_cuse"])); ?></td>
      <td><?php echo Fmoney(getFloatvalue($minfo['credit_limit']-$minfo['credit_cuse'],2));?></td>
      <td>正常</td>
     </tr>
    </table>
   </div>
   <div class="lb1_lr"><input type="button" class="bor_but" value="立即借入" onclick="javascript:window.location.href='__APP__/borrow/post/normal.html'" /><p>已有<span><?php echo (($allStat[1])?($allStat[1]):0); ?></span>个该类型借款</p></div>
  </div>
 </div>
 
 <div class="lb2_h"><h4><span>担保</span>借款</h4><p>担保标说明:担保标是一种以担保额度为借款依据的标的类型</p></div>
 <div class="lb2">
  <div class="lb2_upper"><p>申请条件:<span>1.注册用户</span><span>2.通过实名认证</span><span>3.资料认证</span></p></div>
  <div class="lb2_lower">
   <div class="lb2_ll">
    <table width="358" border="0" cellspacing="0" cellpadding="0">
     <tr>