Beispiel #1
0
 public function get_rows($start = 0)
 {
     // Initialize
     global $template;
     // Get rows to display
     if ($this->userid > 0) {
         $rows = DB::query("SELECT * FROM orders WHERE userid = %d ORDER BY date_added DESC LIMIT {$start},{$this->rows_per_page}", $this->userid);
     } else {
         $rows = DB::query("SELECT * FROM orders WHERE status = %s ORDER BY date_added DESC LIMIT {$start},{$this->rows_per_page}", $this->status);
     }
     // Go through rows
     $results = array();
     foreach ($rows as $row) {
         $row['checkbox'] = "<center><input type=\"checkbox\" name=\"order_id[]\" value=\"{$row['id']}\"></center>";
         $row['date_added'] = fdate($row['date_added'], true);
         $row['product'] = DB::queryFirstField("SELECT display_name FROM products WHERE id = %d", $row['product_id']);
         $row['amount'] = fmoney_coin($row['amount_btc']) . ' BTC (' . fmoney($row['amount']) . ')';
         $row['status'] = ucwords($row['status']);
         // Get manage URL
         $url = $template->theme == 'public' ? SITE_URI . "/account/view_order?order_id={$row['id']}" : SITE_URI . "/admin/financial/orders_manage?order_id={$row['id']}";
         $row['manage'] = "<center><a href=\"{$url}\" class=\"btn btn-primary btn-xs\">Manage</a></center>";
         $username = get_user($row['userid']);
         $row['username'] = "******"" . SITE_URI . "/admin/user/manage2?username={$username}\">{$username}</a>";
         array_push($results, $row);
     }
     // Return
     return $results;
 }
Beispiel #2
0
 public function create_pending_session($wallet_id, $product_id = 0, $amount = 0, $currency = 'btc')
 {
     // Initialize
     global $config, $template;
     $userid = LOGIN === true ? $GLOBALS['userid'] : 0;
     $expire_time = time() + $config['payment_expire_seconds'];
     // Get hash
     do {
         $hash = generate_random_string(120);
         if ($row = DB::queryFirstRow("SELECT * FROM coin_pending_payment WHERE pay_hash = %s", hash('sha512', 120))) {
             $exists = 1;
         } else {
             $exists = 0;
         }
     } while ($exists > 0);
     // Get product, if needed
     if ($product_id > 0) {
         if (!($prow = DB::queryFirstRow("SELECT * FROM products WHERE id = %d", $product_id))) {
             trigger_error("Product does not exist, ID# {$product_id}", E_USER_ERROR);
         }
         $amount = $prow['amount'];
         $currency = $prow['currency'];
         $item_name = $prow['display_name'];
     } else {
         $item_name = '';
     }
     // Get amount
     if ($currency == 'fiat') {
         $amount_btc = $amount / $config['exchange_rate'];
     } else {
         $amount_btc = $amount;
         $amount = $amount_btc * $config['exchange_rate'];
     }
     // Get payment address
     if ($userid > 0) {
         $client = new bip32();
         $payment_address = $client->get_user_address($wallet_id, $userid);
         // Delete any existing pending payments
         DB::query("DELETE FROM coin_pending_payment WHERE payment_address = %s AND status = 'pending'", $payment_address);
     } else {
         $payment_address = '';
     }
     // Add to db
     DB::insert('coin_pending_payment', array('wallet_id' => $wallet_id, 'pay_hash' => $hash, 'userid' => $userid, 'item_id' => $product_id, 'amount' => $amount, 'amount_btc' => $amount_btc, 'expire_time' => $expire_time, 'payment_address' => $payment_address));
     // Template variables
     $template->assign('payment_address', $payment_address);
     $template->assign('currency', $currency);
     $template->assign('amount', fmoney_coin($amount_btc));
     $template->assign('amount_fiat', fmoney($amount));
     $template->assign('product_id', $product_id);
     $template->assign('product_name', $item_name);
     // Return hash
     return $hash;
 }
Beispiel #3
0
 public function get_rows($start = 0)
 {
     // Get rows to display
     $rows = DB::query("SELECT * FROM products WHERE is_enabled = %d ORDER BY display_name LIMIT {$start},{$this->rows_per_page}", $this->is_enabled);
     // Go through rows
     $results = array();
     foreach ($rows as $row) {
         $row['checkbox'] = "<center><input type=\"checkbox\" name=\"product_id[]\" value=\"{$row['id']}\"></center>";
         $row['amount'] = $row['currency'] == 'fiat' ? fmoney($row['amount']) : fmoney_coin($row['amount']) . ' BTC';
         array_push($results, $row);
     }
     // Return
     return $results;
 }
Beispiel #4
0
<?php

// Initialize
global $template, $currency;
// Get invoice
if (!($row = DB::queryFirstRow("SELECT * FROM invoices WHERE id = %d", $_REQUEST['invoice_id']))) {
    trigger_error("Invoice does not exist, ID# {$_REQUST['invoice_id']}", E_USER_ERROR);
}
// Set variables
$row['wallet_name'] = DB::queryFirstField("SELECT display_name FROM coin_wallets WHERE id = %d", $row['wallet_id']);
$row['status'] = ucwords($row['status']);
$row['date_added'] = fdate($row['date_added']);
$row['date_paid'] = preg_match("/^0000/", $row['date_paid']) ? 'Unpaid' : fdate($row['date_paid']);
$row['note'] = str_replace("\n", "<br />", $row['note']);
$row['amount'] = fmoney($row['amount']);
$row['amount_btc'] = fmoney_coin($row['amount_btc']);
// Template variables
$template->assign('invoice', $row);
		<dl class="lineD"><dt>投资总额:</dt><dd><?php echo (fmoney($capitalinfo["tj"]["jcze"])); ?></dd><dt>投标奖励:</dt><dd><?php echo (fmoney($capitalinfo["tj"]["tbjl"])); ?></dd></dl>
		<dl class="lineD"><dt>已收总额:</dt><dd><?php echo (fmoney($capitalinfo["tj"]["ysze"])); ?></dd><dt>待收总额:</dt><dd><?php echo (fmoney($capitalinfo["tj"]["dsze"])); ?></dd></dl>
	</div><!--tab3-->
	
	<div id="tab_3" style="display:none">
		<dl class="lineD"><dt class="title">资金情况</dt><dd class="xwidth">&nbsp;</dd></dl>
		<dl class="lineD"><dt>帐户总额:</dt><dd><?php echo (fmoney($vo["money_all"])); ?></dd><dt>待收金额:</dt><dd><?php echo (fmoney($vo["money_collect"])); ?></dd></dl>
		<dl class="lineD"><dt>可用余额:</dt><dd><?php echo (fmoney($vo["account_money"])); ?></dd><dt>冻结金额:</dt><dd><?php echo (fmoney($vo["money_freeze"])); ?></dd></dl>

		<dl class="lineD"><dt class="title">充值提现</dt><dd class="xwidth">&nbsp;</dd></dl>
		<dl class="lineD"><dt>充值成功次数:</dt><dd><?php echo (($wc["C"]["num"])?($wc["C"]["num"]):0); ?>次</dd><dt>充值成功金额:</dt><dd><?php echo (fmoney($wc["C"]["money"])); ?></dd></dl>
		<dl class="lineD"><dt>提现成功次数:</dt><dd><?php echo (($wc["W"]["num"])?($wc["W"]["num"]):0); ?>次</dd><dt>提现成功金额:</dt><dd><?php echo (fmoney($wc["W"]["money"])); ?></dd></dl>

		<dl class="lineD"><dt class="title">额度情况</dt><dd class="xwidth">&nbsp;</dd></dl>
		<dl class="lineD"><dt>借款信用额度:</dt><dd><?php echo (fmoney($vo["credit_limit"])); ?></dd><dt>可用信用额度:</dt><dd><?php echo (fmoney($vo["credit_cuse"])); ?></dd></dl>
		<dl class="lineD"><dt>借款担保总额:</dt><dd><?php echo (fmoney($vo["borrow_vouch_limit"])); ?></dd><dt>可用借款担保额度:</dt><dd><?php echo (fmoney($vo["borrow_vouch_cuse"])); ?></dd></dl>
		<dl class="lineD"><dt>投资担保总额:</dt><dd><?php echo (fmoney($vo["invest_vouch_limit"])); ?></dd><dt>可用投资担保额度:</dt><dd><?php echo (fmoney($vo["invest_vouch_cuse"])); ?></dd></dl>
	</div><!--tab3-->

	<div class="page_btm">
	  <input type="submit" class="btn_b" value="关闭" onclick="closeui();" />
	</div>
</div>

</div>
<script type="text/javascript">
function closeui(){
	ui.box.close();
}
</script>
<script type="text/javascript" src="__ROOT__/Style/A/js/adminbase.js"></script>
Beispiel #6
0
<?php

// Initialize
global $template;
// Get order
if (!($row = DB::queryFirstRow("SELECT * FROM orders WHERE id = %d", $_REQUEST['order_id']))) {
    trigger_error("Order does not exist, ID# {$_REQUEST['order_id']}", E_USER_ERROR);
}
// Set variables
$_POST['order_id'] = $row['id'];
$row['username'] = get_user($row['userid']);
$row['product_name'] = DB::queryFirstField("SELECT display_name FROM products WHERE id = %d", $row['product_id']) . ' (#' . $row['product_id'] . ')';
$row['amount'] = fmoney_coin($row['amount_btc']) . ' BTC (' . fmoney($row['amount']) . ')';
$row['date_added'] = fdate($row['date_added'], true);
// Status options
if ($row['status'] == 'declined') {
    $status_options = '<option value="approved">Approved<option value="declined" selected="selected">Declined<option value="pending">Pending';
} elseif ($row['status'] == 'pending') {
    $status_options = '<option value="approved">Approved<option value="declined">Declined<option value="pending" selected="selected">Pending';
} else {
    $status_options = '<option value="approved" selected="selected">Approved<option value="declined">Declined<option value="pending">Pending';
}
// Template variables
$template->assign('order', $row);
$template->assign('status_options', $status_options);
<div id="maincontent">
	<div id="hy_left">
		   <div id="us_l">
    <!-- Left -->
     <div id="usl_upper">
      <div id="uslup_upper">
       <div id="uslup_upper_l"><img src="<?php echo (get_avatar($UID)); ?>" width="80" height="80" alt="" /></div>
       <div id="uslup_upper_r">
        <h4><?php echo session('u_user_name');?></h4>
        <?php if($minfo["time_limit"] > time()): ?><div class="vip"></div><?php endif; ?>
        <p>等级:</p><span title="经验:<?php echo (($minfo["credits"])?($minfo["credits"]):0); ?>"><?php echo (getleveico($minfo["credits"],2)); ?></span>
       </div>
      </div>
      <div id="uslup_lower">
       <p>信用额度:<?php echo (fmoney($minfo["credit_cuse"])); ?><input type="button" class="us_appBut" value="申请额度" onclick="window.location.href='__APP__/member/moneylimit#fragment-1'" /></p>
       <p>担保额度:<?php echo (fmoney($minfo["borrow_vouch_cuse"])); ?></p>
      </div>
     </div>
     
     <ul>
      <li class="cen"><div class="ulDiv1"></div><a href="__APP__/member/index.html"><h5>账户首页</h5></a></li>
     </ul>
     <ul>
      <li><div class="ulDiv2"></div><h6>投资管理</h6></li>
      <li><div class="liDiv"></div><a href="__APP__/invest/index.html">我要投资</a></li>
      <li><div class="liDiv"></div><a href="__APP__/member/tendout#fragment-1">投资总表</a></li>
      <li><div class="liDiv"></div><a href="__APP__/member/autoborrow/index.html">自动投标设置</a></li>
      <li><div class="liDiv"></div><a href="__APP__/member/tendout#fragment-3">回收中的投资</a></li>
      <li><div class="liDiv"></div><a href="__APP__/member/tendout#fragment-2">竞标中的投资</a></li>
      <li><div class="liDiv"></div><a href="__APP__/member/vouch#fragment-1">我担保的借款</a></li>
     </ul>
Beispiel #8
0
<?php

// Initialize
global $template, $config;
// Go through products
$products = array();
$rows = DB::query("SELECT * FROM products WHERE is_enabled = 1 ORDER BY display_name");
foreach ($rows as $row) {
    if ($row['currency'] == 'fiat') {
        $row['amount_fiat'] = fmoney($row['amount']);
        $row['amount_btc'] = fmoney_coin($row['amount'] / $config['exchange_rate']);
    } else {
        $row['amount_fiat'] = fmoney($row['amount'] * $config['exchange_rate']);
        $row['amount_btc'] = fmoney_coin($row['amount']);
    }
    $row['price'] = $row['amount_btc'] . ' BTC (' . $row['amount_fiat'] . ')';
    array_push($products, $row);
}
// Template variables
$template->assign('products', $products);
?>
</dd></dl>
            <dl class="lx"><dt>邀请注册奖金总额:</dt><dd><?php 
echo fmoney($list["13"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>已付利息总额:</dt><dd><?php 
echo fmoney($list["32"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>待付利息总额:</dt><dd><?php 
echo fmoney($list["32"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>红包总额:</dt><dd><?php 
echo fmoney($red);
?>
</dd></dl>
            <!-- <dl class="lx"><dt>总计:</dt><dd><?php 
echo Fmoney($list['28']['money'] + $list['21']['money'] + $list['32']['money']);
?>
 -->
</dd></dl>
        </td>
      </tr>
     
    </table>
  </div>
<!--<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ff708bea5a5b94473d52231dbe92e5017' type='text/javascript'%3E%3C/script%3E"));
 
 <div class="lb2_h"><h4><span>担保</span>借款</h4><p>担保标说明:担保标是一种以担保额度为借款依据的标的类型</p></div>
 <div class="lb2">
  <div class="lb2_upper"><p>申请条件:<span>1.注册用户</span><span>2.通过实名认证</span><span>3.资料认证</span></p></div>
  <div class="lb2_lower">
   <div class="lb2_ll">
    <table width="358" border="0" cellspacing="0" cellpadding="0">
     <tr>
      <th>可使用额度</th>
      <th>总额度</th>
      <th>已使用额度</th>
      <th>额度状态</th>
     </tr>
     <tr>
      <td><?php echo (fmoney($minfo["borrow_vouch_cuse"])); ?></td>
      <td><?php echo (fmoney($minfo["borrow_vouch_limit"])); ?></td>
      <td><?php echo Fmoney($minfo['borrow_vouch_limit']-$minfo['borrow_vouch_cuse']);?></td>
      <td>正常</td>
     </tr>
    </table>
   </div>
   <div class="lb2_lr"><input type="button" class="bor_but" value="立即借入" onclick="window.location.href='__APP__/borrow/post/vouch.html'" /><p>已有<span><?php echo (($allStat[2])?($allStat[2]):0); ?></span>个该类型借款</p></div>
  </div>
 </div>
 
 <div class="lb3_h"><h4><span>净值</span>借款</h4><p>净值标说明:净值标是一种以投资人的净投资作为借款依据来确认发标金额的标的类型</p></div>
 <div class="lb3">
  <div class="lb3_upper"><p>申请条件:<span>投资多少钱便有多少净值额度!</span>&nbsp;&nbsp;&nbsp;&nbsp;计算公式:<span>投资待收总额-借款净值标待还的总额=可借额度</span></p></div>
  <div class="lb3_lower">
   <div class="lb3_ll">
    <table width="358" border="0" cellspacing="0" cellpadding="0">
Beispiel #11
0
     $aterm = "</a>";
 }
 $name = $row['name'];
 $spcname = "";
 if ($row['subitem'] == "1" && $parent > 0) {
     if ($orderf) {
         $res3 = getDetailByCode($parentfinea);
         $pname = pg_result($res3, 0, 1);
         $name = "{$name} &nbsp;&nbsp; {$pname}";
     }
     $spcname = "&nbsp;&nbsp;";
 }
 echo $spcname . $ahref . $name . "{$aterm}</td>";
 $amount1 = fmoney($row['amount1']);
 $amount2 = fmoney($row['amount2']);
 $amount3 = fmoney($row['amount3']);
 $id0 = $row['id'];
 $img = "edit_empty.png";
 if (checkPage("ID_{$id0}")) {
     $img = "edit_filled.png";
 }
 echo "<td bgcolor={$col}>&nbsp;<a href=index.php?id={$id0}><img src='img/{$img}'  border='0'></a>&nbsp;</td>";
 if ($totalp) {
     $percent = $row['amount1'] / $totaluf * 100;
     $js .= "\$(\"#pbar{$cnt}\").progressbar({\n\t\t\tvalue: {$percent}\n\t\t});\n                \$(\"#pbar{$cnt}\").height(20);\n                ";
     echo "{$vline}<td bgcolor={$col}><div id='pbar{$cnt}'></div>" . number_format($percent, 2) . "</td>";
 }
 echo "{$vline}<td align='right'  bgcolor={$col}>&nbsp;" . $amount1 . "&nbsp;</td>";
 echo "{$vline}<td align='right' bgcolor={$col}>&nbsp;" . $amount2 . "&nbsp;</td>";
 echo "{$vline}<td align='right' bgcolor={$col}>&nbsp;" . $amount3 . "&nbsp;</td>";
 echo "</tr>";
  <div id="bottomPart">
   <table width="958" 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($nearlylist)): $i = 0; $__LIST__ = $nearlylist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nl): $mod = ($i % 2 );++$i;?><tr>
     <td align="center"><a href="javascripg:void(0);"><?php echo (hidecard($nl["borrow_user"],8)); ?></a></td>
     <td align="center"><?php echo (date("Y-m-d",$nl["deadline"])); ?></td>
     <td align="center"><?php echo (fmoney($nl["repay_money"],false)); ?></td>
     <td align="center"><?php echo (($nl["back"])?($nl["back"]):"0"); ?>/<?php echo ($nl["total"]); ?>(<?php if($nl["repayment_type"] == 1): ?>天<?php else: ?>月<?php endif; ?>)</td>
     <td align="center"><?php echo ($nl["sort_order"]); ?></td>
     <td align="center"><?php if($nl['repayment_time'] != 0): ?>已还<?php else: ?>待还<?php endif; ?></td>
     <td align="center"><?php if($nl['repayment_time'] != 0): echo (date("Y-m-d H:i",$nl["repayment_time"])); else: ?>-<?php endif; ?></td>
     <td align="left"><a href="<?php echo (getinvesturl($nl["borrow_id"])); ?>" target="_blank"><?php echo ($nl["borrow_name"]); ?></a></td>
    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
   </table>
   <div class="pages"><?php echo ($pagebar); ?></div>
  </div>
 </div>
<script language=javascript src="__ROOT__/Style/Js/gchart/jquery.gchart.min.js" type=text/javascript></script>
<script language=javascript src="__ROOT__/Style/Js/gchart/jquery.gchart.icons.min.js" type=text/javascript></script>
<script language=javascript src="__ROOT__/Style/Js/gchart/jquery.gchart.graphviz.min.js" type=text/javascript></script>
<script language=javascript src="__ROOT__/Style/Js/gchart/jquery.gchart.ext.min.js" type=text/javascript></script>
<script type="text/javascript">
     <li>借款利率: <?php echo ($vo["borrow_interest_rate"]); ?>%/<?php if($vo["repayment_type"] == 1): ?>天<?php else: ?>年<?php endif; ?></li>
     <li>已经完成:<?php echo ($vo["progress"]); ?>%</li>
     <li>借款用途:<?php echo ($Bconfig['BORROW_USE'][$vo['borrow_use']]); ?></li>
     <li>借款期限: <?php echo ($vo["borrow_duration"]); if($vo["repayment_type"] == 1): ?>天<?php else: ?>个月<?php endif; ?></li>
     <li>还款方式: <?php echo ($Bconfig['REPAYMENT_TYPE'][$vo['repayment_type']]); ?></li>
    </ol>
    
<FORM method="post" name="investForm" id="investForm" action="__URL__/investmoney">
<input type="hidden" name="borrow_id" id="borrow_id" value="<?php echo ($vo["id"]); ?>" />
<input type="hidden" name="cookieKey" id="cookieKey" value="<?php echo ($cookieKey); ?>" />
    <div id="oper_con_box">
     <div id="oper_con">
      <ul>
       <li><p>进度:</p><div class="rate"><div class="rate_s" style="width:<?php echo ($vo["progress"]); ?>%"></div><span><?php echo ($vo["progress"]); ?>%</span></div></li>
       <li><p>还需借款:<samp><?php echo (fmoney($vo["need"])); ?></samp>元</p></li>
       <li class="epis">最少投标金额:<?php echo (fmoney($vo["borrow_min"])); ?>元;&nbsp;&nbsp;最多投标金额:<?php echo (($vo["borrow_max"])?($vo["borrow_max"]):"无限制"); if($vo["borrow_max"] != 0): ?>元<?php endif; ?></li>
       <li><h5>您的可用余额:<samp><?php echo (($account_money)?($account_money):0.00); ?></samp>元<a href="__APP__/member/charge#fragment-1">我要充值</a></h5></li>
       <li><h4>投标金额:</h4><input type="text" class="oper_text1" id="invest_money" name="money" onkeyup="value=value.replace(/[^0-9]/g,'')" /><h4>元</h4></li>
       <li><h4>支付密码:</h4><?php if($has_pin == 'yes'): ?><input type="password" class="oper_text2" id="pin" name="pin" /><a href="__APP__/member/user#fragment-3">忘记支付密码?</a><?php else: ?>
		<A href="__APP__/member/user#fragment-3" target="_blank"><FONT color="#ff0000">请先设一个支付交易密码</FONT></A><?php endif; ?></li>
		<?php if(!empty($vo['password'])): ?><li><li><h4>定向标密码:</h4><input type="password" class="oper_text2" id="borrow_pass" name="borrow_pass" /></li><?php endif; ?>
       <li><h4>&nbsp;</h4><input type="button" class="oper_but" value="确认投资" onclick="PostData()" /><p class="p_int">点击确认表示您将投标金额并同意支付,同一用户对同一个标限投5次</p></li>
      </ul>
     </div>
     <div id="oper_con_bk"></div>
    </div>
</FORM>
    
  </div>
<script type="text/javascript">
borrow_min = <?php echo (($vo["borrow_min"])?($vo["borrow_min"]):0); ?>;
      </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>
                  </div>
                </div>
                
                
                
                
                <div class="col-md-1">
                  <div class="m-t-20">
        </td>
<!--         <td valign="top">
            <dl class="lx"><dt>成功借款利息总额:</dt><dd><?php 
echo fmoney($list["28"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>成功借款投标奖励总额:</dt><dd><?php 
echo fmoney($list["21"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>邀请注册奖金总额:</dt><dd><?php 
echo fmoney($list["13"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>线下充值奖励:</dt><dd><?php 
echo fmoney($list["32"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>总计:</dt><dd><?php 
echo Fmoney($list['28']['money'] + $list['21']['money'] + $list['32']['money']);
?>
</dd></dl>
        </td> -->
      </tr>
      
    </table>
  </div>
<!--<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ff708bea5a5b94473d52231dbe92e5017' type='text/javascript'%3E%3C/script%3E"));
</script>
      	<table width="665" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>性别:</td>
              <td><?php echo ($minfo["sex"]); ?></td>
              <td>年龄:</td>
              <td><?php echo (getagename($minfo["age"])); ?></td>
              <td>婚姻状况:</td>
              <td><?php echo ($minfo["marry"]); ?></td>
              <td> 文化程度:</td>
              <td><?php echo ($minfo["education"]); ?></td>
            </tr>
            <tr>
              <td>职业:</td>
              <td><?php echo ($minfo["zy"]); ?></td>
              <td> 每月收入:</td>
              <td><?php echo (fmoney($minfo["fin_monthin"])); ?></td>
              <td>住房条件:</td>
              <td><?php echo ($minfo["fin_house"]); ?></td>
              <td><DIV>是否购车:</DIV></td>
              <td><?php echo ($minfo["fin_car"]); ?></td>
            </tr>
          </table>
      </div>
      
      <div class="details" id="divFiles" style="display:none">
      	<table width="665" border="0" cellspacing="0" cellpadding="0">
	        <THEAD>
	          <tr>
                  <th>资料类型</th>
                  <th>上传数量</th>
                  <th>更新时间</th>
       <p>待收总额<font class="xtitle" title="是您借款给别人但还没收回的本息总额,待收总额=待收本金总额+待收利息">[?]</font>:<span><?php echo (fmoney($minfo["money_collect"])); ?></span></p>
       <p>待收利息:<span><?php echo (fmoney($capitalinfo["tj"]["willgetInterest"])); ?></span></p>
       <p>投标奖励:<span><?php echo (fmoney($toubiaojl)); ?></span></p>
       <p>推广奖励:<span><?php echo (fmoney($tuiguangjl)); ?></span></p>
       <p>最近待收金额:<span><?php echo Fmoney(getFloatvalue($lastInvest['capital']+$lastInvest['interest'],2));?></span></p>
       <p>最近待收时间:<?php echo (mydate("Y-m-d",$lastInvest["gettime"],'<span>无待收</span>')); ?><a href="__APP__/member/tendout#fragment-3">[明细]</a></p>
       <p>已还总额:<span><?php echo (fmoney($capitalinfo["tj"]["yhze"])); ?></span></p>
       <p>待还总额:<span><?php echo (fmoney($capitalinfo["tj"]["dhze"])); ?></span></p>
       <p>最近待还金额:<span><?php echo Fmoney(getFloatvalue($lastBorrow['borrow_money']+$lastBorrow['borrow_interest'],2));?></span></p>
       <p>最近待还时间:<?php echo (mydate("Y-m-d",$lastBorrow["gettime"],'<span>无待收</span>')); ?><a href="__APP__/member/borrowin#fragment-3">[明细]</a></p>
       <p>借款信用额度:<span><?php echo (fmoney($minfo["credit_limit"])); ?></span></p>
       <p>可用信用额度:<span><?php echo (fmoney($minfo["credit_cuse"])); ?></span></p>
       <p>借款担保总额:<span><?php echo (fmoney($minfo["borrow_vouch_limit"])); ?></span></p>
       <p>可用借款担保额度:<span><?php echo (fmoney($minfo["borrow_vouch_cuse"])); ?></span></p>
       <p>投资担保总额:<span><?php echo (fmoney($minfo["invest_vouch_limit"])); ?></span></p>
       <p>可用投资担保额度:<span><?php echo (fmoney($minfo["invest_vouch_cuse"])); ?></span></p>
      </div>
     </div>
     
    <!-- Right // -->
   </div>
  </div>
<script type="text/javascript">
<!--
function displayDiv(num) {
	var obj = document.getElementById("udiv" + num);
	var obja = document.getElementById("ulink" + num);
	var objtop = document.getElementById("utop" + num);
	var objbottom = document.getElementById("ubottom" + num);

	if (obj.style.display == 'none') {
				<li class="ui-list-header fn-clear" id="loan-list-header">
  					<span class="ui-list-title fn-left color-gray-text w260" next="-1">借款标题</span>
					<span class="ui-list-title fn-left color-gray-text text-center w120" name="INTEREST" next="-1">年利率</span>
					<span class="ui-list-title fn-left color-gray-text text-center w160" next="-1">金额</span>
					<span class="ui-list-title fn-left color-gray-text text-center w100" name="MONTH" next="-1">期限</span>
					<span class="ui-list-title fn-left color-gray-text text-center w110" name="FINISHEDRATIO" next="-1">进度</span>
					<span class="ui-list-title fn-left color-gray-text text-center w160" name="REFRESH" next="-1"></span>
				</li>
				
				<?php if(is_array($listBorrow["list"])): $i = 0; $__LIST__ = $listBorrow["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vb): $mod = ($i % 2 );++$i;?><li class="ui-list-item fn-clear ">
					<p class="ui-list-field fn-left text-big w260">
	    				<span class="biao" style="margin: 12px;"><?php echo getIcoNew($vb);?>&nbsp;</span>
	    				<a class="fn-left w210 rrd-dimgray fn-text-overflow pl40" href="<?php echo (getinvesturl($vb["id"])); ?>" target="_blank" title="<?php echo ($vb["borrow_name"]); ?>"><?php echo (cnsubstr($vb["borrow_name"],15)); ?></a>
	  				</p>
					<p class="ui-list-field fn-left num text-right w120 pr45"><em class="value"><?php echo ($vb["borrow_interest_rate"]); ?></em>%</p>
					<p class="ui-list-field fn-left num text-right w160 pr50"><em class="value"><?php echo (fmoney($vb["borrow_money"])); ?></em>元</p>
					<p class="ui-list-field fn-left num text-right w100 pr30"><em class="value"><?php echo ($vb["borrow_duration"]); ?></em><?php if($vb["repayment_type"] == 1): ?>天<?php else: ?>个月<?php endif; ?></p>
					<p class="ui-list-field fn-left w110">
					  <strong class="ui-progressbar-small ui-progressbar-small-<?php echo (round($vb["progress"])); ?>"><em><?php echo (round($vb["progress"])); ?></em>%</strong>
					</p>
					<p class="ui-list-field fn-left w160 pl35" style="margin-top:10px;">

					<?php if($vb["borrow_status"] == 3): ?><samp class="ui-button ui-button-mid ui-button-grey ui-list-invest-button ui-list-invest-button-OPEN">已流标</samp>
				         <?php elseif($vb["borrow_status"] == 4): ?>
				         <samp class="ui-button ui-button-mid ui-button-grey ui-list-invest-button ui-list-invest-button-OPEN">等待复审</samp>
				         <?php elseif($vb["borrow_status"] == 6): ?>
				         <samp class="ui-button ui-button-mid ui-button-grey ui-list-invest-button ui-list-invest-button-OPEN">还款中</samp>
				         <?php elseif($vb["borrow_status"] > 6): ?>
				         <samp class="ui-button ui-button-mid ui-button-grey ui-list-invest-button ui-list-invest-button-OPEN">已经还完</samp>
				         <?php else: ?>
				         <samp class="ui-button ui-button-mid ui-button-blue ui-list-invest-button ui-list-invest-button-OPEN" onclick="javascript:window.location.href='<?php echo (getinvesturl($vb["id"])); ?>'">投 资</samp><?php endif; ?>
            <div class="tailttb ptailttb">已完成</div>
            <?php 
} else {
    ?>
          <p class="money" style="font-size:13px;"><?php 
    if ($vo["borrow_max"] != 0) {
        ?>
<span>
          最多投资金额:<?php 
        echo $vo["borrow_max"] ? $vo["borrow_max"] : "无限制";
        ?>
</span><?php 
    }
    ?>
起投金额:<?php 
    echo fmoney($vo["borrow_min"]);
    ?>
 </p> 
        
            <div id="toubiao" class="tailttb"  onclick="invest(<?php 
    echo $vo["id"];
    ?>
,<?php 
    echo $vo["borrow_duration"];
    ?>
);">立即投标</div><?php 
}
?>
        </form>
      </div>
    </div>
?>
</dd></dl>
         	<dl class="lx"><dt>待还金额:</dt><dd><?php 
echo Fmoney($transfer['investor_capital'] - $transfer['receive_capital']);
?>
</dd></dl>
         	<dl class="lx"><dt>已支付利息:</dt><dd><?php 
echo fmoney($transfer["receive_interest"]);
?>
</dd></dl>
         	<dl class="lx"><dt>待支付利息:</dt><dd><?php 
echo Fmoney($transfer['investor_interest'] - $transfer['receive_interest']);
?>
</dd></dl>
         	<dl class="lx"><dt>已支付奖励:</dt><dd><?php 
echo fmoney($transfer["reward_money"]);
?>
</dd></dl>
        </td>
        <td valign="top">&nbsp;
        </td>
        <td valign="top">&nbsp;
        </td>
      </tr>
    </table>
  </div>
<!--<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ff708bea5a5b94473d52231dbe92e5017' type='text/javascript'%3E%3C/script%3E"));
</script>
-->
Beispiel #21
0
    $is_input = $row['userid'] == $GLOBALS['userid'] ? true : false;
    $is_order = $row['order_id'] > 0 ? true : false;
    $is_invoice = $row['invoice_id'] > 0 ? true : false;
    $username = $row['userid'] == 0 ? '-' : get_user($row['userid']);
    // Get order details
    if ($is_order === true) {
        $orow = DB::queryFirstRow("SELECT * FROM orders WHERE id = %d", $row['order_id']);
        $product_name = DB::queryFirstField("SELECT display_name FROM products WHERE id = %d", $orow['product_id']);
        $order_details = "<a href=\"" . SITE_URI . "/account/view_order?order_id={$orow['id']}\">ID# {$orow['id']} -- {$product_name}</a>";
    } else {
        $order_details = '';
    }
    // Get invoice details
    if ($is_invoice === true) {
        $irow = DB::queryFirstRow("SELECT * FROM invoices WHERE id = %d", $row['invoice_id']);
        $invoice_details = "<a href=\"" . SITE_URI . "/account/view_invoice?invoice_id={$irow['id']}\">ID# {$irow['id']} -- " . fmoney($irow['amount']) . ' (added on ' . fdate($irow['date_added']) . ")</a>";
    } else {
        $invoice_details = '';
    }
    // Set vars
    $payment = array('is_order' => $is_order, 'is_invoice' => $is_invoice, 'username' => $username, 'date_received' => fdate($row['date_added'], true), 'amount' => fmoney_coin($row['amount']) . ' BTC ', 'order_details' => $order_details, 'invoice_details' => $invoice_details);
    $template->assign('payment', $payment);
}
// Template variables
$template->assign('is_input', $is_input);
$template->assign('txid', $trans['txid']);
$template->assign('confirmations', $trans['confirmations']);
$template->assign('blocknum', $trans['blocknum']);
$template->assign('input_amount', $trans['input_amount']);
$template->assign('output_amount', $trans['output_amount']);
$template->assign('fees', $trans['fees']);
?>
</dd></dl>
            <dl class="lx"><dt>未还款总额:</dt><dd><?php 
echo Fmoney($list['17']['money'] - $list['11']['money']);
?>
</dd></dl>
            <dl class="lx"><dt>待还利息:</dt><dd><?php 
echo $noreadyinterest["0"]["no"];
?>
</dd></dl>
            <dl class="lx"><dt>待还本金:</dt><dd><?php 
echo $bonus["0"]["bm"];
?>
</dd></dl>
            <dl class="lx"><dt>冻结中总额:</dt><dd><?php 
echo fmoney($freeze["0"]["total"]);
?>
</dd></dl>
            <!-- 感觉如此计算不靠谱 因为还款之后没有标志 哪笔还款了 (目前冻结的本金 可以以后或者之前解冻了。无剧可查)-->
            <!-- <dl class="lx"><dt>冻结中的保证金总额:</dt><dd><?php 
echo Fmoney($list['19']['money'] - $list['24']['money']);
?>
</dd></dl> -->
        </td>
    </tr>
   
   
    </table>
  </div>
<!--<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
Beispiel #23
0
function umoney($num, $type = "usd")
{
    global $numTable, $commaTable, $moneyType;
    //global $numTable;
    $numTable[0] = "ZERO ";
    $numTable[1] = "ONE ";
    $numTable[2] = "TWO ";
    $numTable[3] = "THREE ";
    $numTable[4] = "FOUR ";
    $numTable[5] = "FIVE ";
    $numTable[6] = "SIX ";
    $numTable[7] = "SEVEN ";
    $numTable[8] = "EIGHT ";
    $numTable[9] = "NINE ";
    $numTable[10] = "TEN ";
    $numTable[11] = "ELEVEN ";
    $numTable[12] = "TWELVE ";
    $numTable[13] = "THIRTEEN ";
    $numTable[14] = "FOURTEEN ";
    $numTable[15] = "FIFTEEN ";
    $numTable[16] = "SIXTEEN ";
    $numTable[17] = "SEVENTEEN ";
    $numTable[18] = "EIGHTEEN ";
    $numTable[19] = "NINETEEN ";
    $numTable[20] = "TWENTY ";
    $numTable[30] = "THIRTY ";
    $numTable[40] = "FORTY ";
    $numTable[50] = "FIFTY ";
    $numTable[60] = "SIXTY ";
    $numTable[70] = "SEVENTY ";
    $numTable[80] = "EIGHTY ";
    $numTable[90] = "NINETY ";
    $commaTable[0] = "HUNDRED ";
    $commaTable[1] = "THOUSAND ";
    $commaTable[2] = "MILLION ";
    $commaTable[3] = "MILLIARD ";
    $commaTable[4] = "BILLION ";
    $commaTable[5] = "????? ";
    //单位
    $moneyType["usd"] = "DOLLARS ";
    $moneyType["usd_1"] = "CENTS ONLY";
    $moneyType["rmb"] = "YUAN ";
    $moneyType["rmb_1"] = "FEN ONLY";
    if ($type == "") {
        $type = "usd";
    }
    $fnum = fmoney($num);
    $numArray = explode(",", $fnum);
    $resultArray = array();
    $k = 0;
    $cc = count($numArray);
    for ($i = 0; $i < count($numArray); $i++) {
        $num_str = $numArray[$i];
        //echo "<br>";
        //小数位的处理400.21
        if (preg_match("/\\./", $num_str)) {
            $dotArray = explode(".", $num_str);
            if ($dotArray[1] != 0) {
                $resultArray[$k++] = format3num($dotArray[0] + 0);
                $resultArray[$k++] = $moneyType[strtolower($type)];
                $resultArray[$k++] = "AND ";
                $resultArray[$k++] = format3num($dotArray[1] + 0);
                $resultArray[$k++] = $moneyType[strtolower($type) . "_1"];
            } else {
                $resultArray[$k++] = format3num($dotArray[0] + 0);
                $resultArray[$k++] = $moneyType[strtolower($type)];
            }
        } else {
            //非小数位的处理
            if ($num_str + 0 != 0) {
                $resultArray[$k++] = format3num($num_str + 0);
                $resultArray[$k++] = $commaTable[--$cc];
                //判断:除小数外其余若不为零则加and
                for ($j = $i; $j <= $cc; $j++) {
                    //echo "<br>";
                    //echo $numArray[$j];
                    if ($numArray[$j] != 0) {
                        $resultArray[$k++] = "AND ";
                        break;
                    }
                }
            }
        }
    }
    return join("", $resultArray);
}
<span><?php 
echo fmoney($minfo['money_collect']);
?>
</span>
</li>
<li>
待收本金:
<span><?php 
echo fmoney($minfo['money_collect'] - $benefit['interest_collection']);
?>
</span> 
</li>
<li>
待收利息:
<span><?php 
echo fmoney($benefit['interest_collection']);
?>
</span>
</li>
</ul>
</div>
<div class="dw_p2" style="margin-top:18px;"> 
<?php 
if ($hasbind == 0) {
    ?>
<a href="/member/index/bind" class="dw_cz" title="充值" > 充值 </a>
<?php 
} else {
    ?>
<a href="__APP__/member/charge#fragment-1" class="dw_cz" title="充值" > 充值 </a><?php 
}
Beispiel #25
0
    $is_input = true;
    $is_order = $row['order_id'] > 0 ? true : false;
    $is_invoice = $row['invoice_id'] > 0 ? true : false;
    $username = $row['userid'] == 0 ? '-' : get_user($row['userid']);
    // Get order details
    if ($is_order === true) {
        $orow = DB::queryFirstRow("SELECT * FROM orders WHERE id = %d", $row['order_id']);
        $product_name = DB::queryFirstField("SELECT display_name FROM products WHERE id = %d", $orow['product_id']);
        $order_details = "<a href=\"" . SITE_URI . "/admin/financial/orders_manage?order_id={$orow['id']}\">ID# {$orow['id']} -- {$product_name}</a>";
    } else {
        $order_details = '';
    }
    // Get invoice details
    if ($is_invoice === true) {
        $irow = DB::queryFirstRow("SELECT * FROM invoices WHERE id = %d", $row['invoice_id']);
        $invoice_details = "<a href=\"" . SITE_URI . "/admin/financial/invoices_manage?invoice_id={$irow['id']}\">ID# {$irow['id']} -- " . fmoney($irow['amount']) . ' (added on ' . fdate($irow['date_added']) . ")</a>";
    } else {
        $invoice_details = '';
    }
    // Set vars
    $payment = array('is_order' => $is_order, 'is_invoice' => $is_invoice, 'username' => $username, 'date_received' => fdate($row['date_added'], true), 'amount' => fmoney_coin($row['amount']) . ' BTC ', 'order_details' => $order_details, 'invoice_details' => $invoice_details);
    $template->assign('payment', $payment);
}
// Template variables
$template->assign('is_input', $is_input);
$template->assign('txid', $trans['txid']);
$template->assign('confirmations', $trans['confirmations']);
$template->assign('blocknum', $trans['blocknum']);
$template->assign('input_amount', $trans['input_amount']);
$template->assign('output_amount', $trans['output_amount']);
$template->assign('fees', $trans['fees']);
Beispiel #26
0
 private function set_base_variables()
 {
     // Initialize
     global $config;
     // Define base template variables
     $this->assign('site_uri', SITE_URI);
     $this->assign('site_path', SITE_PATH);
     $this->assign('theme_uri', SITE_URI . '/themes/' . $this->theme);
     $this->assign('theme_dir', SITE_PATH . '/themes/' . $this->theme);
     $this->assign('route', $this->route);
     $this->assign('page_title', $this->page_title);
     $this->assign('current_year', date('Y'));
     $this->assign('exchange_rate', fmoney($config['exchange_rate']));
     $this->assign('config', $config);
     // User message
     $user_message = '';
     $msg_types = array('success', 'info', 'error');
     foreach ($msg_types as $type) {
         if (!isset($this->user_messages[$type])) {
             continue;
         }
         $css_type = $type == 'error' ? 'danger' : $type;
         // Get icon
         if ($type == 'info') {
             $icon = 'info';
         } elseif ($type == 'error') {
             $icon = 'ban';
         } else {
             $icon = 'check';
         }
         // Create HTML
         $user_message .= '<div class="callout callout-' . $css_type . ' text-center"><p><i class="icon fa fa-' . $icon . '"></i> ';
         foreach ($this->user_messages[$type] as $msg) {
             if ($msg == '') {
                 continue;
             }
             $user_message .= "{$msg}<br />";
         }
         $user_message .= "</p></div>";
     }
     $this->assign('user_message', $user_message);
     // Check login
     //if (!defined('LOGIN')) {
     //	define('LOGIN', false);
     //	$GLOBALS['userid'] = 0;
     //}
     // Alerts, if admin panel
     if ($this->theme == 'admin' && $GLOBALS['userid'] > 0) {
         // Update alerts
         DB::query("UPDATE alerts SET is_new = 2 WHERE is_new = 1 AND userid = %d", $GLOBALS['userid']);
         // Get total alerts
         $total_alerts = DB::queryFirstField("SELECT count(*) FROM alerts WHERE is_new = 2 AND userid = %d", $GLOBALS['userid']);
         if ($total_alerts == '') {
             $total_alerts = 0;
         }
         // Get alerts
         $alerts = array();
         $rows = DB::query("SELECT count(*) AS total, sum(amount) AS amount, type FROM alerts WHERE is_new = 2 AND userid = %d GROUP BY type ORDER BY type", $GLOBALS['userid']);
         foreach ($rows as $row) {
             // Get icon
             if ($row['type'] == 'new_user') {
                 $icon = 'fa-users text-light-blue';
                 $name = '<b>' . $row['total'] . '</b> new users registered';
             } elseif ($row['type'] == 'new_deposit') {
                 $icon = 'fa-btc text-green';
                 $name = '<b>' . $row['total'] . '</b> new deposits, total <b>' . fmoney_coin($row['amount']) . ' BTC</b>';
             } elseif ($row['type'] == 'product_purchase') {
                 $icon = 'fa-shield text-red';
                 $name = '<b>' . $tow['total'] . '<b> product orders, total <b>' . fmoney_coin($row['amount']) . ' BTC</b>';
             } elseif ($row['type'] == 'invoice_paid') {
                 $icon = 'fa-file-pdf-o text-orange';
                 $name = '<b>' . $tow['total'] . '<b> invoices paid, total <b>' . fmoney_coin($row['amount']) . ' BTC</b>';
             } else {
                 continue;
             }
             // Add to alerts
             $vars = array('icon' => $icon, 'name' => $name);
             array_push($alerts, $vars);
         }
         // Template variables
         $this->assign('total_alerts', $total_alerts);
         $this->assign('alerts', $alerts);
     }
     // Set variables
     $this->assign('is_login', $GLOBALS['userid'] > 0 ? true : false);
     $this->assign('userid', $GLOBALS['userid']);
     // User variables, if needed
     if ($GLOBALS['userid'] > 0) {
         $user = new user($GLOBALS['userid']);
         $profile = $user->load();
         $this->assign('user', $profile);
         $this->assign('username', $profile['username']);
         $this->assign('full_name', $profile['full_name']);
         $this->assign('email', $profile['email']);
     }
 }
?>
</dd></dl>-->
            <dl class="lx"><dt>会员充值:</dt><dd><?php 
echo fmoney($list["0"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>会员提现:</dt><dd><?php 
echo fmoney($list["1"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>公司充值:</dt><dd><?php 
echo fmoney($list2["0"]["money"]);
?>
</dd></dl>
            <dl class="lx"><dt>公司提现:</dt><dd><?php 
echo fmoney($list2["1"]["money"]);
?>
</dd></dl>
            <!-- <dl class="lx"><dt>总计:</dt><dd><?php 
echo Fmoney($list['3']['money'] - $list['29']['money']);
?>
</dd></dl> -->
        </td>
       
    </table>
  </div>
<!--<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ff708bea5a5b94473d52231dbe92e5017' type='text/javascript'%3E%3C/script%3E"));
</script>
-->