59 lines
1.8 KiB
PHP
Executable File
59 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 id="main" class="main">
|
|
<?php include('includes/main-navigation.php'); ?>
|
|
|
|
<div class="page-content">
|
|
<?= $contenu ?>
|
|
</div>
|
|
</main>
|
|
|
|
<?php include('includes/barre-contexte.php'); ?>
|
|
<?php include('includes/modals.php'); ?>
|
|
<?php include('includes/scripts-footer.php'); ?>
|
|
</body>
|
|
</html>
|