1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Le Chêne blanc</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="styles" href="styles.css">
</head>
<body>
<div id="banniére">
</div>
<div id="menu">
<ul>
<li><a href="index.php?page=accueil">L'accueil à la ferme</a></li>
<li><a href="index.php?page=pedagogique">La ferme pédagogique</a></li>
<li><a href="index.php?page=camping">Le camping à la ferme</a></li>
<li><a href="index.php?page=produits">Nos produits</a></li>
<li><a href="index.php?page=plan">Plan du site</a></li>
<li><a href="index.php?page=contact">Nous contacter</a></li>
</ul>
</div>
<div id="corps">
<?php
$pageOK = array('accueil' => 'accueil.php',
'pedagogique' => 'ferme_peda.php', // tu répertories toutes les pages de ton site
'camping' => 'camping.php',
'produits' => 'produits.php',
'plan' => 'plan.php',
'contact' => 'contact.php');
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
if ( (isset($_GET['pages'])) && (isset($pageOK[$_GET['pages']])) ) { // ce script te sert pour la sécurité de ton site
include("pages/".$pageOK[$_GET['pages']]); // Nous appelons le contenu central de la page
} else {
include('pages/accueil.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
</div>
<div id="pied">
</div>
</body>
</html> |