<div class="content_wrapper">
<style>
    .btn-name {
        white-space: nowrap;
    }
</style>
    <div class="container-fluid">
        <div id="msg-tip"></div>
        <aside>
            <header><i class="fa fa-fw fa-file"></i>活动类型</header>
            <section>
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-sm-12">
                            <a style="margin:5px;" class="btn btn-primary <?php if($name=="金蛋")echo "active";?>" href="/#activity/sta/2" role="button">金蛋</a>
                            <a style="margin:5px;" class="btn btn-primary <?php if($name=="气球")echo "active";?>" href="/#activity/sta/3" role="button">气球</a>
                            <a style="margin:5px;" class="btn btn-primary <?php if($name=="偷打")echo "active";?>" href="/#activity/sta/6" role="button">偷打</a>
                            <a style="margin:5px;" class="btn btn-primary <?php if($name=="排行榜")echo "active";?>" href="/#activity/sta/13" role="button">排行榜</a>
                            <a style="margin:5px;" class="btn btn-primary <?php if($name=="排行榜 - 排名")echo "active";?>" href="/#activity/sta/13-rank" role="button">排行榜 - 排名</a>
                        </div>
                        
                    </div>
                    
                </div>
            </section>
        </aside>
        
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>活动数据</header>
                    <section>
                        <div class="container-fluid">
                        	<div class="row">
					            <div class="col-sm-12">
					                <form class="form-inline" role="form" method="POST" action="<?php echo "/#activity/sta/{$id}/{$time}/".($page-10)."/".$roomId;?>">
					                    <span class="gap"></span>
					                    
					                    <div class="form-group">
					                        <label>查询玩家:</label>
					                        
					                        <input type="text" class="form-control" value="<?php if($uid) echo $uid;?>" placeholder="uid" name="uid" />
					                    </div>
					                    <span class="gap"></span>
					                    <button type="submit" class="btn btn-primary" id="query">查询</button>
					                    <span class="gap"></span>
					                </form>
					            </div>
					        </div>
					        <br>
                            <div class="row">
                                <div class="col-sm-2">
                                    <div class="table-responsive">
                                        <table id="example" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>记录场次</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            if(is_array($list)  && !empty($list)){
                                                foreach ($list as $key => $vl) { ?>
                                                    <tr>
                                                        <td><a href="<?php echo "/#activity/sta/{$id}/{$vl}/".($page-10);?>"><?php echo $vl;?></a></td>
                                                    </tr>
                                                <?php }
                                            } else{?>
                                                <tr>
                                                    <td colspan="10">暂无数据</td>
                                                </tr>
                                            <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <nav>
                                        <ul class="pagination">
                                            <li class="disabled"><a href="#">共<span class="pagetotal"><?php echo $total;?></span>条</a></li>
                                            <?php echo $pageurl;?>
                                        </ul>
                                    </nav>
                                </div>
                                <div class="col-sm-2">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>房间(<?php echo $time; ?>)</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            if(is_array($roomData)  && !empty($roomData)){
                                                foreach ($roomData as $key => $vl) { ?>
                                                    <tr>
                                                        <td><a href="<?php echo "/#activity/sta/{$id}/{$time}/".($page-10)."/".$vl;?>"><?php echo $vl;?></a></td>
                                                    </tr>
                                                <?php }
                                            } else{?>
                                                <tr>
                                                    <td colspan="10">暂无数据</td>
                                                </tr>
                                            <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                               
                                <div class="col-sm-2">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>排名(<?php echo $roomId; ?>)</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            if(is_array($rankData)  && !empty($rankData)){
                                                foreach ($rankData as $key => $vl) { ?>
                                                    <tr>
                                                        <td style="<?php if($uid == $key)echo 'background-color:red;';?>"><?php echo $vl;?> - <a style="<?php if($uid == $key)echo 'color:#000;';?>" href="<?php echo "/#user/index/".$key;?>"><?php echo $key;?></a></td>
                                                    </tr>
                                                <?php }
                                            } else{?>
                                                <tr>
                                                    <td colspan="10">暂无数据</td>
                                                </tr>
                                            <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>	

                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>


<script src="<?php echo base_url();?>public/js/common.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/modules/exporting.js"></script>
<script type="text/javascript">
    
</script>