<section class="power-hosting div_c mobi_top">
                <div class="list_main">
                    <?php
                    if ($result) {
                        foreach ($result as $row) {
                            $state= $race->get_state($row['start_time'],$row['end_time'],$row['sign_start_time'],$row['sign_end_time']);
                            ?>
                            <div class="list_div">
                            <section class="bg-parrall padding-top-100 padding-bottom-100" style='background: url( "<?php echo $race->getimg($row['id'])?>") center center no-repeat; background-size: cover' onclick="location.href='index.php?c=race&action=race_msg&id=<?php echo $row['id']?>'">
                                <?php
                                if (time() <strtotime($row['start_time'])) {
                                    ?>
                                    <div class="time"
                                         style="background-color: orangered; color: white; font-size: 15pt;width: 40%; float: right; padding: 4px;">
                                        <span>倒计时：</span>
                                        <span id="t_d<?php echo $row['id'] ?>">00天</span>
                                        <span id="t_h<?php echo $row['id'] ?>">00时</span>
                                        <span id="t_m<?php echo $row['id'] ?>">00分</span>
                                        <span id="t_s<?php echo $row['id'] ?>">00秒</span>
                                    </div>
                                    <script>
                                        function GetRTime() {
                                            //var EndTime= new Date('2017/09/20 00:00:00');
                                            var EndTime = new Date('<?php echo date("Y/m/d H:i:s", strtotime($row['start_time']));?>');
                                            var NowTime = new Date();
                                            var t = EndTime.getTime() - NowTime.getTime();
                                            var d = 0;
                                            var h = 0;
                                            var m = 0;
                                            var s = 0;
                                            if (t >= 0) {
                                                d = Math.floor(t / 1000 / 60 / 60 / 24);
                                                h = Math.floor(t / 1000 / 60 / 60 % 24);
                                                m = Math.floor(t / 1000 / 60 % 60);
                                                s = Math.floor(t / 1000 % 60);
                                            }

                                            document.getElementById("t_d<?php echo $row['id']?>").innerHTML = d + "天";
                                            document.getElementById("t_h<?php echo $row['id']?>").innerHTML = h + "时";
                                            document.getElementById("t_m<?php echo $row['id']?>").innerHTML = m + "分";
                                            document.getElementById("t_s<?php echo $row['id']?>").innerHTML = s + "秒";
                                        }
                                        setInterval(GetRTime, 0);
                                    </script>
                                    <?php
                                }
                                ?>
                                <div class="container">
                                    <div class="text-center">
                                        <div>
                                            <a href="index.php?c=race&action=race_msg&id=<?php echo $row['id']?>">
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </section>
                             <a href="index.php?c=race&action=race_msg&id=<?php echo $row['id']?>">
                                <h4 class="h4"><?php echo $row['race_title']?> <font color="red" size="-2"><?php echo low_price($row['low_price']);?></font> </h4>
                                <span style="color:#666666"><i class="fa fa-eye"></i><?php echo $row['click_point']?></span>
                            </a>
                            <div>
                            </div>
                        </div>
                            <?php
                        }
                    }
                    ?>
                </div>
                <center>
                    <?php if($action == 'race_q_list'){?>
                <a href="index.php?c=race&action=race_q_list&page=<?php echo $prv_page?>" class="btn"><<上一页</a> <a href="index.php?c=race&action=race_q_list&page=<?php echo $next_page?>"  class="btn">更多>></a>
            <?php }?>
            </center>
            <br/><br/><br/><br/>
</section>
<style type="text/css">
    .h4{color: #666666;letter-spacing: 0.1em;background: #f0f0f0;padding: 10px;border-radius: 10px;}
    .list_div{border: 1px #f0f0f0 solid;margin-bottom: 10px;border-radius: 10px;padding: 10px;background-color: #f9f9f9}
    .list_main{width: 90%; margin-right:auto; margin-left: auto }
</style>