I use it on my website too, I have it like this
I hope it's secure else tell me how to make it better
code:
function pagina ($page){
$pad = "paginas/".$page.".php";
if(!file_exists($pad))
{
include("paginas/notfound.php");
}
else
{
include($pad);
}
}
if(!isset($_GET["pagina"]) OR $_GET["pagina"] == "")
{
pagina("home");
}
else
{
pagina($_GET["pagina"]);
}
Edit: Automatic coloring would be nice