123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?php
- global $myUser, $conf;
- User::check_access('setting_global','read');
- ?>
- <div class="row">
- <div class="col-md-12 general-settings" id="general-settings" data-action="general_settings_save">
- <br>
- <?php if($myUser->can('setting_global','configure')): ?>
- <div class="btn btn-success float-right" onclick="general_settings_save();"><i class="fas fa-check"></i> Enregistrer</div>
- <?php endif; ?>
- <h3>Réglages généraux</h3>
- <p>Bienvenue sur l'espace de configuration, cliquez sur le menu de gauche pour acceder aux différents réglages de l'application.</p>
- <hr/>
- <?php if($myUser->can('setting_global','configure')): ?>
- <div>
- <h5>Informations générales :</h5>
- <ul>
- <li>Nom du programme : <strong><?php echo PROGRAM_NAME; ?></strong></li>
- <li>Version : <strong><?php echo SOURCE_VERSION; ?></strong></li>
- <li>Version PHP : <strong><?php echo phpversion(); ?></strong></li>
- <li>Version Apache : <strong><?php echo apache_get_version(); ?></strong></li>
- <li>Version de la base: <strong><?php echo BASE_SGBD.' - '.Database::version(); ?></strong></li>
-
- <li>Adresse de la base : <strong><?php echo BASE_HOST; ?></strong></li>
- <li>Time Zone : <strong><?php echo TIME_ZONE; ?></strong></li>
- <li>OS : <strong><?php echo PHP_OS; ?></strong></li>
-
- <li>Horodatage serveur : <strong><?php echo date('d/m/Y H:i.s'); ?></strong></li>
- </ul>
- </div>
- <hr>
- <!-- Réglages généraux de l'application -->
- <div>
- <h5>Theme :</h5>
- <div class="row">
- <div class="col-md-12 identity-block">
- <div class="row">
- <div class="col-md-6">
- <label> Logo application (clair) <small class="text-muted">(S'appliquera sur les fonds sombre de l'ensemble des établissements)</small> : </label>
- <input type="file" data-type="image" value="action.php?action=general_logo_download" class="form-control-file" id="logo" name="logo" data-delete="general_logo_delete(this)" data-default-src="img/logo/default-logo.png">
- <br>
- </div>
- <div class="col-md-6">
- <label> Logo application (sombre) <small class="text-muted">(S'appliquera sur les fonds clairs de l'ensemble des établissements)</small> : </label>
- <input type="file" data-type="image" value="action.php?action=general_logo_download&variant=dark" class="form-control-file" id="logo_dark" name="logo_dark" data-delete="general_logo_delete(this)" data-default-src="img/logo/default-logo.dark.png">
- <br>
- </div>
- <div class="col-md-6">
- <label> Favicon de l'application <small class="text-muted">(Cette favicon s'appliquera sur l'ensemble du site)</small> : </label>
- <input type="file" data-type="image" value="action.php?action=general_favicon_download" class="form-control-file" id="favicon" name="favicon" data-delete="general_favicon_delete(this)" data-default-src="img/logo/default-favicon.png">
- <br>
- </div>
- <div class="col-md-6"></div>
- </div>
- </div>
- </div>
- <hr>
- <div class="row">
- <div class="col-md-12">
- <h5>Mots de passes :</h5>
- <p>Définissez la politique de format des mots de passes</p>
- <h6 class="font-weight-bold">FORMATS</h6>
- <div id="password-format-form">
- <?php
- $selectedFormats = json_decode($conf->get('password_format'),true);
- if(!is_array($selectedFormats )) $selectedFormats = array();
- foreach(User::password_formats() as $format):
- ?>
- <label class="pl-3"><input type="checkbox" data-type="checkbox" <?php echo in_array($format['pattern'], $selectedFormats)?'checked="checked"':''; ?> data-label="<?php echo $format['label'] ?>" data-pattern="<?php echo $format['pattern'] ?>" onclick="password_settings_format()"> <?php echo $format['label'] ?></label><br/>
- <?php endforeach; ?>
-
- </div>
- </div>
- </div>
- <hr>
- <h5>Logs :</h5>
- <div>
- <span class="d-inline-block">
- Définition de la durée de conservation des logs par catégorie<small class="text-muted"> - en nombre de jours</small>
- </span>
- <small class="d-inline-block float-right text-danger">
- Laisser vide si vous souhaitez conserver les logs indéfiniment (déconseillé)
- </small>
- <div class="clear"></div>
- </div>
- <div class="row mt-2">
- <?php foreach(Log::staticQuery('SELECT DISTINCT category FROM {{table}}',array(),true) as $log):
- $slug = slugify($log->category);
- ?>
- <div class="col-md-3">
- <div class="input-group">
- <div class="input-group-prepend w-75">
- <span class="input-group-text w-100"><code><?php echo $log->category ?></code></span>
- </div>
- <input type="number" onkeydown="return input_number_control(event);" class="form-inline form-control" id="log_retention_time_<?php echo $slug; ?>" placeholder="ex. 30" value="<?php echo $conf->get('log_retention_time_'.$slug); ?>">
- </div>
- </div>
- <?php endforeach; ?>
- </div>
- <hr>
- <div class="row">
- <div class="col-md-12 general-settings-block">
- <?php echo Configuration::html('configuration-global'); ?>
- </div>
- </div>
- <hr/>
- <div class="row">
- <div class="col-md-12 maintenance-block">
- <span class="float-right">
- <input onchange="toggle_maintenance();" <?php echo file_exists('enabled.maintenance') ? 'checked="checked"' : '' ?> type="checkbox" autocomplete="off" name="maintenance" id="maintenance" data-type="checkbox" data-class="">
- <label for="maintenance" class="pointer">Site en maintenance</label><br>
- </span>
- <h5>Maintenance :</h5>
- <div class="clear"></div>
- <textarea data-type="wysiwyg" name="maintenance-content" id="maintenance-content" cols="30" rows="3" class="form-control">
- <?php echo file_exists('enabled.maintenance') ? file_get_contents('enabled.maintenance') : (file_exists('disabled.maintenance') ? file_get_contents('disabled.maintenance') : ''); ?>
- </textarea>
- </div>
- </div>
- </div>
- <?php endif; ?>
- </div>
- </div>
|