cms.parametres-general.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. $checkLogSuccess = core::getConfig("LOG_SUCCESS");
  3. $checkLogWarning = core::getConfig("LOG_WARNING");
  4. $checkLogError = core::getConfig("LOG_ERROR");
  5. ?>
  6. <h4>Historique</h4>
  7. <div class="element-parametres form-check form-switch">
  8. <input class="form-check-input" type="checkbox" role="switch" id="checkLogSuccess" <?php core::checkboxSelecter($checkLogSuccess) ?>>
  9. <label class="form-check-label" for="checkLogSuccess">Historiser les actions réalisées avec succès</label>
  10. </div>
  11. <div class="element-parametres form-check form-switch">
  12. <input class="form-check-input" type="checkbox" role="switch" id="checkLogWarning" <?php core::checkboxSelecter($checkLogWarning) ?>>
  13. <label class="form-check-label" for="checkLogWarning">Historiser les actions réalisées avec warning</label>
  14. </div>
  15. <div class="element-parametres form-check form-switch">
  16. <input class="form-check-input" type="checkbox" role="switch" id="checkLogError" <?php core::checkboxSelecter($checkLogError) ?>>
  17. <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
  18. </div>
  19. <script>
  20. $(document).ready(function() {
  21. $('#checkLogSuccess').on('change', function() {
  22. window.location.href = "/submit.php?from=parametres-config&name=LOG_SUCCESS&value=" + $("#checkLogSuccess").prop('checked');
  23. });
  24. $('#checkLogWarning').on('change', function() {
  25. window.location.href = "/submit.php?from=parametres-config&name=LOG_WARNING&value=" + $("#checkLogWarning").prop('checked');
  26. });
  27. $('#checkLogError').on('change', function() {
  28. window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
  29. });
  30. });
  31. </script>
  32. <h4>Espaces disques</h4>
  33. <?php
  34. $infosDB = core::getSizeDataBase();
  35. $unGo = 1073741824;
  36. core::progressBarWarning(disk_free_space(DOCUMENT_ROOT), disk_total_space(DOCUMENT_ROOT), "Espace ROOT", "bi-pc-display-horizontal");
  37. core::progressBarWarning(disk_free_space(DOCUMENT_DATAS), disk_total_space(DOCUMENT_DATAS), "Espace DATAS", "bi-pc-display-horizontal");
  38. core::progressBarWarning(core::convertBytes(floatval($infosDB["moDB"]), "Mo", "o", TRUE), $unGo, "Base de donnée Mysql", "bi bi-database-fill");
  39. core::progressBarWarning(file::sizeFolder(DIR_BACKUP), disk_free_space(DOCUMENT_DATAS), "Dossier Backups", "bi bi-folder");
  40. core::progressBarWarning(file::sizeFolder(DOCUMENT_DATAS), disk_free_space(DOCUMENT_DATAS), "Dossier Documents", "bi bi-folder");
  41. core::progressBarWarning(file::sizeFolder(DIR_DATAS_JSONDATA), disk_free_space(DOCUMENT_ROOT), "Dossier Json", "bi bi-folder");
  42. core::progressBarWarning(file::sizeFolder(SFTP_LOCAL), disk_free_space(DOCUMENT_ROOT), "Dossier SFTP", "bi bi-folder");
  43. ?>