cms.parametres-general.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. $checkMaintenance = core::isMaintenance();
  3. $checkDebug = core::isDebug();
  4. $checkLogSuccess = core::getConfig("LOG_SUCCESS");
  5. $checkLogWarning = core::getConfig("LOG_WARNING");
  6. $checkLogError = core::getConfig("LOG_ERROR");
  7. $space_total_documents = disk_total_space(DOCUMENT_DATAS);
  8. $space_free_documents = disk_free_space(DOCUMENT_DATAS);
  9. $space_total_backup = disk_total_space(DIR_BACKUP);
  10. $space_free_backup = disk_free_space(DIR_BACKUP);
  11. ?>
  12. <h4>Espaces disques</h4>
  13. <div>
  14. <span class="badge" style="background-color:#28a745; width: 130px;"><?php echo core::convertBytes(disk_free_space(DOCUMENT_ROOT), "o", "Go") . " / " . core::convertBytes(disk_total_space(DOCUMENT_ROOT), "o", "Go") ?></span> <label> Espace ROOT</label>
  15. </div>
  16. <div>
  17. <span class="badge" style="background-color:#28a745; width: 130px;"><?php echo core::convertBytes(disk_free_space(DOCUMENT_DATAS), "o", "Go") . " / " . core::convertBytes(disk_total_space(DOCUMENT_DATAS), "o", "Go") ?></span> <label> Espace DATAS</label>
  18. </div>
  19. <div>
  20. <span class="badge" style="background-color:#17a2b8; width: 130px;"><?php echo core::convertBytes(file::sizeFolder(DIR_BACKUP), "o", "Mo") . " / " . core::convertBytes(disk_total_space(DOCUMENT_DATAS), "o", "Go") ?></span> <label> Dossier Backups</label>
  21. </div>
  22. <div>
  23. <span class="badge" style="background-color:#17a2b8; width: 130px;"><?php echo core::convertBytes(file::sizeFolder(DOCUMENT_DATAS), "o", "Mo") . " / " . core::convertBytes(disk_total_space(DOCUMENT_DATAS), "o", "Go") ?></span> <label> Dossier Documents</label>
  24. </div>
  25. <div>
  26. <span class="badge" style="background-color:#17a2b8; width: 130px;"><?php echo core::convertBytes(file::sizeFolder(DIR_DATAS_JSONDATA), "o", "Mo") . " / " . core::convertBytes(disk_total_space(DOCUMENT_ROOT), "o", "Go") ?></span> <label> Dossier Json</label>
  27. </div>
  28. <div>
  29. <span class="badge" style="background-color:#17a2b8; width: 130px;"><?php echo core::convertBytes(file::sizeFolder(SFTP_LOCAL), "o", "Mo") . " / " . core::convertBytes(disk_total_space(DOCUMENT_ROOT), "o", "Go") ?></span> <label> Dossier SFTP</label>
  30. </div>
  31. <h4>Général</h4>
  32. <div class="element-parametres form-check form-switch">
  33. <input class="form-check-input" type="checkbox" role="switch" id="checkMaintenance" <?php core::checkboxSelecter($checkMaintenance) ?>>
  34. <label class="form-check-label" for="checkMaintenance">Site en mode maintenance (les salariés ne pourront plus faire d'action sur le site)</label>
  35. </div>
  36. <div class="element-parametres form-check form-switch">
  37. <input class="form-check-input" type="checkbox" role="switch" id="checkDebug" <?php core::checkboxSelecter($checkDebug) ?>>
  38. <label class="form-check-label" for="checkDebug">Afficher les erreurs (débug)</label>
  39. </div>
  40. <h4>Historique</h4>
  41. <div class="element-parametres form-check form-switch">
  42. <input class="form-check-input" type="checkbox" role="switch" id="checkLogSuccess" <?php core::checkboxSelecter($checkLogSuccess) ?>>
  43. <label class="form-check-label" for="checkLogSuccess">Historiser les actions réalisées avec succès</label>
  44. </div>
  45. <div class="element-parametres form-check form-switch">
  46. <input class="form-check-input" type="checkbox" role="switch" id="checkLogWarning" <?php core::checkboxSelecter($checkLogWarning) ?>>
  47. <label class="form-check-label" for="checkLogWarning">Historiser les actions réalisées avec warning</label>
  48. </div>
  49. <div class="element-parametres form-check form-switch">
  50. <input class="form-check-input" type="checkbox" role="switch" id="checkLogError" <?php core::checkboxSelecter($checkLogError) ?>>
  51. <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
  52. </div>
  53. <script>
  54. $(document).ready(function() {
  55. $('#checkMaintenance').on('change', function() {
  56. window.location.href = "/submit.php?from=parametres-maintenance-activation&actif=" + $("#checkMaintenance").prop('checked');
  57. });
  58. $('#checkDebug').on('change', function() {
  59. window.location.href = "/submit.php?from=parametres-debug-activation&actif=" + $("#checkDebug").prop('checked');
  60. });
  61. $('#checkLogSuccess').on('change', function() {
  62. window.location.href = "/submit.php?from=parametres-config&name=LOG_SUCCESS&value=" + $("#checkLogSuccess").prop('checked');
  63. });
  64. $('#checkLogWarning').on('change', function() {
  65. window.location.href = "/submit.php?from=parametres-config&name=LOG_WARNING&value=" + $("#checkLogWarning").prop('checked');
  66. });
  67. $('#checkLogError').on('change', function() {
  68. window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
  69. });
  70. });
  71. </script>