Beispiel #1
0
function emoji($str)
{
    global $filter;
    $tmpArr = $acsii = array();
    $s = '';
    array();
    $strToArray = str_split($str);
    foreach ($strToArray as $i => $v) {
        if ($i % 2 == 0) {
            if (isset($strToArray[$i + 1])) {
                $s = dechex(ord($strToArray[$i])) . dechex(ord($strToArray[$i + 1]));
                //var_dump($s);
                if (in_array($s, $filter)) {
                    $index = $i / 2;
                    if ($index != 0) {
                        $tmpArr = array($index => $s);
                        array_push($acsii, $tmpArr);
                        //will push string index and HEX code.
                    }
                }
            }
        }
    }
    $newStr = $str;
    foreach ($acsii as $asi) {
        foreach ($asi as $k => $v) {
            $newStr = str_replace(cnsubstr($str, $k + 1, 1), "\\&\\#" . $v, $newStr);
        }
    }
    return $newStr;
}
 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();
     }
 }
Beispiel #3
0
 function viewthread_sidetop_output()
 {
     global $_G, $postlist;
     $aid = $_G['forum_thread']['authorid'];
     $return = array();
     $tid = $_G['tid'];
     if ($postlist && $aid) {
         foreach ($postlist as $value) {
             if ($value['first']) {
                 $amu_query = DB::fetch_first("SELECT SUM(recommends),SUM(recommend_add),SUM(recommend_sub) FROM " . DB::table('forum_thread') . " WHERE authorid='{$aid}'");
                 $amu_recommends = $amu_query['SUM(recommends)'];
                 $amu_recommend_add = $amu_query['SUM(recommend_add)'];
                 $amu_recommend_sub = $amu_query['SUM(recommend_sub)'];
                 if ($amu_recommend_add || $amu_recommend_sub) {
                     $amu_hpl = round($amu_recommend_add * 100 / ($amu_recommend_add + $amu_recommend_sub), 1);
                 }
                 for ($k = 0; $k < count($this->amu_ranks, 0); $k++) {
                     if ($amu_recommends >= $this->amu_ranks[$k][3] && ($amu_recommends <= $this->amu_ranks[$k][4] || $this->amu_ranks[$k][4] == 0)) {
                         $return[0] = '<dl class="pil">';
                         if ($this->amu_ranks[$k][4] && $this->vars['showmod'] == 2) {
                             $bilv = '|' . round($amu_recommends * 100 / ($this->amu_ranks[$k][4] + 1), 1) . '%';
                             $return[0] .= '<dt>' . $this->vars['txt'] . '</dt><dd id="amurecommend_add" onmouseover="showMenu({\'ctrlid\':this.id, \'pos\':\'12\'});">' . $this->amu_ranks[$k][2] . $bilv . '</dd>';
                         }
                         if ($amu_hpl) {
                             $return[0] .= '<dt>' . $this->vars['txt2'] . '</dt><dd>' . $amu_hpl . '%&nbsp;<span id="amuassess" onmouseover="showMenu({\'ctrlid\':this.id,\'pos\':\'43\'})"><IMG SRC="source/plugin/dsu_amuassess/images/more_' . $this->vars['icon'] . '.png"></span></dd>';
                         }
                         $return[0] .= '</dl>';
                     }
                 }
             }
         }
     }
     $return[0] .= '<div id="amurecommend_add_menu" class="g_up" style="display:none"><div class="crly">&#24110;&#25105;&#21319;&#32423;&#23601;&#28857;&nbsp;:&nbsp;<a id="recommend_add2" href="forum.php?mod=misc&action=recommend&do=add&tid=' . $tid . '" onclick="ajaxmenu(this, 3000, 1, 0, \'43\', \'recommendupdate(1)\');return false;">' . $_G['setting']['recommendthread']['addtext'] . '</a> </div><div class="mncr"></div></div>';
     $ggprint = array();
     $fromfid = (array) unserialize($this->vars['fromfid']);
     if (count($fromfid, 0) == 1 && $fromfid[0] == '') {
         $where = '';
     } else {
         $fromfid = array_diff($fromfid, array(null));
         $where = ' AND fid IN (' . implode(",", array_unique($fromfid)) . ')';
     }
     if ($aid) {
         $num = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_thread') . " WHERE authorid = '" . $aid . "' AND recommends > 0" . $where);
         $page = max(1, intval($_G['gp_page']));
         $start_limit = ($page - 1) * 10;
         $multipage = multi($num, 10, $page, "plugin.php?id=dsu_amuassess:hook&authorid=" . $aid);
         $sql = "SELECT * FROM " . DB::table('forum_thread') . " WHERE authorid = '" . $aid . "' AND recommends > 0" . $where . " ORDER BY recommends DESC LIMIT " . $start_limit . " , 10";
         $querygg = DB::query($sql);
         $return[0] .= '<div id="amuassess_menu" style="display:none;width:340px;"><div class="crly bm_c"><ol class="xl xl1">';
         while ($value = DB::fetch($querygg)) {
             $return[0] .= '<li><a href="forum.php?mod=viewthread&tid=' . $value['tid'] . '" target="_blank" style="color:#3083C7; white-space:nowrap;">' . cnsubstr($value['subject'], 30) . '</a><em style="position:absolute; width:90px; color:#B7B7B7; text-align:right; height:12px;left:240px;">' . $value['replies'] . '/' . $value['views'] . '</em></li>';
         }
         $return[0] .= '</ol></div></div>';
     }
     return $return;
 }
 /**
  * 债权转让列表
  * 
  */
 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();
     }
 }
    public function index()
    {
        $parm['type_id'] = 2;
        $parm['pagesize'] = 8;
        $list = getArticleList($parm);
        if ($this->isAjax()) {
            $string = '';
            foreach ($list['list'] as $vn) {
                $string .= '<div class="new_list">
					<a href="' . $vn['arturl'] . '">
					  <div class="new_right">
					    <h3>' . cnsubstr($vn['title'], 23) . '</h3>
					    <em>日期' . date("Y-m-d", $vn['art_time']) . '</em>
					  </div>
					</a>
				</div>';
            }
            echo $string;
        } else {
            $this->assign("noticeList", $list);
            $this->display();
        }
    }
        foreach ($__LIST__ as $key => $vb) {
            $mod = $i % 2;
            ++$i;
            ?>
<tr>
<td> <?php 
            echo getIco($vb);
            ?>
<a href="<?php 
            echo getinvesturl($vb["id"]);
            ?>
"title="<?php 
            echo $vb["borrow_name"];
            ?>
"><?php 
            echo cnsubstr($vb["borrow_name"], 11);
            ?>
</a></td> 
<td><?php 
            echo getmoneyformt($vb["borrow_money"]);
            ?>
</td>
<td><span><?php 
            echo $vb["borrow_interest_rate"];
            ?>
</span>%</td>
<td>
            <?php 
            if ($vb['repayment_type'] == 1) {
                echo $vb["borrow_duration"];
                ?>
delline<?php 
            }
            ?>
">
		    <td width="286" align="left" style="text-align:left;">
		    &nbsp;&nbsp;<?php 
            echo getIco($vb);
            ?>
		    <a href="<?php 
            echo getinvesturl($vb["id"]);
            ?>
"title="<?php 
            echo $vb["borrow_name"];
            ?>
" ><?php 
            echo cnsubstr($vb["borrow_name"], 20);
            ?>
</a></td>
		   
			<td style="color:#5b5b5b"><span style="color:#f35a00; font-size:20px;"><?php 
            echo $vb["borrow_interest_rate"];
            ?>
</span>%</td>
		    <td style="color:#5b5b5b"><span class="BL_time"><?php 
            echo $vb["transfer_price"] ? $vb["transfer_price"] : 0;
            ?>
</span>&nbsp;元</td>
		    <td style="color:#5b5b5b"><span class="BL_time">¥<?php 
            echo $vb['transfer_price'] + $vb['interest'] ? $vb['transfer_price'] + $vb['interest'] : 0;
            ?>
</span>&nbsp;元</td>
 public function sendgala()
 {
     set_time_limit(0);
     //设置脚本最大执行时间
     $info = cnsubstr(text($_POST['info']), 500);
     $title = cnsubstr($info, 12);
     if ($info == "") {
         exit("发送内容不可为空");
     }
     $smsLog['admin_id'] = $_SESSION['admin_id'];
     $smsLog['admin_real_name'] = $_SESSION['admin_user_name'];
     $smsLog['title'] = $title;
     $smsLog['content'] = $info;
     $smsLog['add_time'] = time();
     $type = text($_POST['type']);
     $user_name = intval($_POST['user_name']);
     if ($user_name == 2) {
         //VIP会员
         $map = " user_leve=1 AND time_limit>" . time();
         $user = "******";
     } elseif ($user_name == 3) {
         //非VIP会员
         $map = " user_leve=0 OR time_limit<" . time();
         $user = "******";
     } else {
         //所有会员
         $map = "";
         $user = "******";
     }
     if (stripos($type, "1")) {
         $smsLog['user_email'] = $user;
     }
     if (stripos($type, "2")) {
         $smsLog['user_phone'] = $user;
     }
     if (stripos($type, "4")) {
         $smsLog['user_name'] = $user;
     }
     M('smslog')->add($smsLog);
     $user = M('members m')->field(" m.id,m.user_email,m.user_phone,ms.email_status,ms.phone_status ")->join(" lzh_members_status ms ON m.id=ms.uid ")->where($map)->select();
     if (stripos($type, "4")) {
         //站内信
         foreach ($user as $k => $v) {
             addInnerMsg($v['id'], $title, $info);
         }
     }
     /*if (stripos( $type,"1")) {//邮件
                 $i= 1;
                 foreach ($user as $k => $v) {
                     if($v['email_status']==1){
                         $to[floor($i/160)] .=$v['user_email'].",";
                         $i++;
                     }
                 }
     
                 foreach ($to as $key => $val) {
                     $val = substr($val, 0, strlen($val)-1 );
     
                     if($key<6)     sendemail2($val,$title,$info);
                     else           sendemail($val,$title,$info);
                 }
             }*/
     if (stripos($type, "2")) {
         //短信
         $i = 1;
         foreach ($user as $k => $v) {
             if ($v['phone_status'] == 1) {
                 $phone[floor($i / 150)] .= $v['user_phone'] . ",";
                 $i++;
             }
         }
         //var_dump($phone);
         foreach ($phone as $key2 => $val2) {
             $val2 = substr($val2, 0, strlen($val2) - 1);
             sendsms($val2, $info);
             // var_dump("$val2,$info");
         }
     }
     alogs("Smslog", 0, 1, '对' . $user . '执行通讯通知操作成功!');
     //管理员操作日志
     exit("发送成功");
 }
')" href="javascript:void(0);"><?php 
            echo $vo["user_name"];
            ?>
</a></td>
        <td><?php 
            echo $vo["borrow_type"];
            ?>
</td>
        <td><a href="<?php 
            echo getinvesturl($vo["id"]);
            ?>
" title="<?php 
            echo $vo["borrow_name"];
            ?>
" target="_blank"><?php 
            echo cnsubstr($vo["borrow_name"], 12);
            ?>
</a></td>
        <td><?php 
            echo $vo["borrow_money"];
            ?>
</td>
        <td><?php 
            echo $vo["repayment_type"];
            ?>
</td>
        <td><?php 
            echo $vo["borrow_duration"];
            if ($vo["repayment_type_num"] == 1) {
                ?>
天<?php 
	       		<div class="rb1_ha" style="margin-top: 0;"><span style="color: black;padding-left:15px">公司动态</span>
	       			<span style="padding-left: 250px;"><a href="http://www.yintt.cn/indexs/notice.html" class="fn-more">更多 &gt;</a></span>
	       		</div>
	      			<div class="rb1a">
	       			<ul>
		       			<?php if(is_array($noticeList["list"])): $i = 0; $__LIST__ = $noticeList["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vl): $mod = ($i % 2 );++$i;?><li style="margin: 5px"><a href="<?php echo ($vl["arturl"]); ?>" title="<?php echo ($vl["title"]); ?>"><?php echo (cnsubstr($vl["title"],25)); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
	     			</ul>
	     	 	</div>
	      	</div>
	      	<div id="right1" style="padding-left:20px">
		  		<div class="rb1_ha" style="margin-top: 0;"><span style="color: black;padding-left:15px">行业动态</span>
		  			<span style="padding-left: 250px;"><a href="http://www.yintt.cn/indexs/viontrend.html" class="fn-more">更多 &gt;</a></span>
		  		</div>
			     	<div class="rb1a">
			       	<ul>
				       	<?php if(is_array($gsdtList["list"])): $i = 0; $__LIST__ = $gsdtList["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vl): $mod = ($i % 2 );++$i;?><li style="margin: 5px"><a href="<?php echo ($vl["arturl"]); ?>" title="<?php echo ($vl["title"]); ?>"><?php echo (cnsubstr($vl["title"],25)); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
			     	</ul>
				</div>
	    	</div>
	    </div>
    </div>
    
   </div>
 
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<!-- <link rel="stylesheet" href="__ROOT__/Style/gold/css/css" type="text/css" media="all"> -->
	<link rel="stylesheet" href="__ROOT__/Style/gold/css/_footer.css" type="text/css">
    <link href="__ROOT__/Style/gold/css/online.css" rel="stylesheet" type="text/css" />
	<!-- Layout wrapper -->

    <script src="__ROOT__/Style/gold/js/toastr.js"></script>
Beispiel #11
0
function hidecard($cardnum, $type = 1, $default = "")
{
    if (empty($cardnum)) {
        return $default;
    }
    $len = 1;
    if ($type == 1) {
        $cardnum = substr($cardnum, 0, 3) . str_repeat("*", 12) . substr($cardnum, strlen($cardnum) - 4);
    } elseif ($type == 2) {
        $cardnum = substr($cardnum, 0, 3) . str_repeat("*", 5) . substr($cardnum, strlen($cardnum) - 4);
    } elseif ($type == 3) {
        $cardnum = str_repeat("*", strlen($cardnum) - 4) . substr($cardnum, strlen($cardnum) - 4);
    } elseif ($type == 4) {
        $cardnum = cnsubstr($cardnum, $len, 0, 'utf-8', false) . str_repeat("*", strlen($cardnum) - 3);
        //用户名
    } elseif ($type == 8) {
        $pos = strpos($cardnum, "@qq_");
        $pos1 = strpos($cardnum, "@sina_");
        if ($pos === 0) {
            $cardnum = "@qq_" . cnsubstr($cardnum, $len, 4, 'utf-8', false) . str_repeat("*", 3);
        } else {
            if ($pos1 === 0) {
                $cardnum = "@sina_" . cnsubstr($cardnum, $len, 6, 'utf-8', false) . str_repeat("*", 3);
            } else {
                $cardnum = cnsubstr($cardnum, $len, 0, 'utf-8', false) . str_repeat("*", 3);
                //用户名
            }
        }
    }
    return $cardnum;
}
    <th class="line_l">真实姓名</th>
    <th class="line_l">所选客服</th>
    <th class="line_l">专属客服</th>
    <th class="line_l">申请说明</th>
    <th class="line_l">申请时间</th>
    <th class="line_l">状态</th>
    <th class="line_l">操作</th>
  </tr>
  <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr overstyle='on' id="list_<?php echo ($vo["id"]); ?>">
        <td><input type="checkbox" name="checkbox" id="checkbox2" onclick="checkon(this)" value="<?php echo ($vo["id"]); ?>"></td>
        <td><?php echo ($vo["id"]); ?></td>
        <td><a onclick="loadUser(<?php echo ($vo["uid"]); ?>,'<?php echo ($vo["uname"]); ?>')" href="javascript:void(0);"><?php echo ($vo["uname"]); ?></a></td>
        <td><?php echo (($vo["real_name"])?($vo["real_name"]):"&nbsp;"); ?></td>
        <td><?php echo (($vo["a_kfName"])?($vo["a_kfName"]):"&nbsp;"); ?></td>
        <td><?php echo (($vo["a_deliName"])?($vo["a_deliName"]):"&nbsp;"); ?></td>
        <td><?php echo (cnsubstr($vo["des"],20)); ?></td>
        <td><?php echo (date("Y-m-d H:i:s",$vo["add_time"])); ?></td>
        <td><?php if($vo['status'] == 0): ?><span style="color:#F00">待审核</span><?php elseif($vo['status'] == 1): ?><span style="color:#090">审核通过</span><?php else: ?>审核未通过<?php endif; ?></td>
        <td>
            <a href="__URL__/edit?id=<?php echo ($vo['id']); ?>">审核</a> 
        </td>
      </tr><?php endforeach; endif; else: echo "" ;endif; ?>
  </table>

  </div>
  
  <div class="Toolbar_inbox">
  	<div class="page right"><?php echo ($pagebar); ?></div>
    <a onclick="dosearch();" class="btn_a" href="javascript:void(0);"><span class="search_action">搜索/筛选会员</span></a>
    <a class="btn_a" href="__URL__/index?status=1"><span>已通过审核</span></a>
    <a class="btn_a" href="__URL__/index?status=2"><span>未通过审核</span></a>
	<p>您目前回收中的投资总额是:<span class="fontred">¥<?php echo (($total)?($total):"0.00"); ?></span>,共<span class="fontred"><?php echo (($num)?($num):"0"); ?></span>笔投标。</p>
</div>
<table width="758" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <th>借款标号</th>
  <th>借款标题</th>
  <th>借入人</th>
  <th>我的投资金额</th>
  <th>已还本息</th>
  <th>年化利率</th>
  <th>已还/总期数(还款期)</th>
  <th>合同</th>
 </tr>
 <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
	<td><?php echo ($vo["borrow_id"]); ?></td>
	<td><a href="<?php echo (getinvesturl($vo["borrow_id"])); ?>" title="<?php echo ($vo["borrow_name"]); ?>" target="_blank"><?php echo (cnsubstr($vo["borrow_name"],10)); ?></a></td>
	<td><?php echo ($vo["borrow_user"]); echo (getleveico($vo["credits"],2)); ?></td>
	<td><?php echo ($vo["investor_capital"]); ?></td>
	<td><?php echo ($vo['receive_capital'] + $vo['receive_interest']); ?></td>
	<td><?php echo ($vo["borrow_interest_rate"]); ?>%<?php if($vo["repayment_type"] == 1): ?>/天<?php endif; ?></td>
	<td><?php echo (($vo["back"])?($vo["back"]):"0"); ?>/<?php echo ($vo["total"]); ?>(<?php echo (date("Y-m-d",$vo["deadline"])); ?>)(<a href="__URL__/tendoutdetail?id=<?php echo ($vo["id"]); ?>" target="_blank">详情</a>)</td>
	<td><a href="__APP__/member/agreement/downfile?id=<?php echo ($vo["id"]); ?>" target="_blank">合同</a></td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<div data="fragment-3" id="pager" style="float: right; text-align: right; width: 500px; padding-right: 8px;margin-right: 24px;" class="yahoo2 ajaxpagebar"><?php echo ($pagebar); ?></div>

<script type="text/javascript">
$('.ajaxpagebar a').click(function(){
	try{	
		var geturl = $(this).attr('href');
		var id = $(this).parent().attr('data');
        } else {
            foreach ($__LIST__ as $key => $vq) {
                $mod = $i % 2;
                ++$i;
                ?>
<a class="icoTc" href="tencent://Message/?Uin=<?php 
                echo $vq["qq_num"];
                ?>
&amp;websiteName=<?php 
                echo $vq["qq_title"];
                ?>
&amp;Menu=ye"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php 
                echo $vq["qq_num"];
                ?>
:52" alt="点击这里给我发消息" title="点击这里给我发消息"/>&nbsp;<?php 
                echo cnsubstr($vq["qq_title"], 6, 0, "utf-8", false);
                ?>
</a><?php 
            }
        }
    } else {
        echo "";
    }
    ?>
</div>
</li> 
</ul>
<div class="fl">

</div>
</div>
       <h4>投资项目列表</h4>
       <ul>
        <li><a id="a1" href="__APP__/invest/index/borrow_status/9">全部</a></li>
        <li><a id="a2" href="__APP__/invest/index/borrow_status/4">复审中的</a></li>
        <li><a id="a3" href="__APP__/invest/index/borrow_status/6">还款中的</a></li>
        <li><a id="a4" href="__APP__/invest/index/borrow_status/7">已完成的</a></li>
       </ul>
       <p>当前<span><?php echo ($doingnum); ?></span>个项目,供您选择</p>
      </div>
      
      <div id="list">
   
      <?php if(is_array($list["list"])): $i = 0; $__LIST__ = $list["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vb): $mod = ($i % 2 );++$i;?><div class="tiles white add-margin">
            
            
             <div class="text-black tpt"><a href="<?php echo (getinvesturl($vb["id"])); ?>" title="<?php echo ($vb["borrow_name"]); ?>"><?php echo (cnsubstr($vb["borrow_name"],15)); ?></a><span title="抵押标" class="biao di_biao">抵</span></div>
          <div class="p-l-20 p-r-20 p-b-20">
          
          
              <div class="row b-grey b-b xs-p-b-20">
                
                <div class="col-md-4">
                  <h5 class="text-black m-t-20 semi-bold">借款金额</h5>
                  <h3 class="text-success semi-bold"><span data-animation-duration="600" data-value="15458" class="animate-number"><?php echo (fmoney($vb["borrow_money"])); ?></span></h3>
                </div>

                
                <div class="col-md-1">
                  <div class="m-t-20">
                    <h5 class="text-black semi-bold h4m"><?php if($vb["repayment_type"] == 1): ?>日利率<?php else: ?>年利率<?php endif; ?></h5>
                    <h4 class="text-success semi-bold"><span data-animation-duration="600" data-value="4569" class="animate-number"><?php echo ($vb["borrow_interest_rate"]); ?></span>%</h4>
    <th class="line_l">发生时间</th>
    <th class="line_l">说明</th>
  </tr>
  <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr overstyle='on' id="list_<?php echo ($vo["id"]); ?>">
        <td><input type="checkbox" name="checkbox" id="checkbox2" onclick="checkon(this)" value="<?php echo ($vo["id"]); ?>"></td>
        <td><?php echo ($vo["id"]); ?></td>
        <td><?php echo ($vo["mid"]); ?></td>
        <td><?php echo ($vo["user_name"]); ?></td>
        <td><?php echo ($vo["target_uname"]); ?></td>
        <td><?php echo ($type[$vo['type']]); ?></td>
        <td><?php echo (($vo["affect_money"])?($vo["affect_money"]):0); ?>元</td>
        <td><?php echo (($vo["account_money"])?($vo["account_money"]):0); ?>元</td>
        <td><?php echo (($vo["freeze_money"])?($vo["freeze_money"]):0); ?>元</td>
        <td><?php echo (($vo["collect_money"])?($vo["collect_money"]):0); ?>元</td>
        <td><?php echo (date("Y-m-d H:i:s",$vo["add_time"])); ?></td>
        <td title="<?php echo ($vo["info"]); ?>"><?php echo (cnsubstr($vo["info"],10)); ?></td>
      </tr><?php endforeach; endif; else: echo "" ;endif; ?>
  </table>

  </div>
  
  <div class="Toolbar_inbox">
  	<div class="page right"><?php echo ($pagebar); ?></div>
    <a onclick="dosearch();" class="btn_a" href="javascript:void(0);"><span class="search_action">搜索/筛选会员</span></a>
    <a class="btn_a" href="__GROUP__/capital_detail/export?<?php echo ($query); ?>"><span>将当前条件下数据导出为Excel</span></a>
  </div>
</div>
<script type="text/javascript">
function showurl(url,Title){
	ui.box.load(url, {title:Title});
}
 public function bank()
 {
     $ids = M('members_status')->getFieldByUid($this->uid, 'id_status');
     if ($ids != 1) {
         ajaxmsg("您还未完成身份验证,请先进行实名认证", 0);
     } else {
         if (!M('escrow_account')->where("uid={$this->uid} and account <>''")->count('uid')) {
             ajaxmsg("你还未绑定托管账户,请先绑定托管账户", 0);
         }
         $voinfo = M("member_info")->field('idcard,real_name')->find($this->uid);
         $vobank = M("member_banks")->field(true)->where("uid = {$this->uid} and bank_num !=''")->find();
         $vobank['bank_province'] = M('area')->getFieldByid("{$vobank['bank_province']}", 'name');
         $vobank['bank_city'] = M('area')->getFieldByid("{$vobank['bank_city']}", 'name');
         if (!empty($vobank['bank_num'])) {
             $data['bank_num'] = hidecard($vobank['bank_num'], 3);
             $data['bank_name'] = hidecard($vobank['bank_name'], 4);
             $data['real_name'] = cnsubstr($voinfo['real_name'], 1, 0, 'utf-8', false) . str_repeat("*", strlen($voinfo['real_name']) - 1);
             $data['bank_province'] = "开户银行所在省份:" . $vobank['bank_province'];
             $data['bank_city'] = "开户银行所在市:" . $vobank['bank_city'];
             $data['bank_address'] = "开户行支行名称:" . $vobank['bank_address'];
             ajaxmsg($data);
         } else {
             $data['real_name'] = cnsubstr($voinfo['real_name'], 1, 0, 'utf-8', false) . str_repeat("*", strlen($voinfo['real_name']) - 1);
             ajaxmsg($data, 2);
             //ajaxmsg("您还未绑定银行卡",0);
         }
     }
 }
    public static function baike($array)
    {
        global $DB_Document_Read;
        $str = '';
        $sql = 'select z_title,z_docid,i.class_id from z_document_id_title t left join doc_index i on t.z_docid = i.document_id where t.z_flag = 0 and i.class_id = ' . $array['classId'];
        $rows = $DB_Document_Read->get_results($sql);
        $icnt = count($rows);
        if ($rows && $icnt > 4) {
            shuffle($rows);
            $str .= '<div class="r_bd mt10 pb10">
							        <div class="tit_5 tit_6">' . str_replace('频道', '', $array['className']) . '百科</div>
							        <ul class="rank_ul2 rank_dot">';
            $i = 1;
            foreach ($rows as $row) {
                $title = str_replace('-中关村在线', '', $row['z_title']);
                $url = get_document_url($row['z_docid'], 1, 0, $row['class_id']);
                $class = $i == $icnt || 10 == $i ? ' class="lastli"' : '';
                $str .= '<li' . $class . '><a href="' . $url . '" title="' . htmlspecialchars($title) . '">' . cnsubstr($title, 40) . '</a></li>';
                if (10 == $i) {
                    break;
                }
                $i++;
            }
            $str .= '</ul></div>';
        }
        return $str;
    }
</div>

<div class="state_main">
  <div class="xw_main_state">
    <div class="state_project"> 
    <div class="phc_dybt"> <span class="tailuser">借款用户&nbsp;:&nbsp;<?php 
echo $minfo["user_name2"];
?>
&nbsp;<!--<?php 
echo getleveico($minfo["credits"], 2);
?>
--></span><span style="display:block; float:left;"><?php 
echo getIco($vo);
?>
</span> <?php 
echo cnsubstr($vo["borrow_name"], 26);
?>
&nbsp; </div>
      <div class="project_left" <?php 
if ($vo["borrow_status"] != "2") {
    ?>
style="background:url(/Style/H/images/invest/ymb.jpg) no-repeat right 100px "<?php 
}
?>
>
       
        <div class="clear"></div>
        <p> <span class="width1">借款金额</span> <span class="width2">年利率</span> <span class="width3">借款期限</span> </p>
        <ul>
          <li class="bt"><span class="width1"><strong style="color:#f39700">¥<?php 
echo getmoneyformt($vo["borrow_money"]);
  <li><p><span>*</span>上传文件:</p><input name="uploadFile" id="uploadFile" class="u12_tex1" type="file" />(文件大小2M以内)</li>
  <li><p><span>*</span>文件名称:</p><input class="u12_tex1" type="text" id="filetxt" value="文件名称" /></li>
  <li><p>资料分类:</p><div class="sel_border"><div class="selNr"><select name="data_type" id="data_type"   class="c_select sel"><option value="">--请选择--</option><?php foreach($Bconfig['DATA_TYPE'] as $key=>$v){ if($_X[""]==$key && $_X[""]!=""){ ?><option value="<?php echo ($key); ?>" selected="selected"><?php echo ($v); ?></option><?php }else{ ?><option value="<?php echo ($key); ?>"><?php echo ($v); ?></option><?php }} ?></select></div></div></li>
  <li><p>&nbsp;</p><input type="button" class="u12_but2" value="上传" id="btnUpload" onclick="upfile();" /></li>
 </ul>
<table width="758" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <th nowrap="nowrap">文件名</th>
  <th nowrap="nowrap">文件类型</th>
  <th nowrap="nowrap">大小</th>
  <th nowrap="nowrap">资料分类</th>
  <th nowrap="nowrap">审核状态</th>
  <th nowrap="nowrap">操作(说明)</th>
 </tr>
 <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vx): $mod = ($i % 2 );++$i;?><tr>
	<td align="left" title="<?php echo ($vx["data_name"]); ?>"><?php echo (cnsubstr($vx["data_name"],8)); ?></td>
	<td align="center"><?php echo ($vx["ext"]); ?></td>
	<td align="center"><?php echo (setmb($vx["size"])); ?></td>
	<td align="left"><?php echo ($Bconfig['DATA_TYPE'][$vx['type']]); ?></td>
	<td><?php echo ($Bconfig['DATA_STATUS'][$vx['status']]); ?></td>
	<td>
       <?php if($vx["status"] == 0): ?><input id="btndel" value="删除" class="u12_but1" style="float:none" type="button" onclick="delfile(<?php echo ($vx["id"]); ?>);">
       <?php else: ?>
<input title="<?php echo ($vx["deal_info"]); ?>" id="btndel" value=" " style="width: 55px; height: 20px; border: none;background-image: url(__ROOT__/Style/M/images/account/filedelete.jpg);cursor: pointer; border: none;" type="button" onclick="delfile(<?php echo ($vx["id"]); ?>);"><?php endif; ?> | <a href="__ROOT__/<?php echo ($vx["data_url"]); ?>" target="_blank">查看</a>
	</td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
</div>
<script type="text/javascript">
$('.ajaxpagebar a').click(function(){
	try{	
Beispiel #21
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();
     }
 }
 /**
  * [reclist(recommend list) 推荐标信息作废]
  * @return [type] [description]
  * @author yudianguo <*****@*****.**>
  */
 public function reclist()
 {
     //普通表\企业标
     //$maxid=M('borrow_info')->max('id');
     //$parm=array();
     //searchMap=array();
     //$searchMap['id']=$maxid;
     $searchMap['stock_type'] = 1;
     $searchMap['borrow_status'] = '2';
     $parm['map'] = $searchMap;
     $parm['limit'] = 1;
     $parm['orderby'] = "b.id DESC";
     $func = (require c("APP_ROOT") . "Common/Apps/function.php");
     $list = getBorrowList($parm);
     foreach ($list['list'] as $key => $v) {
         $_list[$key]['uid'] = intval($v['uid']);
         $_list[$key]['type'] = getleixing($v);
         $_list[$key]['id'] = intval($v['id']);
         $_list[$key]['borrow_name'] = $v['borrow_name'];
         $_list[$key]['borrow_interest_rate'] = $v['borrow_interest_rate'];
         if ($v['repayment_type'] == 1) {
             $_list[$key]['borrow_duration'] = $v['borrow_duration'] . "天";
         } else {
             $_list[$key]['borrow_duration'] = $v['borrow_duration'] . "个月";
         }
         $_list[$key]['repayment_type'] = $v['repayment_type'];
         $_list[$key]['huankuan_type'] = $Bconfig['REPAYMENT_TYPE'][$v['repayment_type']];
         $_list[$key]['borrow_money'] = $v['borrow_money'];
         $_list[$key]['progress'] = $v['progress'];
         $_list[$key]['credits'] = $v['credits'];
         $_list[$key]['borrow_min'] = $v['borrow_min'];
         $_list[$key]['borrow_max'] = $v['borrow_max'];
         $_list[$key]['user_name'] = $v['user_name'];
         $_list[$key]['imgpath'] = get_avatar(intval($v['uid']));
         $_list[$key]['suo'] = empty($v['password']) ? "0" : "1";
         //是否定向标
         if ($v['reward_type'] == 1) {
             $_list[$key]['reward'] = $v['reward_num'] . "%";
         } elseif ($v['reward_type'] == 2) {
             $_list[$key]['reward'] = $v['reward_num'] . "元";
         } else {
             $_list[$key]['reward'] = "0";
         }
         $borrowinfo = M("borrow_info bi")->field('bi.id as bid,bi.*,ac.title,ac.id')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $v['id'])->find();
         $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
         if ($v['progress'] >= 100) {
             $_list[$key]['lefttime'] = "已结束";
         } elseif ($borrowinfo['lefttime'] > 0) {
             $left_tian = floor($borrowinfo['lefttime'] / (60 * 60 * 24));
             $left_hour = floor(($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60) / 3600);
             $left_minute = floor(($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60 - $left_hour * 60 * 60) / 60);
             $left_second = floor($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60 - $left_hour * 60 * 60 - $left_minute * 60);
             $_list[$key]['lefttime'] = $left_tian . "天" . $left_hour . "时" . $left_minute . "分";
         } else {
             $_list[$key]['lefttime'] = "已结束";
         }
         $m_list['lists'] = $_list;
     }
     //企业标
     $searchMaps['stock_type'] = 2;
     $searchMaps['borrow_status'] = '2';
     $parms['map'] = $searchMaps;
     $parms['limit'] = 2;
     $parms['orderby'] = "b.id DESC";
     $lists = getBorrowList($parms);
     foreach ($lists['list'] as $key => $v) {
         $_lists[$key]['uid'] = intval($v['uid']);
         $_lists[$key]['type'] = getleixing($v);
         $_lists[$key]['id'] = intval($v['id']);
         $_lists[$key]['borrow_name'] = $v['borrow_name'];
         $_lists[$key]['borrow_interest_rate'] = $v['borrow_interest_rate'];
         if ($v['repayment_type'] == 1) {
             $_lists[$key]['borrow_duration'] = $v['borrow_duration'] . "天";
         } else {
             $_lists[$key]['borrow_duration'] = $v['borrow_duration'] . "个月";
         }
         $_lists[$key]['repayment_type'] = $v['repayment_type'];
         $_lists[$key]['huankuan_type'] = $Bconfig['REPAYMENT_TYPE'][$v['repayment_type']];
         $_lists[$key]['borrow_money'] = $v['borrow_money'];
         $_lists[$key]['progress'] = $v['progress'];
         $_lists[$key]['credits'] = $v['credits'];
         $_lists[$key]['user_name'] = $v['user_name'];
         $_lists[$key]['borrow_min'] = $v['borrow_min'];
         $_lists[$key]['borrow_max'] = $v['borrow_max'];
         $_lists[$key]['imgpath'] = get_avatar(intval($v['uid']));
         $_lists[$key]['suo'] = empty($v['password']) ? 0 : 1;
         //是否定向标
         if ($v['reward_type'] == 1) {
             $_lists[$key]['reward'] = $v['reward_num'] . "%";
         } elseif ($v['reward_type'] == 2) {
             $_lists[$key]['reward'] = $v['reward_num'] . "元";
         } else {
             $_lists[$key]['reward'] = "0";
         }
         $borrowinfo = M("borrow_info bi")->field('bi.id as bid,bi.*,ac.title,ac.id')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $v['id'])->find();
         $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
         if ($v['progress'] >= 100) {
             $_lists[$key]['lefttime'] = "已结束";
         } elseif ($borrowinfo['lefttime'] > 0) {
             $left_tian = floor($borrowinfo['lefttime'] / (60 * 60 * 24));
             $left_hour = floor(($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60) / 3600);
             $left_minute = floor(($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60 - $left_hour * 60 * 60) / 60);
             $left_second = floor($borrowinfo['lefttime'] - $left_tian * 24 * 60 * 60 - $left_hour * 60 * 60 - $left_minute * 60);
             $_lists[$key]['lefttime'] = $left_tian . "天" . $left_hour . "时" . $left_minute . "分";
         } else {
             $_lists[$key]['lefttime'] = "已结束";
         }
         $m_list['company'] = $_lists;
     }
     //债券转让
     $search['b.borrow_status'] = array("in", "2,4,6,7");
     $parmss['map'] = $search;
     $parmss['limit'] = 1;
     D("DebtBehavior");
     $Debt = new DebtBehavior();
     $list = $Debt->listAllz($parmss);
     foreach ($list as $k => $v) {
         foreach ($v as $k => $vl) {
             $listss[$k]['borrow_name'] = cnsubstr($vl['borrow_name'], 12);
             $listss[$k]['credits'] = getLeveIco($vl['credits'], 2);
             $listss[$k]['borrow_interest_rate'] = $vl['borrow_interest_rate'];
             $listss[$k]['transfer_price'] = $vl['transfer_price'];
             $listss[$k]['money'] = $vl['money'];
             $listss[$k]['transfer_date'] = $vl['period'];
             $listss[$k]['total_date'] = $vl['total_period'];
             $listss[$k]['id'] = $vl['id'];
             $listss[$k]['invest_id'] = $vl['invest_id'];
             if ($vl['status'] == 2) {
                 $listss[$k]['status'] = "我要购买";
             } elseif ($vl['status'] == 4) {
                 $listss[$k]['status'] = "已停售";
             }
             $m_list['debt'] = $listss;
         }
     }
     ajaxmsg($m_list);
 }