index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <include file="public@header" />
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="{:url('user/index')}">{:lang('ADMIN_USER_INDEX')}</a></li>
  7. <li><a href="{:url('user/add')}">{:lang('ADMIN_USER_ADD')}</a></li>
  8. </ul>
  9. <form class="well form-inline margin-top-20" method="get" action="{:url('User/index')}">
  10. 用户名:
  11. <input type="text" class="form-control" name="user_login" style="width: 120px;" value="{:input('request.user_login/s','')}" placeholder="请输入{:lang('USERNAME')}">
  12. 邮箱:
  13. <input type="text" class="form-control" name="user_email" style="width: 120px;" value="{:input('request.user_email/s','')}" placeholder="请输入{:lang('EMAIL')}">
  14. <input type="submit" class="btn btn-primary" value="搜索" />
  15. <a class="btn btn-danger" href="{:url('User/index')}">清空</a>
  16. </form>
  17. <table class="table table-hover table-bordered">
  18. <thead>
  19. <tr>
  20. <th width="50">ID</th>
  21. <th>{:lang('USERNAME')}</th>
  22. <th>{:lang('LAST_LOGIN_IP')}</th>
  23. <th>{:lang('LAST_LOGIN_TIME')}</th>
  24. <th>{:lang('EMAIL')}</th>
  25. <th>{:lang('STATUS')}</th>
  26. <th width="140">{:lang('ACTIONS')}</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php>
  31. <foreach name="users" item="vo">
  32. <tr>
  33. <td>{$vo.id}</td>
  34. <td><if condition="$vo['user_url']"><a href="{$vo.user_url}" target="_blank" title="{$vo.signature}">{$vo.user_login}</a><else />{$vo.user_login}</if></td>
  35. <td>{$vo.last_login_ip}</td>
  36. <td>
  37. <if condition="$vo['last_login_time'] eq 0">
  38. {:lang('USER_HAVE_NOT_LOGIN')}
  39. <else />
  40. {:date('Y-m-d H:i',$vo['last_login_time'])}
  41. </if>
  42. </td>
  43. <td>{$vo.user_email}</td>
  44. <td>
  45. <switch name="vo.user_status">
  46. <case value="0">
  47. <span class="label label-danger">{$user_statuses[$vo['user_status']]}</span>
  48. </case>
  49. <case value="1">
  50. <span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
  51. </case>
  52. <case value="2">
  53. <span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
  54. </case>
  55. </switch>
  56. </td>
  57. <td>
  58. <if condition="$vo['id'] eq 1 || $vo['id'] eq cmf_get_current_admin_id()">
  59. <span class="btn btn-xs btn-primary disabled">{:lang('EDIT')}</span>
  60. <span class="btn btn-xs btn-danger disabled">{:lang('DELETE')}</span>
  61. <if condition="$vo['user_status'] eq 1">
  62. <span class="btn btn-xs btn-danger disabled">{:lang('BLOCK_USER')}</span>
  63. <else />
  64. <span class="btn btn-xs btn-warning disabled">{:lang('ACTIVATE_USER')}</span>
  65. </if>
  66. <else />
  67. <a class="btn btn-xs btn-primary" href='{:url("user/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
  68. <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('user/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
  69. <if condition="$vo['user_status'] eq 1">
  70. <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('user/ban',array('id'=>$vo['id']))}" data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
  71. <else />
  72. <a class="btn btn-xs btn-warning js-ajax-dialog-btn" href="{:url('user/cancelban',array('id'=>$vo['id']))}" data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
  73. </if>
  74. </if>
  75. </td>
  76. </tr>
  77. </foreach>
  78. </tbody>
  79. </table>
  80. <div class="pagination">{$page}</div>
  81. </div>
  82. <script src="__STATIC__/js/admin.js"></script>
  83. </body>
  84. </html>