on a fini, sinon $trouveLG=true ==> on doit faire une langue // $lg est la langue initiale sur laquelle il faut revenir $trouveLG=false; if (empty($tableLangueCode) or $refresh=='Oui') { include ($includePath. "/req/03-init.langueActives.php"); } else { if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['Nombre de langues' => $_SESSION['nbLgActives'], 'lg encours' => $lg,'_SESSION[lgCouranteCode] en cours' => $_SESSION['lgCouranteCode']], 'changementLg.php'); } } // if (!isset($compteur)) $compteur=0; if (isset($_SESSION['lgFait'])) $lgFait=$_SESSION['lgFait']; else {$lgFait=''; $_SESSION['lgFait']='';} if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (4, ['lgFait' => $lgFait ], '');} // Mettre celle en cours que l'on vient de faire donc, en done for ($i=0; $i<($_SESSION['nbLgActives']); $i++) { if ($tableLangueCode[$i]==$_SESSION['lgCouranteCode'] ) { $lgFait[$i]=1; // $compteur=$compteur + 1; if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['Langue encours validée' => $tableLangueCode[$i] ], '');} } } for ($i=0; $i<($_SESSION['nbLgActives']); $i++) { // la prochaine trouvée pas faite if ($trouveLG==false) { //init des autres au cas ou if (empty($lgFait[$i])) {$lgFait[$i]=0;} // ----------------------------------------------------- // mettre la nouvelle langue sauf si deja fait // ----------------------------------------------------- if ($lgFait[$i]!=1) { $lg=$tableLangueCode[$i]; $_SESSION['lg']=$lg; $lgCouranteCode=$tableLangueCode[$i]; $_SESSION['lgCouranteCode']=$lgCouranteCode; $_SESSION['lgCouranteLibelle']=$tableLangueMsg[$i]; $drapeau=str_replace("./","../", $tableLangueImgPt[$i]); //echo ''; $trouveLG=true; if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['SESSION[lgCouranteCode] passé à' => $tableLangueCode[$i],'_SESSION[lgCouranteLibelle]' => $_SESSION['lgCouranteLibelle'] ], ''); } } else { if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['
Cette langue a déjà été faite' => $tableLangueCode[$i]], '');} } } //trouve Lg = false else { if (!isset($lgFait[$i])) {$lgFait[$i]=0;} if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['Langue a faire' => $tableLangueCode[$i]], ''); } } } // ----------------------------------------------------- // si on a fini // ----------------------------------------------------- if ($trouveLG==false) { $lgFait=array(); $FIN='OUI'; //$propager=2; if (isset($debug[5]) && $debug[5] == '1' ) { $debugMsg .= monDebug (5, ['Fin changement langue -->' => ''], '');} // on repart sur français $lg='FRA'; $_SESSION['lgCouranteCode']=$lg; $_SESSION['lg']=$lg; } $_SESSION['lgFait']=$lgFait; if (isset($debug[5]) && $debug[5] == '1' ) { $admMsg .= monDebug(5, ['lg -->' => $lg, 'SESSION[lgCouranteCode] ' => $_SESSION['lgCouranteCode'], 'trouveLG finale' => $trouveLG ], ''); } ?>