156 lines
6.7 KiB
PHP
Executable File
156 lines
6.7 KiB
PHP
Executable File
<?php
|
|
/*
|
|
* INTER SANTÉ — gabarit.php
|
|
* Point d'entrée principal — Structure modulaire SaaS Premium
|
|
* Refonte UI/UX v2026
|
|
*/
|
|
|
|
require_once 'gabarit_queries.php';
|
|
$gabary = new Gabary();
|
|
|
|
/* ── Résolution du menu actif ── */
|
|
$_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;
|
|
|
|
/* ── Constantes ── */
|
|
defined('MAX_COMPANY_NAME_LENGTH') || define('MAX_COMPANY_NAME_LENGTH', 20);
|
|
defined('APP_VERSION') || define('APP_VERSION', date('YmdHi'));
|
|
|
|
/* ── Variables de présentation ── */
|
|
$companyDisplayName = htmlspecialchars($_SESSION['nomSociete'] ?? '', ENT_QUOTES);
|
|
$modeDev = $_SESSION['modeDev_C'];
|
|
$imgData = $_SESSION['photoAssureCrypte'];
|
|
|
|
/* ── Infos de la vue ── */
|
|
$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'];
|
|
$descriptionVue = $_SESSION['descriptionVue'];
|
|
?>
|
|
<!doctype html>
|
|
<html lang="<?= est_anglophone() ? 'en' : 'fr' ?>">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<base href="<?= $racineWeb ?>">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="Bootstrap_new/images/favicon.ico">
|
|
|
|
<!-- Google Fonts: Syne + DM Sans -->
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap" rel="stylesheet">
|
|
|
|
<!-- Vendor CSS -->
|
|
<link href="Bootstrap/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/quill/quill.snow.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/quill/quill.bubble.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/remixicon/remixicon.css" rel="stylesheet">
|
|
<link href="Bootstrap/vendor/simple-datatables/style.css" rel="stylesheet">
|
|
|
|
<!-- dataTables -->
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css">
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.bootstrap5.min.css">
|
|
|
|
<link href="Bootstrap_new/css/select2.min.css" rel="stylesheet">
|
|
<link href="Bootstrap_new/select/css/bootstrap-select.min.css" rel="stylesheet">
|
|
|
|
<!-- SweetAlert2 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.1/dist/sweetalert2.min.css" rel="stylesheet">
|
|
|
|
<!-- FontAwesome -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer">
|
|
|
|
<!-- ★ THEME MODERNE (override global) -->
|
|
<link href="Bootstrap_new/css/theme-modern.css?ver=<?= APP_VERSION ?>" rel="stylesheet">
|
|
|
|
<!-- Custom overrides -->
|
|
<link href="Bootstrap_new/css/custom.css?ver=<?= APP_VERSION ?>" rel="stylesheet">
|
|
|
|
<title><?= htmlspecialchars($_SESSION['descriptionVue'] ?? '', ENT_QUOTES) ?></title>
|
|
|
|
<!-- Libs JS en tête (graphiques — peuvent être en head) -->
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-annotation@1.0.2"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
|
|
|
|
|
<!-- Variable globale modeDev -->
|
|
<script>
|
|
var modeDev = <?= json_encode($_SESSION['modeDev_C']) ?>;
|
|
if (modeDev !== '1') {
|
|
document.addEventListener('contextmenu', function (e) { e.preventDefault(); }, false);
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body class="<?= ($_SESSION['bdTests_C'] == '1') ? 'mode-test-active' : '' ?> theme-outlook">
|
|
|
|
<?php include 'includes/header.php'; ?>
|
|
<?php include 'includes/sidebar.php'; ?>
|
|
|
|
|
|
|
|
<!-- ======= Main ======= -->
|
|
<main id="main" class="main">
|
|
|
|
<!-- Inputs techniques vitaux pour AJAX / JS (sr-only = accessibles mais invisibles) -->
|
|
<input class="sr-only" type="text" id="vue" name="vue" value="<?= htmlspecialchars($_SESSION['vue'] ?? '', ENT_QUOTES) ?>">
|
|
<input class="sr-only" type="text" id="racineWeb" name="racineWeb" value="<?= htmlspecialchars($racineWeb, ENT_QUOTES) ?>">
|
|
<input class="sr-only" type="text" id="dureeSession" name="dureeSession" value="<?= htmlspecialchars($_SESSION['dureeSession'] ?? '', ENT_QUOTES) ?>">
|
|
<input class="sr-only" type="text" id="nomSociete" name="nomSociete" value="<?= htmlspecialchars($_SESSION['nomSociete'] ?? '', ENT_QUOTES) ?>">
|
|
<input class="sr-only" type="text" id="codeLangue" name="codeLangue" value="<?= est_anglophone() ? 'en_US' : 'fr_FR' ?>">
|
|
|
|
<!-- Scroll menu des sous-vues -->
|
|
<?php if (!empty($menusvue)): ?>
|
|
<div class="fixed-div">
|
|
<div class="content">
|
|
<div class="scrollmenu">
|
|
<?php foreach ($menusvue as $menu): ?>
|
|
<a href="<?= htmlspecialchars($menu['lienMenu'], ENT_QUOTES) ?>"
|
|
title="<?= htmlspecialchars($menu['descriptionMenu'] ?? '', ENT_QUOTES) ?>">
|
|
<?= htmlspecialchars($menu['libeleMenu'], ENT_QUOTES) ?>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<!-- Contenu de la page -->
|
|
<section class="section main-dashboard">
|
|
<div id="contenu" class="page-content">
|
|
<div id="div_test_gabarit"></div>
|
|
<div id="div_entite" class="sr-only"></div>
|
|
<?= $contenu ?>
|
|
</div>
|
|
</section>
|
|
|
|
</main>
|
|
<!-- End Main -->
|
|
|
|
<?php include 'includes/barre-contexte.php'; ?>
|
|
<?php include 'includes/modals.php'; ?>
|
|
<?php include 'includes/scripts-footer.php'; ?>
|
|
</body>
|
|
</html>
|