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

42 lines
1.5 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
if ($admMsg!='' && $admMsg!=' ') {
$admMsg=rtrim($admMsg);
// -----------------------------------------------------
// il y a un admMsg avec </span> introuvable
// -----------------------------------------------------
$admMsg = str_replace('</span>', '', $admMsg);
// -----------------------------------------------------
// supprimer le premier <br>
// -----------------------------------------------------
$admMsg = preg_replace('/^<br\s*\/?>/i', '', $admMsg);
// -----------------------------------------------------
// la class
// -----------------------------------------------------
if ($admMsgClass=='ko' && $admMsg!='') {echo '<div class="admMsgKo" id="admMsgKo" >⚠️ '; }
elseif ($admMsgClass=='ok' && $admMsg!='') {echo '<div class="admMsgOk" id="admMsgOk" >✅ '; }
else {echo '<div class="admMsgOk" id="admMsgOk" > '; }
// -----------------------------------------------------
// Le message admin
// -----------------------------------------------------
echo '' .($admMsg).'';
// echo 'len:' .strlen($admMsg);
echo '</div>';
}
// else {echo 'EMPTY='.$admMsg;}
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (!empty($debugMsg)) {
// supprimer le premier <br>
$debugMsg = preg_replace('/^<br\s*\/?>/i', '', $debugMsg);
echo '<div class="debugStyle" >';
echo $debugMsg;
echo '</div>';
}
?>