SI UNE ERREUR S\'EST INSÉRÉE DANS LE CODE OU GÉNÈRE UN BUG,
MERCI DE M\'EN INFORMER Créer un fichier nommé style.css et y mettre le code ci-dessous
ensuite le placer dans un dossier nommé \'css\':
- Code:
-
#navcontainer ul
{
padding-left : 0;
margin-left : 0;
color : White;
float : left;
width : 440px;
font-size : 11pt;
font-family : arial, helvetica, sans-serif;
}
#navcontainer ul li
{
display : inline;
}
#navcontainer ul li a
{
padding : 0.3em 1em;
background : #036;
color : White;
text-decoration : none;
float : left;
border-right : solid #FFFFFF 1px;
}
#navcontainer ul li a:hover
{
background : #369;
color : #FFFFFF;
}
Créer un fichier nommé index.php et y mettre le code ci-dessous les fonctions require_once peuvent être intégrés dans des tableaux div ou table :
-tableaux concerne les liens
-menu concerne l'affichage du menu
-inclusion concerne le corps du site lancé par les liens
- Code:
-
require_once(\"tableaux.php\");
require_once(\'menu.php\');
require_once(\"inclusion.php\");
Créer un fichier nommé menu.php et y mettre le code ci-dessous :
- Code:
-
/**
* @author Yann-Guilhem Guichard
* @copyright 2009
*/
echo'<div id="navcontainer" class="navcontainer"><ul id="navlist">';
for($ml=0;$ml<=count($lien)-1;$ml++)
{
* echo''.$lien[$ml].'
';
}
echo'</ul></div>';
Créer un fichier nommé tableaux.php et y mettre le code ci-dessous :
- Code:
-
/**
* @author Yann-Guilhem Guichard
* @copyright 2009
*/
/**
* Tableau du menu
***********************************************/
$lien = array(\'Accueil\',\'Liens\',\'Contact\');
$href = array();
for($l=0;$l<=count($lien)-1;$l++)
{
array_push($href,\"?choix=\".$l);
}
Créer un fichier nommé inclusion.php et y mettre le code ci-dessous :
- Code:
-
/**
* @author Yann-Guilhem Guichard
* @copyright 2009
*/
$sw = null;
if( isset($_GET[\'choix\']) == null ):
$choix = \"0\";
$_SESSION[\'choix\'] = $choix;
else:
$choix = $_GET[\'choix\'];
$_SESSION[\'choix\'] = $choix;
endif;
switch($choix):
case \'\'.$sw++.\'\': require(\"accueil\".EXT); // 0
break;
default: require(\"accueil\".EXT);
break;
endswitch;