 <?php  include("../template/usertop.php");?>
<body style="padding:0px;">
<?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="/mobile/user/project.php">投资产品</a></li>
<li class="current"><a href="/mobile/user/tender.php">已投产品</a></li>
<li><a href="/mobile/user/recycling.php">收益明细</a></li>
<li><a href="/mobile/user/received.php">投资明细</a></li>
<li><a href="/mobile/user/projectback.php">收回本金明细</a></li>
</ul>
<div class="hite"> <span id="account"></span> </div>
</div>
</div>
<div class="myinfo" style="padding: 5px; margin-bottom: 15px;background:#fff;">
<p style="margin:15px 0px;">尊敬的<?php echo configW('webname'); ?>用户，以下是您在<?php echo configW('webname'); ?>的投资总表，敬请仔细审阅。</p>

<div class="container-fluid"  style="    padding-right: 1px;">
        <div class="row-fluid">
            <table class="table table-striped table-bordered table-hover datatable">
                <thead>
                    <tr>
                        <th width="18%">投资产品名称</th>
                        <!-- <th width="10%">投资规模</th> -->
                        <th width="8%">收益率</th>
                        <th width="15%">投资期限</th>
                        <th width="15%">投资状态</th>
                        <th width="10%">投资金额</th>
                        <th width="10%">投资收益</th>
                        <th width="12%">投注时间</th>
                        <th width="10%">协议</th>
                    </tr>
                </thead>
                <tbody>
					<?php
						$username = $_SESSION["glo_username"];
						$sql="select * from {$db_prefix}project_buy as a,{$db_prefix}project as b  where a.projectId = b.id and username ='".$username."' order by useritem_time desc";
						$rs = $db->query($sql);
						if(mysql_num_rows($rs) <1 ){  ?>
							<tr>
								<td width="90%" colspan="6">暂无记录</td>
							</tr>
					<?php }else{ 
						while ($rs2=$db->fetch_array($rs)){ ?>
                    <tr class="odd gradeX">
                        <td><?php echo $rs2['title']; ?></td>
                        <!-- <td><?php echo $rs2['xmgm']; ?></td> -->
                       	<td><?php echo $rs2['jyrsy'].'%'; ?></td>
                       	<td><?php echo $rs2['shijian'].$rs2['qxdw']; ?></td>
                       	<td><?php 
                                 if($rs2['sendDay_count'] !== $rs2['useritem_count']){
                                    echo '<font color="#0000FF">投资中</font>';
                                 }else{
                                    echo '已结束';
                                 }

                         ?></td>
                        <td><?php echo round($rs2['amount'],2); ?></td>
                        <td><?php echo round($rs2['shijian']*$rs2['jyrsy']*$rs2['amount'] * 0.01,2); ?></td>
                        <td><?php echo $rs2['useritem_time']; ?></td>
                        <td><a target="_blank" href="/mobile/user/agreement.php?sign=<?php echo strtotime($rs2['useritem_time']).','.$username; ?>">查看协议</a></td>
                    </tr>
                    <?php  }}  ?>
                </tbody>
            </table>
        </div>
    </div> 
</div>
</div>
</div>
</div>
<?php  include("../template/foot.php");?> 
<?php  include("../template/page.php");?> 
</body></html>