179 lines
8.1 KiB
PHP
Executable File
179 lines
8.1 KiB
PHP
Executable File
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
|
<meta name="description" content="INTER SANTÉ - Gestionnaire de santé">
|
|
<meta name="author" content="INTER SANTÉ">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<meta name="theme-color" content="#0088cf">
|
|
|
|
<!-- Pour PWA/iOS - Version corrigée -->
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="INTER SANTÉ">
|
|
|
|
<base href="<?= $racineWeb ?>">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="Bootstrap_new/images/favicon.ico" type="image/x-icon">
|
|
<link rel="icon" href="Bootstrap_new/images/favicon-32x32.png" type="image/png" sizes="32x32">
|
|
<link rel="icon" href="Bootstrap_new/images/favicon-16x16.png" type="image/png" sizes="16x16">
|
|
<link rel="apple-touch-icon" href="Bootstrap_new/images/apple-touch-icon.png">
|
|
|
|
<!-- Preconnect pour améliorer les performances -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
|
|
<link rel="dns-prefetch" href="https://cdnjs.cloudflare.com">
|
|
|
|
<!-- Google Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600&display=swap"
|
|
rel="stylesheet"
|
|
crossorigin="anonymous">
|
|
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
|
|
rel="stylesheet"
|
|
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM"
|
|
crossorigin="anonymous">
|
|
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
|
|
integrity="sha512-Avb2QiuDEEvB4bZJYdft2mNjVShBftLdPG8FJ0V7irTLQ8Uo0qcPxh4Plq7G5tGm0rU+1SPhVotteLpBERwTkw=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer">
|
|
|
|
<!-- Vendor CSS -->
|
|
<link href="Bootstrap/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
|
|
|
|
<!-- Toastr CSS -->
|
|
<link rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"
|
|
integrity="sha512-vKMx8UnXk60zUwyUnUPM3HbQo8QfmNx7+ltw8Pm5zLusl1XIfwcxo8DbWCqMGKaWeNxWA8yrx5v3SaVpMvR3CA=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer">
|
|
|
|
<!-- SweetAlert2 -->
|
|
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.1/dist/sweetalert2.min.css"
|
|
rel="stylesheet">
|
|
|
|
<!-- Animate.css -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
|
|
|
<!-- Bootstrap Select CSS (si vous l'utilisez) -->
|
|
<?php if (isset($needBootstrapSelect) && $needBootstrapSelect): ?>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/css/bootstrap-select.min.css">
|
|
<?php endif; ?>
|
|
|
|
<!-- Vendor CSS spécifiques (chargement conditionnel) -->
|
|
<?php
|
|
$current_page = $_SERVER['REQUEST_URI'] ?? '';
|
|
$needQuill = strpos($current_page, 'quill') !== false;
|
|
$needDatatables = isset($needDatatables) ? $needDatatables : false;
|
|
$needSelect2 = isset($needSelect2) ? $needSelect2 : false;
|
|
$needBootstrapSelect = isset($needBootstrapSelect) ? $needBootstrapSelect : false;
|
|
?>
|
|
|
|
<?php if ($needQuill): ?>
|
|
<link href="Bootstrap/vendor/quill/quill.snow.css" rel="stylesheet">
|
|
<?php endif; ?>
|
|
|
|
<?php if ($needDatatables): ?>
|
|
<link href="Bootstrap_new/css/datatables.min.css" rel="stylesheet">
|
|
<?php endif; ?>
|
|
|
|
<?php if ($needSelect2): ?>
|
|
<link href="Bootstrap_new/css/select2.min.css" rel="stylesheet">
|
|
<link href="Bootstrap_new/css/select2-bootstrap-5-theme.min.css" rel="stylesheet">
|
|
<?php endif; ?>
|
|
|
|
<!-- Styles personnalisés -->
|
|
<link href="Bootstrap_new/css/style_moderne.css?ver=<?= date('Y.m.d.H') ?>" rel="stylesheet">
|
|
|
|
<title><?= htmlspecialchars($_SESSION['vue'] ?? 'Dashboard') ?> - INTER SANTÉ</title>
|
|
|
|
<!-- Scripts de prévention de clic droit - Version optimisée -->
|
|
<script type="text/javascript">
|
|
// Fonction safe pour toastr
|
|
window.safeToastr = function() {
|
|
if (typeof toastr !== 'undefined') {
|
|
return toastr;
|
|
}
|
|
return {
|
|
warning: function(msg) { console.warn('TOASTR:', msg); },
|
|
error: function(msg) { console.error('TOASTR:', msg); },
|
|
success: function(msg) { console.log('TOASTR:', msg); },
|
|
info: function(msg) { console.info('TOASTR:', msg); }
|
|
};
|
|
};
|
|
|
|
var modeDev = <?= json_encode($modeDev ?? '0') ?>;
|
|
|
|
// Protection en mode production seulement
|
|
if (modeDev != "1") {
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var toastr = window.safeToastr();
|
|
|
|
// Prévention clic droit
|
|
document.addEventListener('contextmenu', function(e) {
|
|
e.preventDefault();
|
|
toastr.warning('<?= _("Le clic droit est désactivé en mode production") ?>');
|
|
}, { passive: false });
|
|
|
|
// Prévention des raccourcis clavier
|
|
var blockedKeys = {
|
|
85: 'Ctrl+U (code source)',
|
|
123: 'F12 (outils de développement)',
|
|
73: 'Ctrl+Shift+I',
|
|
74: 'Ctrl+Shift+J',
|
|
67: 'Ctrl+Shift+C'
|
|
};
|
|
|
|
document.addEventListener('keydown', function(e) {
|
|
// Ctrl+U, Ctrl+Shift+I, etc.
|
|
if (e.ctrlKey && blockedKeys[e.keyCode]) {
|
|
e.preventDefault();
|
|
toastr.warning('<?= _("Cette fonctionnalité est désactivée") ?>: ' + blockedKeys[e.keyCode]);
|
|
return false;
|
|
}
|
|
|
|
// F12 seul
|
|
if (e.keyCode === 123) {
|
|
e.preventDefault();
|
|
toastr.warning('<?= _("Les outils de développement sont désactivés") ?>');
|
|
return false;
|
|
}
|
|
|
|
// Ctrl+Shift avec I, J, C
|
|
if (e.ctrlKey && e.shiftKey && [73, 74, 67].includes(e.keyCode)) {
|
|
e.preventDefault();
|
|
toastr.warning('<?= _("Cette fonctionnalité est désactivée") ?>');
|
|
return false;
|
|
}
|
|
}, { passive: false });
|
|
});
|
|
}
|
|
|
|
// Initialiser le panneau de contexte
|
|
window.initializeContextPanel = function() {
|
|
// Cette fonction sera appelée après le chargement de jQuery
|
|
if (typeof $ !== 'undefined') {
|
|
$(document).on('click', '#showSideNav', function(e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
$('#barre_laterale_d').addClass('active');
|
|
$(this).hide();
|
|
});
|
|
|
|
$(document).on('click', '#hideSideNav', function(e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
$('#barre_laterale_d').removeClass('active');
|
|
$('#showSideNav').show();
|
|
});
|
|
}
|
|
};
|
|
</script>
|
|
</head>
|