setting.log.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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="label" data-filter-type="text">Libellé</option>
  17. <option value="category" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($categories); ?>'>Catégorie</option>
  18. <option value="created" data-filter-type="date">Date</option>
  19. <option value="ip" data-filter-type="text">IP</option>
  20. <option value="creator" data-filter-type="user">Auteur</option>
  21. </select>
  22. </div>
  23. </div>
  24. <br/>
  25. <div class="row">
  26. <div class="col-md-12">
  27. <table id="logs" class="table table-striped">
  28. <thead>
  29. <tr>
  30. <th data-sortable="created">Date</th>
  31. <th data-sortable="category">Catégorie</th>
  32. <th data-sortable="label" class="log-col">Libellé</th>
  33. <th data-sortable="creator">Utilisateur</th>
  34. <th data-sortable="ip">Ip</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr data-id="{{id}}" class="hidden">
  39. <td>{{created}}</td>
  40. <td>{{category}}</td>
  41. <td class="log-col">{{{label}}}</td>
  42. <td>{{creator}}</td>
  43. <td>{{ip}}</td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. <ul class="pagination justify-content-center">
  48. <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()">
  49. <span class="page-link">{{label}}</span>
  50. </li>
  51. </ul>
  52. </div>
  53. </div>
  54. </div>
  55. </div>