| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- $checkMaintenance = core::isMaintenance();
- $checkDebug = core::isDebug();
- $checkLogSuccess = core::getConfig("LOG_SUCCESS");
- $checkLogWarning = core::getConfig("LOG_WARNING");
- $checkLogError = core::getConfig("LOG_ERROR");
- ?>
- <h4>Général</h4>
- <div class="element-parametres form-check form-switch">
- <input class="form-check-input" type="checkbox" role="switch" id="checkMaintenance" <?php core::checkboxSelecter($checkMaintenance) ?>>
- <label class="form-check-label" for="checkMaintenance">Site en mode maintenance (les salariés ne pourront plus faire d'action sur le site)</label>
- </div>
- <div class="element-parametres form-check form-switch">
- <input class="form-check-input" type="checkbox" role="switch" id="checkDebug" <?php core::checkboxSelecter($checkDebug) ?>>
- <label class="form-check-label" for="checkDebug">Afficher les erreurs (débug)</label>
- </div>
- <h4>Historique</h4>
- <div class="element-parametres form-check form-switch">
- <input class="form-check-input" type="checkbox" role="switch" id="checkLogSuccess" <?php core::checkboxSelecter($checkLogSuccess) ?>>
- <label class="form-check-label" for="checkLogSuccess">Historiser les actions réalisées avec succès</label>
- </div>
- <div class="element-parametres form-check form-switch">
- <input class="form-check-input" type="checkbox" role="switch" id="checkLogWarning" <?php core::checkboxSelecter($checkLogWarning) ?>>
- <label class="form-check-label" for="checkLogWarning">Historiser les actions réalisées avec Warning</label>
- </div>
- <div class="element-parametres form-check form-switch">
- <input class="form-check-input" type="checkbox" role="switch" id="checkLogError" <?php core::checkboxSelecter($checkLogError) ?>>
- <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
- </div>
- <?php if (session::accessUserByType(1) and session::getId() == 1 and (ENVIRONNEMENT == "DEV" or ENVIRONNEMENT == "PREPROD")) { ?>
- <h4>Développement</h4>
- <div class="element-parametres">
- <a href="/submit.php?from=parametres-reset-datas" onclick="return confirm('Etes-vous certain de vouloir supprimer les données ?')"><button type="button" class="btn btn-warning">Nettoyer les données</button></a>
- </div>
- <div class="element-parametres">
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modalPHPInfo">PHP Infos</button>
- </div>
- <div class="modal fade" id="modalPHPInfo" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLabel">PHP Info</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <iframe width="970" height="800" src="/parametres-debug-info.vue"></iframe>
- </div>
- </div>
- </div>
- </div>
- <?php } ?>
- <script>
- $(document).ready(function() {
- $('#checkMaintenance').on('change', function() {
- window.location.href = "/submit.php?from=parametres-maintenance-activation&actif=" + $("#checkMaintenance").prop('checked');
- });
- $('#checkDebug').on('change', function() {
- window.location.href = "/submit.php?from=parametres-debug-activation&actif=" + $("#checkDebug").prop('checked');
- });
- $('#checkLogSuccess').on('change', function() {
- window.location.href = "/submit.php?from=parametres-config&name=LOG_SUCCESS&value=" + $("#checkLogSuccess").prop('checked');
- });
- $('#checkLogWarning').on('change', function() {
- window.location.href = "/submit.php?from=parametres-config&name=LOG_WARNING&value=" + $("#checkLogWarning").prop('checked');
- });
- $('#checkLogError').on('change', function() {
- window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
- });
- $('#modalPHPInfo').on('show.bs.modal', function() {
- $(this).find('.modal-body').css({
- width: 'auto', //probably not needed
- height: 'auto', //probably not needed
- 'max-height': '100%'
- });
- });
- });
- </script>
- <style>
- h4 {
- margin-top: 15px;
- }
- .element-parametres {
- margin-top: 5px;
- }
- .modal-body {
- position: relative;
- overflow-y: auto;
- max-height: 400px;
- padding: 15px;
- }
- .modal-dialog{
- width: 1005px !important;
- }
- .modal {
- --bs-modal-width: none;
- }
- .autoModal.modal .modal-body {
- max-height: 100%;
- }
- </style>
|