123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- global $myUser,$_,$conf;
- User::check_access('activedirectory','configure');
- require_once(__DIR__.SLASH.'ActiveDirectoryGroup.class.php');
- ?>
- <div class="row">
- <div class="col-md-12"><br>
- <div class="btn btn btn-success ml-2 float-right" onclick="activedirectory_setting_save();"><i class="fas fa-check"></i> Enregistrer</div>
- <h3>Réglages Active Directory</h3>
- <div class="clear"></div>
- <hr>
- <?php echo Configuration::html('activedirectory'); ?>
- <hr>
- </div>
- <div class="activedirectory-test-connection col-md-12 mt-3 mb-3">
- <div class="btn btn btn-primary float-right" onclick="activedirectory_connection_check();"><i class="fas fa-network-wired"></i> Tester la connexion</div>
- <legend>Récapitulatif de connexion</legend>
- <div class="clear"></div>
-
- <!-- Reload ajax partie bloc config -->
- <div class="row">
- <div class="col-sm-4">
- <div id="reach-connection" class="card text-center">
- <div class="card-body">
- <div class="label">
- <h5 class="">Connexion au serveur AD distant</h5>
- <small class="card-subtitle mb-2 text-muted">Test de connexion au serveur</small>
- </div>
- <span class="d-block mt-2 mb-3">
- <h2 class="card-icon d-block"><i class="fas fa-question-circle"></i></h2>
- </span>
- <small class="card-text text-muted">
- <div>IP Serveur : <span class="text-<?php echo !empty($conf->get('activedirectory_server'))?'primary':'danger'; ?>"><?php echo !empty($conf->get('activedirectory_server')) ? $conf->get('activedirectory_server') : "Non renseigné"; ?></span></div>
- <div>Port / Port SSL : <span class="text-<?php echo !empty($conf->get('activedirectory_port')) && !empty($conf->get('activedirectory_ssl_port'))?'primary':'danger'; ?>"><?php echo !empty($conf->get('activedirectory_port')) && !empty($conf->get('activedirectory_ssl_port')) ? $conf->get('activedirectory_port').' / '.$conf->get('activedirectory_ssl_port') : "Non renseigné"; ?></span></div>
- <div>Domaine : <span class="text-<?php echo !empty($conf->get('activedirectory_domain'))?'primary':'danger'; ?>"><?php echo !empty($conf->get('activedirectory_domain')) ? $conf->get('activedirectory_domain') : "Non renseigné"; ?></span></div>
- </small>
- </div>
- </div>
- </div>
- <div class="col-sm-4">
- <div id="reader-connection" class="card text-center">
- <div class="card-body">
- <div class="label">
- <h5 class="">Connexion avec le compte AD <i>read-only</i></h5>
- <small class="card-subtitle mb-2 text-muted">Test d'identification avec le compte AD lecture seule</small>
- </div>
- <span class="d-block mt-2 mb-3">
- <h2 class="card-icon d-block"><i class="fas fa-question-circle"></i></h2>
- </span>
- <small class="card-text text-muted">
- <div class="text-fullbreak">CN : <span class="text-<?php echo !empty($conf->get('activedirectory_reader_login'))?'primary':'danger'; ?>"><?php echo !empty($conf->get('activedirectory_reader_login')) ? $conf->get('activedirectory_reader_login') : "Non renseigné"; ?></span></div>
- <div>Mot de passe : <span class="text-<?php echo !empty($conf->get('activedirectory_reader_password'))?'success':'danger'; ?>"><?php echo !empty($conf->get('activedirectory_reader_password')) ? "Renseigné" : "Non renseigné"; ?></span></div>
- </small>
- </div>
- </div>
- </div>
- <div class="col-sm-4">
- <div id="users-connection" class="card text-center">
- <div class="card-body">
- <div class="label">
- <h5 class="">Récupération d'utilisateurs</h5>
- <small class="card-subtitle mb-2 text-muted">Test de récupération d'utilisateurs depuis l'AD</small>
- </div>
- <span class="d-block mt-2 mb-3">
- <h2 class="card-icon d-block"><i class="fas fa-question-circle"></i></h2>
- </span>
- <small class="card-text text-muted">
- <div class="mb-2">Racine des utilisateurs :
- <?php if(!empty($conf->get('activedirectory_users_root'))): ?>
- <ul class="pl-3 list-unstyled">
- <?php foreach(explode(';',$conf->get('activedirectory_users_root')) as $userRoot): ?>
- <li class="text-primary text-fullbreak"><?php echo $userRoot; ?></li>
- <?php endforeach; ?>
- </ul>
- <?php else: ?>
- <span class="text-danger">Non renseigné</span>
- <?php endif; ?>
- </div>
- <div>Racine des groupes :
- <?php if(!empty($conf->get('activedirectory_groups_root'))): ?>
- <ul class="pl-3 list-unstyled">
- <?php foreach(explode(';',$conf->get('activedirectory_groups_root')) as $userRoot): ?>
- <li class="text-primary text-fullbreak"><?php echo $userRoot; ?></li>
- <?php endforeach; ?>
- </ul>
- <?php else: ?>
- <span class="text-danger">Non renseigné</span>
- <?php endif; ?>
- </div>
- </small>
- </div>
- </div>
- </div>
- </div>
- <hr>
- </div>
- <div class="col-md-12">
- <legend>Correspondance Groupe / Rang / Établissement</legend>
- <table id="group-rank-firm" class="table table-striped table-bordered table-hover table-group-rank-firm">
- <thead>
- <tr>
- <th>Groupe AD</th>
- <th>Rang</th>
- <th>Établissement</th>
- <th></th>
- </tr>
- <tr id="ad-correspondance" data-id="" class="" data-action="activedirectory_group_save">
- <th><input type="text" name="ad-group" id="ad-group" placeholder="Nom du groupe" class="form-control"></th>
- <th>
- <select name="ad-rank" id="ad-rank" class="form-control">
- <option value="">-</option>
- <?php foreach(Rank::loadAll() as $rank): ?>
- <option value="<?php echo $rank->id; ?>"><?php echo $rank->label; ?></option>
- <?php endforeach; ?>
- </select>
- </th>
- <th>
- <select name="ad-firm" id="ad-firm" class="form-control">
- <option value="">-</option>
- <?php foreach(Firm::loadAll() as $firm): ?>
- <option value="<?php echo $firm->id; ?>"><?php echo $firm->label; ?></option>
- <?php endforeach; ?>
- </select>
- </th>
- <th class="text-center"><div class="btn btn-success" onclick="activedirectory_group_save();"><i class="fas fa-check"></i></div></th>
- </tr>
- </thead>
- <tbody>
- <tr data-id="{{id}}" class="hidden">
- <td>{{adgroup}}</td>
- <td>{{rankLabel}}</td>
- <td>{{firmLabel}}</td>
- <td class="text-center action-buttons">
- <div class="btn btn-info btn-squarred btn-mini" onclick="activedirectory_group_edit(this);"><i class="fas fa-pencil-alt"></i></div>
- <div class="btn btn-danger btn-squarred btn-mini" onclick="activedirectory_group_delete(this);"><i class="fas fa-times"></i></div>
- </td>
- </tr>
- </tbody>
- </table>
- <!-- Pagination -->
- <ul class="pagination justify-content-center">
- <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');activedirectory_group_search()">
- <span class="page-link">{{label}}</span>
- </li>
- </ul>
- </div>
- </div>
-
|