This commit is contained in:
KONE SOREL 2026-02-02 15:44:46 +00:00
parent 813b8d3512
commit a9994a8fa5
12 changed files with 1876 additions and 1514 deletions

View File

@ -1,29 +1,230 @@
:root {
--is-primary: #08C5D1;
--is-sidebar: #2c3e50;
--is-light-bg: #f8f9fa;
}
body { font-family: 'Inter', sans-serif; font-size: 0.88rem; color: #334155; }
/* Sidebar moderne */
.sidebar { width: 260px; background: var(--is-sidebar); transition: all 0.3s; z-index: 1000; border-right: 1px solid rgba(255,255,255,0.1); }
.sidebar .nav-link { color: rgba(255,255,255,0.7); font-weight: 500; border-radius: 8px; margin-bottom: 5px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active-main { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar .nav-link i { font-size: 1.1rem; margin-right: 12px; }
/* Header épuré */
.header { height: 60px; background: #fff; box-shadow: 0 1px 10px rgba(0,0,0,0.05); }
/* Utilitaires de cartes */
.card { border: none; border-radius: 12px; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04); }
/* Transition douce pour AJAX */
.transition { transition: all 0.3s ease; }
@media (min-width: 1200px) {
body.toggle-sidebar .sidebar { left: -260px; }
body.toggle-sidebar .main, body.toggle-sidebar #header { margin-left: 0; }
:root {
--primary-color: #0088cf;
--bg-workspace: #f6f9ff;
--sidebar-width: 280px;
--card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
--sidebar-bg: #2c3e50; /* Couleur sombre pro pour trancher avec le contenu */
--header-height: 60px;
}
.cursor-pointer { cursor: pointer; }
.shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
body {
background-color: var(--bg-workspace) !important;
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
/* Modernisation des inputs */
.form-control, .form-select {
border-radius: 8px;
border: 1px solid #dee2e6;
padding: 0.6rem 0.75rem;
transition: all 0.2s;
}
.form-control:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.25rem rgba(0, 136, 207, 0.1);
}
/* Suppression du look "Tableau de bord 2010" pour les fieldsets */
fieldset {
background: #fff;
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--card-shadow);
border: none;
margin-bottom: 1.5rem;
}
legend {
float: none;
width: auto;
font-size: 1.1rem;
font-weight: 700;
color: var(--primary-color);
padding: 0 10px;
}
/* Style des cartes pour remplacer les fieldsets */
.card-modern {
background: #ffffff;
border: none;
border-radius: 10px;
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
margin-bottom: 1.5rem;
}
/* On épure le scrollbar pour le côté moderne */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 10px;
}
.sidebar {
background-color: #2c3e50 !important; /* Couleur pro */
padding-top: 20px;
}
.sidebar-nav .nav-link {
background: transparent;
color: #ecf0f1;
font-weight: 500;
transition: 0.3s;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active-main {
background: rgba(255, 255, 255, 0.1);
color: var(--primary-color);
border-left: 4px solid var(--primary-color);
}
.sidebar-nav .nav-content a {
padding-left: 45px;
font-size: 0.9rem;
color: #bdc3c7;
}
.nav-scroller {
scrollbar-width: none; /* Cache la barre de scroll sur Firefox */
}
.nav-scroller::-webkit-scrollbar {
display: none; /* Cache la barre de scroll sur Chrome/Safari */
}
/* Espacement du Main */
#main {
margin-top: 60px; /* Hauteur du header */
padding: 20px 0;
min-height: calc(100vh - 60px);
background-color: #f6f9ff;
transition: all 0.3s;
}
/* Style du fil d'ariane */
.breadcrumb-item + .breadcrumb-item::before {
content: "\f105" !important; /* Symbole FontAwesome > */
font-family: "Font Awesome 5 Free";
font-weight: 900;
padding-right: 12px;
color: #adb5bd;
}
/* Onglets fluides */
.nav-scroller {
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.sub-nav-link {
text-decoration: none;
color: #6c757d;
font-size: 0.85rem;
font-weight: 600;
border-bottom: 3px solid transparent;
transition: all 0.2s;
}
.sub-nav-link:hover {
color: #0088cf;
background: rgba(0, 136, 207, 0.05);
}
.active-tab {
color: #0088cf !important;
border-bottom: 3px solid #0088cf !important;
background: rgba(0, 136, 207, 0.08);
}
/* Animation douce lors du changement de page */
#contenu {
animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Bouton flottant Chatbot */
.chatbot-trigger {
position: fixed;
bottom: 30px;
right: 30px;
width: 60px;
height: 60px;
border-radius: 50%;
background: #0088cf;
color: white;
border: none;
z-index: 1060;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
}
.badge-msg-count {
position: absolute;
top: -5px;
right: -5px;
font-size: 0.7rem;
border: 2px solid white;
}
/* Sidebar Contextuelle */
.context-sidebar {
position: fixed;
top: 60px;
right: -350px;
width: 320px;
height: calc(100vh - 60px);
background: #f8faff;
z-index: 1050;
transition: all 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
display: flex;
flex-direction: column;
}
.context-sidebar.active {
right: 0;
}
.context-header {
padding: 15px;
background: white;
}
.section-label {
font-size: 10px;
font-weight: 800;
color: #8e9db5;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 5px;
display: block;
}
.info-card {
transition: transform 0.2s;
}
.info-card:hover {
transform: translateY(-2px);
}
.stats-grid {
font-size: 9px;
letter-spacing: -0.2px;
}
.btn-close-context {
border: none;
background: transparent;
color: #adb5bd;
font-size: 1.5rem;
transition: 0.2s;
}
.btn-close-context:hover {
color: #0088cf;
transform: translateX(3px);
}

View File

@ -1,117 +1,107 @@
<?php
// $this->titre = "INTER SANTE - "._("Rechercher assuré") ;
?>
<div class="container-fluid py-4">
<div class="card border-0 shadow-sm mb-4">
<div class="card-header bg-white py-3">
<h5 class="mb-0 text-primary fw-bold">
<i class="fas fa-search me-2"></i><?= _("Critères de recherche de l'assuré") ?>
</h5>
</div>
<div class="card-body">
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label small fw-bold"><?= _("Numéro Bénéficiaire") ?></label>
<input class="form-control" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold"><?= _("Numéro Famille") ?></label>
<input class="form-control" type="text" id="numeroAdherent" name="numeroAdherent">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold"><?= _("Nom") ?></label>
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold"><?= _("Prénoms") ?></label>
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold">Tel</label>
<div class="input-group">
<span class="input-group-text bg-light"><i class="fa fa-phone fa-xs"></i></span>
<input class="form-control" type="text" id="telephonePortable" name="telephonePortable">
</div>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold">E-mail</label>
<input class="form-control" type="email" id="email" name="email">
</div>
<div class="col-md-6 d-flex align-items-end justify-content-end">
<button type="submit" class="btn btn-primary px-4 shadow-sm">
<i class="fa fa-search me-2"></i> <?= _("Rechercher") ?>
</button>
</div>
</div>
</form>
</div>
</div>
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
<fieldset>
<legend> <?= _("Critères de recherche de l'assuré") ?> </legend>
<table class="table table-condensed table-responsive" style='font-size:8pt;'>
<tbody>
<tr>
<td width="10%" > <?= _("Numéro Bénéficiaire") ?> </td>
<td width="40%" ><INPUT class="form-control" TYPE="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus AUTOCOMPLETE="OFF"></td>
<td align="center" width="10%"> <?= _("Numéro Famille") ?> </td>
<td align="center"><INPUT class="form-control" TYPE="text" id="numeroAdherent" name="numeroAdherent" AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td> <?= _("Nom") ?> </td>
<td><INPUT class="form-control" TYPE="text" id="nomBeneficiaire" name="nomBeneficiaire" AUTOCOMPLETE="OFF"></td>
<td align="center"> <?= _("Prénoms") ?> </td>
<td><INPUT class="form-control" TYPE="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire" AUTOCOMPLETE="OFF"></td>
</tr>
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau'] > 0): ?>
<div class="alert alert-warning border-0 shadow-sm d-flex align-items-center" role="alert">
<i class="fa-solid fa-triangle-exclamation fs-4 me-3 text-danger"></i>
<div>
<strong><?= _("Alerte de remplacement") ?> :</strong>
<?= _("Carte") ?> <span class="badge bg-danger"><?= $derniernumerobeneficiaires['ancien'] ?></span>
<?= _("remplacée par") ?> <span class="badge bg-success"><?= $derniernumerobeneficiaires['nouveau'] ?></span>.
</div>
</div>
<?php endif; ?>
<tr>
<td>Tel</td>
<td><INPUT class="form-control" TYPE="text" id="telephonePortable" NAME="telephonePortable" AUTOCOMPLETE="OFF"></td>
<td align="center">E-mail</td>
<td><INPUT class="form-control" TYPE="text" id="email" NAME="email" AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td><input id="lancerrecherche" name="lancerrecherche" class="sr-only" type="submit" value="<?= _("Rechercher") ?>" ></td>
</tr>
</tbody>
</table>
</fieldset>
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center; margin-bottom:5px;" >
<H4> <?= _("Cette carte")." => ".$derniernumerobeneficiaires['ancien'] . " "._("a été déclarée perdue et remplacée par") ." => ".$derniernumerobeneficiaires['nouveau'] .". ". _("Veuillez ne pas le communiquer sans autorisation.") ?> </H4>
</div>
<?php endif; ?>
<?php
/*
$keys = [
'session.gc_maxlifetime',
'session.cookie_lifetime',
'session.cookie_secure',
'session.cookie_httponly',
'session.cookie_samesite',
'session.gc_probability',
'session.gc_divisor',
];
foreach ($keys as $k) {
echo $k . ' = ' . ini_get($k) . "<br>";
}
*/
?>
<h4> <?= _("Résultats de la recherche") ?> </h4>
<?php if (is_array($beneficiaires) && count($beneficiaires) > 0): ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:8pt;'>
<thead>
<tr>
<th width="8%" style="text-align: center"> <?= _("Numéro Bénéficiaire") ?> </th>
<th width="8%" style="text-align: center"> <?= _("Numéro Famille") ?> </th>
<th width="20%" > <?= _("Nom") ?> </th>
<th width="20%" > <?= _("Prénoms") ?> </th>
<th style="text-align: center"> <?= _("Lien parenté") ?> </th>
<th style="text-align: center"> <?= _("Naissance") ?> </th>
<th style="text-align: center"><?= _("Genre") ?></th>
<th style="text-align: center"> <?= _("Tél") ?> </th>
<th width="20%" > <?= _("Souscripteur") ?> </th>
<th> <?= _("Etat") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($beneficiaires as $beneficiaire):
$idBeneficiaire=$this->nettoyer($beneficiaire['id']);
$numeroBeneficiaire=$this->nettoyer($beneficiaire['numeroBeneficiaire']);
?>
<tr onclick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');"
ondblclick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();" valign="top">
<td align="center"> <input type="button" value="<?= $numeroBeneficiaire ?>" onClick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();"> </td>
<td align="center"> <?= $this->nettoyer($beneficiaire['numeroAdherent']) ?></td>
<td><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></td>
<td><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
<td align="center"><?= dateLang($this->nettoyer($beneficiaire['dateNaissance'])) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['sexe']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['telephonePortable']) ?></td>
<td><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['codeEtatBeneficiaire']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</form>
<div class="card border-0 shadow-sm">
<div class="card-header bg-white d-flex justify-content-between align-items-center py-3">
<h5 class="mb-0 fw-bold"><?= _("Résultats de la recherche") ?></h5>
<span class="badge bg-info"><?= count($beneficiaires) ?> <?= _("trouvés") ?></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><?= _("Bénéficiaire") ?></th>
<th><?= _("Identité") ?></th>
<th><?= _("Parenté") ?></th>
<th class="text-center"><?= _("Infos") ?></th>
<th><?= _("Souscripteur") ?></th>
<th class="text-center"><?= _("État") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($beneficiaires as $beneficiaire): ?>
<tr class="cursor-pointer" onclick="..." style="cursor: pointer;">
<td>
<span class="fw-bold text-primary">#<?= $beneficiaire['numeroBeneficiaire'] ?></span><br>
<small class="text-muted">Fam: <?= $beneficiaire['numeroAdherent'] ?></small>
</td>
<td>
<div class="fw-bold"><?= strtoupper($beneficiaire['nomBeneficiaire']) ?></div>
<div class="small"><?= $beneficiaire['prenomsBeneficiaire'] ?></div>
</td>
<td><span class="badge bg-light text-dark border"><?= $beneficiaire['codeLienParente'] ?></span></td>
<td class="small text-center">
<?= $beneficiaire['sexe'] ?> | <?= dateLang($beneficiaire['dateNaissance']) ?><br>
<i class="fa fa-phone text-muted me-1"></i><?= $beneficiaire['telephonePortable'] ?>
</td>
<td class="small fw-bold"><?= $beneficiaire['nomClient'] ?></td>
<td class="text-center">
<?php
$statusClass = ($beneficiaire['codeEtatBeneficiaire'] == 'ACTIF') ? 'bg-success' : 'bg-secondary';
?>
<span class="badge rounded-pill <?= $statusClass ?>"><?= $beneficiaire['codeEtatBeneficiaire'] ?></span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -1,127 +0,0 @@
<?php
// $this->titre = "INTER SANTE - "._("Rechercher assuré") ;
?>
<div class="card shadow-sm border-0 mb-4">
<div class="card-body p-4">
<h5 class="card-title mb-4 text-primary fw-bold">
<i class="bi bi-search me-2"></i><?= _("Critères de recherche de l'assuré") ?>
</h5>
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Numéro Bénéficiaire") ?></label>
<input class="form-control" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Numéro Famille") ?></label>
<input class="form-control" type="text" id="numeroAdherent" name="numeroAdherent" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Nom") ?></label>
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Prénoms") ?></label>
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Tel") ?></label>
<input class="form-control" type="text" id="telephonePortable" name="telephonePortable" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("E-mail") ?></label>
<input class="form-control" type="text" id="email" name="email" autocomplete="off">
</div>
<div class="col-12">
<input id="lancerrecherche" name="lancerrecherche" class="visually-hidden" type="submit" value="<?= _("Rechercher") ?>">
<button type="submit" class="btn btn-primary px-4 shadow-sm float-end">
<i class="bi bi-search me-2"></i><?= _("Rechercher") ?>
</button>
</div>
</div>
</form>
</div>
</div>
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
<div class="alert alert-danger shadow-sm d-flex align-items-center mb-4" role="alert">
<i class="bi bi-exclamation-triangle-fill fs-4 me-3"></i>
<div>
<?= _("Cette carte")." => <strong>".$derniernumerobeneficiaires['ancien'] . "</strong> "._("a été déclarée perdue et remplacée par") ." => <strong>".$derniernumerobeneficiaires['nouveau'] ."</strong>. ". _("Veuillez ne pas le communiquer sans autorisation.") ?>
</div>
</div>
<?php endif; ?>
<div class="card shadow-sm border-0">
<div class="card-header bg-white py-3 border-0">
<h5 class="mb-0 fw-bold text-muted"><?= _("Résultats de la recherche") ?></h5>
</div>
<div class="card-body p-0">
<?php if (is_array($beneficiaires) && count($beneficiaires) > 0): ?>
<div class="table-responsive">
<table id="table_resultats" class="table table-hover align-middle mb-0" style="font-size: 0.85rem;">
<thead class="table-light">
<tr class="text-muted small text-uppercase">
<th class="text-center border-0"><?= _("N° Bénéficiaire") ?></th>
<th class="text-center border-0"><?= _("N° Famille") ?></th>
<th class="border-0"><?= _("Nom") ?></th>
<th class="border-0"><?= _("Prénoms") ?></th>
<th class="text-center border-0"><?= _("Lien") ?></th>
<th class="text-center border-0"><?= _("Naissance") ?></th>
<th class="text-center border-0"><?= _("Genre") ?></th>
<th class="text-center border-0"><?= _("Tél") ?></th>
<th class="border-0"><?= _("Souscripteur") ?></th>
<th class="border-0"><?= _("Etat") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($beneficiaires as $beneficiaire):
$idBeneficiaire = $this->nettoyer($beneficiaire['id']);
$numeroBeneficiaire = $this->nettoyer($beneficiaire['numeroBeneficiaire']);
?>
<tr style="cursor: pointer;"
onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');"
ondblclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>'); afficher_beneficiaire_id();">
<td class="text-center">
<button type="button" class="btn btn-sm btn-outline-primary fw-bold"
onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>'); afficher_beneficiaire_id();">
<?= $numeroBeneficiaire ?>
</button>
</td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['numeroAdherent']) ?></td>
<td class="fw-bold text-dark"><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></td>
<td><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
<td class="text-center small"><?= dateLang($this->nettoyer($beneficiaire['dateNaissance'])) ?></td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['sexe']) ?></td>
<td class="text-center small"><?= $this->nettoyer($beneficiaire['telephonePortable']) ?></td>
<td class="small"><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
<td>
<?php
$etat = $this->nettoyer($beneficiaire['codeEtatBeneficiaire']);
$badgeClass = ($etat == 'ACTIF') ? 'bg-success' : 'bg-secondary';
?>
<span class="badge <?= $badgeClass ?>-light text-<?= str_replace('bg-','',$badgeClass) ?> rounded-pill">
<?= $etat ?>
</span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="p-5 text-center text-muted">
<i class="bi bi-info-circle fs-2 d-block mb-3"></i>
<?= _("Aucun résultat à afficher. Veuillez lancer une recherche.") ?>
</div>
<?php endif; ?>
</div>
</div>

117
Vue/Recherche/index_old.php Executable file
View File

@ -0,0 +1,117 @@
<?php
// $this->titre = "INTER SANTE - "._("Rechercher assuré") ;
?>
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
<fieldset>
<legend> <?= _("Critères de recherche de l'assuré") ?> </legend>
<table class="table table-condensed table-responsive" style='font-size:8pt;'>
<tbody>
<tr>
<td width="10%" > <?= _("Numéro Bénéficiaire") ?> </td>
<td width="40%" ><INPUT class="form-control" TYPE="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus AUTOCOMPLETE="OFF"></td>
<td align="center" width="10%"> <?= _("Numéro Famille") ?> </td>
<td align="center"><INPUT class="form-control" TYPE="text" id="numeroAdherent" name="numeroAdherent" AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td> <?= _("Nom") ?> </td>
<td><INPUT class="form-control" TYPE="text" id="nomBeneficiaire" name="nomBeneficiaire" AUTOCOMPLETE="OFF"></td>
<td align="center"> <?= _("Prénoms") ?> </td>
<td><INPUT class="form-control" TYPE="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire" AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td>Tel</td>
<td><INPUT class="form-control" TYPE="text" id="telephonePortable" NAME="telephonePortable" AUTOCOMPLETE="OFF"></td>
<td align="center">E-mail</td>
<td><INPUT class="form-control" TYPE="text" id="email" NAME="email" AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td><input id="lancerrecherche" name="lancerrecherche" class="sr-only" type="submit" value="<?= _("Rechercher") ?>" ></td>
</tr>
</tbody>
</table>
</fieldset>
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center; margin-bottom:5px;" >
<H4> <?= _("Cette carte")." => ".$derniernumerobeneficiaires['ancien'] . " "._("a été déclarée perdue et remplacée par") ." => ".$derniernumerobeneficiaires['nouveau'] .". ". _("Veuillez ne pas le communiquer sans autorisation.") ?> </H4>
</div>
<?php endif; ?>
<?php
/*
$keys = [
'session.gc_maxlifetime',
'session.cookie_lifetime',
'session.cookie_secure',
'session.cookie_httponly',
'session.cookie_samesite',
'session.gc_probability',
'session.gc_divisor',
];
foreach ($keys as $k) {
echo $k . ' = ' . ini_get($k) . "<br>";
}
*/
?>
<h4> <?= _("Résultats de la recherche") ?> </h4>
<?php if (is_array($beneficiaires) && count($beneficiaires) > 0): ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:8pt;'>
<thead>
<tr>
<th width="8%" style="text-align: center"> <?= _("Numéro Bénéficiaire") ?> </th>
<th width="8%" style="text-align: center"> <?= _("Numéro Famille") ?> </th>
<th width="20%" > <?= _("Nom") ?> </th>
<th width="20%" > <?= _("Prénoms") ?> </th>
<th style="text-align: center"> <?= _("Lien parenté") ?> </th>
<th style="text-align: center"> <?= _("Naissance") ?> </th>
<th style="text-align: center"><?= _("Genre") ?></th>
<th style="text-align: center"> <?= _("Tél") ?> </th>
<th width="20%" > <?= _("Souscripteur") ?> </th>
<th> <?= _("Etat") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($beneficiaires as $beneficiaire):
$idBeneficiaire=$this->nettoyer($beneficiaire['id']);
$numeroBeneficiaire=$this->nettoyer($beneficiaire['numeroBeneficiaire']);
?>
<tr onclick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');"
ondblclick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();" valign="top">
<td align="center"> <input type="button" value="<?= $numeroBeneficiaire ?>" onClick="javascript:selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();"> </td>
<td align="center"> <?= $this->nettoyer($beneficiaire['numeroAdherent']) ?></td>
<td><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></td>
<td><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
<td align="center"><?= dateLang($this->nettoyer($beneficiaire['dateNaissance'])) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['sexe']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['telephonePortable']) ?></td>
<td><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
<td align="center"><?= $this->nettoyer($beneficiaire['codeEtatBeneficiaire']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</form>

View File

@ -1,36 +1,125 @@
<aside id="barre_laterale_d" class="bg-white border-start d-none d-xl-block" style="width: 280px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;">
<div class="p-4">
<h6 class="text-uppercase small fw-bold text-muted mb-4 text-center border-bottom pb-2"><?= _("CONTEXTE DE GESTION") ?></h6>
<input type="text" class="sr-only" id="numeroClient_C" name="numeroClient_C" value="<?= $this->nettoyer($_SESSION['numeroClient_C']) ?>">
<input type="text" class="sr-only" id="codeGcAssureur_C" NAME="codeGcAssureur_C" value="<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>">
<div class="text-center mb-4">
<div class="photo-container mb-3">
<img src="data:image/png;base64,<?= $_SESSION['photoAssureCrypte'] ?>"
class="rounded-circle shadow border border-3 border-white transition hover-scale"
width="100" height="100" style="object-fit: cover;">
</div>
<h6 class="fw-bold mb-1"><?= _($_SESSION['nomSociete']) ?></h6>
<span class="badge bg-success-light text-success rounded-pill px-3"><?= _("Garant Actif") ?></span>
</div>
<div class="vstack gap-2">
<?php if ($_SESSION['numeroClient_C']): ?>
<div class="p-3 bg-light rounded-3 border-0">
<div class="text-muted small mb-1"><?= _("Numéro Client") ?></div>
<div class="fw-bold text-primary"><?= $_SESSION['numeroClient_C'] ?></div>
</div>
<?php endif; ?>
<?php if ($_SESSION['numeroPolice_C']): ?>
<div class="p-3 bg-light rounded-3 border-0">
<div class="text-muted small mb-1"><?= _("Police en cours") ?></div>
<div class="fw-bold"><?= $_SESSION['numeroPolice_C'] ?></div>
</div>
<?php endif; ?>
</div>
<div class="text-center mt-5 opacity-25 grayscale">
<img src="Bootstrap_new/images/new/favicon.png" width="30">
<p class="small mt-2 mb-0">© 2026 INTER SANTE</p>
<button class="chatbot-trigger shadow-lg" id="showSideNav" title="<?= _("Afficher contexte")?>">
<div class="pulse"></div>
<i class="fa-solid fa-id-card"></i>
<span class="badge rounded-pill bg-danger badge-msg-count" id="badge_notif_msg">0</span>
</button>
<div id="barre_laterale_d" class="context-sidebar shadow-lg">
<div class="context-header d-flex align-items-center justify-content-between border-bottom">
<div class="d-flex align-items-center text-primary">
<i class="fa fa-cog fa-spin me-2"></i>
<span class="fw-bold small text-uppercase"><?= _("Gestion du Contexte") ?></span>
</div>
<button class="btn-close-context" id="hideSideNav">
<i class="fa-solid fa-angle-double-right"></i>
</button>
</div>
</aside>
<div class="context-body p-3">
<div class="context-section mb-3">
<label class="section-label"><?= _("Garant & Souscripteur") ?></label>
<div class="info-card p-2 border-start border-primary border-4 shadow-sm bg-white rounded">
<div class="mb-2">
<div class="d-flex justify-content-between align-items-start">
<small class="text-muted"><i class="fas fa-user-shield me-1"></i> <?= _("Garant") ?></small>
<a href="javascript:afficher_garant('<?=$this->nettoyer($_SESSION['codeGcAssureur_C']);?>');" class="badge bg-light text-primary text-decoration-none border"><?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?></a>
</div>
<button class="btn btn-sm btn-light w-100 text-truncate fw-bold mt-1 text-start" onclick="javascript:afficher_garant('<?=$this->nettoyer($_SESSION['codeGcAssureur_C']);?>');">
<?= $_SESSION['nomGcAssureur_C'] ?: "N/A" ?>
</button>
</div>
<div>
<div class="d-flex justify-content-between align-items-start">
<small class="text-muted"><i class="fas fa-user-tie me-1"></i> <?= _("Souscripteur") ?></small>
<a href="javascript:afficher_client_id();" class="badge bg-light text-primary text-decoration-none border"><?= $this->nettoyer($_SESSION['numeroClient_C']) ?></a>
</div>
<button class="btn btn-sm btn-light w-100 text-truncate fw-bold mt-1 text-start" onclick="javascript:afficher_client_id();">
<?= $this->nettoyer($_SESSION['nomClient_C']) ?>
</button>
</div>
</div>
</div>
<div class="context-section mb-3">
<label class="section-label"><?= _("Détails Police") ?></label>
<button class="btn btn-primary btn-sm w-100 mb-2 shadow-sm" id="numeroPolice_C" name="numeroPolice_C" onclick="javascript:afficher_police_id();" title="<?= _("Couverture").": ".dateLang($_SESSION['dateEffet_C'], $_SESSION['lang']).' - '.dateLang($_SESSION['dateEcheance_C'], $_SESSION['lang'])?>">
<i class="fa fa-file-text me-1"></i> <?= _("Police")." : ".$this->nettoyer($_SESSION['numeroPolice_C']) ?>
</button>
<div class="stats-grid text-center small fw-bold text-white py-1 bg-secondary rounded shadow-sm">
<?= _("Fam.")." [".format_N($_SESSION['ndAdh_C'])."] | ". _("Dép.")." [".format_N($_SESSION['ndDep_C'])."] | ". _("Bén.")." [".format_N($_SESSION['ndActif_C'])."]" ?>
</div>
</div>
<div class="context-section mb-3">
<label class="section-label"><?= _("Famille & Bénéficiaire") ?></label>
<div class="info-card p-2 shadow-sm bg-white rounded border-top border-info border-3">
<div class="photo-container text-center mb-2">
<?php if ($_SESSION['faceRegistered_C']=="1" && $_SESSION['idBeneficiaire_C'] > "0"): ?>
<img src="data:image/jpg;base64,<?=$imgData?>" class="img-fluid rounded-circle border border-3 border-light shadow-sm" style="width: 80px; height: 80px; object-fit: cover;" data-bs-toggle="modal" data-bs-target="#pop_photo">
<?php else: ?>
<div class="bg-light rounded-circle mx-auto d-flex align-items-center justify-content-center border" style="width: 60px; height: 60px;">
<i class="fa fa-user fa-2x text-muted opacity-25"></i>
</div>
<?php endif; ?>
</div>
<button class="btn btn-outline-info btn-sm w-100 mb-1 text-truncate" onclick="javascript:afficher_adherent_id();" title="<?= $this->nettoyer($_SESSION['adherent_C']) ?>">
<i class="fa-solid fa-users"></i> <?= $this->nettoyer($_SESSION['numeroAdherent_C']) ?>
</button>
<button class="btn btn-info btn-sm w-100 text-truncate text-white fw-bold" onclick="javascript:afficher_beneficiaire_id();" title="<?= $this->nettoyer($_SESSION['beneficiaire_C']) ?>">
<i class="fa-solid fa-user"></i> <?= $this->nettoyer($_SESSION['numeroBeneficiaire_C']) ?>
</button>
</div>
</div>
<div class="context-section mb-3">
<div class="card border-0 shadow-sm bg-light">
<div class="card-body p-2">
<h6 class="small fw-bold text-primary mb-2"><i class="bi bi-clock-history me-1"></i><?= _("Dernières polices") ?></h6>
<ul class="list-unstyled mb-2" style="max-height: 100px; overflow-y: auto;">
<?php foreach ($_SESSION['contextPolice'] as $contextPolice): ?>
<li class="small mb-1 border-bottom pb-1">
<a href="javascript:selectionner_police(<?= $contextPolice['idPolice'] ?>,'<?= $contextPolice['numeroPolice'] ?>');afficher_police_id();" class="text-decoration-none text-dark d-block text-truncate">
<i class="fa fa-history fa-xs text-muted"></i> <?= htmlspecialchars($contextPolice['libellePolice']) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<button class="btn btn-outline-primary btn-sm w-100 shadow-sm" onclick="javascript:gerer_messagerie();">
<?= _("Gérer Messages") ?> <i class="fa fa-comments"></i>
</button>
</div>
</div>
</div>
<div class="text-center py-2 border-top">
<a href="javascript:change_password();" class="text-decoration-none group">
<div class="p-2 bg-white rounded-circle shadow-sm d-inline-flex border mb-1">
<img src="Bootstrap_new/images/pwd.png" style="width:20px;">
</div>
<div class="small fw-bold text-secondary"><?= _("Sécurité") ?></div>
</a>
</div>
<?php if ($_SESSION['modeDevis']=="1"): ?>
<div class="mt-3 p-2 rounded" style="background-color: #ff00ff20; border: 1px dashed #ff00ff;">
<div class="text-center fw-bold small mb-2" style="color: #ff00ff;"><?= _("MODE COTATION") ?></div>
<button class="btn btn-sm w-100 mb-1 text-white" style="background-color: #ff00ff;" onclick="javascript:afficher_client_d_id();">
<i class="fa fa-user-times"></i> <?= $this->nettoyer($_SESSION['numeroClient_d_C']) ?>
</button>
<button class="btn btn-sm btn-outline-dark w-100 text-truncate small" onclick="javascript:afficher_police_d_id_init();">
<i class="fa fa-file-text"></i> <?= $this->nettoyer($_SESSION['numeroPolice_d_C']) ?>
</button>
</div>
<?php endif; ?>
</div>
<footer class="p-2 bg-light mt-auto border-top">
<div id="nbMessagesNonLus">
<input class='sr-only timer' id="timer" name="timer" type="button" value="0">
<input class="sr-only" type="text" id="msgNonLus" name="msgNonLus" value="0">
</div>
</footer>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,116 +0,0 @@
<?php
require_once 'gabarit_queries.php';
$gabary = new Gabary();
$_SESSION['firstLevelMenu']='';
$current_url = $_SERVER['REQUEST_URI'];
$elements = explode("/", $current_url);
$activeLink = $elements[1];
$fullPath = $gabary->get_full_path($activeLink);
$fullPath = explode("\ ", $fullPath);
$activeLevel1 = $activeLink;
$activeLevel2 = sizeof($fullPath)>1?$fullPath[1]:'';
$activeLevel3 =sizeof($fullPath)>2?$fullPath[2]:'';
$activeLevel4 = sizeof($fullPath)>3?$fullPath[3]:'';
$activeLevel5 = sizeof($fullPath)>4?$fullPath[4]:'';
$_SESSION['firstLevelMenu']=$activeLink;
const MAX_COMPANY_NAME_LENGTH = 20;
$companyDisplayName = htmlspecialchars($_SESSION['nomSociete'], ENT_QUOTES);
$modeDev = $_SESSION['modeDev_C'];
$imgData = $_SESSION['photoAssureCrypte'];
//
?>
<!doctype html>
<html lang="fr">
<?php require_once 'head.php'; ?>
<body class="d-flex flex-column min-vh-100 bg-light">
<?php include 'header.php'; ?>
<div class="d-flex flex-grow-1" style="margin-top: 60px;">
<?php include 'sidebar.php'; ?>
<main id="main" class="main flex-grow-1 p-3 p-md-4 transition">
<nav aria-label="breadcrumb" class="mb-4 d-none d-md-block">
<ol class="breadcrumb shadow-sm bg-white p-2 px-3 rounded-pill">
<li class="breadcrumb-item small"><a href="#" class="text-decoration-none text-muted"><?= _("INTER SANTE") ?></a></li>
<li class="breadcrumb-item small text-primary fw-bold active"><?= strtoupper(_($activeLevel1)) ?></li>
</ol>
</nav>
<div class="container-fluid p-0">
<?= $contenu; ?>
</div>
</main>
<?php include 'contexte.php'; ?>
</div>
<div id="modals-container">
<div class="modal fade" id="popmessagerie" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content border-0 shadow-lg">
<div class="modal-header bg-light">
<h5 class="modal-title fw-bold text-primary"><i class="bi bi-envelope-paper me-2"></i><?= _("Messages non lus") ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body"><div id="div_messagerie"></div></div>
</div>
</div>
</div>
<div class="modal fade" id="pop_photo" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0 shadow-lg text-center p-3">
<img src="data:image/png;base64,<?= $_SESSION['photoAssureCrypte'] ?>" class="img-fluid rounded shadow">
</div>
</div>
</div>
</div>
<script src="Bootstrap/js/jquery.min.js"></script>
<script src="Bootstrap/js/jquery-ui.js"></script>
<script src="Bootstrap/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="Bootstrap_new/datatables/datatable.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="Js/html2pdf.js"></script>
<script src="Bootstrap_new/js/select2.min.js"></script>
<script src="Bootstrap/js/timer.jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<?php if (est_anglophone()) : ?>
<script src="Js/datepicker-eng.js"></script>
<?php else: ?>
<script src="Js/datepicker-fr.js"></script>
<?php endif; ?>
<script src="Js/fonctions.js?ver=2025.11.29.09"></script>
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>"></script>
<script type="text/javascript">
$(document).ready(function() {
// Toggle Sidebar
$('.toggle-sidebar-btn').on('click', function() {
$('body').toggleClass('toggle-sidebar');
});
// Initialisation métier
raffraichier_gabarit();
$('#timer').timer({
duration: '60s',
callback: function() { raffraichier_messagerie(); },
repeat: true
});
});
</script>
<div id="div_ajaxgabarit" class="d-none"></div>
</body>
</html>

1040
Vue/gabarit_old.php Executable file

File diff suppressed because it is too large Load Diff

View File

@ -32,11 +32,6 @@ class Gabary extends Modele {
function getMenuVueByParent($vue)
{
// echo 'vuexx: '.$vue;
// if (!isset($_SESSION['menu'.$vue]))
// {
if (est_anglophone())
{
$sql = "CALL sp_get_menus_vue_eng(?, ?, ?);";
@ -45,25 +40,21 @@ class Gabary extends Modele {
{
$sql = "CALL sp_get_menus_vue(?, ?, ?);";
}
// $sql = "CALL sp_get_menus_vue(?, ?, ?)";
// echo $_SESSION['codeSociete'];
// echo $_SESSION['codeProfil'];
// echo $vue;
// echo $sql;
$request_body = array($_SESSION['codeSociete'], $_SESSION['codeProfil'], $vue);
// var_dump($request_body);
// var_dump($request_body);
$execu = $this->executerRequete($sql, $request_body);
$menuvue = $execu->fetchAll();
// var_dump($menuvue);
// echo json_encode($menuvue);
// $menuvue=[];
// $n = 1;
// $menuvue = array_slice($menuvue, 0, $n);
$request_body = array($_SESSION['codeSociete'], $_SESSION['codeProfil'], $vue);
$execu = $this->executerRequete($sql, $request_body);
$menuvue = $execu->fetchAll();
return $menuvue;
}
// echo sizeof($menuvue);
// echo '---------------------------------------';
return $menuvue;
public function getInfosVue($vue)
{
$sql = "call sp_get_info_vue(?)";
$resultat = $this->executerRequete($sql, array($vue));
$infovue = $resultat->fetch();
return $infovue;
}
}
?>

View File

@ -19,7 +19,7 @@
<link href="Bootstrap_new/css/select2.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css" rel="stylesheet">
<link rel="stylesheet" href="Bootstrap_new/datatables/datatable.min.css" crossorigin="anonymous">
<link href="Bootstrap_new/css/style_moderne.css?ver=2026.01.30.00" rel="stylesheet">
<link href="Bootstrap_new/css/style_moderne.css?ver=2026.02.02.00" rel="stylesheet">
<!-- Libraries -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

View File

@ -8,40 +8,32 @@
}
$flag = (est_anglophone()) ? 'england.png' : 'france.png';
?>
<header id="header" class="header fixed-top d-flex align-items-center bg-white shadow-sm" style="<?= $styleHeader ?>">
<div class="d-flex align-items-center justify-content-between px-3" style="width: 260px;">
<header id="header" class="header fixed-top d-flex align-items-center shadow-sm" style="background: #fff; border-bottom: 1px solid #e0e0e0;">
<div class="d-flex align-items-center justify-content-between px-3" style="width: 280px;">
<a class="logo d-flex align-items-center text-decoration-none">
<img src="Bootstrap_new/images/new/favicon.png" alt="Logo" height="30">
<span class="fs-5 fw-bold ms-2 text-dark"><?= _("INTER SANTE") ?></span>
<img src="Bootstrap_new/images/new/favicon.png" alt="" style="max-height: 35px;">
<span class="d-none d-lg-block ms-2 fw-bold" style="color: var(--primary-color); letter-spacing: 1px;">INTER SANTÉ</span>
</a>
<i class="bi bi-list toggle-sidebar-btn fs-4 border-0 bg-transparent cursor-pointer" id="btn-toggle"></i>
<i class="bi bi-list toggle-sidebar-btn fs-4 cursor-pointer"></i>
</div>
<div class="ms-auto d-flex align-items-center pe-3">
<?= $labelTest ?>
<div class="dropdown mx-3">
<a href="#" class="nav-link dropdown-toggle d-flex align-items-center" data-bs-toggle="dropdown">
<img src="Bootstrap_new/images/<?= $flag ?>" width="20" class="me-2">
<span class="d-none d-md-block"><?= (est_anglophone()) ? _("English") : _("Français") ?></span>
</a>
<ul class="dropdown-menu dropdown-menu-end shadow border-0">
<li><a class="dropdown-item" href="javascript:change_langue();"><i class="bi bi-translate me-2"></i><?= _("Changer de langue") ?></a></li>
</ul>
</div>
<div class="dropdown">
<a href="#" class="nav-link d-flex align-items-center" data-bs-toggle="dropdown">
<div class="bg-primary text-white rounded-circle d-flex align-items-center justify-content-center fw-bold shadow-sm" style="width: 35px; height: 35px;">
<?= $_SESSION['userInitials_C'] ?>
</div>
</a>
<ul class="dropdown-menu dropdown-menu-end shadow border-0">
<li class="px-3 py-2 small fw-bold text-muted border-bottom"><?= $_SESSION['utilisateur_C'] ?></li>
<li><a class="dropdown-item mt-2" href="javascript:change_password();"><i class="bi bi-key me-2"></i><?= _("Mot de passe") ?></a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item text-danger" href="Deconnexion/"><i class="bi bi-box-arrow-right me-2"></i><?= _("Déconnexion") ?></a></li>
</ul>
</div>
</div>
<nav class="header-nav ms-auto px-4">
<ul class="d-flex align-items-center list-unstyled mb-0">
<li class="nav-item dropdown pe-3">
<a class="nav-link" href="#" data-bs-toggle="dropdown">
<img src="Bootstrap_new/images/<?= $flag ?>" alt="<?= $alt ?>" width="20">
</a>
<ul class="dropdown-menu dropdown-menu-end shadow border-0">
<li><a class="dropdown-item" href="javascript:change_langue();"><i class="fa fa-exchange me-2"></i><?= _("Switch to English") ?></a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link nav-profile d-flex align-items-center" href="#" data-bs-toggle="dropdown">
<div class="rounded-circle d-flex align-items-center justify-content-center bg-primary text-white shadow-sm" style="width: 35px; height: 35px; font-size: 0.8rem; font-weight: bold;">
<?= $_SESSION['userInitials_C']; ?>
</div>
</a>
</li>
</ul>
</nav>
</header>

View File

@ -1,36 +1,42 @@
<aside id="sidebar" class="sidebar">
<div class="p-3">
<ul class="nav nav-pills flex-column" id="sidebar-nav">
<?php foreach ($menus as $key0 => $menuParent):
$menuChildren = $gabary->get_menus_by_parent_code($menuParent['vue']);
$hasChildren = count($menuChildren) > 0;
$isActive = (strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1));
?>
<li class="nav-item mb-1">
<a class="nav-link d-flex align-items-center <?= $isActive ? 'active bg-primary text-white' : 'text-white-50' ?> <?= $hasChildren ? 'collapsed' : '' ?>"
<?= $hasChildren ? 'data-bs-toggle="collapse" data-bs-target="#menu'.$key0.'"' : 'href="'.$menuParent['lienMenu'].'"' ?>>
<i class="<?= $menuParent['icone'] ?> fs-5 me-3"></i>
<span class="flex-grow-1"><?= _($menuParent['libeleMenu']) ?></span>
<?php if($hasChildren): ?><i class="bi bi-chevron-down small opacity-50"></i><?php endif; ?>
</a>
<?php if($hasChildren): ?>
<div class="collapse ps-3 mt-1 <?= $isActive ? 'show' : '' ?>" id="menu<?= $key0 ?>" data-bs-parent="#sidebar-nav">
<ul class="nav flex-column border-start border-secondary border-opacity-25 ms-2">
<?php foreach ($menuChildren as $child):
$isSubActive = (explode('/',$child['lienMenu'])[0] == $_SESSION['firstLevelMenu']);
<aside id="sidebar" class="sidebar shadow">
<ul class="sidebar-nav" id="sidebar-nav">
<?php foreach ($menus as $key0 => $menuParent):
$menuChildrenLevelOne = $gabary->get_menus_by_parent_code($menuParent['vue']);
$hasChildren = (sizeof($menuChildrenLevelOne) > 0);
$parentTarget = "menu-" . $menuParent['codeMenu'] . $key0;
$isActiveParent = (strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1));
?>
<li class="nav-item">
<?php if ($hasChildren): ?>
<a class="nav-link <?= $isActiveParent ? '' : 'collapsed' ?>"
data-bs-target="#<?= $parentTarget ?>"
data-bs-toggle="collapse" href="#">
<i class="<?= $menuParent['icone']; ?> shadow-sm"></i>
<span><?= $menuParent['libeleMenu'] ?></span>
<i class="bi bi-chevron-down ms-auto"></i>
</a>
<ul id="<?= $parentTarget ?>"
class="nav-content collapse <?= $isActiveParent ? 'show' : '' ?>"
data-bs-parent="#sidebar-nav">
<?php foreach ($menuChildrenLevelOne as $menuChild):
$link_clean = explode('/', $menuChild['lienMenu'])[0];
?>
<li class="nav-item">
<a href="<?= $child['lienMenu'] ?>" class="nav-link py-1 small <?= $isSubActive ? 'text-white fw-bold' : 'text-white-50' ?>">
<?= _($child['libeleMenu']) ?>
</a>
</li>
<li>
<a href="<?= $menuChild['lienMenu']; ?>"
class="<?= ($link_clean == $activeLink) ? 'active' : ''; ?>">
<i class="bi bi-circle"></i>
<span><?= $menuChild['libeleMenu']; ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php else: ?>
<a class="nav-link <?= $isActiveParent ? '' : 'collapsed' ?>" href="<?= $menuParent['lienMenu']; ?>">
<i class="<?= $menuParent['icone']; ?>"></i>
<span><?= $menuParent['libeleMenu'] ?></span>
</a>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</ul>
</aside>