// Top of page
$orderText['FR'] = 'Commander';
$orderText['EN'] = 'Order';
$orderText['ES'] = 'Encargar';
$orderText['CA'] = 'Encarregar';
$refText['FR'] = 'Réf:';
$refText['EN'] = 'Ref:';
$refText['ES'] = 'Ref:';
$refText['CA'] = 'Ref:';
$commentText['FR'] = 'Votre avis m\'intéresse';
$commentText['EN'] = 'Any comment?';
$commentText['ES'] = 'Tu opinión me interesa';
$commentText['CA'] = "La teva opinió m'interessa";
?>
|
Laia Calatrava
|
|
///////////////////////////////////////
// Les drapeaux pour changer de langue
if ($showflags) {
echo ' ';
foreach ($langs as $l) {
if ($l != $lang)
echo ' '
.' ';
else
echo ' ';
}
echo ' ';
}
?>
include_once($rootpath.'common/config.php');
// Menus
// Get page count
$pagecount = 0;
foreach ($menus as $menu) {
if (array_key_exists($lang, $menu))
$pagecount++;
}
if ($pagecount > 0) {
$menuwidth = 70 / $pagecount;
foreach ($menus as $menu) {
if (array_key_exists($lang, $menu)) {
if ($pagefile == $menu['URL'])
$menutext = ''.$menu[$lang].'';
else
$menutext = ''.$menu[$lang].'';
// Menu with submenus for galleries
if ($menu['URL'] == 'galleries.php') {
echo ' | ';
echo '';
echo ' ';
if (strpos($pages['dir'][$lang].$pages[$menu['URL']][$lang]['URL'], '?') === false ) {
echo ' '.$menutext.' >>';
echo '';
echo ' ';
echo ' ';
}
else // Normal menu (not Galleries)
echo ' | '.$menutext.'';
echo ' | ';
}
}
}
?>
|
|
function borderImgTag($imgTag) {
global $rootpath, $pages;
return ''
.''
.' '
.' '.$imgTag.' | '
.' | '
.' '
.' '
.' | '
.' | '
.' '
.' | ';
}
?>
|
// Bottom of page
if ($isgallery) {
////////////
// Galleries
?>
$counter = 0;
foreach ($galleries[$gallery]->photos as $photo) {
if ($photo->display) echo borderImgTag('').' ';
$counter++;
}
?>
} else {
//////////////
// Page normale
echo ''
.'';
/////////////////////////////////
// Contenu spécifique de la page
if ($pagefile != '') {
// Ouvrir la page originale (template de la partie en bas à droite)
$filename = '_'.$pages[$pagefile][$lang]['URL'];
if (!file_exists($filename))
$filename = $rootpath.'pages/_'.$pagefile;
$filename = str_replace('.php', $lang.'.php', $filename);
$hf = fopen($filename, 'r');
if (!($hf === false)) {
$pagecontent = fread ($hf, filesize ($filename));
fclose($hf);
// Préparer un fichier temporaire
$tempfile = rand(0, 1000000).'.php';
if (file_exists($tempfile))
delete($tempfile);
// Remplacer le contenu actif par la traduction
$count = 60;
while ($count > 0) {
$strstart = strpos($pagecontent, '-'.$count.'--');
if ($strstart === false) {
$count--;
continue;
} else {
$strend = strpos($pagecontent, '--'.$count.'-');
if (!($strend === false))
$pagecontent = substr($pagecontent, 0, $strstart).$texts[$pagefile][$lang][$count].substr($pagecontent, $strend + 4 + floor(log10($count)), 9999999);
$count--;
}
}
$count = 50;
while ($count > 0) {
$strstart = strpos($pagecontent, $count.'---');
if ($strstart === false) {
$count--;
continue;
} else {
$strend = strpos($pagecontent, '---'.$count);
if (!($strend === false))
$pagecontent = substr($pagecontent, 0, $strstart).$texts[$pagefile][$lang][$count].substr($pagecontent, $strend + 4 + floor(log10($count)), 9999999);
$count--;
}
}
// Save to a temp file and include
$hi = fopen($tempfile, 'w');
fwrite($hi, $pagecontent);
fclose($hi);
include($tempfile);
unlink($tempfile);
}
}
echo ' | ';
}
// End of Bottom of page
?>
|