setting.log.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. global $myUser;
  3. User::check_access('log','read');
  4. $categories = array();
  5. foreach(Log::staticQuery('SELECT DISTINCT category FROM {{table}} ORDER BY category',array(),true) as $category)
  6. $categories[$category->category] = $category->category;
  7. ?>
  8. <div class="row">
  9. <div class="col-md-12">
  10. <br>
  11. <h3>Logs</h3>
  12. <hr/>
  13. <div class="row">
  14. <div class="col-md-12">
  15. <select id="filters" data-slug="log-search" data-type="filter" data-label="Recherche" data-function="search_log">
  16. <option value="category" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($categories); ?>'>Catégorie</option>
  17. <option value="created" data-filter-type="date">Date</option>
  18. <option value="ip" data-filter-type="text">IP</option>
  19. <option value="creator" data-filter-type="user">Auteur</option>
  20. </select>
  21. </div>
  22. </div>
  23. <br/>
  24. <div class="row">
  25. <div class="col-md-12">
  26. <table id="logs" class="table table-striped">
  27. <thead>
  28. <tr>
  29. <th data-sortable="created">Date</th>
  30. <th data-sortable="category">Catégorie</th>
  31. <th data-sortable="label" class="log-col">Libellé</th>
  32. <th data-sortable="creator">Utilisateur</th>
  33. <th data-sortable="ip">Ip</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <tr data-id="{{id}}" class="hidden">
  38. <td>{{created}}</td>
  39. <td>{{category}}</td>
  40. <td class="log-col">{{{label}}}</td>
  41. <td>{{creator}}</td>
  42. <td>{{ip}}</td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. <ul class="pagination justify-content-center">
  47. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');search_log()">
  48. <a class="page-link" href="#">{{label}}</a>
  49. </li>
  50. </ul>
  51. </div>
  52. </div>
  53. </div>
  54. </div>