alpha_full/admin/frmAdmin.php
2026-04-06 22:58:51 +02:00

156 lines
5.8 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Init
// -----------------------------------------------------
if (isset($_GET['refreshCache']) && $_GET['refreshCache'] == 1) {
header("Cache-Control: no-cache, no-store, max-age=0, must-revalidate");
header("Pragma: no-cache");
header("Expires: 0");
}
//défini headers et demarre session
include ("../_include/headers.php");
ini_set('output_buffering', 'off');
ini_set('zlib.output_compression', 'off');
ob_implicit_flush(true);
// flush();
echo '<!DOCTYPE html>';
// -----------------------------------------------------
// Init
// -----------------------------------------------------
$_SESSION['jeviensDeAdminIndex'] = 0;
$_SESSION['jeviensDeIndex'] = 1;
$_SESSION['jeviensDeIndex'] = 1;
include ("./adminInclude/admin.initVar.php");
include_once ("../_include/initVar.php");
// -----------------------------------------------------
// doit etre a chaque fois car pas de mise en session des erreurs
// -----------------------------------------------------
include_once ("../_include/initProjet.php");
// echo 'environnement = '.$environnement;
// -----------------------------------------------------
// debug init & post -- doit etre avant initSessLg.
// -----------------------------------------------------
include ("./adminInclude/debugPost.php");
// $debug[1]='1';
// Fonctions pour créer requete préparée
include_once ("./adminInclude/_fonctions/fonctionRequete_select.php");
include_once ("./adminInclude/_fonctions/fonctionRequete_update.php");
// -----------------------------------------------------
// Session : on doit forcer le refresh pour contenu + agencement
// -----------------------------------------------------
include_once ("../_include/initSessLg.php");
include ("./adminInclude/admin.initSess.php");
// -----------------------------------------------------
// Combien d'admin connectés ? Menu gauche - doit etre là (cad apres initSessLg) car utilise includePath/databaseConnect
// -----------------------------------------------------
include ($includePathAdmin. "/_menuGauche/online.php");
// -----------------------------------------------------
// Variables Session / Get / Post
// -----------------------------------------------------
include ($includePathAdmin. "/admin.post.php");
// -----------------------------------------------------
// debug des données admin
if (isset($debug[1]) && $debug[1] == '1' ) { include ("./adminInclude/admin.debug.php"); }
if (isset($debug[3]) && $debug[3] == '1' ) { $debugMsg .= monDebug (3,[],'');}
if (isset($debug[4]) && $debug[4] == '1' ) { $debugMsg .= monDebug (4,[],'');}
if (isset($debug[8]) && $debug[8] == '1' ) { $debugMsg .= monDebug (8,[],'');}
// -----------------------------------------------------
// Etre Admin
// -----------------------------------------------------
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O') {
echo '<html>';
echo '<head>';
// -----------------------------------------------------
// Balises Meta
// -----------------------------------------------------
include ($includePathAdmin. "/admin.head.php");
// -----------------------------------------------------
// Js Par page
// -----------------------------------------------------
include ($includePathAdmin. "/switchAdminJS.php");
// -----------------------------------------------------
// Css Par page
// -----------------------------------------------------
include ($includePathAdmin. "/switchAdminCSS.php");
echo '</head>';
echo '<body >';
// -----------------------------------------------------
// Admin Spinner
// -----------------------------------------------------
$spinnerMsg = ("🔵 Veuillez patienter, traitement en cours ... <br><br>");
include ("./adminInclude/spinner/spinnerAdmin.php");
//pas en dev car ca bloque si bug de page
echo '<script>onSpinnerAdmin();</script>';
echo '<div id="globalContainer">';
echo '<div id="rightFrameAdmin">';
include ($includePathAdmin. "/switchAdminPages.php");
echo '</div>';
echo '<div id="leftFrameAdmin">';
// -----------------------------------------------------
// Menu gauche
// -----------------------------------------------------
include $includePathAdmin. "/_menuGauche/menuGaucheAdmin.php";
echo '<script type="text/javascript">clock();</script>';
echo '</div>';
echo '</div>';
// -----------------------------------------------------
// éviter de reposter le codeOpe
// -----------------------------------------------------
echo '<script type="text/javascript">if(document.getElementById(\'codeOpe\')) document.getElementById(\'codeOpe\').value=\'\';</script>';
// -----------------------------------------------------
// affichage de l'environnement si il a changé ( script js)
// -----------------------------------------------------
include ($includePathAdmin. "/_menuGauche/afficherEnv.php");
echo '</body>';
echo '</html>';
// -----------------------------------------------------
// Compass : abandonné pour le moment
// -----------------------------------------------------
$affCompass='pasAfficherMessages';
// include_once ("./styles/upCompass.php");
// -----------------------------------------------------
// Fin session
// -----------------------------------------------------
include_once ("../_include/finSessLg.php");
include_once ("./adminInclude/admin.finSess.php");
}
else {
$confPath="../_conf";
include ("./adminInclude/redirectionAdmin.php");
}
?>