setting.log.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. <div class="btn btn-primary float-right" title="Exporter les résultats au format Excel" onclick="search_log(true);" id="export-logs-btn"><i class="far fa-file-excel mr-1"></i>Exporter</div>
  12. <h3>Logs</h3>
  13. <div class="clear"></div>
  14. <hr>
  15. <div class="row">
  16. <div class="col-md-12">
  17. <select id="filters" data-slug="log-search" data-type="filter" data-label="Recherche" data-function="search_log">
  18. <option value="label" data-filter-type="text">Libellé</option>
  19. <option value="category" data-filter-type="list" data-values='<?php echo json_encode($categories); ?>'>Catégorie</option>
  20. <option value="created" data-filter-type="date">Date</option>
  21. <option value="ip" data-filter-type="text">IP</option>
  22. <option value="creator" data-filter-type="user">Utilisateur</option>
  23. </select>
  24. </div>
  25. </div>
  26. <br/>
  27. <div class="row">
  28. <div class="col-md-12">
  29. <table id="logs" class="table table-striped">
  30. <thead class="bg-secondary text-light">
  31. <tr>
  32. <th data-sortable="created">Date</th>
  33. <th data-sortable="category">Catégorie</th>
  34. <th data-sortable="label" class="log-col">Libellé</th>
  35. <th data-sortable="creator">Utilisateur</th>
  36. <th data-sortable="ip">Ip</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <tr data-id="{{id}}" class="hidden">
  41. <td>{{created}}</td>
  42. <td>{{category}}</td>
  43. <td class="log-col">{{{label}}}</td>
  44. <td>{{creator}}</td>
  45. <td>{{ip}}</td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. <ul class="pagination justify-content-center">
  50. <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()">
  51. <span class="page-link">{{label}}</span>
  52. </li>
  53. </ul>
  54. </div>
  55. </div>
  56. </div>
  57. </div>