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

PHP getMinfo函数代码示例

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

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



在下文中一共展示了getMinfo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: fund

 /**
  * 资金信息
  */
 public function fund()
 {
     $this->assign('pcount', get_personal_count($this->uid));
     $this->assign('benefit', get_personal_benefit($this->uid));
     //收入
     $minfo = getMinfo($this->uid, true);
     $this->assign("minfo", $minfo);
     $this->display();
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:12,代码来源:UserController.class.php


示例3: summary

 public function summary($re = false)
 {
     $vlist = getMemberMoneySummary($this->uid);
     $this->assign("vo", $vlist);
     $this->assign('pcount', get_personal_count($this->uid));
     $minfo = getMinfo($this->uid, true);
     $this->assign("minfo", $minfo);
     $this->assign('benefit', get_personal_benefit($this->uid));
     //收入
     $this->assign('out', get_personal_out($this->uid));
     //支出
     ////////////////////////////////////////////////////////////////////
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:15,代码来源:CapitalAction.class.php


示例4: index

 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'));
     $this->assign("mstatus", M('members_status')->field(true)->find($this->uid));
     $minfo = getMinfo($this->uid, true);
     $pin_pass = $minfo['pin_pass'];
     $has_pin = empty($pin_pass) ? "no" : "yes";
     $this->assign("has_pin", $has_pin);
     $this->assign("memberinfo", M('members')->find($this->uid));
     $this->assign("memberdetail", M('member_info')->find($this->uid));
     $this->assign("minfo", $minfo);
     $this->assign('benefit', get_personal_benefit($this->uid));
     $this->assign('out', get_personal_out($this->uid));
     $this->assign("bank", M('member_banks')->field('bank_num')->find($this->uid));
     $info = getMemberDetail($this->uid);
     $this->assign("info", $info);
     $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=0")->select();
     //m.customer_id={$minfo['customer_id']}
     foreach ($rule as $key => $v) {
         $list[$key]['qq'] = $v['qq'];
         $list[$key]['phone'] = $v['phone'];
     }
     $this->assign("kfs", $list);
     $_SX = M('investor_detail')->field('deadline,interest,capital')->where("investor_uid = {$this->uid} AND status=7")->order("deadline ASC")->find();
     $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);
     $map = array();
     $map['uid'] = $this->uid;
     $Log_list = getMoneyLog($map, 4);
     $this->assign("Log_list", $Log_list['list']);
     $this->assign("list", get_personal_count($this->uid));
     $this->assign("uid", $map['uid']);
     $this->display();
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:48,代码来源:IndexController.class.php


示例5: login

 public function login()
 {
     $returnData = array('login' => false, 'verify' => false, 'collection' => 0, 'lend' => 0);
     $isphone = false;
     if ($this->isMobile($_GET['username'])) {
         $isphone = true;
         $data['user_phone'] = text($_GET['username']);
         $data['user_pass'] = md5($_GET['password']);
     } else {
         $data['user_name'] = text($_GET['username']);
         $data['user_pass'] = md5($_GET['password']);
     }
     $vo = M('members')->field('id,user_name,user_email,user_pass,is_ban')->where($data)->find();
     if (empty($vo) && true === $isphone) {
         unset($data['user_phone']);
         $data['user_name'] = text($_GET['username']);
         $vo = M('members')->field('id,user_name,user_email,user_pass,is_ban')->where($data)->find();
     }
     if (empty($vo)) {
         $returnData['login'] = false;
     } else {
         $returnData['login'] = true;
         $uid = $vo['id'];
         $pre = C('DB_PREFIX');
         $memberstatus = M("members m")->field("m.id,m.user_leve,m.time_limit,m.pin_pass,s.id_status,s.phone_status,s.email_status,s.video_status,s.face_status,m.user_phone")->join("{$pre}members_status s ON s.uid=m.id")->where("m.id={$uid}")->find();
         if (empty($memberstatus['user_phone']) || $memberstatus['id_status'] != 1) {
             $returnData['verify'] = false;
         } else {
             $returnData['verify'] = true;
         }
         $minfo = getMinfo($vo['id'], true);
         $money_collect = $minfo['money_collect'];
         $invest_money = $this->getInvestMoney($vo['id']);
         $invest_money = $invest_money['investmoney'];
         if (empty($money_collect)) {
             $money_collect = "0.00";
         }
         if (empty($invest_money)) {
             $invest_money = "0.00";
         }
         $returnData['collection'] = $money_collect;
         $returnData['lend'] = $invest_money;
     }
     echo json_encode($returnData);
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:45,代码来源:ApiAction.class.php


示例6: login

 public function login()
 {
     $returnData = array();
     $isphone = false;
     if ($this->isMobile($_GET['username'])) {
         $isphone = true;
         $data['user_phone'] = text($_GET['username']);
         $data['user_pass'] = md5($_GET['password']);
     } else {
         $data['user_name'] = text($_GET['username']);
         $data['user_pass'] = md5($_GET['password']);
     }
     $vo = M('members')->field('id,user_name,user_email,user_pass,is_ban')->where($data)->find();
     if (empty($vo) && true === $isphone) {
         unset($data['user_phone']);
         $data['user_name'] = text($_GET['username']);
         $vo = M('members')->field('id,user_name,user_email,user_pass,is_ban')->where($data)->find();
     }
     if (empty($vo)) {
         $returnData['login'] = false;
     } else {
         $returnData['login'] = true;
         $uid = $vo['id'];
         $members_status = M('members_status')->field('id_status,phone_status,email_status')->where("uid ={$uid}")->find();
         if ($members_status['id_status'] == 1) {
             $returnData['verify'] = true;
         } else {
             $returnData['verify'] = false;
         }
         $minfo = getMinfo($vo['id'], true);
         $money_collect = $minfo['money_collect'];
         $invest_money = $this->getInvestMoney($vo['id']);
         if (empty($money_collect)) {
             $money_collect = "0.00";
         }
         $returnData['collection'] = $money_collect;
         $returnData['lend'] = $money_collect;
         echo json_encode($returnData);
     }
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:40,代码来源:ChoujiangAction.class.php


示例7: withdraw

 public function withdraw($re = false)
 {
     $pre = C('DB_PREFIX');
     $field = "m.user_name,m.user_phone,(mm.account_money+mm.back_money) all_money,mm.account_money,mm.back_money,i.real_name,b.bank_num,b.bank_name,b.bank_address";
     $vo = M('members m')->field($field)->join("{$pre}member_info i on i.uid = m.id")->join("{$pre}member_money mm on mm.uid = m.id")->join("{$pre}member_banks b on b.uid = m.id")->where("m.id={$this->uid}")->find();
     if (empty($vo['bank_num'])) {
         if (true === $re) {
             $this->assign("noview", true);
             return true;
         }
         $data['html'] = '<script type="text/javascript">alert("您还未绑定银行帐户,请先绑定");window.location.href="' . __APP__ . '/member/bank#fragment-1";</script>';
     } else {
         $tqfee = explode("|", $this->glo['fee_tqtx']);
         $txxz_min = $this->glo['txxz_min'];
         $fee[0] = explode("-", $tqfee[0]);
         $fee[1] = explode("-", $tqfee[1]);
         $fee[2] = explode("-", $tqfee[2]);
         $this->assign("fee", $fee);
         $this->assign("txxz_min", (int) $txxz_min);
         $borrow_info = M("borrow_info")->field("sum(borrow_money+borrow_interest+borrow_fee) as borrow, sum(repayment_money+repayment_interest) as also")->where("borrow_uid = {$this->uid} and borrow_type=4 and borrow_status in (0,2,4,6,8,9,10)")->find();
         $minfo = getMinfo($this->uid, true);
         $pin_pass = $minfo['pin_pass'];
         $has_pin = empty($pin_pass) ? "no" : "yes";
         $this->assign("has_pin", $has_pin);
         $vo['all_money'] -= $borrow_info['borrow'] + $borrow_info['also'];
         $this->assign("borrow_info", $borrow_info);
         $this->assign("vo", $vo);
         $this->assign("memberinfo", M('members')->find($this->uid));
         if (true === $re) {
             $this->assign("noview", false);
             return true;
         }
         $data['html'] = $this->fetch();
     }
     if (true === $re) {
         return true;
     }
     exit(json_encode($data));
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:39,代码来源:WithdrawAction.class.php


示例8: tinvestmoney

 public function tinvestmoney()
 {
     $jsoncode = file_get_contents("php://input");
     //alogsm("tinvestmoney",0,1,session("u_id").$jsoncode);
     if (!$this->uid) {
         ajaxmsg('请先登录', 0);
         exit;
     }
     $arr = array();
     $arr = json_decode($jsoncode, true);
     if (intval($arr['uid']) != $this->uid) {
         ajaxmsg("查询错误!", 0);
     }
     if (!is_array($arr) || empty($arr) || empty($arr['borrow_id']) || empty($arr['pin']) || empty($arr['num']) || empty($arr['month']) || $arr['type'] != 2) {
         ajaxmsg("查询错误!", 0);
     }
     $_pin = $arr['pin'];
     $_borrow_id = $arr['borrow_id'];
     $_tnum = $arr['num'];
     $_month = $arr['month'];
     $borrow_id = intval($_borrow_id);
     $tnum = intval($_tnum);
     $month = intval($_month);
     $m = M("member_money")->field('account_money,back_money,money_collect')->find($this->uid);
     $amoney = $m['account_money'] + $m['back_money'];
     $uname = session("u_user_name");
     $binfo = M("transfer_borrow_info")->field("borrow_uid,borrow_interest_rate,transfer_out,transfer_back,transfer_total,per_transfer,is_show,deadline,min_month,increase_rate,reward_rate,borrow_duration")->find($borrow_id);
     if ($this->uid == $binfo['borrow_uid']) {
         ajaxmsg("不能去投自己的标", 0);
     }
     $max_month = $binfo['borrow_duration'];
     //getTransferLeftmonth($binfo['deadline']);
     $min_month = $binfo['min_month'];
     $max_num = $binfo['transfer_total'] - $binfo['transfer_out'];
     if ($tnum < 1) {
         ajaxmsg("购买份数必须大于等于1份!", 3);
     }
     if ($month < $min_month || $max_month < $month) {
         ajaxmsg("本标认购期限只能在'" . $min_month . "个月---" . $max_month . "个月'之间", 3);
     }
     if ($max_num < $tnum) {
         ajaxmsg("本标还能认购最大份数为" . $max_num . "份,请重新输入认购份数", 3);
     }
     $money = $binfo['per_transfer'] * $tnum;
     if ($amoney < $money) {
         ajaxmsg("尊敬的{$uname},您准备认购{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再认购.", __APP__ . "/member/charge#fragment-1", 2);
     }
     $vm = getMinfo($this->uid, "m.pin_pass,mm.invest_vouch_cuse,mm.money_collect");
     $pin_pass = $vm['pin_pass'];
     $pin = md5($_pin);
     if ($pin != $pin_pass) {
         ajaxmsg("支付密码错误,请重试", 0);
     }
     $done = TinvestMoney($this->uid, $borrow_id, $tnum, $month);
     //投省心宝
     if ($done === true) {
         $_msg['type'] = 2;
         $_msg['id'] = $borrow_id;
         $_msg['message'] = "恭喜成功认购{$tnum}份,共计{$money}元";
         ajaxmsg($_msg, 1);
     } else {
         if ($done) {
             ajaxmsg($done, 3);
         } else {
             ajaxmsg("对不起,认购失败,请重试!", 3);
         }
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:68,代码来源:MainController.class.php


示例9: ajax_invest

 public function ajax_invest()
 {
     if (!$this->uid) {
         ajaxmsg("请先登陆", 0);
     }
     $pre = c("DB_PREFIX");
     $id = intval($_GET['id']);
     $num = intval($_GET['num']);
     $chooseWay = $_GET['chooseWay'];
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $field = "id,borrow_uid,borrow_money,borrow_interest_rate,borrow_duration,repayment_type,transfer_out,transfer_back,transfer_total,per_transfer,is_show,deadline,min_month,increase_rate,reward_rate";
     $vo = M("transfer_borrow_info")->field($field)->find($id);
     if ($this->uid == $vo['borrow_uid']) {
         ajaxmsg("不能投自己的标", 0);
     }
     if ($vo['transfer_out'] == $vo['transfer_total']) {
         ajaxmsg("此标可认购份数为0", 0);
     }
     if ($vo['is_show'] == 0) {
         ajaxmsg("只能投正在借款中的标", 0);
     }
     $vo['transfer_leve'] = $vo['transfer_total'] - $vo['transfer_out'];
     $vo['uname'] = M("members")->getFieldById($vo['borrow_uid'], "user_name");
     //$vo['leftday'] = ceil(($vo['collect_day']-time())/3600/24);
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     $amoney = $vm['account_money'] + $vm['back_money'];
     $pin_pass = $vm['pin_pass'];
     $has_pin = empty($pin_pass) ? "no" : "yes";
     //收益开始
     $money = $vo['per_transfer'];
     //每月还息
     $monthData['month_times'] = $vo['borrow_duration'];
     $monthData['account'] = $money;
     $monthData['year_apr'] = $vo['borrow_interest_rate'];
     $monthData['type'] = "all";
     $repay_detail = EqualEndMonth($monthData);
     $vo['shouyi4'] = $repay_detail['repayment_account'] - $money;
     //利息复投
     $monthData['month_times'] = $vo['borrow_duration'];
     $monthData['account'] = $money;
     $monthData['year_apr'] = $vo['borrow_interest_rate'];
     $monthData['type'] = "all";
     $repay_detail = CompoundMonth($monthData);
     $vo['shouyi6'] = $repay_detail['repayment_account'] - $money;
     //收益结束
     $this->assign("has_pin", $has_pin);
     $this->assign("vo", $vo);
     $this->assign("account_money", $amoney);
     $this->assign("Bconfig", $Bconfig);
     $this->assign("num", $num);
     $this->assign("chooseway", $chooseWay);
     $data['content'] = $this->fetch();
     ajaxmsg($data);
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:54,代码来源:FundController.class.php


示例10: newbie_check

 public function newbie_check()
 {
     if (!$this->uid) {
         ajaxmsg('请先登录', 3);
         exit;
     }
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         ajaxmsg("您是" . $type['type'] . "用户不能投标", 3);
     }
     $money = intval($_POST['money']);
     $borrow_id = intval($_POST['borrow_id']);
     $m = M("member_money")->field('account_money,back_money,money_collect')->find($this->uid);
     $amoney = $m['account_money'] + $m['back_money'];
     $uname = session('u_user_name');
     //用户名称
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     //这里用来判断 是否投过此新手标 根据$uid
     $is_access = M('newbie_record')->getFieldByInvest_uid($this->uid, 'id');
     //$this->uid
     if ($is_access) {
         ajaxmsg("尊敬的财来用户,此标只能进行一次投标,您已经投过此标。", 3);
     }
     $binfo = M("newbie_bid")->find($borrow_id);
     //查询此新手标信息
     if ($binfo['min'] > $money) {
         $this->error("尊敬的{$uname},本标最低投标金额为{$binfo['min']}元,请重新输入投标金额", 3);
     } else {
         if ($binfo['max'] < $money) {
             $this->error("尊敬的{$uname},本标最高投标金额为{$binfo['max']}元,请重新输入投标金额", 3);
         }
     }
     //这里判断是否使用了红包
     $redvalue = intval($_POST['redvalue']);
     //红包面值
     if ($redvalue) {
         // $redtotal=M("active_redpacket")->field('sum(facevalue) as f')->where('owner='.$this->uid)->select();
         //查询红包总额
         $myown = $redvalue + $amoney;
         //包括我的红包
         if ($money > $myown) {
             $msg = '您的账户可用余额与所选代金券总额为' . $myown . ',不足支付所投资的金额' . $money;
             ajaxmsg($msg, 5);
         } else {
             $msg1 = '您的账户可用余额与红包总额为' . $myown . ',您确认投标' . $money . '元吗?';
             ajaxmsg($msg1, 1);
         }
     } else {
         if ($amoney < $money) {
             $msg = '尊敬的' . $uname . ',您准备投标' . $money . '元,但您的账户可用余额为' . $amoney . '元,请先去充值再投标';
             ajaxmsg($msg, 5);
             //$this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.",__APP__."/member/charge#fragment-1");
         } else {
             $msg1 = "尊敬的{$uname},您的账户可用余额为" . $amoney . ",您确认投标{$money}元吗?";
             ajaxmsg($msg1, 6);
         }
     }
     //这里判断是否使用了红包(结束)
 }
开发者ID:GStepOne,项目名称:CI,代码行数:59,代码来源:InvestAction.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: index

 public function index()
 {
     //	$this->duizhang();
     $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'));
     $this->assign("mstatus", M('members_status')->field(true)->find($this->uid));
     $danbao = M('borrow_investor')->where("borrow_uid=" . $this->uid)->sum("guar_fee");
     $this->assign("danbao", $danbao);
     //die(M()->getlastsql());
     //echo $danbao;exit;
     //查询会员状态
     $vip_status = M("members_status as ms")->field("ms.phone_status,ms.id_status,ms.email_status,ms.safequestion_status,lmb.uid")->join("left join lzh_member_banks as lmb on ms.uid=lmb.uid")->where('ms.uid=' . $this->uid)->find();
     $this->vip = $vip_status;
     $minfo = getMinfo($this->uid, true);
     $pin_pass = $minfo['pin_pass'];
     $has_pin = empty($pin_pass) ? "no" : "yes";
     $this->assign("has_pin", $has_pin);
     $this->assign("memberinfo", M('members')->find($this->uid));
     $this->assign("memberdetail", M('member_info')->find($this->uid));
     $this->assign("minfo", $minfo);
     //加上新手标的利息 2015-09-18
     $benefit = get_personal_benefit($this->uid);
     //dump($benefit);
     //查询新手标的代收利息
     $newbieinterest = M('newbie_record')->field('interest')->where('investid=' . $this->uid . ' and status=4')->find();
     //echo M()->getLastSql();
     $benefit['interest_collection'] = $benefit['interest_collection'] + $newbieinterest['interest'];
     $this->assign('benefit', $benefit);
     //var_dump(get_personal_benefit($this->uid));
     $this->assign('out', get_personal_out($this->uid));
     $this->assign("bank", M('member_banks')->field('bank_num')->find($this->uid));
     $info = getMemberDetail($this->uid);
     $this->assign("info", $info);
     $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);
     $_SX = M('investor_detail')->field('deadline,interest,capital')->where("investor_uid = {$this->uid} AND status=7")->order("deadline ASC")->find();
     $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);
     $map = array();
     $map['uid'] = $this->uid;
     $Log_list = getMoneyLog($map, 4);
     $this->assign("Log_list", $Log_list['list']);
     $this->assign("list", get_personal_count($this->uid));
     //以下是我的投资详细
     $zwmap['investor_uid'] = $this->uid;
     $zwmap['status'] = 4;
     $zwmap['Borrow.borrow_type'] = array('neq', 9);
     $zwlist = getTenderList($zwmap, 1);
     //显示真实姓名
     if (is_array($zwlist['list'])) {
         foreach ($zwlist['list'] as $zwkey => $zwval) {
             $borrow_uid = $zwval['borrow_uid'];
             $zwmap = " uid = {$borrow_uid} ";
             $real_name = M("member_info")->field('real_name')->where($zwmap)->limit(1)->select();
             $zwlist['list'][$zwkey]['real_name'] = $real_name[0]['real_name'];
             unset($real_name);
         }
     }
     //曲线走势图
     $result = M("month_detail")->where("user_id=" . $this->uid)->find();
     //去掉前三个
     $res = array_slice($result, 3);
     foreach ($res as $key => $value) {
         $arr[] = $value;
     }
     if (max($arr) >= 10000) {
         foreach ($arr as $key => $value) {
             $brr[] = $value / 10000;
         }
         $this->char = "万元";
     } else {
         if (max($arr) >= 1000) {
             foreach ($arr as $key => $value) {
                 $brr[] = $value / 1000;
             }
             $this->char = "千元";
         } else {
             if (max($arr) >= 100) {
                 foreach ($arr as $key => $value) {
                     $brr[] = $value / 100;
                 }
                 $this->char = "百元";
             } else {
//.........这里部分代码省略.........
开发者ID:GStepOne,项目名称:CI,代码行数:101,代码来源:IndexAction.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: investmoney

 public function investmoney()
 {
     //print_r($_POST);die;
     //if(!$this->uid) exit;
     if (!$this->uid) {
         ajaxmsg('请先登录', 3);
         exit;
     }
     $money = intval($_POST['money']);
     //var_dump($money);die;
     $borrow_id = intval($_POST['borrow_id']);
     //print_r($money);
     //print_r($borrow_id);die;
     $m = M("member_money")->field('account_money,back_money,money_collect')->find($this->uid);
     //print_r($m);die;
     $amoney = $m['account_money'] + $m['back_money'];
     $uname = session('u_user_name');
     if ($amoney < $money) {
         $this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.", "http://qfw.taoweikeji.com/M/Center/cz_online");
         /*if($this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标")){
         			$this->redirect("http://qfw.taoweikeji.com/M/Center/cz_online");
         		}
         		*/
     }
     //echo "尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标";$this->redirect("http://qfw.taoweikeji.com/M/Center/cz_online");
     //$this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.");$this->redirect("http://qfw.taoweikeji.com/M/Center/cz_online");
     //$this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.","http://qfw.taoweikeji.com/M/Center/cz_online");
     //$msg = "尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,您要先去充值吗?";
     //ajaxmsg($msg,2);
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     $pin_pass = $vm['pin_pass'];
     $pin = md5($_POST['pin']);
     if ($pin != $pin_pass) {
         $this->error("支付密码错误,请重试");
     }
     $binfo = M("borrow_info")->field('borrow_money,money_invest_place,borrow_max,has_borrow,has_vouch,borrow_type,borrow_min,money_collect')->find($borrow_id);
     //dump($binfo);die;
     //var_dump($binfo);{ ["borrow_money"]=> string(7) "5000.00" ["money_invest_place"]=> string(1) "0" ["borrow_max"]=> string(1) "0" ["has_borrow"]=> string(4) "0.00" ["has_vouch"]=> string(4) "0.00" ["borrow_type"]=> string(1) "1" ["borrow_min"]=> string(2) "50" ["money_collect"]=> string(4) "0.00" }
     if ($money % $binfo['borrow_min'] != 0) {
         echo 0;
         //ajaxmsg("投标金额必须为起投金额的整数倍",3);
         $this->error("投标金额必须为起投金额的整数倍");
     }
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     if ($binfo['money_collect'] > 0) {
         if ($m['money_collect'] < $binfo['money_collect']) {
             echo 1;
             //ajaxmsg("此标设置有投标待收金额限制,您账户里必须有足够的待收才能投此标",3);
             $this->error("此标设置有投标待收金额限制,您账户里必须有足够的待收才能投此标");
         }
     }
     $today_start = strtotime(date('Y-m-d', time()) . "00:00:00");
     //$today_end = strtotime(date('Y-m-d', time())."23:59:59");
     //echo $binfo['borrow_type'];die;
     if ($binfo['borrow_type'] == 3) {
         if ($binfo['money_invest_place'] > 0) {
             $M_affect_money = M('member_moneylog')->where('uid = ' . $this->uid . " AND type in (6,37) AND add_time > " . $today_start . " AND add_time < " . time())->sum('affect_money');
             $money_place = $binfo['money_invest_place'] + $M_affect_money;
             if ($money_place > 0) {
                 echo 2;
                 //ajaxmsg("此标设置有当日投标金额限制,您还需投资".$money_place."元才能投此秒标",3);
                 $this->error("此标设置有当日投标金额限制,您还需投资" . $money_place . "元才能投此秒标");
             }
         }
     }
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     //投标总数检测
     $capital = M('borrow_investor')->where("borrow_id={$borrow_id} AND investor_uid={$this->uid}")->sum('investor_capital');
     if ($capital + $money > $binfo['borrow_max'] && $binfo['borrow_max'] > 0) {
         $xtee = $binfo['borrow_max'] - $capital;
         $this->error("您已投标{$capital}元,此投上限为{$binfo['borrow_max']}元,你最多只能再投{$xtee}");
     }
     //if($binfo['has_vouch']<$binfo['borrow_money'] && $binfo['borrow_type'] == 2) $this->error("此标担保还未完成,您可以担保此标或者等担保完成再投标");
     $need = $binfo['borrow_money'] - $binfo['has_borrow'];
     //echo $need;(5000)
     $caninvest = $need - $binfo['borrow_min'];
     //echo $caninvest;(4950)
     //dump($money);
     //dump($caninvest);
     //dump($need);die;
     if ($money > $caninvest && $need == 0) {
         echo 3;
         $msg = "尊敬的{$uname},此标已被抢投满了,下次投标手可一定要快呦!";
         $this->error($msg);
     }
     if ($binfo['borrow_min'] - $money > 0) {
         echo 4;
         $this->error("尊敬的{$uname},本标最低投标金额为{$binfo['borrow_min']}元,请重新输入投标金额");
     }
     if ($need - $money < 0) {
         echo 5;
         $this->error("尊敬的{$uname},此标还差{$need}元满标,您最多只能再投{$need}元");
     } else {
         //var_dump($this->uid);//(23)
         //var_dump($borrow_id);//(12)
         //var_dump($money);die;//(150)
         $done = investMoney($this->uid, $borrow_id, $money);
         //echo $done;die();
         //var_dump($done);die;
         //echo $done;die;
//.........这里部分代码省略.........
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:101,代码来源:InvestAction.class.php


示例15: invest


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getModel函数代码示例发布时间:2022-05-15
下一篇:
PHP getMimeTypes函数代码示例发布时间: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