val
This commit is contained in:
parent
4430f2c4e1
commit
2403b09622
|
|
@ -25,4 +25,5 @@ class Menuvueutilisateur extends Modele {
|
|||
// ajouté le 30/07/2019
|
||||
$_SESSION['vue'] = $vue;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -23,30 +23,30 @@ $imgData = $_SESSION['photoAssureCrypte'] ?? '';
|
|||
*/
|
||||
|
||||
if (!function_exists('detectActiveMenu')) {
|
||||
function detectActiveMenu($activeLink, $menus, $gabary) {
|
||||
// LOG SIMPLIFIÉE ET FIABLE :
|
||||
|
||||
// 1. ACCUEIL = TOUJOURS menu 0 (priorité absolue)
|
||||
if ($activeLink == 'Accueil') {
|
||||
return ['parent' => '0', 'child' => null];
|
||||
}
|
||||
|
||||
// 2. Recherche dans les autres menus
|
||||
foreach ($menus as $key0 => $menuParent) {
|
||||
$menuChildren = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
function detectActiveMenu($activeLink, $menus, $gabary) {
|
||||
// LOG SIMPLIFIÉE ET FIABLE :
|
||||
|
||||
// Vérifier chaque enfant
|
||||
foreach ($menuChildren as $key1 => $menuChild) {
|
||||
$childLink = explode('/', $menuChild['lienMenu'])[0] ?? '';
|
||||
if ($childLink == $activeLink) {
|
||||
return ['parent' => (string)$key0, 'child' => (string)$key1];
|
||||
// 1. ACCUEIL = TOUJOURS menu 0 (priorité absolue)
|
||||
if ($activeLink == 'Accueil') {
|
||||
return ['parent' => '0', 'child' => null];
|
||||
}
|
||||
|
||||
// 2. Recherche dans les autres menus
|
||||
foreach ($menus as $key0 => $menuParent) {
|
||||
$menuChildren = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
|
||||
// Vérifier chaque enfant
|
||||
foreach ($menuChildren as $key1 => $menuChild) {
|
||||
$childLink = explode('/', $menuChild['lienMenu'])[0] ?? '';
|
||||
if ($childLink == $activeLink) {
|
||||
return ['parent' => (string)$key0, 'child' => (string)$key1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Fallback : premier menu
|
||||
return ['parent' => '0', 'child' => null];
|
||||
}
|
||||
|
||||
// 3. Fallback : premier menu
|
||||
return ['parent' => '0', 'child' => null];
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================
|
||||
|
|
@ -60,6 +60,12 @@ $activeChildId = $menuData['child'];
|
|||
$imgData = $_SESSION['photoAssureCrypte'];
|
||||
$photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
||||
|
||||
$infovue = $gabary->getInfosVue($_SESSION['vue']);
|
||||
$descriptionVue = est_anglophone() ? $infovue['DescriptionEng'] : $infovue['Description'];
|
||||
$retourVue = $infovue['lienRetour'];
|
||||
|
||||
var_dump(array("Descrip =" => $descriptionVue, "retour" => $retourVue));
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
|
@ -71,7 +77,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<base href="<?= $racineWeb ?>">
|
||||
|
||||
<title><?= htmlspecialchars($_SESSION['vue'] ?? 'INTER-SANTE') ?> | Portail Santé</title>
|
||||
<title><?= htmlspecialchars($_SESSION['vue'] ?? 'INTER-SANTE') ?> | Portail RH Santé</title>
|
||||
|
||||
<!-- Meta pour UX améliorée -->
|
||||
<meta name="description" content="Portail RH de gestion santé - INTER-SANTE">
|
||||
|
|
@ -233,6 +239,13 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
|
||||
<i class="bi bi-list toggle-sidebar-btn" onclick="toggleSidebar()" style="cursor: pointer;"></i>
|
||||
</div>
|
||||
|
||||
<nav aria-label="breadcrumb" class="mb-4">
|
||||
<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="header-controls">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ class Gabary extends Modele {
|
|||
return $result;
|
||||
}
|
||||
|
||||
|
||||
function getMenuVueByParent($vue)
|
||||
{
|
||||
|
||||
|
|
@ -29,7 +28,7 @@ class Gabary extends Modele {
|
|||
|
||||
$request_body = array($_SESSION['codeSociete'], $_SESSION['codeProfil'], $vue);
|
||||
|
||||
//var_dump($request_body); exit();
|
||||
//var_dump($request_body); exit();
|
||||
|
||||
$execu = $this->executerRequete($sql, $request_body);
|
||||
$menuvue = $execu->fetchAll();
|
||||
|
|
@ -38,5 +37,15 @@ class Gabary extends Modele {
|
|||
|
||||
}
|
||||
|
||||
public function getInfosVue($vue)
|
||||
{
|
||||
$sql = "call sp_c_get_info_vue(?)";
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($vue));
|
||||
|
||||
$infovue = $resultat->fetchAll();
|
||||
|
||||
return $infovue;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user