Pagination en PHP
From Tuxunix
1.<?php 2. 3./* 4. * Fonction de pagination 5. * @param char GET page 6.*/ 7.function page_select(){ 8. if(isset($_GET[page]) && !empty($_GET[page])){ 9. switch($_GET[page]){ 10. case "accueil" : 11. $page = require_once("accueil.html"); ; break; 12. case "contact" : 13. $page = require_once("contact.php"); break; 14. case "ast" : 15. $page = require_once("astuces.php"); break; 16. default : 17. $page = require_once("accueil.html"); ; break; 18. } 19. } 20. else 21. { 22. $page = require_once("accueil.html"); 23. } 24. 25. // return $page ; 26.}//End page_select 27. 28.?>
<!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"> <head> <meta name="generator" content="HTML Tidy, see www.w3.org" /> <title>TuXedo</title> <meta http-equiv="Content-Type" content= "text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="tuxedo.css" media= "screen" /> </head> <body> <div id="contents"> <fieldset class="fieldset">
<?php echo page_select(); ?>
</fieldset> </div> </body> </html>

