<?php
header("Vary: Accept");
if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml") ||
    stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")     ||
    stristr($_SERVER["HTTP_USER_AGENT"],"W3C_CSS_Validator") ||
    stristr($_SERVER["HTTP_USER_AGENT"],"WDG_Validator")) {
        $mime = "application/xhtml+xml";
        header("Content-Type: application/xhtml+xml; charset=utf-8");
}
else {
        $mime = "text/html";
        header("Content-Type: text/html; charset=utf-8");
}

//----------  variables  --------------------------------------------

$langue=$_GET['langue'];
$choix=$_GET['choix'];
$texte=$_GET['texte'];
//$ajust=$_GET['ajust'];   //pour les photos

$menu=array(
"so" => array("fr" => "sommaire","en" => "summary"),
"co" => array("fr" => "cv / coordonnées","en" => "cv / contacts"),
"mu" => array("fr" => "musique","en" => "music"),
"re" => array("fr" => "recherche","en" => "research"),
"ens" => array("fr" => "enseignement","en" => "lecturing"),
"di" => array("fr" => "diffusion","en" => "diffusion"),
"li" => array("fr" => "liens","en" => "links"),
"ir" => array("fr" => "activités pour l'IREM","en" => "IREM activities")
);
//   echo '<pre>';print_r($menu);echo '</pre>';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >

<head>
<?php
//------------------  entête  ---------------------------------------

if ($mime == "application/xhtml+xml") {
     echo "   <meta http-equiv=\"Content-Type\"
content=\"application/xhtml+xml; charset=utf-8\"/>\n";
}
else {
echo "   <meta http-equiv=\"Content-Type\" content=\"text/html;
charset=utf-8\"/>\n";
}

if (isset($choix))
   {
   echo '<title>Stéphane Vinatier (' . $menu[$choix][$langue] . ')</title>'; 
   }
elseif (isset($langue))
	{
	echo '<title>Stéphane Vinatier (' . $menu["so"][$langue] . ')</title>'; 
	}
else
	{
	echo '<title>Stéphane Vinatier (pages personnelles)</title>'; 
	}

?>

<link rel="stylesheet" media="screen" type="text/css" title="style_sv" href="style_sv.css" />   
</head>
<body>


<?php
//-----------------  titre  ------------------------------

if (isset($choix))
   {
   echo '<h1>Stéphane Vinatier (' . $menu[$choix][$langue] . ')</h1>
   ';    
   }
elseif (isset($langue))
	{
	echo '<h1>Stéphane Vinatier (' . $menu["so"][$langue] . ')</h1>'; 	
	}
else
	{
	echo '<h1>Stéphane Vinatier</h1>'; 	
	}


//--------------------------  menu  ----------------------

echo '<div id="menu">';
if (isset($choix))
   {
   echo '<table width="100%"><tr>
	<td align="right">
	<a href="index.php?langue=' . $langue . '"><img
	src="Contenus/' . $choix . '.jpg" alt="sommaire" title="sommaire" /></a></td>
	<td align="left">';
	include('Contenus/' . $langue . $choix . '.php');
	echo '</td>
	</tr></table>';       
   }
elseif (isset($langue))
   {
   echo '<table width="100%"><tr>
	<td align="right"><a href="index.php"><img
	src="Contenus/sommaire.jpg" alt="sortie" title="sortie" /></a></td>
	<td align="left">';
	include('Contenus/' . $langue . 'so.php');
	echo '</td>
	</tr></table>';       
   }
else
	{
	echo '<a href="index.php?langue=fr"><img src="Contenus/index.jpg" alt="entrée" title="entrée"/><br />[entrée]</a>'; 	
	}
echo '</div>';


//--------------------------  zone de texte  -------------------

if (isset($texte))
   {
   echo '<div id="corps">';
   include('Contenus/' . $langue . $choix . $texte . '.php');
   echo '</div>';
   }


//--------------------------  pied de page  -------------------

echo '<div id="pied_de_page">';
if (isset($langue))
       { 
       if ($choix == "li")
	  {
	  echo '<p>
	  <a href="http://www.xlim.fr">XLIM</a> - 
	  <a href="http://www.unilim.fr/">Université de Limoges</a>
	  </p>';
	  }
       }
else
	{
	echo '	<p>
	<a href="http://www.sciences.unilim.fr"><i>Faculté des Sciences et Techniques de Limoges</i></a>
	</p><p>
	<a href="http://www.xlim.fr">XLIM</a> - 
	<a href="http://www.unilim.fr/">Université de Limoges</a>
	</p><p>
	<a href="index.php?langue=fr&amp;choix=co&amp;texte=coor"><b>contact</b></a>
        </p>
<p class="petit">
	<em>dernière modification le 21 février 2023</em></p>';
	}
echo '</div>';

?>

</body>
</html>