manage-users.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. include 'common.php';
  3. include 'header.php';
  4. include 'menu.php';
  5. $users = \Widget\Users\Admin::alloc();
  6. ?>
  7. <div class="main">
  8. <div class="body container">
  9. <?php include 'page-title.php'; ?>
  10. <div class="row typecho-page-main" role="main">
  11. <div class="col-mb-12 typecho-list">
  12. <div class="typecho-list-operate clearfix">
  13. <form method="get">
  14. <div class="operate">
  15. <label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
  16. class="typecho-table-select-all"/></label>
  17. <div class="btn-group btn-drop">
  18. <button class="btn dropdown-toggle btn-s" type="button"><i
  19. class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
  20. class="i-caret-down"></i></button>
  21. <ul class="dropdown-menu">
  22. <li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
  23. href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
  24. </li>
  25. </ul>
  26. </div>
  27. </div>
  28. <div class="search" role="search">
  29. <?php if ('' != $request->keywords): ?>
  30. <a href="<?php $options->adminUrl('manage-users.php'); ?>"><?php _e('&laquo; 取消筛选'); ?></a>
  31. <?php endif; ?>
  32. <input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
  33. value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
  34. <button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
  35. </div>
  36. </form>
  37. </div><!-- end .typecho-list-operate -->
  38. <form method="post" name="manage_users" class="operate-form">
  39. <div class="typecho-table-wrap">
  40. <table class="typecho-list-table">
  41. <colgroup>
  42. <col width="20" class="kit-hidden-mb"/>
  43. <col width="6%" class="kit-hidden-mb"/>
  44. <col width="30%"/>
  45. <col width="" class="kit-hidden-mb"/>
  46. <col width="25%" class="kit-hidden-mb"/>
  47. <col width="15%"/>
  48. </colgroup>
  49. <thead>
  50. <tr>
  51. <th class="kit-hidden-mb"></th>
  52. <th class="kit-hidden-mb"></th>
  53. <th><?php _e('用户名'); ?></th>
  54. <th class="kit-hidden-mb"><?php _e('昵称'); ?></th>
  55. <th class="kit-hidden-mb"><?php _e('电子邮件'); ?></th>
  56. <th><?php _e('用户组'); ?></th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. <?php while ($users->next()): ?>
  61. <tr id="user-<?php $users->uid(); ?>">
  62. <td class="kit-hidden-mb"><input type="checkbox" value="<?php $users->uid(); ?>"
  63. name="uid[]"/></td>
  64. <td class="kit-hidden-mb"><a
  65. href="<?php $options->adminUrl('manage-posts.php?__typecho_all_posts=off&uid=' . $users->uid); ?>"
  66. class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a>
  67. </td>
  68. <td>
  69. <a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
  70. <a href="<?php $users->permalink(); ?>"
  71. title="<?php _e('浏览 %s', $users->screenName); ?>"><i
  72. class="i-exlink"></i></a>
  73. </td>
  74. <td class="kit-hidden-mb"><?php $users->screenName(); ?></td>
  75. <td class="kit-hidden-mb"><?php if ($users->mail): ?><a
  76. href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?>
  77. </td>
  78. <td><?php switch ($users->group) {
  79. case 'administrator':
  80. _e('管理员');
  81. break;
  82. case 'editor':
  83. _e('编辑');
  84. break;
  85. case 'contributor':
  86. _e('贡献者');
  87. break;
  88. case 'subscriber':
  89. _e('关注者');
  90. break;
  91. case 'visitor':
  92. _e('访问者');
  93. break;
  94. default:
  95. break;
  96. } ?></td>
  97. </tr>
  98. <?php endwhile; ?>
  99. </tbody>
  100. </table><!-- end .typecho-list-table -->
  101. </div><!-- end .typecho-table-wrap -->
  102. </form><!-- end .operate-form -->
  103. <div class="typecho-list-operate clearfix">
  104. <form method="get">
  105. <div class="operate">
  106. <label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
  107. class="typecho-table-select-all"/></label>
  108. <div class="btn-group btn-drop">
  109. <button class="btn dropdown-toggle btn-s" type="button"><i
  110. class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
  111. class="i-caret-down"></i></button>
  112. <ul class="dropdown-menu">
  113. <li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
  114. href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. <?php if ($users->have()): ?>
  120. <ul class="typecho-pager">
  121. <?php $users->pageNav(); ?>
  122. </ul>
  123. <?php endif; ?>
  124. </form>
  125. </div><!-- end .typecho-list-operate -->
  126. </div><!-- end .typecho-list -->
  127. </div><!-- end .typecho-page-main -->
  128. </div>
  129. </div>
  130. <?php
  131. include 'copyright.php';
  132. include 'common-js.php';
  133. include 'table-js.php';
  134. include 'footer.php';
  135. ?>