Просмотр файла htmly-2.9.8/system/admin/views/users.html.php

Размер файла: 1.2Kb
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <h2 class="post-index"><?php echo i18n('Manage_users'); ?></h2>
  3. <br>
  4. <a class="btn btn-primary right" href="<?php echo site_url();?>admin/add/user"><?php echo i18n('Add_user');?></a>
  5. <br><br>
  6. <?php
  7. $users = glob('config/users/*.ini', GLOB_NOSORT);
  8. ksort($users);
  9. ?>
  10.  
  11. <table class="table post-list">
  12. <thead>
  13. <tr class="head">
  14. <th><?php echo i18n('username');?></th>
  15. <th><?php echo i18n('role');?></th>
  16. <th><?php echo i18n('Operations');?></th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php foreach ($users as $u): ?>
  21. <?php $username = pathinfo($u, PATHINFO_FILENAME); $role = user('role', $username);?>
  22. <tr>
  23. <td><?php echo $username; ?></td>
  24. <td><?php echo $role; ?></td>
  25. <td><a class="btn btn-primary btn-xs" href="<?php echo site_url() . 'admin/users/' . $username;?>/edit?destination=admin/users"><?php echo i18n('Edit');?></a> <?php if ($role !== 'admin'):?><a class="btn btn-danger btn-xs" href="<?php echo site_url() . 'admin/users/' . $username;?>/delete?destination=admin/users"><?php echo i18n('Delete');?></a><?php endif;?></td>
  26. </tr>
  27. <?php endforeach; ?>
  28. </tbody>
  29. </table>