<?php foreach($notices as $onenotice){ ?>
    <tr>
      <td><input type="checkbox" name="noticeid[]" lay-skin="primary" value="<?php echo $onenotice->id; ?>"></td>
      <td<?php if(!empty($onenotice->color)){echo ' style="color:'. $onenotice->color .';"';} ?>><?php echo $onenotice->title; ?></td>
      <td><?php echo $onenotice->starttime; ?></td>
      <td><?php echo $onenotice->stoptime; ?></td>
      <td><?php if($onenotice->stoptime>date("Y-m-d H:i:s")){echo '正常';}else{echo '<span style="color: #FF5722;">已过期</span>';} ?></td>      
      <td><a class="layui-btn layui-btn-sm" href="/glnotice/basic/<?php echo $onenotice->id; ?>.html" title="编辑">编辑</a> <a target="_blank" class="layui-btn layui-btn-sm" href="/notice/<?php echo $onenotice->id; ?>.html" title="预览"><i class="fa fa-eye"></i></a></td>
    </tr>
<?php } ?>