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