www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 995482dff10b638e5eb138ab4900b016e02a26d5
parent 7c4fef596fb2684ab5182ccefb48539477df031a
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Sun,  4 Jul 2010 22:14:27 +0200

Ajout d'un en-tête et d'un pied à la page générée.

Diffstat:
M__cms__/cms.php | 27+++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/__cms__/cms.php b/__cms__/cms.php @@ -25,8 +25,31 @@ class CMS { public static function affiche($uri) { $p = Page::_new(CMS::uri_vers_chemin($uri)); - echo "<h1>Test</h1>"; - echo $p->vue(); + echo CMS::en_tete($uri) // TODO + . $p->vue() + . CMS::pied(); + } + + public static function en_tete($titre) { + return +'<!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="fr" lang="fr"> + <head> + <title>' . $titre . '</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Language" content="fr" /> + </head> + <body> + <h1>' . $titre . '</h1>'; +// <meta name="keywords" lang="fr" content="motcle1,mocle2" /> +// <meta name="description" content="Description de ma page web." /> +// <link href="style.css" rel="stylesheet" type="text/css" /> + } + + public static function pied() { + return +' </body> +</html>'; } } ?> \ No newline at end of file