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

PHP getFloatValue函数代码示例

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

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



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

示例1: index

 public function index()
 {
     $key = $_GET['key'];
     $arg = file_get_contents($this->updir . "config.txt");
     $arga = explode("|", $arg);
     $rate = intval($arga[1]);
     if ($key != $arga[2]) {
         exit("fail|密钥错误");
     }
     $total = 0;
     if ($rate > 0) {
         $list = M("member_money")->field("uid,account_money")->where("account_money>0")->select();
         $i = 0;
         foreach ($list as $v) {
             $amoney = getFloatValue($v['account_money'] * $rate / 10000, 2);
             $re = memberMoneyLog($v['uid'], 32, $amoney, date("Y年m月d日") . "利息");
             if ($re) {
                 $i++;
                 $total += $amoney;
             }
         }
         $all = count($list);
         $str = "共{$all}人需要发布利息,共成功对{$i}人发放共计{$total}元利息";
         echo "success|{$str}";
     } else {
         echo "success|利率为0,不返利";
     }
     echo "\r\n" . date("Y-m-d H:i:s", time());
     exit;
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:30,代码来源:AutoAction.class.php


示例2: getBorrowList

function getBorrowList($map, $size, $limit = 10)
{
    //if(empty($map['borrow_uid'])) return;
    if ($size) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info')->where($map)->count('id');
        $p = new Page($count, $size);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
    $status_arr = $Bconfig['BORROW_STATUS_SHOW'];
    $type_arr = $Bconfig['REPAYMENT_TYPE'];
    //$list = M('borrow_info')->where($map)->order('id DESC')->limit($Lsql)->select();
    /////////////使用了视图查询操作 fans 2013-05-22/////////////////////////////////
    $Model = D("BorrowView");
    $list = $Model->field(true)->where($map)->order('times ASC')->group('id')->limit($Lsql)->select();
    //echo M()->getlastsql();exit;
    /////////////使用了视图查询操作 fans 2013-05-22/////////////////////////////////
    foreach ($list as $key => $v) {
        $list[$key]['status'] = $status_arr[$v['borrow_status']];
        $list[$key]['repayment_type_num'] = $v['repayment_type'];
        $list[$key]['repayment_type'] = $type_arr[$v['repayment_type']];
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100, 2);
        if ($map['borrow_status'] == 6) {
            $vx = M('investor_detail')->field('deadline')->where("borrow_id={$v['id']} and status=7")->order("deadline ASC")->find();
            $list[$key]['repayment_time'] = $vx['deadline'];
        }
        if ($map['borrow_status'] == 5 || $map['borrow_status'] == 1) {
            $vd = M('borrow_verify')->field(true)->where("borrow_id={$v['id']}")->find();
            $list[$key]['dealinfo'] = $vd;
        }
        $dealinfo2 = M("borrow_verify")->field("deal_info_2")->where("borrow_id=" . $v['id'])->find();
        $list[$key]['deal_info'] = $dealinfo2['deal_info_2'];
    }
    $row = array();
    $row['list'] = $list;
    $row['page'] = $page;
    //$map['status'] = 1;
    //$row['success_money'] = M('member_payonline')->where($map)->sum('money');
    //$map['status'] = array('neq','1');
    //$row['fail_money'] = M('member_payonline')->where($map)->sum('money');
    return $row;
}
开发者ID:GStepOne,项目名称:CI,代码行数:49,代码来源:function.php


示例3: getBorrowList

function getBorrowList($parm = array(), $countonly = false)
{
    if (empty($parm['map'])) {
        return;
    }
    $map = $parm['map'];
    $orderby = $parm['orderby'];
    //$map = array_merge($map,$search);
    if ($countonly) {
        return M('borrow_info b')->where($map)->count('b.id');
    }
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info b')->where($map)->count('b.id');
        $p = new Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    $field = "b.id,b.borrow_name,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,b.borrow_info,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.pro_provide,b.first_verify_time,b.schedular_time";
    if ($parm['hotest']) {
        $field .= ",IFNULL(b.`full_time`,0)-IFNULL(bv.`deal_time`,0) finish_time";
        $list = M('borrow_info')->alias("b")->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->join("{$pre}borrow_verify bv ON b.id=bv.borrow_id")->where($map)->order($orderby)->limit($Lsql)->select();
    } else {
        $list = M('borrow_info')->alias("b")->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    }
    $areaList = getArea();
    foreach ($list as $key => $v) {
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100, 2);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("Home/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        $list[$key]['schedular_time'] = trans_date_format($v['schedular_time'], 'Y-m-d');
    }
    $row = array();
    $row['list'] = $list;
    $row['page'] = $page;
    return $row;
}
开发者ID:hutao1004,项目名称:yintt,代码行数:48,代码来源:function.php


示例4: downfile

 public function downfile()
 {
     //$this->assign("waitSecond",-1);$this->error("该功能暂时被关闭!");
     $per = C('DB_PREFIX');
     $borrow_config = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $invest_id = intval($_GET['id']);
     //$borrow_id=intval($_GET['id']);
     $iinfo = M('borrow_investor')->field('borrow_id,investor_capital,investor_interest,deadline,investor_uid')->where("(investor_uid={$this->uid} OR borrow_uid={$this->uid}) AND id={$invest_id}")->find();
     $binfo = M('borrow_info')->field('repayment_type,borrow_duration,borrow_uid,borrow_type,full_time,add_time,borrow_interest_rate')->find($iinfo['borrow_id']);
     $mBorrow = M("members m")->join("{$per}member_info mi ON mi.uid=m.id")->field('mi.real_name,m.user_name')->where("m.id={$binfo['borrow_uid']}")->find();
     $mInvest = M("members m")->join("{$per}member_info mi ON mi.uid=m.id")->field('mi.real_name,m.user_name')->where("m.id={$iinfo['investor_uid']}")->find();
     if (!is_array($iinfo) || !is_array($binfo) || !is_array($mBorrow) || !is_array($mInvest)) {
         exit;
     }
     $type = $borrow_config['REPAYMENT_TYPE'];
     //echo $binfo['repayment_type'];
     $binfo['repayment_name'] = $type[$binfo['repayment_type']];
     $iinfo['repay'] = getFloatValue(($iinfo['investor_capital'] + $iinfo['investor_interest']) / $binfo['borrow_duration'], 2);
     //print_r($type);
     $this->assign('iinfo', $iinfo);
     $this->assign('binfo', $binfo);
     $this->assign('mBorrow', $mBorrow);
     $this->assign('mInvest', $mInvest);
     $detail_list = M('investor_detail')->field(true)->where("invest_id={$invest_id}")->select();
     $this->assign("detail_list", $detail_list);
     $html = $this->fetch('index');
     //路径,x坐标,y坐标,图片宽度,图片高度(''表示自适应),网址,
     //$mask = $pdf->Image($this->pdfPath.'images/alpha.png', 10, 10, 10, '', '', '', '', false, 100, '', true);
     $this->mypdf->Image(K_PATH_MAIN . '../../../Style/seal/images/bg.png', 35, 130, 143, 44, '', '', '', false, 300, '', false, false, 0);
     //出图的,放在后面图就在上层,放在前面图就在下层
     // set the starting point for the page content
     $this->mypdf->setPageMark();
     $this->mypdf->writeHTML($html, true, false, true, false, '');
     //$this->mypdf->MultiCell(0, 5, "ssssssssssssssssssssssssssssssss", 0, 'J', 0, 2, '', '', true, 0, false);
     //路径,x坐标,y坐标,图片宽度,图片高度(''表示自适应),网址,
     //$mask = $this->mypdf->Image($this->pdfPath.'images/alpha.png', 10, 10, 10, '', '', '', '', false, 100, '', true);
     //$this->mypdf->Image($this->pdfPath.'images/image_with_alpha.png', 70, 120, 60, 60, '', '', '', false, 10, '', true, $mask);//出图的,放在后面图就在上层,放在前面图就在下层
     // ---------------------------------------------------------
     $this->mypdf->setPage(2);
     //$this->mypdf->Image(K_PATH_MAIN.'../../../Style/seal/images/seal.png', 150, 230, 42, 42, '', '', '', false, 300, '', false, false, 0);//出图的,放在后面图就在上层,放在前面图就在下层
     $this->mypdf->Image(K_PATH_MAIN . '../../../Style/seal/images/seal.png', 10, 170, '145', '46', '', '', '', false, 300, '', false, false, 0);
     //出图的,放在后面图就在上层,放在前面图就在下层
     ob_end_clean();
     //Close and output PDF document
     $this->mypdf->Output('jiedaihetong.pdf', 'I');
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:46,代码来源:AgreementAction.class.php


示例5: addborrow

 public function addborrow()
 {
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $fee_borrow_manage = explode("|", $this->glo['fee_borrow_manage']);
     $vminfo = M('members')->field("credit_limit,credit_use,credit_status,user_leve,time_limit")->find($this->uid);
     $add_field = array('borrow_interest_rate', 'borrow_money', 'borrow_duration', 'repayment_type', 'borrow_name', 'borrow_info');
     foreach ($add_field as $v) {
         $savedata[$v] = text($_POST[$v]);
     }
     if ($savedata['borrow_interest_rate'] > $rate_lixt[1] || $savedata['borrow_interest_rate'] < $rate_lixt[0]) {
         ajaxmsg("提交的数据有误,请重试", 0);
     }
     if ($savedata['borrow_duration'] > $borrow_duration[1] || $savedata['borrow_duration'] < $borrow_duration[0]) {
         ajaxmsg("提交的数据有误,请重试", 0);
     }
     if ($savedata['borrow_money'] > $vminfo['credit_limit'] - $vminfo['credit_use'] || $savedata['borrow_money'] < 500) {
         ajaxmsg("提交的数据有误,请重试", 0);
     }
     //if(!in_array($savedata['repayment_type'],C('REPAYMENT_TYPE'))) ajaxmsg("提交的数据有误,请重试",0);
     if (empty($savedata['borrow_name']) || empty($savedata['repayment_type']) || empty($savedata['borrow_info'])) {
         ajaxmsg("提交的数据有误,请重试", 0);
     }
     if ($vminfo['credit_status'] == 0) {
         ajaxmsg("您还未通过借款审核", 0);
     }
     $bc = M("borrow_info")->where("borrow_uid={$this->uid} AND borrow_status in(0,2)")->count('id');
     if ($bc > 0) {
         ajaxmsg("您有正在审核或者正在筹集中的借款,所以暂时不能发布新的借款申请", 0);
     }
     $vminfo['user_leve'] == 1 && $vminfo['time_limit'] > time() ? $fee_rate = $fee_borrow_manage[1] / 100 : ($fee_rate = $fee_borrow_manage[0] / 100);
     $savedata['borrow_uid'] = $this->uid;
     $savedata['borrow_interest'] = getBorrowInterest($savedata['repayment_type'], $savedata['borrow_money'], $savedata['borrow_duration'], $savedata['borrow_interest_rate']);
     $savedata['borrow_fee'] = getFloatValue($fee_rate * $savedata['borrow_money'], 2);
     $savedata['borrow_status'] = 0;
     $savedata['add_time'] = time();
     $savedata['add_ip'] = get_client_ip();
     $savedata['total'] = $savedata['repayment_type'] == 1 ? $savedata['borrow_duration'] : "1";
     $newid = M('borrow_info')->add($savedata);
     if ($newid) {
         ajaxmsg();
     } else {
         ajaxmsg("借款申请发布失败,请重试", 0);
     }
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:45,代码来源:BorrowAction.class.php


示例6: tool3

 public function tool3()
 {
     if ($_POST) {
         $money = floatval($_POST['money']);
         $rate = floatval($_POST['interest_rate']);
         $month = $_POST['selDays'] == -1 ? intval($_POST['month']) : intval($_POST['selDays']);
         $fee = getFloatValue($rate / 12 * $month * $money / 100 + $money, 4);
         $this->assign('mmoney', $money);
         $this->assign('m', $month);
         $this->assign('fee', $fee);
         $parm['month_times'] = $month;
         $parm['account'] = $money;
         $parm['year_apr'] = $rate;
         $repay_detail = EqualSeason($parm);
         $parm['type'] = "all";
         $repay_summary = EqualSeason($parm);
         $this->assign('repay_detail', $repay_detail);
         $this->assign('repay_summary', $repay_summary);
         $data['html_1'] = $this->fetch('tool3_res_1');
         $data['html_2'] = $this->fetch('tool3_res_2');
         exit(json_encode($data));
     }
     $this->display();
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:24,代码来源:ToolAction.class.php


示例7: detail

 public function detail()
 {
     $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 (!$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);
     //borrowinfo
     //此标借款利息还款相关情况
     //memberinfo
     $memberinfo = M("members")->field("id,customer_name,customer_id,user_name,reg_time,credits")->where("id={$borrowinfo['borrow_uid']}")->find();
     $this->assign("minfo", $memberinfo);
     //memberinfo
     $this->assign("Bconfig", $Bconfig);
     $this->assign("gloconf", $this->gloconf);
     $this->display();
 }
开发者ID:GStepOne,项目名称:CI,代码行数:24,代码来源:InvestAction.class.php


示例8: ajax_invest

 public function ajax_invest()
 {
     $jsoncode = file_get_contents("php://input");
     //alogsm("ajax_invest",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['id']) || !in_array($arr['type'], array(3, 4, 5, 6, 7))) {
         ajaxmsg("查询错误!", 0);
     }
     $pre = C('DB_PREFIX');
     $id = intval($arr['id']);
     //$id=23;
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $field = "id,borrow_uid,borrow_money,borrow_status,borrow_type,has_borrow,has_vouch,borrow_interest_rate,borrow_duration,repayment_type,collect_time,borrow_min,borrow_max,password,borrow_use,money_collect";
     $vo = M('borrow_info')->field($field)->find($id);
     if ($this->uid == $vo['borrow_uid']) {
         ajaxmsg("不能去投自己的标", 0);
     }
     if ($vo['borrow_status'] != 2) {
         ajaxmsg("只能投正在借款中的标", 0);
     }
     $vo['need'] = $vo['borrow_money'] - $vo['has_borrow'];
     if ($vo['need'] < 0) {
         ajaxmsg("投标金额不能超出借款剩余金额", 0);
     }
     $vo['lefttime'] = $vo['collect_time'] - time();
     $vo['progress'] = getFloatValue($vo['has_borrow'] / $vo['borrow_money'] * 100, 4);
     //ceil($vo['has_borrow']/$vo['borrow_money']*100);
     $vo['uname'] = M("members")->getFieldById($vo['borrow_uid'], 'user_name');
     $time1 = microtime(true) * 1000;
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     $amoney = $vm['account_money'] + $vm['back_money'];
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     if ($binfo['money_collect'] > 0) {
         if ($vm['money_collect'] < $binfo['money_collect']) {
             ajaxmsg("此标设置有投标待收金额限制,您账户里必须有足够的待收才能投此标", 0);
         }
     }
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     ////////////////////投标时自动填写可投标金额在投标文本框 2013-07-03 fan////////////////////////
     if ($amoney < floatval($vo['borrow_min'])) {
         ajaxmsg("您的账户可用余额小于本标的最小投标金额限制,不能投标!", 0);
     } elseif ($amoney >= floatval($vo['borrow_max']) && floatval($vo['borrow_max']) > 0) {
         $toubiao = intval($vo['borrow_max']);
     } else {
         if ($amoney >= floatval($vo['need'])) {
             $toubiao = intval($vo['need']);
         } else {
             $toubiao = floor($amoney);
         }
     }
     $vo['toubiao'] = $toubiao;
     ////////////////////投标时自动填写可投标金额在投标文本框 2013-07-03 fan////////////////////////
     $pin_pass = $vm['pin_pass'];
     $has_pin = empty($pin_pass) ? "no" : "yes";
     $data['type'] = $arr['type'];
     $data['id'] = $id;
     $data['has_pin'] = $has_pin == 'yes' ? 1 : 0;
     $data['borrow_min'] = $vo['borrow_min'];
     $data['borrow_max'] = $vo['borrow_max'] == "0" ? "无" : "{$vo['borrow_max']}";
     $data['need'] = $vo['need'];
     $data['toubiao'] = $vo['toubiao'];
     $data['password'] = empty($vo['password']) ? 0 : 1;
     $data['account_money'] = $amoney;
     ajaxmsg($data);
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:73,代码来源:MainController.class.php


示例9: vouchmoney

 public function vouchmoney()
 {
     if (!$this->uid) {
         exit;
     }
     /****** 防止模拟表单提交 *********/
     $cookieKeyS = cookie(strtolower(MODULE_NAME) . "-vouch");
     if ($cookieKeyS != $_REQUEST['cookieKey']) {
         $this->error("数据校验有误");
     }
     /****** 防止模拟表单提交 *********/
     $money = intval($_POST['vouch_money']);
     $borrow_id = intval($_POST['borrow_id']);
     $rate = M('borrow_info')->getFieldById($borrow_id, 'reward_vouch_rate');
     $amoney = M("member_money")->getFieldByUid($this->uid, 'invest_vouch_cuse');
     $uname = session('u_user_name');
     if ($amoney < $money) {
         $this->error("尊敬的{$uname},您准备担保{$money}元,但您可用担保投资额度为{$amoney}元,请先去申请更高额度.");
     }
     $saveVouch['borrow_id'] = $borrow_id;
     $saveVouch['uid'] = $this->uid;
     $saveVouch['uname'] = $uname;
     $saveVouch['vouch_money'] = $money;
     $saveVouch['vouch_reward_rate'] = $rate;
     $saveVouch['vouch_reward_money'] = getFloatValue($money * $rate / 100, 2);
     $saveVouch['add_ip'] = get_client_ip();
     $saveVouch['vouch_time'] = time();
     $newid = M('borrow_vouch')->add($saveVouch);
     if ($newid) {
         $done = M("member_money")->where("uid={$this->uid}")->setDec('invest_vouch_cuse', $money);
     }
     //$this->assign("waitSecond",1000);
     if ($done == true) {
         M("borrow_info")->where("id={$borrow_id}")->setInc('has_vouch', $money);
         $this->success("恭喜成功担保{$money}元");
     } else {
         $this->error("对不起,担保失败,请重试!");
     }
 }
开发者ID:GStepOne,项目名称:CI,代码行数:39,代码来源:InvestAction.class.php


示例10: downliuzhuanfile

 public function downliuzhuanfile()
 {
     $per = C('DB_PREFIX');
     $borrow_config = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $invest_id = intval($_GET['id']);
     //$borrow_id=intval($_GET['id']);
     //old
     //$iinfo = M('borrow_investor')->field('id,borrow_id,investor_capital,investor_interest,deadline,investor_uid,add_time')->where("(investor_uid={$this->uid} OR borrow_uid={$this->uid}) AND id={$invest_id}")->find();
     $iinfo = M('borrow_investor')->field('id,borrow_id,investor_capital,investor_interest,deadline,investor_uid,add_time')->where("investor_uid={$this->uid} AND id={$invest_id}")->find();
     $investor_capital_big = cny($iinfo['investor_capital']);
     $borrow_id = $iinfo['borrow_id'];
     //dump( $borrow_id);
     //exit;
     $binfo = M('borrow_info bi')->field('bi.id,bi.repayment_type,bi.borrow_duration,bi.borrow_uid,bi.borrow_type,bi.borrow_use,bi.borrow_money,bi.full_time,bi.add_time,bi.borrow_interest_rate,bi.deadline,bi.second_verify_time,bi.collect_time,mi.real_name,mi.stamp_img')->join("{$per}member_info mi ON bi.danbao=mi.uid")->find($borrow_id);
     //dump($iinfo);
     //dump(M("members m")->getlastsql());
     //exit;
     $mBorrow = M("members m")->join("{$per}member_info mi ON mi.uid=m.id")->field('mi.real_name,m.user_name,mi.idcard,mi.stamp_img')->where("m.id={$binfo['borrow_uid']}")->find();
     //$mInvest = M("members m")->join("{$per}member_info mi ON mi.uid=m.id")->field('mi.real_name,m.user_name')->where("m.id={$iinfo['investor_uid']}")->find();
     $mInvest = M("members m")->join("{$per}member_info mi ON mi.uid=m.id")->field('mi.real_name,mi.address,mi.cell_phone,mi.idcard,m.user_name,m.user_email')->where("m.id={$iinfo['investor_uid']}")->find();
     //if(!is_array($iinfo)||!is_array($binfo)||!is_array($mBorrow)||!is_array($mInvest)) exit;
     $detail = M('investor_detail d')->field('d.borrow_id,d.investor_uid,d.borrow_uid,d.capital,sum(d.capital+d.interest-d.interest_fee) benxi,d.total')->where("d.borrow_id={$iinfo['borrow_id']} and d.invest_id ={$iinfo['id']}")->group('d.investor_uid')->find();
     //$detailinfo = M('investor_detail d')->join("{$per}borrow_investor bi ON bi.id=d.invest_id")->join("{$per}members m ON m.id=d.investor_uid")->field('d.borrow_id,d.investor_uid,d.borrow_uid,d.capital,sum(d.capital+d.interest-d.interest_fee) benxi,d.total,m.user_name,bi.investor_capital,bi.add_time')->where("d.borrow_id={$iinfo['borrow_id']} and d.invest_id ={$iinfo['id']}")->group('d.investor_uid')->find();
     $detailinfo = M('investor_detail d')->field('d.borrow_id,d.investor_uid,d.borrow_uid,(d.capital+d.interest-d.interest_fee) benxi,d.capital,d.interest,d.interest_fee,d.sort_order,d.deadline')->where("d.borrow_id={$iinfo['borrow_id']} and d.invest_id ={$iinfo['id']}")->select();
     $time = M('borrow_investor')->field('id,add_time')->where("borrow_id={$iinfo['borrow_id']} order by add_time asc")->limit(1)->find();
     if ($binfo['repayment_type'] == 1) {
         $deadline_last = strtotime("+{$binfo['borrow_duration']} day", $time['add_time']);
     } else {
         $deadline_last = strtotime("+{$binfo['borrow_duration']} month", $time['add_time']);
     }
     $this->assign('deadline_last', $deadline_last);
     $this->assign('detailinfo', $detailinfo);
     $this->assign('detail', $detail);
     $type1 = $this->gloconf['BORROW_USE'];
     $binfo['borrow_use'] = $type1[$binfo['borrow_use']];
     $ht = M('hetong')->field('hetong_img,name,dizhi,tel')->find();
     $this->assign("ht", $ht);
     $type = $borrow_config['REPAYMENT_TYPE'];
     //echo $binfo['repayment_type'];
     $binfo['repayment_name'] = $type[$binfo['repayment_type']];
     //	dump($binfo['stamp_img']);exit;
     $iinfo['repay'] = getFloatValue(($iinfo['investor_capital'] + $iinfo['investor_interest']) / $binfo['borrow_duration'], 2);
     $this->assign("bid", "bytp2pD");
     //print_r($type);
     $this->assign('investor_capital_big', $investor_capital_big);
     $this->assign('iinfo', $iinfo);
     $this->assign('binfo', $binfo);
     $this->assign('mBorrow', $mBorrow);
     $this->assign('mInvest', $mInvest);
     $this->assign('borrow_id', $borrow_id);
     $detail_list = M('investor_detail')->field(true)->where("invest_id={$invest_id}")->select();
     $this->assign("detail_list", $detail_list);
     //echo "<pre>";print_r($binfo);echo "</pre>";exit;
     //$this->display("transfer");exit;
     Vendor('Mpdf.mpdf');
     $mpdf = new mPDF('UTF-8', 'A4', '', '', 15, 15, 4, 15);
     $mpdf->useAdobeCJK = true;
     $mpdf->SetAutoFont(AUTOFONT_ALL);
     $mpdf->SetDisplayMode('fullpage');
     $mpdf->SetAutoFont();
     $mpdf->SetHTMLFooter(' >>{PAGENO}<<');
     $mpdf->WriteHTML($this->fetch('transfer'));
     $mpdf->Output('cailaijinfu.pdf', 'I');
     exit;
     $this->display("transfer");
 }
开发者ID:GStepOne,项目名称:CI,代码行数:66,代码来源:AgreementAction.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: getBorrowerInfo

 public function getBorrowerInfo($bid)
 {
     $db = core::db()->getConnect('CAILAI', true);
     $filed = "bi.borrow_uid,mi.sex,mi.age,mi.education,mi.marry,fi.fin_monthin,m.user_email,m.customer_name,fi.fin_car,m.integral,mi.zy,mm.credit_limit,mi.province,mi.city,mm.account_money,mm.back_money,mm.money_collect,mm.money_freeze ";
     $sql = sprintf("SELECT {$filed} FROM`lzh_borrow_info` bi  LEFT JOIN lzh_members m ON m.id = bi.borrow_uid LEFT JOIN lzh_member_financial_info fi ON bi.borrow_uid=fi.uid  LEFT JOIN `lzh_member_info` mi ON mi.uid=bi.borrow_uid  LEFT JOIN `lzh_member_money` mm ON mm.uid=bi.borrow_uid WHERE bi.id=%s", $bid);
     $zw = $db->query($sql, "array ");
     $borrow_uid = $zw['borrow_uid'];
     unset($zw['borrow_uid']);
     $zw['fin_monthin'] = getMoneyFormt($zw['fin_monthin']);
     $zw['integral'] = (int) $zw['integral'];
     $zw['credit_limit'] = (double) $zw['credit_limit'];
     if ($zw['fin_car'] == NULL) {
         $zw['fin_car'] = '未填写';
     }
     //借款次数相关
     $sql2 = sprintf("SELECT `borrow_status`, COUNT(id) AS num,SUM(borrow_money) AS money,SUM(repayment_money) AS repayment_money FROM `lzh_borrow_info` WHERE borrow_uid = %s GROUP BY borrow_status ", $borrow_uid);
     $zw2 = $db->query($sql2);
     while ($row = $db->fetchArray($zw2)) {
         $borrowCount[$row['borrow_status']] = $row;
     }
     //借出情况相关
     $field3 = "status,count(id) as num,sum(investor_capital) as investor_capital,sum(reward_money) as reward_money,sum(investor_interest) as investor_interest,sum(receive_capital) as receive_capital,sum(receive_interest) as receive_interest,sum(invest_fee) as invest_fee";
     $sql3 = sprintf("SELECT {$field3} FROM `lzh_borrow_investor` WHERE investor_uid = %s GROUP BY STATUS  ", $borrow_uid);
     $zw3 = $db->query($sql3);
     $_reward_money = 0;
     while ($v = $db->fetchArray($zw3)) {
         $investStatus[$v['status']] = $v;
         $_reward_money += floatval($v['reward_money']);
     }
     $rowtj['jkze'] = getFloatValue(floatval($borrowCount[6]['money'] + $borrowCount[7]['money'] + $borrowCount[8]['money'] + $borrowCount[9]['money']), 2);
     //借款总额
     $rowtj['jcze'] = getFloatValue(floatval($investStatus[4]['investor_capital']), 2);
     //借出总额
     $rowtj['ysze'] = getFloatValue(floatval($investStatus[4]['receive_capital']), 2);
     //应收总额
     $rowtj['yhze'] = getFloatValue(floatval($borrowCount[6]['repayment_money'] + $borrowCount[7]['repayment_money'] + $borrowCount[8]['repayment_money'] + $borrowCount[9]['repayment_money']), 2);
     //应还总额
     $data2['yhze'] = getMoneyFormt(getFloatValue(floatval($borrowCount[6]['repayment_money'] + $borrowCount[7]['repayment_money'] + $borrowCount[8]['repayment_money'] + $borrowCount[9]['repayment_money']), 2));
     //应还总额
     $data2['dhze'] = getMoneyFormt(getFloatValue($rowtj['jkze'] - $rowtj['yhze'], 2));
     //待还总额
     $data2['jcze'] = getMoneyFormt(getFloatValue(floatval($investStatus[4]['investor_capital']), 2));
     //借出总额
     $data2['ysze'] = getMoneyFormt(getFloatValue(floatval($investStatus[4]['receive_capital']), 2));
     //应收总额
     $data2['dsze'] = getMoneyFormt(getFloatValue($rowtj['jcze'] - $rowtj['ysze'], 2));
     //待收总额
     $data2['fz'] = getMoneyFormt(getFloatValue($rowtj['jcze'] - $rowtj['jkze'], 2));
     $data2['jkcgcs'] = (int) ($borrowCount[6]['num'] + $borrowCount[7]['num'] + $borrowCount[8]['num'] + $borrowCount[9]['num']);
     //借款成功次数
     $data2['zcze'] = getMoneyFormt(getFloatValue(floatval($zw['account_money'] + $zw['back_money'] + $zw['money_collect'] + $zw['money_freeze']), 2));
     //资产总额
     //还款情况相关
     $field4 = "status,sort_order,borrow_id,sum(capital) as capital,sum(interest) as interest";
     $sql4 = sprintf("SELECT {$field4} FROM `lzh_investor_detail` WHERE borrow_uid = %s GROUP BY sort_order, borrow_id ", $borrow_uid);
     $zw4 = $db->query($sql4);
     while ($v = $db->fetchArray($zw4)) {
         //                    $repaymentStatus[$v['status']]['capital']+=$v['capital'];//当前状态下的数金额
         //                    $repaymentStatus[$v['status']]['interest']+=$v['interest'];//当前状态下的数金额
         $repaymentStatus[$v['status']]['num']++;
         //当前状态下的总笔数
     }
     $data2['repayment1'] = (int) $repaymentStatus[1]['num'];
     //正常还款次数:
     $data2['repayment3'] = (int) $repaymentStatus[3]['num'];
     //迟还次数:
     $data2['repayment2'] = (int) $repaymentStatus[2]['num'];
     //提前还款次数::
     $data2['repayment6'] = (int) $repaymentStatus[6]['num'];
     //待还款笔数:
     $data2['repayment4'] = (int) $repaymentStatus[4]['num'];
     //网站代还次数:::
     $data2['repayment5'] = (int) $repaymentStatus[5]['num'];
     //逾期还款笔数::
     $areaList = getArea();
     $data2['location'] = $areaList[$zw['province']] . $areaList[$zw['city']];
     unset($zw['province'], $zw['city']);
     $zz = array_merge($zw, $data2);
     return $zz;
 }
开发者ID:GStepOne,项目名称:CI,代码行数:80,代码来源:class.borrow_info.php


示例13: 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


示例14: renderBlock

function renderBlock($char_data)
{
    $rating = getRating($char_data[UNIT_FIELD_LEVEL]);
    $value = getFloatValue($char_data[PLAYER_BLOCK_PERCENTAGE], 2);
    $valueRating = $char_data[PLAYER_FIELD_BLOCK_RATING];
    $RatingPct = $valueRating / GetRatingCoefficient($rating, CR_BLOCK);
    $block_damage = $char_data[PLAYER_SHIELD_BLOCK];
    createTopTable();
    printf("<TR><TD class=head>Block Chance %.2f%%</TD></TR>", $value);
    printf("<TR><TD>Block rating of %d adds  Block</TD></TR>", $valueRating, $RatingPct);
    printf("<TR><TD>You block stops %d damage</TD></TR>", $block_damage);
    createEndTable("normStat", $value . "%");
}
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:13,代码来源:player_info_generator.php


示例15: getPaydetail

 private function getPaydetail()
 {
     if (!$this->uid) {
         exit;
     }
     $this->paydetail['money'] = getFloatValue($_GET['t_money'], 2);
     $this->paydetail['fee'] = 0;
     $this->paydetail['add_time'] = time();
     $this->paydetail['add_ip'] = get_client_ip();
     $this->paydetail['status'] = 0;
     $this->paydetail['uid'] = $this->uid;
     $this->paydetail['bank'] = strtoupper($_GET[ 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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