コード例 #1
0
ファイル: BorrowAction.class.php プロジェクト: GStepOne/CI
 public function index()
 {
     $per = C('DB_PREFIX');
     if ($this->uid) {
         $this->assign("mstatus", M('members_status')->field(true)->find($this->uid));
         $this->assign("mdata", getMemberInfoDone($this->uid));
         $this->assign("minfo", getMinfo($this->uid, true));
         $this->assign("capitalinfo", getMemberBorrowScan($this->uid));
     }
     $this->assign("pagebar", $donate_list['page']);
     $this->display();
 }
コード例 #2
0
 public function index()
 {
     $per = C('DB_PREFIX');
     if ($this->uid) {
         $this->assign("mstatus", M('members_status')->field(true)->find($this->uid));
         $this->assign("mdata", getMemberInfoDone($this->uid));
         $minfo = getMinfo($this->uid, true);
         $this->assign("minfo", $minfo);
         $this->assign("netMoney", getNet($this->uid));
         //可用净值额度
         $_allnetMoney = getFloatValue(0.9 * $minfo['money_collect'], 2);
         $this->assign("allnetMoney", $_allnetMoney);
         //总净值额度
         $this->assign("capitalinfo", getMemberBorrowScan($this->uid));
     }
     $this->assign("pagebar", $donate_list['page']);
     $this->display();
 }
コード例 #3
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();
 }
コード例 #4
0
 public function post()
 {
     if (!$this->uid) {
         $this->error("请先登陆", __APP__ . "/member/common/login");
     }
     $MinfoDone = getMemberInfoDone($this->uid);
     //if($MinfoDone['mi']=='未填写'||$MinfoDone['mci']=='未填写'||$MinfoDone['mdpi']=='未填写'||$MinfoDone['mfi']=='未填写'||$MinfoDone['mhi']!='未填写'||$MinfoDone['mei']=='未填写'){
     //$this->error("个人资料:".$MinfoDone['mi']."<br/>联系方式:".$MinfoDone['mci']."<br/>单位资料:".$MinfoDone['mdpi']."<br/>财务状况:".$MinfoDone['mfi']."<br/>房产信息:".$MinfoDone['mhi']."<br/>联保情况:".$MinfoDone['mei']."<br/>请先补全个人资料然后再发标",__APP__."/member/memberinfo");
     //$this->assgin('waitSecond',80000);
     //}
     $_xoc = M('borrow_info')->where("borrow_uid={$this->uid} AND borrow_status in(0,2,4)")->count('id');
     if ($_xoc > 0) {
         $this->error("您有一个借款中的标,请等待审核", __APP__ . "/member/borrowin#fragment-1");
     }
     $vminfo = M('members')->field("user_leve,time_limit")->find($this->uid);
     if (!($vminfo['user_leve'] > 0 && $vminfo['time_limit'] > time())) {
         $this->error("请先通过VIP审核再发标", __APP__ . "/member/vip");
     }
     $gtype = text($_GET['type']);
     $vkey = md5(time() . $gtype);
     switch ($gtype) {
         case "normal":
             //普通标
             $borrow_type = 1;
             break;
         case "vouch":
             //担保标
             $borrow_type = 2;
             break;
         case "second":
             //秒还标
             $this->assign("miao", 'yes');
             $borrow_type = 3;
             break;
         case "net":
             //净值标
             $borrow_type = 4;
             break;
         case "mortgage":
             //抵押标
             $borrow_type = 5;
             break;
         case "student":
             //助学贷标
             $borrow_type = 6;
             break;
     }
     cookie($vkey, $borrow_type, 3600);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $day = range($borrow_duration_day[0], $borrow_duration_day[1]);
     $day_time = array();
     foreach ($day as $v) {
         $day_time[$v] = $v . "天";
     }
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $month = range($borrow_duration[0], $borrow_duration[1]);
     $month_time = array();
     foreach ($month as $v) {
         $month_time[$v] = $v . "个月";
     }
     $borrow_config = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $this->assign("borrow_use", $borrow_config['BORROW_USE']);
     $this->assign("borrow_min", $borrow_config['BORROW_MIN']);
     $this->assign("borrow_max", $borrow_config['BORROW_MAX']);
     $this->assign("borrow_time", $borrow_config['BORROW_TIME']);
     $this->assign("BORROW_TYPE", $borrow_config['BORROW_TYPE']);
     $this->assign("borrow_type", $borrow_type);
     $this->assign("borrow_day_time", $day_time);
     $this->assign("borrow_month_time", $month_time);
     $this->assign("repayment_type", $borrow_config['REPAYMENT_TYPE']);
     $this->assign("vkey", $vkey);
     $this->display();
 }
コード例 #5
0
ファイル: IndexAction.class.php プロジェクト: hutao1004/yintt
 public function index()
 {
     $ucLoing = de_xie($_COOKIE['LoginCookie']);
     setcookie('LoginCookie', '', time() - 10 * 60, "/");
     $this->assign("uclogin", $ucLoing);
     $this->assign("unread", $read = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'));
     $vipIdenty = M("vip_apply");
     $this->assign("MinfoDone", getMemberInfoDone($this->uid));
     $mstatus = M('members_status')->field(true)->find($this->uid);
     $memberinfo = M('members')->find($this->uid);
     $rate = 0;
     if ($mstatus["id_status"] == 1) {
         ++$rate;
     }
     if ($mstatus["phone_status"] == 1) {
         ++$rate;
     }
     if ($mstatus["email_status"] == 1) {
         ++$rate;
     }
     if ($mstatus["video_status"] == 1) {
         ++$rate;
     }
     if ($mstatus["face_status"] == 1) {
         ++$rate;
     }
     if ($memberinfo["user_leve"] == 1) {
         ++$rate;
     }
     $this->assign("rate", $rate);
     $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("investor_uid={$this->uid}")->sum('reward_money');
     //投标奖励
     $this->assign("toubiaojl", $toubiaojl);
     //投标奖励
     $tuiguangjl = M('member_moneylog')->where("uid={$this->uid} and type=13")->sum('affect_money');
     //推广奖励
     $this->assign("tuiguangjl", $tuiguangjl);
     //推广奖励
     $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);
     $this->assign("kflist", get_admin_name());
     $list = array();
     $pre = C('DB_PREFIX');
     $rule = M('ausers u')->field('u.id,u.qq,u.phone')->join("{$pre}members m ON m.customer_id=u.id")->where("u.is_kf =1 and m.customer_id={$minfo['customer_id']}")->select();
     foreach ($rule as $key => $v) {
         $list[$key]['qq'] = $v['qq'];
         $list[$key]['phone'] = $v['phone'];
     }
     $this->assign("kfs", $list);
     //获取推荐姓名
     $recommend_name = "";
     if (!empty($minfo["recommend_id"]) && $minfo["recommend_id"] > 0) {
         $recommend_user = D("members")->where(array('id' => $minfo["recommend_id"]))->find();
         if (!empty($recommend_user)) {
             $recommend_name = $recommend_user['user_name'];
         }
     }
     $this->assign("recommend_name", $recommend_name);
     //上次登录时间
     $this->assign("login_info", M("member_login")->where("uid={$this->uid}")->order("id desc")->find());
     $this->display();
 }