   <div class="row">
        <div class="col-lg-12">
          <h3 class="page-header"><i class="fa fa-laptop"></i> 赛事 <a href="index.php?c=race&action=add" class="badge bg-important">新增赛事</a></h3> 
        </div>
      </div>
<div id="col-lg-12">
<div id="table-responsive">
<table class="table table-striped table-advance table-hover">
    <thead>
    <tr>
        <th>赛事名称</th>
        <th>开始时间</th>
        <th>开启/暂停</th>
        <th>操作</th>
    </tr>
</thead>
<tbody>
    <?php
    if ($result) {
        foreach ($result as $row) {
            ?>
            <tr>
                <td><a href="index.php?c=race&action=dashboard&id=<?php echo $row['id'] ?>"><?php echo $row['race_title'] ?></a></td>
                <td><a href="index.php?c=race&action=dashboard&id=<?php echo $row['id'] ?>"><?php echo $row['start_time'] ?></a></td>
                <td>
                    <a href="index.php?c=race&action=race_display&display=1&id=<?php echo $row['id']?>" 
<?php if($row['display']=='1'){echo 'class=blue';}?>
                        >开启</a>
                      <a href="index.php?c=race&action=race_display&display=0&id=<?php echo $row['id']?>"
<?php if($row['display']=='0'){echo 'class=blue';}?>>暂停</a>
                </td>
                <td><a href="index.php?c=race&action=dashboard&id=<?php echo $row['id'] ?>" class="badge bg-important" style="color: white"><i class="fa fa-pencil"></i> 管理</a>

                </td>
            </tr>
            <?php
        }
    } else {
        ?>
        <tr>
            <td colspan="3">nothing</td>
        </tr>
        <?php
    }
    ?>
    </tbody>
</table>
</div>
</div>
<br/><br/><br/>
<style type="text/css">
    .blue{background: #00a0df; color: white; padding:3px; border-radius: 5px;}
</style>