115 lines
5.9 KiB
PHP
Executable File
115 lines
5.9 KiB
PHP
Executable File
<?php
|
|
$this->titre = "INTER SANTE - Utilisateurs RH";
|
|
$idClient = $this->nettoyer($client['idClient']);
|
|
$nomClient = $this->nettoyer($client['nom']);
|
|
?>
|
|
|
|
<input class="visually-hidden" type="text" id="idClient" value="<?= $idClient ?>">
|
|
|
|
<div id="div_liste" class="container-fluid py-3 animate__animated animate__fadeIn">
|
|
<div class="card shadow-sm border-0">
|
|
<div class="card-header bg-primary text-white py-3 d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0 fw-bold">
|
|
<i class="fas fa-users-cog me-2"></i>
|
|
<?= _("Utilisateurs Portail RH") ?> : <span class="fw-normal"><?= $nomClient ?></span>
|
|
</h5>
|
|
<span class="badge bg-white text-primary rounded-pill"><?= count($users) ?> <?= _("comptes") ?></span>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0">
|
|
<thead class="table-light">
|
|
<tr class="small text-uppercase text-muted">
|
|
<th class="ps-4" width="12%"><?= _("Login") ?></th>
|
|
<th width="18%"><?= _("Utilisateur") ?></th>
|
|
<th class="text-center" width="5%"><?= _("Langue") ?></th>
|
|
<th class="text-center"><?= _("Profil") ?></th>
|
|
<th class="text-center"><?= _("Compte") ?></th>
|
|
<th class="text-center pe-4"><?= _("Actions") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($users as $user_client):
|
|
$idUtilisateur = $user_client['idUtilisateur'];
|
|
$codeUtilisateur = $user_client['codeUtilisateur'];
|
|
$actif = (int)$user_client['actif'];
|
|
$actVisible = (int)$user_client['actVisible'];
|
|
$AffectionVisible = (int)$user_client['AffectionVisible'];
|
|
$reInit = (int)$user_client['reInit'];
|
|
$codeLangue = $user_client['codeLangue'];
|
|
|
|
$profil = $user_client['profil'];
|
|
if (est_anglophone()){
|
|
$profil = $user_client['profilEng'];
|
|
}
|
|
?>
|
|
<tr>
|
|
<td class="ps-4">
|
|
<span class="badge bg-secondary-subtle text-dark border font-monospace px-2 py-1">
|
|
<?= $this->nettoyer($codeUtilisateur) ?>
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<div class="fw-bold"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<span class="small fw-bold border p-1 rounded bg-white shadow-xs"><?= strtoupper($codeLangue) ?></span>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<span class="badge bg-secondary-subtle text-dark border font-monospace px-2 py-1">
|
|
<?= $profil ?>
|
|
</span>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<?php if($actif === 1): ?>
|
|
<span class="badge bg-success-subtle text-success border border-success-subtle px-3 py-2 clickable"
|
|
onClick="desactiver_user_client('<?= $codeUtilisateur ?>');">
|
|
<i class="fas fa-check-circle me-1"></i> <?= _("Actif") ?>
|
|
</span>
|
|
<?php else: ?>
|
|
<span class="badge bg-danger-subtle text-danger border border-danger-subtle px-3 py-2 clickable"
|
|
onClick="activer_user_client('<?= $codeUtilisateur ?>');">
|
|
<i class="fas fa-times-circle me-1"></i> <?= _("Bloqué") ?>
|
|
</span>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td class="text-center pe-4">
|
|
<div class="btn-group shadow-sm border rounded">
|
|
<button class="btn btn-sm btn-white text-info" title="<?= _("Modifier") ?>"
|
|
onClick="afficher_users_client_id(<?= $idUtilisateur ?>);">
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
<button class="btn btn-sm btn-white <?= ($reInit === 1) ? 'text-danger fw-bold' : 'text-primary' ?>"
|
|
title="<?= _("Ré-initialiser mot de passe") ?>"
|
|
onClick="reinitpaswd_client('<?= $codeUtilisateur ?>');">
|
|
<i class="fas fa-key"></i>
|
|
</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* Style personnalisé pour les switches */
|
|
.form-switch-custom {
|
|
width: 2.5em;
|
|
height: 1.25em;
|
|
cursor: pointer;
|
|
}
|
|
.clickable { cursor: pointer; transition: 0.2s; }
|
|
.clickable:hover { filter: brightness(0.9); }
|
|
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
|
|
.btn-white { background: #fff; border: none; }
|
|
.btn-white:hover { background: #f8f9fa; }
|
|
.font-monospace { font-family: 'Courier New', Courier, monospace; }
|
|
</style>
|