newdesigngestionnaire/Vue/gabarit.php
2026-02-24 13:45:48 +00:00

56 lines
1.8 KiB
PHP
Executable File

<?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'];
$infovue = $gabary->getInfosVue($_SESSION['vue']);
$_SESSION['descriptionVue'] = est_anglophone() ? $infovue['DescriptionEng'] : $infovue['Description'];
$_SESSION['titreRetour'] = est_anglophone() ? $infovue['titreRetourEng'] : $infovue['titreRetour'];
$_SESSION['retourVue'] = $infovue['lienRetour'];
// Pour l'exemple, on désactive le mode test, mais vous pouvez le laisser dynamique
$_SESSION['bdTests_C'] = "0";
?>
<!doctype html>
<html lang="fr">
<head>
<?php include('includes/head-meta.php'); ?>
</head>
<body class="<?= ($_SESSION['bdTests_C'] == '1') ? 'mode-test-active' : '' ?>">
<?php include('includes/header.php'); ?>
<?php include('includes/sidebar.php'); ?>
<!-- MAIN CONTENT - NE PAS MODIFIER LA STRUCTURE -->
<main id="main" class="main">
<?php include('includes/main-content.php'); ?>
</main>
<?php include('includes/barre-contexte.php'); ?>
<?php include('includes/modals.php'); ?>
<?php include('includes/scripts-footer.php'); ?>
</body>
</html>