alpha_full/_include/req/08-init.menuMsgList.php
2026-04-06 22:58:51 +02:00

74 lines
2.9 KiB
PHP
Executable File

<?php
if (!isset($refresh)) $refresh='N';
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1, ['refresh' => $refresh], '08-init.catMsgList.php'); }
if (empty($_SESSION['menuDesc']) or empty($_SESSION['menuMsg']) or empty($_SESSION['menuLien']) or empty($_SESSION['menuAlt'])
or empty($_SESSION['menuImgPt']) or empty($_SESSION['menuImgPt']) or empty($_SESSION['menuNum']) or ($refresh==='Oui')) {
$i=0;
$menuID=array();
$menuNum=array();
$menuDesc=array();
$menuAfficher=array();
$menuMsg=array();
$menuTitle=array();
$menuAlt=array();
$menuImgPt=array();
$menuLien=array();
$menuClasse=array();
$menuStyle=array();
$reqSelect="SELECT * FROM `languenav` WHERE variable ='menu' order by `num`;";
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1, ['reqSelect' => $reqSelect], '');}
$resConn=$idPdo->query($reqSelect);
// PDO
// $resConn=$id->reqSelect;
if ($resConn) {
while ($tabResult = $resConn->fetch(PDO::FETCH_ASSOC)) {
$menuID[$i]=$tabResult['id'];
$menuNum[$i]=$tabResult['num'];
$menuDesc[$i]=$tabResult['description'];
$menuAfficher[$i]=$tabResult['afficher'];
$menuMsg[$i]=$tabResult[$lg];
$menuTitle[$i]= $tabResult['title' .$lg];
$menuAlt[$i]= $tabResult['alt' .$lg];
$menuImgPt[$i]=$tabResult['imgPt' .$lg];
$menuLien[$i]=$tabResult['lien'];
$menuClasse[$i]=$tabResult['class'];
$menuStyle[$i]=$tabResult['style'];
if (isset($debug[10]) && $debug[10] == '1' ) {
$debugMsg .= monDebug (1,['num' => $i, 'menuID' => $menuID[$i], 'menuDesc' => $menuDesc[$i] , 'menuNum' => $menuNum[$i] , 'menuAfficher' => $menuAfficher[$i] ],'');
}
$i++;
}
$_SESSION['menuID']= $menuID;
$_SESSION['menuNum']= $menuNum;
$_SESSION['menuDesc']= $menuDesc;
$_SESSION['menuAfficher']= $menuAfficher;
$_SESSION['menuMsg']= $menuMsg;
$_SESSION['menuTitle']= $menuTitle;
$_SESSION['menuAlt']= $menuAlt;
$_SESSION['menuImgPt']= $menuImgPt;
$_SESSION['menuLien']= $menuLien;
$_SESSION['menuClasse']= $menuClasse;
$_SESSION['menuStyle']= $menuStyle;
$tabResult='';
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1,['session re-chargée' => 'Oui'],'');}
}
else {
echo "&#160;Impossible de récupérer les données de la table";
}
}
else {
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1,['session déjà chargée' => 'Oui'],'');}
$menuID=$_SESSION['menuID'];
$menuNum=$_SESSION['menuNum'];
$menuDesc=$_SESSION['menuDesc'];
$menuAfficher=$_SESSION['menuAfficher'];
$menuMsg=$_SESSION['menuMsg'];
$menuTitle=$_SESSION['menuTitle'];
$menuAlt=$_SESSION['menuAlt'];
$menuImgPt=$_SESSION['menuImgPt'];
$menuLien=$_SESSION['menuLien'];
$menuClasse=$_SESSION['menuClasse'];
$menuStyle=$_SESSION['menuStyle'];
}
?>