AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 52.15.190.187


Current Path : /var/www/lhjmq-records.qc.ca/public_html/xsl/records/booknew/includes/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/xsl/records/booknew/includes/common.php

<?php
session_start();

if(isSet($_GET['lang']))
{
$lang = $_GET['lang'];

// register the session and set the cookie
$_SESSION['lang'] = $lang;

setcookie("lang", $lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['lang']))
{
$lang = $_SESSION['lang'];
}
else if(isSet($_COOKIE['lang']))
{
$lang = $_COOKIE['lang'];
}
else
{
$lang = 'fr';
}

switch ($lang) {
  case 'fr': 
  
  $lang_file = 'lang.fr.php';
  $switch_lang = 'en';
  break;

  case 'en':
  
  $lang_file = 'lang.en.php';
  $switch_lang = 'fr';
  break;

  default:
  $lang_file = 'lang.fr.php';
  $switch_lang = 'en';

}
//var_dump($lang);
include_once 'languages/'.$lang_file;
?>