2
0

cms.parametres-general.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. <?php
  14. $infosDB = core::getSizeDataBase();
  15. ?>
  16. <div>
  17. <span class="badge" style="background-color:#28a745; width: 130px;"><?php echo $infosDB["moDB"] ?> Mo</span> <label> <?php echo $infosDB["nameDB"] ?> (Mysql)</label>
  18. </div>
  19. <div>
  20. <span class="badge" style="background-color:#28a745; width: 130px;"><?php echo core::convertBytes((disk_total_space(DOCUMENT_ROOT) - disk_free_space(DOCUMENT_ROOT)), "o", "Go") . " / " . core::convertBytes(disk_total_space(DOCUMENT_ROOT), "o", "Go") ?></span> <label> Espace ROOT</label>
  21. </div>
  22. <div>
  23. <span class="badge" style="background-color:#28a745; width: 130px;"><?php echo core::convertBytes((disk_total_space(DOCUMENT_DATAS) - disk_free_space(DOCUMENT_DATAS)), "o", "Go") . " / " . core::convertBytes(disk_total_space(DOCUMENT_DATAS), "o", "Go") ?></span> <label> Espace DATAS</label>
  24. </div>
  25. <div>
  26. <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>
  27. </div>
  28. <div>
  29. <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>
  30. </div>
  31. <div>
  32. <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>
  33. </div>
  34. <div>
  35. <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>
  36. </div>
  37. <h4>Général</h4>
  38. <div class="element-parametres form-check form-switch">
  39. <input class="form-check-input" type="checkbox" role="switch" id="checkMaintenance" <?php core::checkboxSelecter($checkMaintenance) ?>>
  40. <label class="form-check-label" for="checkMaintenance">Site en mode maintenance (les salariés ne pourront plus faire d'action sur le site)</label>
  41. </div>
  42. <div class="element-parametres form-check form-switch">
  43. <input class="form-check-input" type="checkbox" role="switch" id="checkDebug" <?php core::checkboxSelecter($checkDebug) ?>>
  44. <label class="form-check-label" for="checkDebug">Afficher les erreurs (débug)</label>
  45. </div>
  46. <h4>Historique</h4>
  47. <div class="element-parametres form-check form-switch">
  48. <input class="form-check-input" type="checkbox" role="switch" id="checkLogSuccess" <?php core::checkboxSelecter($checkLogSuccess) ?>>
  49. <label class="form-check-label" for="checkLogSuccess">Historiser les actions réalisées avec succès</label>
  50. </div>
  51. <div class="element-parametres form-check form-switch">
  52. <input class="form-check-input" type="checkbox" role="switch" id="checkLogWarning" <?php core::checkboxSelecter($checkLogWarning) ?>>
  53. <label class="form-check-label" for="checkLogWarning">Historiser les actions réalisées avec warning</label>
  54. </div>
  55. <div class="element-parametres form-check form-switch">
  56. <input class="form-check-input" type="checkbox" role="switch" id="checkLogError" <?php core::checkboxSelecter($checkLogError) ?>>
  57. <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
  58. </div>
  59. <script>
  60. $(document).ready(function() {
  61. $('#checkMaintenance').on('change', function() {
  62. window.location.href = "/submit.php?from=parametres-maintenance-activation&actif=" + $("#checkMaintenance").prop('checked');
  63. });
  64. $('#checkDebug').on('change', function() {
  65. window.location.href = "/submit.php?from=parametres-debug-activation&actif=" + $("#checkDebug").prop('checked');
  66. });
  67. $('#checkLogSuccess').on('change', function() {
  68. window.location.href = "/submit.php?from=parametres-config&name=LOG_SUCCESS&value=" + $("#checkLogSuccess").prop('checked');
  69. });
  70. $('#checkLogWarning').on('change', function() {
  71. window.location.href = "/submit.php?from=parametres-config&name=LOG_WARNING&value=" + $("#checkLogWarning").prop('checked');
  72. });
  73. $('#checkLogError').on('change', function() {
  74. window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
  75. });
  76. });
  77. </script>