 <?php  include("../template/usertop.php");?>
<body>
<?php  include("../template/menu.php");?>
<div class="head-wrap">
<div class="main_top_1">
<div class="mt" style="position:relative;">
<?php  include("../template/user_left.php");?> 
<div class="user_zx_right">
<div class="box">
<div class="tagMenu">
<ul class="menu">
<li><a href="/user/statistics.php">资金统计</a></li>
<li><a href="/user/recharge.php">马上充值</a></li>
<li class="current"><a href="/user/recharge.php">充值记录</a></li>
<li><a href="/user/withdraw.php">马上提现</a></li>
<li><a href="/user/withdraw_list.php">提现记录</a></li>
<li><a href="/user/offline_record.php">下线分成记录</a></li>
</ul>
<div class="hite"> <span id="account"></span> </div>
</div>
</div>
<?php
	$username  = $userConfig['username'];
	$sql_ok = "select sum(amount) as ok from  {$db_prefix}member_order where username =  '{$username}' and status = 1";
	$rsok = $db->get_one($sql_ok);		//成功充值
	
	$sql_no = "select sum(amount) as error from  {$db_prefix}member_order where username =  '{$username}' and status = 0";
	$rsno = $db->get_one($sql_no);		//失败充值

	$sql_sh = "select sum(amount) as sh from  {$db_prefix}member_companyPay where username =  '{$username}' and status = 0";
	$rssh = $db->get_one($sql_sh);		//充值审核
?>
<div class="myinfo" style="padding: 20px; margin-bottom: 15px;background:#fff;">
<p style="margin:15px 0px;">尊敬的<?php echo configW('webname'); ?>会员，以下是您在<?php echo configW('webname'); ?>的充值记录，敬请审阅！</p>
<p>截止 <?php echo toData(time()); ?> 您的充值成功： <span style="color:#ff6600; font-size:14px;">￥<?php echo $rsok['ok']?$rsok['ok']:0; ?></span>，充值失败： <span style="color:#ff6600; font-size:14px;">￥<?php echo $rsno['error']?$rsno['error']:0; ?></span>，充值审核中： <span style="color:#ff6600; font-size:14px;">￥<?php echo $rssh['sh']?$rssh['sh']:0; ?></span>。</p>
<div class="container-fluid">
        <div class="row-fluid">
            <table class="table table-striped table-bordered table-hover datatable">
                <thead>
                    <tr>
                        <th width="20%">订单号</th>
                        <th width="25%">充值时间</th>
                        <th width="15%">充值金额</th>
                        <th width="15%">备注</th>
                        <th width="15%">类型</th>
                        <th width="15%">状态</th>
                    </tr>
                </thead>
                <tbody>
					<?php
						$username = $_SESSION["glo_username"];
						$sql="select * from {$db_prefix}member_order where username = '{$username}' order by id desc";
						$rs = $db->query($sql);
						if(mysql_num_rows($rs) <1 ){  ?>
							<tr>
								<td width="90%" colspan="5">暂无记录</td>
							</tr>
					<?php }else{ 
						while ($rs2=$db->fetch_array($rs)){  ?>
                    <tr class="odd gradeX">
                        <td><?php echo $rs2['ordernumber']; ?></td>
                        <td><?php echo $rs2['paytime']?toData($rs2['paytime']):''; ?></td>
                       	<td><?php echo $rs2['amount']; ?></td>
                       	<td><?php echo $rs2['memo']; ?></td>
                       	<td><?php echo $rs2['type']; ?></td>
                        <td><?php echo $rs2['status']?'已支付':'未支付'; ?></td>
                    </tr>
                    <?php  }}  ?>
                </tbody>
            </table>
        </div>
    </div> 
</div>
</div>
</div>
</div>
<?php  include("../template/foot.php");?> 
<?php  include("../template/page.php");?>
</body></html>