public function index()
 {
     $parm = array();
     //$Map  = ' b.borrow_status = 2 and b.is_show=1 and b.transfer_total > b.transfer_out';
     $Map = 'b.is_show=1 ';
     $parm['map'] = $Map;
     $parm['orderby'] = "b.is_show desc,b.id DESC";
     $parm['pagesize'] = 8;
     $listTBorrow = getTBorrowList($parm);
     if ($this->isAjax()) {
         $string = '';
         foreach ($listTBorrow['list'] as $vb) {
             $string .= '<a href="' . getInvestUrl($vb['id']) . '">
                     <div class="biao_box">
                      <h4><div class="title_img" style="float:left;margin-top:4px">' . getIco($vb) . '</div>
                         <div style="float:left;text-align:left">' . cnsubstr($vb['borrow_name'], 5) . '</div></h4><table>
                         <tr>
                             <td>融资金额:' . MFormt($vb['borrow_money']) . '元</td>
                             <td>融资期限:' . $vb['borrow_duration'];
             $string .= $vb['repayment_type'] == 1 ? '天' : '个月';
             $string .= '</tr><tr><td>年化利率:' . $vb['borrow_interest_rate'] . '%/';
             $string .= $vb['repayment_type'] == 1 ? '天' : '年';
             $string .= '</td><td><span class="progress"> <span class="precent" style="width":' . $vb['progress'] . '></span></span>
              </td></tr></table> </div> </a>';
         }
         echo $string;
     } else {
         $this->assign("listTBorrow", $listTBorrow);
         $this->display();
     }
 }
 /**
  * 债权转让列表
  * 
  */
 public function index()
 {
     if ($this->uid) {
         $uid = $this->uid;
     } else {
         $uid = 88;
     }
     $searchMap['borrow_status'] = array("in", '2,4,6,7,3');
     $parm['map'] = $searchMap;
     $parm['pagesize'] = 2;
     $sort = "desc";
     $parm['orderby'] = "b.borrow_status ASC,b.id DESC";
     D("DebtBehavior");
     $Debt = new DebtBehavior();
     $list = $Debt->listAllz($parm);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     if ($this->isAjax()) {
         $str = '';
         foreach ($list['list'] as $vb) {
             $str .= "<div class='box'>";
             $str .= " <p class='tit'><a href='/m/invest/detail/id/{$vb['id']}'>{$vb['borrow_name']}</a></p>";
             $str .= "<table cellpadding='0' cellspacing='0' border='0' class='table'>";
             $str .= "<tr>";
             $str .= "<td>借款标题:</td><td>" . getIco($vb) . "<a href='" . getInvestUrl($vb[id]) . "' title='{$vb['borrow_name']}' class='BL_name'>" . cnsubstr($vb[borrow_name], 12) . "</a></td><td>信誉等级:</td><td>" . getLeveIco($vb[credits], 2) . "</td>";
             $str .= "</tr><tr>";
             $str .= "<td>借款利率:</td><td>{$vb['borrow_interest_rate']}%</td><td>转让价格:</td><td>{$vb['transfer_price']}</span>&nbsp;元</td>";
             $str .= "</tr><tr>";
             $str .= "<td>待收本息:</td><td>¥{$vb['money']}</span>&nbsp;元</td><td>转让期数/总期数:</td><td>{$vb['period']}期/{$vb['total_period']}期</td>";
             $str .= "</table>";
             $str .= "<p class='sub'>";
             if ($vb[status] == 2) {
                 $str .= "<a href='javascript:;' onclick='buy_debt({$vb['invest_id']})' id='tz' class='<css1 an btn-a fr'>我要投资</a>";
             } elseif ($vb[status] == 1) {
                 $str .= "<img  class='' src='/Style/H/images/status/ywc.gif'  />";
             } elseif ($vb[status] == 4) {
                 $str .= "<img  class='' src='/Style/H/images/status/yts.gif'  />";
             }
             $str .= " </p></div>";
         }
         echo $str;
     } else {
         $this->assign("list", $list);
         $this->assign('uid', $uid);
         $this->assign("searchUrl", $searchUrl);
         $this->assign("searchMap", $searchMap);
         $this->display();
     }
 }
Example #3
0
/**
* 根据接收到的状态输出状态按钮
* @desc intval $status  // 借款状态
* @return string
* @author zhangjili 2014-03-25
*/
function borrow_status($borrow_id, $status = 0)
{
    switch ($status) {
        case 0:
            $href = '<a  class="tz_bt">等待初审</a> ';
            break;
        case 2:
            $href = '<a href="/m' . getInvestUrl($borrow_id) . '"  class="tz_bt">我要投资</a> ';
            break;
        case 4:
            $href = '<a  class="tz_bt">等待复审</a> ';
            break;
        case 6:
            $href = '<a  class="tz_btt">还款中</a> ';
            break;
        default:
            $href = '<a  class="tz_btt">已结束</a> ';
    }
    return $href;
}
Example #4
0
 public function index()
 {
     $maprow = array();
     $searchMap['borrow_status'] = array("in", '2,4,6,7');
     $parm['map'] = $searchMap;
     $parm['pagesize'] = 5;
     $sort = "desc";
     $parm['orderby'] = "b.borrow_status ASC,b.id DESC";
     $list = getBorrowList($parm);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     if ($this->isAjax()) {
         $string = '';
         foreach ($list['list'] as $vb) {
             $string .= '
                     <div class="main_box">
                       <div class="title">
                         <div class="title_img">' . getIco($vb) . '</div>
                         <a href="' . getInvestUrl($vb['id']) . '" >' . cnsubstr($vb['borrow_name'], 17) . '</a>
                            
                       </div>  
                       <div class="box_ner">
                        <table cellpadding="0" cellspacing="0" border="0">
                         <tr>
                          <td align="left">
                              <div class="box_ner_nn">
                               <ul>
                              <li>金额:<span class="col">' . MFormt($vb['borrow_money']) . '元</span></li>
                              <li>期限:' . $vb['borrow_duration'];
             $string .= $vb['repayment_type'] == 1 ? '天' : '个月';
             $string .= '</li>
                              <li>利率:' . $vb['borrow_interest_rate'] . '%/';
             $string .= $vb['repayment_type'] == 1 ? '天' : '年';
             $string .= '</li>
                              <li><span class="jd">进度:</span>
                              <span class="progress">
                              <span class="precent" style="width:' . $vb['progress'] . '%;"></span></span></li>
                             </ul> 
                             </div>     
                          </td>
                          <td align="center">' . borrow_status($vb['id'], $vb['borrow_status']) . '</td>
                          </tr>
                        </table>
                         
                        </div>
                       </div>';
         }
         echo $string;
     } else {
         ///////////////企业直投列表开始 /////////////
         $parm = array();
         $Map = ' b.borrow_status = 2 and b.is_show=1 and b.transfer_total > b.transfer_out';
         $parm['map'] = $Map;
         $parm['orderby'] = "b.is_show desc,b.id DESC";
         $listTBorrow = getTBorrowList($parm);
         $this->assign("listTBorrow", $listTBorrow);
         ///////////////企业直投列表结束 /////////////
         $this->assign('list', $list);
         $this->assign('Bconfig', $Bconfig);
         $this->display();
     }
 }
	<?php 
            } elseif ($vb["borrow_status"] == 6) {
                ?>
		<a class="ui-button ui-button-mid ui-button-blue ui-list-invest-button ui-list-invest-button-IN_PROGRESS"><span class="IN_PROGRESS">还款中</span></a>
	<?php 
            } elseif ($vb["borrow_status"] > 6) {
                ?>
		<a class="ui-button ui-button-mid ui-button-blue ui-list-invest-button ui-list-invest-button-IN_PROGRESS" href="<?php 
                echo getInvestUrl($vb["id"]);
                ?>
"><span class="READY FIRST_READY">已满标</span></a>
	<?php 
            } else {
                ?>
		<a class="ui-button ui-button-mid ui-button-blue ui-list-invest-button ui-list-invest-button-IN_PROGRESS" href="<?php 
                echo getInvestUrl($vb["id"]);
                ?>
"><span class="OPEN">投标</span></a><?php 
            }
            ?>
    
  </span>
</li><?php 
        }
    }
} else {
    echo "";
}
?>
<li class="ui-list-more">
  <a class="darkgray" href="/p2p/invest/index.html" target="_blank">查看更多投资理财项目</a>