<?php require APPPATH_MVC.'views/header.php'; ?>
<style>
    /*2018 5 10 新增*/
    .clearo{ border: none;clear: both;}
    .p{ padding:10px 20px;}
    .acenter td{ text-align: center;}
    .user-nav a.nav7{ background:url(http://user.house365.com/images/new_pep-ico.gif) no-repeat;    background-position: 13px -694px;}
    .user-nav a.nav7 {background-position: 13px -695px;}
    .user-nav-mod.on a.nav7{background-position: 13px -763px;background-color: #fff;}
    .mt10{ margin-top: 10px;}
</style>
<div class="w960 clearfix mt10 pepcenterBox">
    <?php require APPPATH_MVC.'views/left.php'; ?>
    <!--会员左侧 End-->
    <div class="user-main user-main02">
        <form id="search_form" name="search_form" accept-charset="gbk" method="post" action="/user/myorder">

        <div class="hd-bar pos-r">
            <h2>我的订单</h2>
        </div>
        <div class="user-main user-main03 mt10">

            <div class="mod-list statistical">
                <?php if(count($orders)>0){ ?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-style-a acenter">
                    <tr>
                        <th width="20%">套餐名称</th>
                        <th width="20%">房源编号</th>
                        <th width="20%">服务时长</th>
                        <th width="10%">实收金额（元）</th>
                        <th width="5%">发票</th>
                        <th width="15%">购买时间</th>
                    </tr>

                    <?php foreach ($orders as $k=>$v){ ?>
                    <tr>
                        <?php
                        if($v['package_type'] == 1){
                            echo "<td>首页推荐</td>";
                        }elseif($v['package_type'] == 2){
                            echo "<td>列表页推荐</td>";
                        }elseif($v['package_type'] == 3){
                            echo "<td>智能刷新</td>";
                        }elseif($v['package_type'] == 4){
                            echo "<td>普通刷新</td>";
                        }elseif($v['package_type'] == 5){
                            echo "<td>vr实勘</td>";
                        }elseif($v['package_type'] == 6){
                            echo "<td>普通刷新</td>";
                        }else{
                            echo "<td>异常套餐</td>";
                        }
                        ?>

                        <td><?php echo $v['house_id']; ?> </td>
                        <td><?php echo $v['package_days'].'天'; ?> </td>
                        <td><?php echo $v['price']; ?></td>
                        <td><?php if ( isset( $invoice_url_arr[$v['id']] ) ) { ?><a target="_blank" href="<?php echo $invoice_url_arr[$v['id']]; ?>">查看</a><?php } else {  echo '/'; } ?></td>
                        <td><?php if($v['pay_time']){ echo date('Y-m-d H:i:s',$v['pay_time']);}else{ echo '未付款';}  ?></td>
                    </tr>
                    <?php } ?>
                </table>
                <div class="solidDiv">&nbsp;</div>
                <?php }else{ ?>
                    <div class="mod-list h-source">
                        <div class="no-result">目前您还没有订单哦。</div>
                    </div>
                <?php }?>
            </div>
        </div>
        </form>
        <div class="cut-page clearo" style="padding-top:10px;"> <?php echo page_uri($page,$totalpage,USER_CENTER.'user/myorder');?> </div>
        <!--分页-->
   <!--     <div class="cut-page clearo" style="padding-top:10px;">
            <a class='p-prev'>首 页</a>
            <a class='p-prev'>上一页</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=1;document.search_form.submit();return false;" class='on'>1</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=2;document.search_form.submit();return false;">2</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=3;document.search_form.submit();return false;">3</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=4;document.search_form.submit();return false;">4</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=2;document.search_form.submit();return false;" class='p-next'>下一页</a>
            <a style='cursor:pointer' onclick="document.search_form.page.value=5;document.search_form.submit();return false;" class='p-next'>末 页</a>
        </div>-->
        <?php if(count($orders)>0){ ?>
            <div class="p">
                展示最近2个月的订单记录
            </div>
        <?php }?>
        <!--分页-->
    </div>

</div>
<script>

</script>
<script>

</script>

<script language="javascript" src="http://stat.house365.com/365count.js"></script>

<?php require APPPATH_MVC.'views/footer.php'; ?>
