You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

7 years ago
  1. <!DOCTYPE html><html><head><title>留言列表_<?php echo sysconfig('CMS_WEBNAME'); ?>后台管理</title>@include('admin.common.header')
  2. <div class="container-fluid">
  3. <div class="row">
  4. <!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
  5. <!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
  6. <form id="searcharc" class="navbar-form" action="/fladmin/guestbook" method="get">
  7. <div class="form-group"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
  8. <button type="submit" class="btn btn-info" value="Submit">搜索一下</button></form>
  9. <div class="table-responsive">
  10. <table class="table table-striped table-hover">
  11. <thead>
  12. <tr>
  13. <th>ID</th>
  14. <th width=25%>标题</th>
  15. <th>留言时间</th>
  16. <th width=45%>内容</th><th>操作</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php if($posts){foreach($posts as $row){ ?>
  21. <tr>
  22. <td><?php echo $row->id; ?></td>
  23. <td><?php echo $row->title; ?></td>
  24. <td><?php echo date('Y-m-d H:i:s',$row->addtime); ?></td>
  25. <td><?php echo $row->msg; ?></td><td>&nbsp;<a onclick="delconfirm('/fladmin/guestbook/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
  26. </tr>
  27. <?php }} ?>
  28. </tbody>
  29. </table>
  30. </div><!-- 表格结束 -->
  31. <div class="backpages">{{ $posts->links() }}</div>
  32. <script>
  33. $(function(){
  34. $('.required').on('focus', function() {
  35. $(this).removeClass('input-error');
  36. });
  37. $("#searcharc").submit(function(e){
  38. $(this).find('.required').each(function(){
  39. if( $(this).val() == "" )
  40. {
  41. e.preventDefault();
  42. $(this).addClass('input-error');
  43. }
  44. else
  45. {
  46. $(this).removeClass('input-error');
  47. }
  48. });
  49. });
  50. });
  51. </script>
  52. </div></div><!-- 右边结束 --></div></div>
  53. </body></html>