//require $_SERVER['DOCUMENT_ROOT'].'/egbx/www/ini.php'; require '../egbx/www/ini.php'; // ------------------------------------------- // choix automatique de la langue $default_language = 'fr'; $accept_lg = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); if($accept_lg == 'es') { $accept_lg = 'sp'; } $languages = array(); $sql = "SELECT * FROM `Multisite_Language` WHERE `valid`='1' ORDER BY `label` ASC"; if ($result = mysql_query($sql)) { while ($myrow = mysql_fetch_array($result)) { array_push( $languages, $myrow['label']); } } if (in_array($accept_lg,$languages)) { $lg_request = $accept_lg; } else { $lg_request = $default_language; } // ------------------------------------------- ?>