index.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <a href="{:U('AdminUser/add')}" class="btn btn-primary">新增用户</a>
  5. </div>
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover">
  10. <thead>
  11. <tr>
  12. <th>用户名</th>
  13. <th>真实姓名</th>
  14. <th>手机号码</th>
  15. <th>登录次数</th>
  16. <th>登录IP</th>
  17. <th>登录地点</th>
  18. <th>创建时间</th>
  19. <th>最后登录</th>
  20. <th>状态</th>
  21. <th>操作</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <volist name="list" id="m" empty="$empty">
  26. <tr>
  27. <td>{$m.a_uname}</td>
  28. <td>{$m.a_true_name}</td>
  29. <td>{$m.a_telephone}</td>
  30. <td>{$m.a_login_count}</td>
  31. <td>{$m.a_last_login_ip}</td>
  32. <td>{$m.a_last_ip_region}</td>
  33. <td><?php echo empty($m['a_create_time'])?'无':date('Y-m-d H:i:s',$m['a_create_time']); ?></td>
  34. <td><?php echo empty($m['a_last_login_time'])?'无':date('Y-m-d H:i:s',$m['a_last_login_time']); ?></td>
  35. <td>
  36. <?php
  37. switch($m['a_status']){
  38. case '1':
  39. echo '<span class="green bold">启用</span>';
  40. break;
  41. case '0':
  42. echo '<span class="red bold">禁用</span>';
  43. break;
  44. }
  45. ?>
  46. </td>
  47. <td>
  48. <a class="btn btn-xs btn-info" href='{:U("AdminUser/info",array("id"=>$m["a_id"]))}'>
  49. <i class="icon-eye-open bigger-120"></i>
  50. </a>
  51. </td>
  52. </tr>
  53. </volist>
  54. <tr>
  55. <td colspan="20" class="page">{$page}</td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </div>
  62. </block>
  63. <block name="javascript">
  64. <script>
  65. $(function(){
  66. $("#search").click(function () {
  67. var url = $(this).attr('url');
  68. var query = $('.search-form').find('input,select').serialize();
  69. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  70. query = query.replace(/^&/g, '');
  71. if (url.indexOf('?') > 0) {
  72. url += '&' + query;
  73. } else {
  74. url += '?' + query;
  75. }
  76. window.location.href = url;
  77. });
  78. });
  79. </script>
  80. </block>