| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- $checkMaintenance = debug::isFile("maintenance");
- $checkDebug = debug::isFile("debug");
- ?>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td scope="row">
- <h4>Activation Modes</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>Refresh des données</h4>
- <div class="element-parametres">
- <a href="/submit.php?from=parametres-json-refresh" onclick="return confirm('Etes-vous certain de vouloir réinitialiser les JSON ?')"><button type="button" class="btn btn-warning">Réinitialisation des JSON</button></a>
- </div>
- <h4>Infos serveur</h4>
- <div class="element-parametres">
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modalPHPInfo">Voir le PHP Infos</button>
- </div>
- <h4>Infos serveur</h4>
- <div class="element-parametres">
- <?php
- echo 'SAPI: ' . PHP_SAPI . PHP_EOL;
- echo 'upload_max_filesize: ' . ini_get('upload_max_filesize') . PHP_EOL;
- echo 'post_max_size: ' . ini_get('post_max_size') . PHP_EOL;
- echo 'Loaded conf: ' . (php_ini_loaded_file() ?: 'none') . PHP_EOL;
- ?>
- </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>
- </td>
- <?php if (session::getType() == 1 and (ENVIRONNEMENT != "PROD")) { ?>
- <td>
- <h4>Outils de débug</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-danger">Nettoyer les données</button></a>
- </div>
- </td>
- <?php } ?>
- </tr>
- </tbody>
- </table>
- <script>
- $(document).ready(function() {
- $('#modalPHPInfo').on('show.bs.modal', function() {
- $(this).find('.modal-body').css({
- width: 'auto', //probably not needed
- height: 'auto', //probably not needed
- 'max-height': '100%'
- });
- });
- $('#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&target=debug&actif=" + $("#checkDebug").prop('checked');
- });
- });
- </script>
|