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

72 lines
2.5 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
if (!isset( $_SESSION )) {session_start();}
// -----------------------------------------------------
// HTML
// -----------------------------------------------------
echo '<!DOCTYPE html>';
echo '<html>';
// -----------------------------------------------------
// Forcer l'admin a toujours aller sur wbadm
// -----------------------------------------------------
if (empty($_SESSION['server'])) include ("../_include/dataBaseConnect.php");
if (isset($_SESSION['affAdmin'])) {$affAdmin=$_SESSION['affAdmin'];}
if (empty($affAdmin)) $affAdmin=2;
echo '<head>';
if (isset($_SESSION['server'])) {
$url='gestionnaire-' .$affAdmin;
}
else $url='gestionnaire-' .$affAdmin;
if (isset($debug[1]) && $debug[1] == '1') {
echo '<br>SESSION[isAdmin] dans redirectionAdmin.php => '; if (isset($_SESSION['isAdmin'])) echo $_SESSION['isAdmin'];
echo '<br>ID SESSION ='.session_id();
echo '<br>session_name='.session_name() ;
echo '<br>url=' .$url;
echo '<br><a href="'.$url.'">admin</a>';
}
else {
if (isset($_SESSION['server'])) {
echo '<meta http-equiv="refresh" content="1; ' .$url. '" target="parent" />';
}
else {
echo '<meta http-equiv="refresh" content="1; ' .$url. '" target="parent" >';
}
}
echo '<title>Redirection</title>';
echo '</head>';
echo '<body class="non" bgcolor="white" >';
echo '<br>';
echo '<table class="pageNavigation" align="center" >';
echo '<tr><td align="center"><br>';
$trouve=false;
if ($trouve==false && file_exists ("../adminInclude/designAdmin/logo.png") ) {
$trouve=true;
echo '<img src="../adminInclude/designAdmin/logo.png" border="0" />';
}
if ($trouve==false && file_exists ("./adminInclude/designAdmin/logo.png") ) {
$trouve=true;
echo '<img src="./adminInclude/designAdmin/logo.png" border="0" />';
}
if ($trouve==false && file_exists ("./adminInclude/designAdmin/logo.png") ) {
$trouve=true;
echo '<img src="./adminInclude/designAdmin/logo.png" border="0" />';
}
echo '<br></td></tr>';
echo '<tr align="center" >';
echo '<td>';
// echo 'test=' .$test. ' session serv= ' .$_SESSION['server']. '
echo '<font color="green"> --> Redirection vers la page d\'authentification </font>';
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .= monDebug (1,['Fichier appelant' => basename(__FILE__) ],'');
echo '<br><br><br>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</body>';
echo '</html>';
?>